/* ═══════════════════════════════════════════════════════════════
   TICKETX ADMIN — DESIGN SYSTEM
   Paleta: #F5FF00 · #FF006E · #5A00FF · #0D0D1F
   Tipografía: Syne (display) + DM Sans (body)
═══════════════════════════════════════════════════════════════ */

:root {
  --yellow:   #F5FF00;
  --pink:     #FF006E;
  --purple:   #5A00FF;
  --dark:     #0D0D1F;
  --bg:       #07071a;
  --surface:  #0e0e28;
  --surface2: #151530;
  --surface3: #1c1c3a;
  --border:   rgba(90,0,255,0.18);
  --border2:  rgba(90,0,255,0.32);
  --text:     #e8e8ff;
  --text-dim: #6b6b9a;
  --accent:   #5A00FF;
  --radius:   12px;
  --radius-sm:8px;
  --shadow:   0 4px 32px rgba(0,0,0,0.6);
  --glow-purple: 0 0 20px rgba(90,0,255,0.25);
  --glow-yellow: 0 0 20px rgba(245,255,0,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
.app-body { display: flex; min-height: 100vh; }

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: 240px; min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; z-index: 100;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  font-size: 24px; color: var(--yellow); line-height: 1; flex-shrink: 0;
  text-shadow: 0 0 12px rgba(245,255,0,0.5);
}
.brand-name {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 15px;
  letter-spacing: .14em; color: var(--text);
}
.brand-sub {
  font-size: 10px; color: var(--text-dim); letter-spacing: .07em;
  text-transform: uppercase; margin-top: 2px;
}

.sidebar-nav {
  flex: 1; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); text-decoration: none;
  font-size: 13px; font-weight: 400;
  transition: all .2s;
}
.nav-item:hover {
  background: rgba(90,0,255,0.12);
  color: var(--text);
}
.nav-item.active {
  background: rgba(90,0,255,0.2);
  color: var(--yellow);
  font-weight: 600;
  border-left: 2px solid var(--yellow);
  padding-left: 10px;
  box-shadow: inset 0 0 20px rgba(245,255,0,0.04);
}
.nav-icon { font-size: 15px; width: 20px; text-align: center; }

.nav-separator {
  font-size: 9px; letter-spacing: .14em; color: var(--text-dim);
  padding: 12px 12px 4px; text-transform: uppercase; opacity: .6;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-avatar-img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--purple); flex-shrink: 0;
}
.user-email {
  font-size: 12px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role { font-size: 10px; color: var(--text-dim); }
.logout-btn {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
  font-size: 14px; transition: all .2s; flex-shrink: 0;
}
.logout-btn:hover { border-color: var(--pink); color: var(--pink); }

/* ── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
  margin-left: 240px; flex: 1; padding: 32px 36px;
  min-height: 100vh; background: var(--bg);
}

/* ── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.page-title {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 28px;
  color: var(--text); letter-spacing: -.02em;
}
.page-desc  { color: var(--text-dim); font-size: 14px; margin-top: 4px; }
.page-date  { font-size: 13px; color: var(--text-dim); margin-top: 8px; text-transform: capitalize; }

.back-link { font-size: 13px; color: var(--text-dim); text-decoration: none; display: block; margin-bottom: 8px; }
.back-link:hover { color: var(--yellow); }

/* ── KPI CARDS ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.kpi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  position: relative; overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--purple), transparent);
  opacity: 0; transition: opacity .2s;
}
.kpi-card:hover { transform: translateY(-2px); border-color: var(--border2); box-shadow: var(--glow-purple); }
.kpi-card:hover::before { opacity: 1; }

.kpi-primary { border-left: 2px solid var(--yellow); }
.kpi-primary::before { background: linear-gradient(90deg, var(--yellow), transparent) !important; opacity: 1 !important; }
.kpi-accent  { border-left: 2px solid var(--pink); }
.kpi-accent::before  { background: linear-gradient(90deg, var(--pink), transparent) !important; opacity: 1 !important; }

.kpi-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.kpi-value { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 26px; color: var(--text); }
.kpi-primary .kpi-value { color: var(--yellow); text-shadow: var(--glow-yellow); }
.kpi-accent  .kpi-value { color: var(--pink); }
.kpi-sub { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

/* ── DASHBOARD GRID ─────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }
@media(max-width:1100px) { .dashboard-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card-header { margin-bottom: 20px; }
.card-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; color: var(--text);
}
.chart-card .chart-wrap { height: 280px; }

.top-events { display: flex; flex-direction: column; gap: 12px; }
.top-event-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: 8px; background: var(--surface2);
  transition: background .2s;
}
.top-event-row:hover { background: var(--surface3); }
.rank-badge {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.event-info { flex: 1; min-width: 0; }
.event-name { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.event-revenue {
  font-family: 'Syne', sans-serif; font-weight: 600; font-size: 13px;
  color: var(--yellow); flex-shrink: 0;
}
.empty-text { color: var(--text-dim); font-size: 13px; }

/* ── EVENTS GRID ────────────────────────────────────────────── */
.events-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 32px;
}
.event-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(90,0,255,.5);
  box-shadow: var(--glow-purple);
}
.event-card.inactive { opacity: .55; }

.event-poster { position: relative; height: 180px; background: var(--surface2); overflow: hidden; }
.event-poster img { width: 100%; height: 100%; object-fit: cover; }
.poster-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; color: var(--text-dim); }

.event-type-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(13,13,31,.85); backdrop-filter: blur(4px);
  color: var(--text); font-size: 11px; padding: 3px 8px;
  border-radius: 20px; font-weight: 500; border: 1px solid var(--border);
}
.event-status {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 600;
}
.status-active   { background: rgba(245,255,0,.15); color: var(--yellow); border: 1px solid rgba(245,255,0,.3); }
.status-inactive { background: rgba(107,107,154,.1); color: var(--text-dim); }

.event-body  { padding: 16px; flex: 1; }
.event-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px;
  color: var(--text); margin-bottom: 6px;
}
.event-venue, .event-duration { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.event-desc  { font-size: 13px; color: var(--text-dim); margin-top: 8px; line-height: 1.5; }
.event-actions { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-pill {
  padding: 6px 16px; border-radius: 20px; font-size: 13px;
  color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--border); transition: all .2s;
}
.filter-pill:hover  { border-color: var(--purple); color: var(--text); }
.filter-pill.active {
  background: var(--purple); color: #fff; border-color: var(--purple);
  box-shadow: var(--glow-purple);
}

/* ── TABLE ──────────────────────────────────────────────────── */
.table-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--surface2); padding: 12px 16px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-dim); text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px; border-bottom: 1px solid rgba(90,0,255,0.08);
  font-size: 14px; vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(90,0,255,0.06); }

.font-medium { font-weight: 500; color: var(--text); }
.text-muted  { color: var(--text-dim); font-size: 13px; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-active   { background: rgba(245,255,0,.12); color: var(--yellow); border: 1px solid rgba(245,255,0,.25); }
.badge-inactive { background: rgba(255,0,110,.1);  color: #ff6b9d; border: 1px solid rgba(255,0,110,.2); }
.badge-soldout  { background: rgba(90,0,255,.15);  color: #a78bfa; border: 1px solid rgba(90,0,255,.3); }
.badge-neutral  { background: rgba(107,107,154,.1); color: var(--text-dim); }
.badge-role     { background: rgba(90,0,255,.15); color: #a78bfa; }
.badge-action   { background: rgba(255,0,110,.1); color: #ff6b9d; font-size: 10px; }

.seat-counter { font-family: 'Syne', sans-serif; font-weight: 600; font-size: 13px; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  background: var(--yellow); color: var(--dark); border: none;
  padding: 10px 22px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block;
  transition: all .2s; font-family: 'Syne', sans-serif; letter-spacing: .03em;
}
.btn-primary:hover {
  background: #fff; transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245,255,0,.4);
}

.btn-secondary {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); padding: 10px 22px;
  border-radius: var(--radius-sm); font-size: 14px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: all .2s;
  font-family: 'DM Sans', sans-serif;
}
.btn-secondary:hover { border-color: var(--purple); color: var(--text); }

.btn-outline {
  background: transparent; color: var(--purple);
  border: 1px solid var(--purple); padding: 8px 18px;
  border-radius: var(--radius-sm); font-size: 13px; cursor: pointer;
  transition: all .2s;
}
.btn-outline:hover { background: rgba(90,0,255,.12); }

.btn-sm {
  padding: 5px 12px; border-radius: 6px; font-size: 12px;
  font-weight: 500; cursor: pointer; border: none; transition: all .2s;
}
.btn-edit {
  background: rgba(90,0,255,.12); color: #a78bfa;
  text-decoration: none; display: inline-block;
  border: 1px solid rgba(90,0,255,.25);
}
.btn-edit:hover { background: rgba(90,0,255,.22); }
.btn-delete { background: rgba(255,0,110,.1); color: #ff6b9d; border: 1px solid rgba(255,0,110,.2); }
.btn-delete:hover { background: rgba(255,0,110,.2); }

/* Table action buttons */
.btn-table {
  padding: .3rem .7rem; font-size: .75rem; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; transition: all .15s;
}
.btn-table:hover   { background: rgba(90,0,255,.1); border-color: var(--purple); }
.btn-danger        { border-color: rgba(255,0,110,.3); color: #ff6b9d; }
.btn-danger:hover  { background: rgba(255,0,110,.1); border-color: var(--pink); }
.btn-success       { border-color: rgba(245,255,0,.25); color: var(--yellow); }
.btn-success:hover { background: rgba(245,255,0,.08); }

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; max-width: 760px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.span-2 { grid-column: span 2; }

.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 0; }
.field-label {
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .09em;
}
.field-input {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-family: 'DM Sans', sans-serif; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field-input:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(90,0,255,.15);
}
.field-input::placeholder { color: var(--text-dim); }
.field-input option { background: var(--surface2); }
.field-textarea { min-height: 100px; resize: vertical; }
.field-hint { font-size: 12px; color: var(--text-dim); }
.field-hint a { color: var(--purple); }

.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.form-error-banner {
  background: rgba(255,0,110,.1); border: 1px solid rgba(255,0,110,.3);
  color: #ff6b9d; padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 20px; font-size: 14px;
}

.section-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; margin: 24px 0 16px;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── PAGINATION ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.page-btn {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 13px; color: var(--text-dim);
  border: 1px solid var(--border); transition: all .2s;
}
.page-btn:hover  { border-color: var(--purple); color: var(--text); }
.page-btn.active { background: var(--purple); color: #fff; border-color: var(--purple); box-shadow: var(--glow-purple); }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.75); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: 28px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow), var(--glow-purple);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; color: var(--text);
}
.modal-close {
  background: none; border: none; color: var(--text-dim);
  font-size: 18px; cursor: pointer; transition: color .2s;
}
.modal-close:hover { color: var(--pink); }
.modal-box .field-group { margin-bottom: 16px; }

/* ── TOAST ──────────────────────────────────────────────────── */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow);
  animation: slideIn .3s ease, fadeOut .5s ease 3.5s forwards;
}
.toast-success {
  background: rgba(245,255,0,.1); border: 1px solid rgba(245,255,0,.3);
  color: var(--yellow);
}
.toast-error {
  background: rgba(255,0,110,.1); border: 1px solid rgba(255,0,110,.3);
  color: #ff6b9d;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; pointer-events: none; } }

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-dim); }
.empty-icon  { font-size: 48px; margin-bottom: 16px; opacity: .3; }
.empty-state a { color: var(--purple); }

/* ── ROLES GRID ─────────────────────────────────────────────── */
.roles-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 20px; margin-bottom: 32px;
}
.role-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: border-color .2s, box-shadow .2s;
}
.role-card:hover { border-color: var(--border2); box-shadow: var(--glow-purple); }
.role-icon { font-size: 32px; margin-bottom: 12px; }
.role-name {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px;
  color: var(--text); margin-bottom: 8px;
}
.role-desc { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-bottom: 16px; }
.role-perms { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.role-perms li { font-size: 13px; color: var(--text-dim); }
.role-perms li:first-of-type,
.role-perms li:nth-of-type(2) { color: var(--text); }

/* ══ LOGIN PAGE ══════════════════════════════════════════════ */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); position: relative; overflow: hidden;
}
.login-bg { position: fixed; inset: 0; pointer-events: none; }
.login-orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: .3;
}
.orb1 { width: 600px; height: 600px; background: var(--purple); top: -200px; right: -150px; }
.orb2 { width: 400px; height: 400px; background: var(--pink);   bottom: -120px; left: -120px; }
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(90,0,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90,0,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-container {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 20px; padding: 48px 44px;
  box-shadow: 0 24px 80px rgba(0,0,0,.6), var(--glow-purple);
}
.login-brand { text-align: center; margin-bottom: 36px; }
.login-icon  {
  font-size: 48px; color: var(--yellow); display: block; margin-bottom: 12px;
  text-shadow: var(--glow-yellow);
}
.login-title {
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 26px;
  letter-spacing: .12em; color: var(--text);
}
.login-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 4px; letter-spacing: .04em; }
.login-error {
  background: rgba(255,0,110,.1); border: 1px solid rgba(255,0,110,.3);
  color: #ff6b9d; padding: 12px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 20px; text-align: center;
}
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-btn {
  background: var(--yellow); color: var(--dark); border: none;
  padding: 13px; border-radius: var(--radius-sm);
  font-family: 'Syne', sans-serif; font-weight: 800; font-size: 15px;
  letter-spacing: .06em; cursor: pointer; margin-top: 8px;
  transition: all .25s;
}
.login-btn:hover {
  background: #fff; transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,255,0,.45);
}
.login-footer { text-align: center; font-size: 12px; color: var(--text-dim); margin-top: 32px; }

/* ── USER / TABLE HELPERS ───────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: .6rem; }
.user-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.header-meta { font-size: .9rem; color: var(--text-dim); align-self: center; }
.text-sm     { font-size: .78rem; }
.text-nowrap { white-space: nowrap; }
.action-row  { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── STATS ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1rem; margin-bottom: 1rem;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.stat-value {
  font-size: 1.6rem; font-weight: 700; color: var(--yellow);
  font-family: 'Syne', sans-serif;
}
.stat-label { font-size: .75rem; color: var(--text-dim); margin-top: .25rem; }

.progress-bar-container {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem;
}
.progress-bar-label {
  display: flex; justify-content: space-between;
  font-size: .82rem; margin-bottom: .6rem; color: var(--text-dim);
}
.progress-bar  { height: 6px; background: var(--surface3); border-radius: 6px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 6px; transition: width .4s;
}
.mini-bar  { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--text-dim); }
.mini-fill { height: 5px; background: linear-gradient(90deg, var(--purple), var(--pink)); border-radius: 4px; }

/* ── REPORTS ────────────────────────────────────────────────── */
.field-row      { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field-group { flex: 1; min-width: 160px; }
.section-desc   { font-size: .85rem; color: var(--text-dim); margin: .25rem 0 1rem; }
.section-title  { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.card-link-btn  {
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--surface2); border-radius: 12px; padding: 1rem 1.5rem;
  text-decoration: none; color: var(--text);
  border: 1px solid var(--border); transition: all .15s;
}
.card-link-btn:hover { background: var(--surface3); border-color: var(--border2); }
.reports-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Filters */
.filter-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.field-input-sm { max-width: 180px; padding: .4rem .75rem !important; font-size: .82rem !important; }

/* Seat builder */
.seat-builder  { margin-bottom: 16px; }
#rowList { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.seat-row-builder { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════
   SETTINGS PAGE
════════════════════════════════════════════════════════════ */
.settings-wrap { max-width: 900px; margin: 0 auto; }

.settings-header { display: flex; align-items: center; gap: 20px; margin-bottom: 36px; }
.settings-header-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 22px;
  box-shadow: var(--glow-purple); flex-shrink: 0;
}
.settings-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .settings-grid { grid-template-columns: 1fr; } }

.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 32px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.profile-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--yellow));
}
.avatar-wrap { position: relative; display: inline-block; margin-bottom: 20px; }
.avatar-img, .avatar-initials {
  width: 96px; height: 96px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(90,0,255,0.5), 0 0 28px rgba(90,0,255,0.3);
}
.avatar-img { object-fit: cover; border: 3px solid transparent; display: block; }
.avatar-initials {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 38px;
  display: flex; align-items: center; justify-content: center;
}
.avatar-upload-btn {
  position: absolute; bottom: 4px; right: 4px;
  width: 28px; height: 28px; background: var(--yellow);
  border: 2px solid var(--bg); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px; transition: transform .2s; color: var(--dark);
}
.avatar-upload-btn:hover { transform: scale(1.15); background: #fff; }

.profile-name  { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; color: var(--text); margin-bottom: 4px; }
.profile-email { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.profile-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(90,0,255,0.18); border: 1px solid rgba(90,0,255,0.35);
  color: #a78bfa; border-radius: 20px; padding: 4px 14px;
  font-size: 12px; font-family: 'Syne', sans-serif; letter-spacing: .06em;
}
.upload-progress {
  margin-top: 14px; height: 3px; background: rgba(90,0,255,0.12);
  border-radius: 2px; overflow: hidden; display: none;
}
.upload-progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-radius: 2px; transition: width .3s;
}
.photo-status { font-size: 12px; margin-top: 10px; min-height: 18px; color: var(--text-dim); }
.photo-status.ok  { color: var(--yellow); }
.photo-status.err { color: #ff6b9d; }

.settings-panels { display: flex; flex-direction: column; gap: 20px; }
.s-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.s-panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.s-panel-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.s-panel-icon.yellow { background: rgba(245,255,0,.1); }
.s-panel-icon.pink   { background: rgba(255,0,110,.1); }
.s-panel-icon.purple { background: rgba(90,0,255,.18); }
.s-panel-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); }
.s-panel-desc  { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.s-panel-body  { padding: 24px; }

.s-field { margin-bottom: 18px; }
.s-field:last-child { margin-bottom: 0; }
.s-label {
  display: block; font-size: 11px; font-family: 'Syne', sans-serif; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 8px;
}
.s-input {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); font-family: 'DM Sans', sans-serif;
  font-size: 14px; padding: 11px 14px; transition: border-color .2s, box-shadow .2s; outline: none;
}
.s-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(90,0,255,.15); }
.s-input[readonly] { opacity: .5; cursor: not-allowed; }
.s-input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .s-input-group { grid-template-columns: 1fr; } }

.s-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px;
  border-radius: 10px; font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: 13px; cursor: pointer; border: none; transition: all .2s; letter-spacing: .03em;
}
.s-btn-primary {
  background: var(--yellow); color: var(--dark);
  box-shadow: 0 0 18px rgba(245,255,0,.2);
}
.s-btn-primary:hover { background: #fff; box-shadow: 0 0 28px rgba(245,255,0,.4); transform: translateY(-1px); }
.s-btn-ghost {
  background: rgba(90,0,255,.1); color: #a78bfa;
  border: 1px solid rgba(90,0,255,.25);
}
.s-btn-ghost:hover { background: rgba(90,0,255,.2); border-color: var(--purple); }
.s-form-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
}

.s-alert {
  padding: 10px 14px; border-radius: 9px; font-size: 13px;
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.s-alert-success { background: rgba(245,255,0,.08); border: 1px solid rgba(245,255,0,.2); color: var(--yellow); }
.s-alert-error   { background: rgba(255,0,110,.08); border: 1px solid rgba(255,0,110,.25); color: #ff6b9d; }

.toggle-list { display: flex; flex-direction: column; gap: 2px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid rgba(90,0,255,.08);
}
.toggle-row:last-child { border-bottom: none; padding-bottom: 0; }
.toggle-info { flex: 1; }
.toggle-label { font-size: 14px; color: var(--text); font-weight: 500; }
.toggle-desc  { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  border-radius: 13px; transition: .25s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; top: 3px; background: var(--text-dim); border-radius: 50%; transition: .25s;
}
.toggle-switch input:checked + .toggle-slider {
  background: rgba(90,0,255,.35); border-color: var(--purple);
}
.toggle-switch input:checked + .toggle-slider::before {
  background: var(--yellow); transform: translateX(20px);
  box-shadow: 0 0 8px rgba(245,255,0,.5);
}

.password-strength { margin-top: 8px; display: none; }
.strength-bar  { height: 3px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 5px; }
.strength-fill { height: 100%; border-radius: 2px; transition: width .3s, background .3s; }
.strength-text { font-size: 11px; color: var(--text-dim); }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — TICKETX ADMIN
   Breakpoints: 1024px (tablet landscape) · 768px (tablet) · 480px (mobile)
════════════════════════════════════════════════════════════════ */

/* ── HAMBURGER BUTTON (hidden on desktop) ────────────────────── */
.menu-toggle {
  display: none;
  position: fixed; top: 14px; left: 16px; z-index: 300;
  width: 42px; height: 42px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 10px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  transition: background .2s, border-color .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.menu-toggle:hover { background: var(--surface2); border-color: var(--purple); }
.menu-toggle span {
  display: block; width: 18px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s, width .3s;
  transform-origin: center;
}

/* Hamburger → X animation */
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; width: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── SIDEBAR OVERLAY (mobile backdrop) ───────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
}
.sidebar-overlay.open { display: block; }

/* ══════════════════════════════════════════
   TABLET LANDSCAPE  ≤ 1024px
══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .main-content { padding: 24px 24px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
}

/* ══════════════════════════════════════════
   TABLET  ≤ 768px
══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Show hamburger */
  .menu-toggle { display: flex; }

  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
    z-index: 200; width: 260px;
    box-shadow: 4px 0 40px rgba(0,0,0,.6);
  }
  .sidebar.open { transform: translateX(0); }

  /* Main fills full width, add top padding for hamburger */
  .main-content {
    margin-left: 0;
    padding: 72px 16px 24px;
  }

  /* Page header stacks */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }
  .page-title { font-size: 22px; }

  /* KPI grid: 2 columns on tablet */
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Events grid: 2 columns */
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* Form grid: single col */
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .span-2 { grid-column: span 1; }
  .form-card { padding: 20px; max-width: 100%; }

  /* Tables: scroll horizontally */
  .table-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }

  /* Modal full-width */
  .modal-box { margin: 16px; max-width: calc(100% - 32px); padding: 20px; }

  /* Settings */
  .settings-grid { grid-template-columns: 1fr; }
  .settings-wrap { max-width: 100%; }

  /* Filter tabs */
  .filter-tabs { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filter-tabs::-webkit-scrollbar { display: none; }

  /* Dashboard top events: smaller */
  .top-event-row { padding: 8px; }

  /* Form actions */
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary { width: 100%; text-align: center; justify-content: center; }

  /* Pagination */
  .pagination { gap: 4px; }
  .page-btn { width: 32px; height: 32px; font-size: 12px; }

  /* Seat builder */
  .seat-row-builder { flex-wrap: wrap; }

  /* Toast top-center on mobile */
  .toast { left: 16px; right: 16px; top: 16px; text-align: center; }
}

/* ══════════════════════════════════════════
   MOBILE  ≤ 480px
══════════════════════════════════════════ */
@media (max-width: 480px) {

  .main-content { padding: 68px 12px 20px; }

  /* KPI: stack to 1 column */
  .kpi-grid { grid-template-columns: 1fr; gap: 10px; }
  .kpi-card { padding: 16px 18px; }
  .kpi-value { font-size: 22px; }

  /* Events: single column */
  .events-grid { grid-template-columns: 1fr; }

  /* Page title */
  .page-title { font-size: 20px; }
  .page-desc  { font-size: 13px; }

  /* Btn primary full width on forms */
  .btn-primary { width: 100%; text-align: center; }

  /* Settings panels body */
  .s-panel-body { padding: 16px; }
  .s-form-actions { flex-direction: column-reverse; gap: 8px; }
  .s-btn { width: 100%; justify-content: center; }

  /* Password double field stacks */
  .s-input-group { grid-template-columns: 1fr; }

  /* Profile card */
  .profile-card { padding: 24px 16px; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Reports field-row */
  .field-row { flex-direction: column; }
  .field-row .field-group { min-width: 100%; }

  /* Table smaller text */
  .data-table th { font-size: 9px; padding: 10px 10px; }
  .data-table td { font-size: 13px; padding: 10px 10px; }

  /* User cell text truncate */
  .user-cell span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Action buttons wrap */
  .action-row { flex-wrap: wrap; gap: 4px; }
  .btn-table  { font-size: .7rem; padding: .25rem .5rem; }

  /* Card link button */
  .card-link-btn { width: 100%; justify-content: center; }

  /* Modal */
  .modal-box { padding: 16px; }
  .modal-header h2 { font-size: 16px; }

  /* Dashboard chart smaller */
  .chart-card .chart-wrap { height: 200px; }

  /* Top events revenue hide on tiny screens */
  .event-revenue { display: none; }

  /* Back link */
  .back-link { font-size: 12px; }
}

/* ── Extra: filter-tabs class used in Events view ─────────────── */
.filter-tabs {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.tab {
  padding: 6px 16px; border-radius: 20px; font-size: 13px;
  color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--border); transition: all .2s; white-space: nowrap;
}
.tab:hover  { border-color: var(--purple); color: var(--text); }
.tab.active { background: var(--purple); color: #fff; border-color: var(--purple); box-shadow: var(--glow-purple); }

/* link-accent used in empty states */
.link-accent { color: var(--purple); text-decoration: none; }
.link-accent:hover { color: var(--yellow); }

/* event-poster / event-poster-placeholder used in Events/Index */
.event-poster {
  width: 100%; height: 160px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0; display: block;
}
.event-poster-placeholder {
  height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--text-dim);
  background: var(--surface2); border-radius: var(--radius) var(--radius) 0 0;
}
.event-card .event-body { padding: 16px; flex: 1; }
.event-card .event-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.event-type { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.event-card .event-name  { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.event-card .event-venue { font-size: 12px; color: var(--text-dim); }
.event-card .event-duration { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.event-card .event-actions { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 6px; flex-wrap: wrap; }
