/* =========================
   [CHRONOSTICKETS][THEME][TOKENS]
   ========================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600&display=swap');

:root{
  --ct-bg: #f6f7fb;
  --ct-card: #ffffff;
  --ct-text: #0b0f19;
  --ct-muted: #667085;

  --ct-blue: #2563eb;   /* TICKETS */
  --ct-red:  #ef4444;   /* detalles */
  --ct-line: rgba(15, 23, 42, .10);

  --ct-radius: 16px;
  --ct-shadow: 0 10px 30px rgba(2,6,23,.08);
}

*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--ct-bg);
  color: var(--ct-text);
}

.container{
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

/* =========================
   [CHRONOSTICKETS][TOPBAR]
   ========================= */

.topbar{
  position: sticky;
  top:0;
  z-index:10;
  background: rgba(246,247,251,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ct-line);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
  position: relative; /* para dropdown en mobile */
}

/* =========================
   [CHRONOSTICKETS][BRAND]
   - CHRONOS negro, TICKETS azul
   ========================= */

.brand{
  font-size: 22px;
  letter-spacing: .5px;
  display:flex;
  gap: 0;               /* palabras juntas */
  align-items: baseline;
}

.brand-chronos{
  color: #0F172A; /* CHRONOS */
  font-weight: 600;
}

.brand-tickets{
  color: #2563eb; /* TICKETS */
  font-weight: 600;
}

/* =========================
   [CHRONOSTICKETS][NAV]
   ========================= */

.nav{
  display:flex;
  gap: 10px;
  align-items:center;
}

.nav a{
  text-decoration:none;
  color: var(--ct-text);
  opacity:.92;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover{
  opacity: 1;
  background: rgba(37, 99, 235, .08);
  border-color: rgba(37,99,235,.12);
}

/* =========================
   [CHRONOSTICKETS][NAV][ADMIN_DASH_STYLE]
   ========================= */
.topbar[data-ct-area="admin"] .nav a{
  background: #fff;
  border-color: var(--ct-line);
  box-shadow: 0 6px 16px rgba(2,6,23,.04);
}

.topbar[data-ct-area="admin"] .nav a:hover{
  background: rgba(37, 99, 235, .10);
  border-color: rgba(37,99,235,.18);
}

/* =========================
   [CHRONOSTICKETS][BUTTONS]
   ========================= */

.btn{
  border:0;
  border-radius: 999px;
  padding: 10px 14px;
  font-family: inherit;
  cursor:pointer;
  white-space: nowrap;
}

.btn-primary{
  background: var(--ct-blue);
  color:#fff;
}

.btn-outline{
  background: transparent;
  border: 1px solid var(--ct-line);
  color: var(--ct-text);
}

/* =========================
   [CHRONOSTICKETS][HERO/CARDS]
   ========================= */

.hero{
  padding: 26px 0 10px;
}

.hero-card{
  background: linear-gradient(180deg, #ffffff, #f3f6ff);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-shadow);
  padding: 18px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ct-line);
  color: var(--ct-muted);
  background:#fff;
}

.search-row{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.input{
  flex: 1 1 260px;
  background:#fff;
  border: 1px solid var(--ct-line);
  border-radius: 12px;
  padding: 12px 12px;
  font-family: inherit;
  outline:none;
}

.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 18px 0 40px;
}

@media (max-width: 1024px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: var(--ct-card);
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
}

.card-img{
  height: 140px;
  background: #e8edff;
}

.card-body{
  padding: 12px 12px 14px;
}

.price{
  color: var(--ct-red);
  font-weight: 600;
}

/* =========================
   [CHRONOSTICKETS][NAV][RESPONSIVE]
   - Un solo sistema (sin duplicados)
   ========================= */

.nav-toggle{
  display:none;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius: 999px;
  border: 1px solid var(--ct-line);
  background:#fff;
  font-family: inherit;
  cursor:pointer;
  white-space: nowrap;
}

.nav-toggle .bars{
  width: 18px;
  height: 12px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle .bars span{
  display:block;
  height:2px;
  border-radius: 2px;
  background: var(--ct-text);
}

@media (max-width: 720px){
  .brand{ font-size: 18px; }

  .nav-toggle{ display:inline-flex; }

  /* NAV como dropdown */
  .nav{
    display:none;
    position:absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(320px, calc(100vw - 32px));
    flex-direction: column;
    gap: 6px;
    background:#fff;
    border:1px solid var(--ct-line);
    border-radius: 14px;
    box-shadow: var(--ct-shadow);
    padding: 10px;
    z-index: 50;
  }

  .nav.is-open{ display:flex; }

  .nav a{
    display:block;
    padding: 12px 10px;
    border-radius: 12px;
  }

  .nav a:hover{
    background: rgba(37, 99, 235, .08);
  }
}

/* =========================
   [CHRONOSTICKETS][TICKETS_UI][SUCCESS]
   ========================= */

.ticket-wrap{
  display:grid;
  gap:14px;
  margin-top:14px;
}

.ticket-card{
  border:1px solid var(--ct-line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  box-shadow: var(--ct-shadow);
}

.ticket-banner{
  height:250px;
  background: linear-gradient(135deg, rgba(37,99,235,.18), rgba(15,23,42,.12));
  border-bottom:1px solid var(--ct-line);
  position:relative;
}

.ticket-banner .badge{
  position:absolute;
  left:14px;
  bottom:12px;
}

.ticket-body{
  padding:14px;
}

.ticket-title{
  text-align:center;
  margin:6px 0 0;
  font-size:20px;
}

.ticket-sub{
  text-align:center;
  margin:8px 0 0;
  color: var(--ct-muted);
  font-size:14px;
}

.ticket-grid{
  margin-top:14px;
  display:grid;
  gap:12px;
}

@media (min-width: 760px){
  .ticket-grid{
    grid-template-columns: 1fr 220px;
    align-items:start;
  }
}

.ticket-info{
  border:1px solid var(--ct-line);
  border-radius:14px;
  padding:12px;
  background: rgba(15,23,42,.02);
}

.kv{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-bottom:1px dashed rgba(15,23,42,.12);
  font-size:14px;
}
.kv:last-child{ border-bottom:none; }
.kv span:first-child{ color: var(--ct-muted); }
.kv span:last-child{ font-weight:600; }

.qr-box{
  border:1px solid var(--ct-line);
  border-radius:14px;
  padding:12px;
  text-align:center;
  background:#fff;
}

.qr-box img{
  width: 180px;
  height: 180px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.08);
}

.ticket-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}

/* =========================
   [CHRONOSTICKETS][PRINT][PRO]
   ========================= */

@media print {
  .topbar, header, nav, .nav,
  .ticket-actions,
  a.btn, button.btn,
  .print-hide {
    display: none !important;
  }

  body { background:#fff !important; }
  .hero-card, .ticket-card, .ticket-info, .qr-box {
    box-shadow:none !important;
    background:#fff !important;
  }

  @page { margin: 10mm; }

  .ticket-card { break-inside: avoid; page-break-inside: avoid; }

  .ticket-grid{
    display: grid !important;
    grid-template-columns: 1fr 220px !important;
    gap: 12px !important;
    align-items: start !important;
  }

  .qr-box img{
    width: 200px !important;
    height: 200px !important;
  }

  .ticket-banner { height: 55px !important; }

  .ticket-print-page { break-after: page; page-break-after: always; }
}
/* =========================
   [CHRONOSTICKETS][ADMIN][DASH_LAYOUT]
   ========================= */
.admin-top{
  position: sticky;
  top:0;
  z-index: 100;
  background: rgba(246,247,251,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ct-line);
}
.admin-top-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 0;
  gap:12px;
}
.admin-brand{ display:flex; align-items:center; gap:10px; }
.admin-pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--ct-line);
  background:#fff;
  color:var(--ct-muted);
  font-weight:700;
}
.admin-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.admin-shell{
  display:grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 60px;
}
.admin-side{
  position: sticky;
  top: 66px;
  align-self: start;
}
.admin-main{ min-width: 0; }

.admin-nav{
  background:#fff;
  border:1px solid var(--ct-line);
  border-radius:16px;
  box-shadow: var(--ct-shadow);
  padding:10px;
  display:grid;
  gap:6px;
}
.admin-nav a{
  text-decoration:none;
  color: var(--ct-text);
  padding: 12px 12px;
  border-radius: 12px;
  font-weight:600;
}
.admin-nav a:hover{
  background: rgba(37, 99, 235, .08);
}

@media (max-width: 920px){
  .admin-shell{ grid-template-columns: 1fr; }
  .admin-side{ position: relative; top:auto; }
  .admin-actions{ justify-content:flex-end; }
}
