/* TOKENS */
:root {
  --accent:      #e8445a;
  --accent-dark: #cf3349;
  --green:       #22c55e;
  --gold:        #f59e0b;
  --danger:      #ef4444;
  --info:        #3b82f6;
  --purple:      #8b5cf6;
  --bg:          #0f0f0f;
  --bg2:         #1a1a1a;
  --bg3:         #222222;
  --surface:     #181818;
  --text:        #f0f0f0;
  --muted:       #6b7280;
  --muted2:      #9ca3af;
  --border:      rgba(255,255,255,.08);
  --border2:     rgba(255,255,255,.14);
  --sidebar-w:   240px;
  --radius:      10px;
  --radius-lg:   12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1);
  --t: 180ms cubic-bezier(.4,0,.2,1);
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  height: -webkit-fill-available;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  color-scheme: dark;
}

/* LOGIN */
.login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  padding-top: calc(1.25rem + var(--safe-top));
  padding-bottom: calc(1.25rem + var(--safe-bottom));
  z-index: 9999;
}
.login-box { width: 100%; max-width: 400px; }
.login-logo { text-align: center; margin-bottom: 1.75rem; color: white; }
.login-logo .k { font-size: 2.5rem; }
.login-logo h1 { font-size: 2rem; font-weight: 800; color: white; }
.login-logo h1 span { opacity: .8; }
.login-logo p { font-size: .85rem; opacity: .75; margin-top: .25rem; }
.login-box .card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.75rem; display: flex; flex-direction: column; gap: 1.1rem;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  border: 1px solid var(--border2);
}
.err {
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25);
  color: var(--danger); padding: .75rem 1rem;
  border-radius: var(--radius); font-size: .85rem; text-align: center;
}

/* APP SHELL */
.app-shell {
  display: flex;
  height: 100vh;
  height: -webkit-fill-available;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
  overflow-y: auto; overflow-x: hidden;
  z-index: 100; transition: transform var(--t);
  padding-bottom: var(--safe-bottom);
}
.sidebar-logo {
  padding: 1.1rem 1rem;
  padding-top: calc(1.1rem + var(--safe-top));
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; flex-shrink: 0;
}
.brand { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.brand span { color: var(--accent); }
.role-badge {
  font-size: .65rem; font-weight: 700;
  background: rgba(232,68,90,.15); color: var(--accent);
  padding: .25rem .6rem; border-radius: 99px;
  text-transform: uppercase; letter-spacing: .5px; white-space: nowrap;
}
.credit-badge {
  font-size: .78rem; font-weight: 700; color: var(--accent);
  background: rgba(232,68,90,.1); border: 1px solid rgba(232,68,90,.25);
  border-radius: var(--radius); padding: .45rem .9rem;
  margin: .6rem 1rem 0; text-align: center; transition: color var(--t);
  flex-shrink: 0;
}
.credit-badge.low {
  color: var(--danger);
  background: rgba(239,68,68,.08);
  border-color: rgba(239,68,68,.2);
}
.sidebar-nav { flex: 1; padding: .5rem 0; overflow-y: auto; }
.nav-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  color: var(--muted); letter-spacing: .6px;
  padding: .75rem 1rem .3rem; display: block;
}
.nav-item {
  width: 100%; padding: .65rem 1rem; background: none; border: none;
  color: var(--muted2); cursor: pointer;
  display: flex; align-items: center; gap: .65rem;
  font-size: .875rem; font-weight: 500; text-align: left;
  transition: all var(--t); position: relative;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(232,68,90,.1); color: var(--accent); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item .icon { font-size: 1.05rem; min-width: 1.2rem; }
.count-badge { font-size: .65rem; font-weight: 700; padding: .2rem .45rem; border-radius: 4px; line-height: 1; margin-left: auto; }
.count-badge.red  { background: rgba(239,68,68,.15); color: var(--danger); }
.count-badge.blue { background: rgba(59,130,246,.15); color: var(--info); }
.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border); flex-shrink: 0; }
.connected-indicator { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted2); margin-bottom: .75rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border2); flex-shrink: 0; }
.dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.red   { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 999;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* MAIN AREA */
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .875rem 1.25rem;
  padding-top: calc(.875rem + var(--safe-top));
  padding-left: calc(1.25rem + var(--safe-left));
  padding-right: calc(1.25rem + var(--safe-right));
  display: flex; align-items: center; gap: .875rem;
  flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.mobile-menu-btn {
  display: none; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); font-size: 1.1rem; width: 40px; height: 40px;
  border-radius: 8px; cursor: pointer; align-items: center; justify-content: center;
  flex-shrink: 0; -webkit-tap-highlight-color: transparent;
}
.topbar-title { font-weight: 700; font-size: .95rem; color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-event {
  background: rgba(232,68,90,.12); color: var(--accent);
  font-size: .78rem; font-weight: 600; padding: .3rem .75rem; border-radius: 99px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 180px; flex-shrink: 0;
}
.content {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + var(--safe-bottom));
  padding-left: calc(1.5rem + var(--safe-left));
  padding-right: calc(1.5rem + var(--safe-right));
  -webkit-overflow-scrolling: touch;
}

/* SECTIONS */
.section { display: none; animation: fadeIn .25s ease; }
.section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.page-header { margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.page-header p  { font-size: .875rem; color: var(--muted2); margin-top: .2rem; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem; padding: .65rem 1.2rem;
  border: none; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all var(--t);
  white-space: nowrap; line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 4px 12px rgba(232,68,90,.35); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #dc2626; }
.btn-teal    { background: #10b981; color: #fff; }
.btn-teal:hover    { background: #059669; }
.btn-gold    { background: var(--gold); color: #111; }
.btn-gold:hover    { background: #d97706; }
.btn-purple  { background: var(--purple); color: #fff; }
.btn-purple:hover  { background: #7c3aed; }
.btn-ghost { background: var(--bg3); color: var(--muted2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); border-color: var(--border2); }
.btn-full { width: 100%; }
.btn-lg   { padding: .875rem 1.5rem; font-size: .95rem; }
.btn-sm   { padding: .45rem .9rem; font-size: .8rem; min-height: 36px; }
.btn-xs   { padding: .3rem .65rem; font-size: .75rem; border-radius: 6px; min-height: 32px; }
.btn-row  { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* CARDS & FORMS */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .8rem; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: .3px; }
.field input,
.field textarea,
.field select {
  padding: .7rem .9rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 1rem; font-family: inherit;
  transition: all var(--t);
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,68,90,.15); background: var(--surface);
}
.invite-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; align-items: flex-end; margin-bottom: 1.25rem;
}
.invite-form-row .field { margin: 0; }

/* STATS */
.stats-row { display: flex; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.stat-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.5rem;
  flex: 1; min-width: 100px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-chip .val { font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat-chip .lbl { font-size: .75rem; color: var(--muted); margin-top: .25rem; text-transform: uppercase; letter-spacing: .5px; }

/* EVENT GRID */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.ev-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem; cursor: pointer;
  transition: all var(--t); display: flex; align-items: center; gap: .9rem;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.ev-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(232,68,90,.06), transparent);
  opacity: 0; transition: opacity var(--t);
}
.ev-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ev-card:hover::before { opacity: 1; }
.ev-card.sel { border-color: var(--accent); background: rgba(232,68,90,.05); }
.ev-card-icon { width: 44px; height: 44px; background: rgba(232,68,90,.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.ev-card-body    { flex: 1; min-width: 0; }
.ev-card-name    { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-card-meta    { font-size: .75rem; color: var(--muted2); margin-top: .2rem; line-height: 1.4; }
.ev-card-actions { display: flex; gap: .35rem; flex-shrink: 0; }

/* DASHBOARD */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .875rem; margin-bottom: 1.5rem; }
.join-code-display { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; margin-bottom: 1rem; }
.join-code-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .5rem; }
.join-code-val   { font-size: 2rem; font-weight: 800; color: var(--accent); font-family: monospace; letter-spacing: .2em; }

/* REPORTS */
.rep {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--danger); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; margin-bottom: .75rem; transition: all var(--t);
}
.rep:hover   { box-shadow: var(--shadow-sm); }
.rep.handled { opacity: .55; border-left-color: var(--green); }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem; }
.rep-head strong { font-size: .9rem; }
.rep-reason { font-size: .875rem; color: var(--muted2); white-space: pre-wrap; margin-bottom: .5rem; line-height: 1.55; word-break: break-word; }
.rep-time   { font-size: .7rem; color: var(--muted); }
.status-pill { display: inline-flex; padding: .28rem .7rem; border-radius: 99px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.status-pill.pending { background: rgba(245,158,11,.15); color: var(--gold); }
.status-pill.handled { background: rgba(34,197,94,.15);  color: var(--green); }
.warning-history { margin-top: .875rem; padding: .875rem 1rem; background: rgba(245,158,11,.08); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; font-size: .82rem; }
.warning-history strong { color: var(--gold); display: block; margin-bottom: .3rem; }
.warning-history ul { margin: 0; padding-left: 1.25rem; color: var(--muted2); }
.warning-history li { margin-bottom: .2rem; line-height: 1.5; }

/* CONVERSATIONS */
.conv-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--info); border-radius: var(--radius-lg);
  padding: 1.1rem 1.25rem; margin-bottom: .75rem; transition: all var(--t);
}
.conv-card:hover             { box-shadow: var(--shadow-sm); }
.conv-card.expiring-soon     { border-left-color: var(--gold); }
.conv-card.expiring-critical { border-left-color: var(--danger); animation: pulseRed 2s ease-in-out infinite; }
@keyframes pulseRed { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 20px rgba(239,68,68,.15); } }
.conv-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.conv-badges { font-weight: 700; font-size: .9rem; }
.conv-timer { font-size: .8rem; font-weight: 700; font-family: 'Courier New', monospace; padding: .28rem .65rem; border-radius: 6px; white-space: nowrap; }
.conv-timer.ok       { background: rgba(34,197,94,.12);  color: var(--green); }
.conv-timer.warning  { background: rgba(245,158,11,.12); color: var(--gold); }
.conv-timer.critical { background: rgba(239,68,68,.12);  color: var(--danger); }
.progress-bar { height: 5px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-bottom: .875rem; }
.progress-fill { height: 100%; border-radius: 99px; transition: width 1s linear, background .4s; }
.progress-fill.ok       { background: linear-gradient(90deg, var(--green), #16a34a); }
.progress-fill.warning  { background: linear-gradient(90deg, var(--gold), #d97706); }
.progress-fill.critical { background: linear-gradient(90deg, var(--danger), #dc2626); }

/* USERS */
.user-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: .875rem 1.1rem;
  margin-bottom: .5rem; display: flex; align-items: center; gap: .875rem;
  flex-wrap: wrap; transition: all var(--t);
}
.user-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.user-badge-num { font-family: 'Courier New', monospace; font-weight: 800; font-size: 1rem; color: var(--accent); min-width: 54px; background: rgba(232,68,90,.12); padding: .3rem .6rem; border-radius: 6px; text-align: center; }
.user-info  { flex: 1; min-width: 0; }
.user-email { font-size: .83rem; color: var(--muted2); word-break: break-all; }
.user-phone { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.user-status-pill { font-size: .68rem; font-weight: 700; padding: .25rem .65rem; border-radius: 99px; white-space: nowrap; text-transform: uppercase; letter-spacing: .3px; }
.user-status-pill.registered { background: rgba(34,197,94,.15);  color: var(--green); }
.user-status-pill.pending    { background: rgba(245,158,11,.15); color: var(--gold); }
.user-status-pill.banned     { background: rgba(239,68,68,.15);  color: var(--danger); }

/* LOTTERY */
.lottery-card {
  background: linear-gradient(135deg, rgba(245,158,11,.07), rgba(251,191,36,.03));
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem;
}
.lottery-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.lot-status { display: inline-block; padding: .25rem .7rem; border-radius: 99px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: .875rem; }
.lot-status.pending   { background: rgba(245,158,11,.2); color: var(--gold); }
.lot-status.drawn     { background: rgba(34,197,94,.2);  color: var(--green); }
.lot-status.validated { background: rgba(139,92,246,.2); color: var(--purple); }
.winner-row { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .4rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; transition: background var(--t); }
.winner-row:hover { background: var(--bg); }
.winner-badge { font-weight: 800; color: var(--gold); font-size: .9rem; }
.claimed-pill { font-size: .68rem; font-weight: 700; padding: .22rem .6rem; border-radius: 99px; white-space: nowrap; }
.claimed-pill.admin         { background: rgba(34,197,94,.18);  color: var(--green); }
.claimed-pill.badge-claimed { background: rgba(139,92,246,.18); color: var(--purple); }
.claimed-pill.none          { background: var(--bg3); color: var(--muted); }
.lot-history { max-height: 320px; overflow-y: auto; }
.lot-history-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .4rem; }

/* LINKS & QR */
.link-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .875rem 1rem; margin-bottom: .5rem; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; transition: all var(--t); }
.link-item:hover { border-color: var(--accent); }
.link-label { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; min-width: 110px; flex-shrink: 0; }
.link-val   { flex: 1; font-size: .8rem; color: var(--muted2); word-break: break-all; font-family: monospace; min-width: 0; }
.copy-btn { font-size: .75rem; font-weight: 600; background: var(--bg3); border: 1px solid var(--border); color: var(--muted2); padding: .3rem .7rem; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: all var(--t); flex-shrink: 0; min-height: 32px; }
.copy-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.qr-box { display: flex; justify-content: center; padding: 1.5rem; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* SETTINGS & MISC */
.maxu-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.maxu-row input { flex: 0 1 200px; }
.status { font-size: .82rem; color: var(--muted2); margin-top: .5rem; min-height: 1.2em; }
.warn-input-row { display: flex; gap: .75rem; margin-top: .75rem; flex-wrap: wrap; }
.warn-input-row input { flex: 1; min-width: 180px; }
.admin-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: .5rem; transition: all var(--t); }
.admin-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.admin-email { font-weight: 700; font-size: .9rem; color: var(--text); }
.admin-meta  { font-size: .75rem; color: var(--muted2); margin-top: .2rem; }
.empty { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 2.5rem; display: block; margin-bottom: .875rem; }
.empty p { color: var(--muted); font-size: .9rem; }
.hidden { display: none !important; }

/* DIALOG */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 2000; padding: 1rem;
  padding-bottom: calc(1rem + var(--safe-bottom));
  animation: fadeIn .2s ease;
}
.overlay.hidden { display: none !important; }
.dialog {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  width: 100%; max-width: 460px;
  max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideInUp .25s ease;
}
.dialog h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 1.25rem; }
.dialog-btns { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
@keyframes slideInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* SMALL */
@media (max-width: 380px) {
  html { font-size: 15px; }
  .topbar-event { display: none; }
  .ev-card-actions .btn-xs { display: none; }
}

/* ─── SIDEBAR MOBILE / TABLET ───────────────── */
@media (max-width: 992px) {

  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 280px !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    transform: translateX(-100%) !important; /* caché par défaut */
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  }

  .sidebar.open {
    transform: translateX(0) !important; /* ouvert au clic */
  }

  .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 9998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
  }

  .sidebar-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  body.mobile-open {
    overflow: hidden;
  }
}
