/* =====================================================================
   Astro Tickets — v2 · DA violet premium (glassmorphism, dark only)
   ===================================================================== */
:root {
  --bg: #08080c;
  --bg-2: #0b0b12;
  --grad: radial-gradient(1200px 700px at 12% -8%, rgba(139,92,246,.16), transparent 55%),
          radial-gradient(1000px 600px at 100% 0%, rgba(109,40,217,.12), transparent 50%),
          radial-gradient(900px 900px at 100% 110%, rgba(124,58,237,.08), transparent 50%);
  --panel: rgba(23, 20, 38, 0.55);
  --panel-solid: #141221;
  --panel-2: rgba(35, 30, 56, 0.6);
  --glass-brd: rgba(139, 92, 246, 0.14);
  --brd: rgba(255,255,255,0.07);
  --brd-2: rgba(255,255,255,0.1);
  --text: #ece9f5;
  --dim: #a29fb8;
  --faint: #6f6b85;
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-deep: #6d28d9;
  --accent-soft: rgba(139,92,246,0.14);
  --accent-glow: rgba(139,92,246,0.45);
  --green: #34d399; --green-soft: rgba(52,211,153,.14);
  --red: #f87171; --red-soft: rgba(248,113,113,.14);
  --amber: #fbbf24; --amber-soft: rgba(251,191,36,.14);
  --blue: #60a5fa;
  --rail-w: 74px;
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  background-image: var(--grad); background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--accent-soft); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.25); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.45); background-clip: padding-box; }

.glass { background: var(--panel); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border: 1px solid var(--glass-brd); border-radius: var(--radius); }

/* -------- Buttons -------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--brd-2); background: var(--panel-2); color: var(--text);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all .18s cubic-bezier(.2,.7,.2,1); }
.btn:hover { border-color: var(--accent); background: rgba(139,92,246,.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 6px 20px -6px var(--accent-glow); }
.btn.primary:hover { filter: brightness(1.1); box-shadow: 0 10px 26px -6px var(--accent-glow); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: rgba(248,113,113,.4); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }

/* =====================================================================
   LOGIN GATE
   ===================================================================== */
#gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  overflow: hidden; transition: opacity .5s, visibility .5s; }
#gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#gate .stars { position: absolute; inset: 0; opacity: .7; }
.gate-card { position: relative; text-align: center; padding: 38px 34px; width: 360px;
  animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.gate-logo { width: 72px; height: 72px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 20px;
  background: linear-gradient(155deg, var(--accent-2), var(--accent-deep)); box-shadow: 0 16px 48px -10px var(--accent-glow); color: #fff; }
.gate-logo svg { width: 38px; height: 38px; transform: rotate(-45deg); }
.gate-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.gate-title span { background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-sub { color: var(--dim); margin-top: 7px; font-size: 13px; }
.gate-input { width: 100%; margin-top: 24px; background: rgba(0,0,0,.35); border: 1px solid var(--brd-2); border-radius: 12px;
  padding: 13px 15px; color: var(--text); font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; }
.gate-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.gate-btn { width: 100%; margin-top: 12px; padding: 13px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px -8px var(--accent-glow); transition: filter .2s, transform .12s; }
.gate-btn:hover { filter: brightness(1.1); } .gate-btn:active { transform: scale(.99); }
.gate-err { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }
.gate-foot { margin-top: 18px; color: var(--faint); font-size: 12px; }

/* =====================================================================
   APP LAYOUT
   ===================================================================== */
#app { display: flex; min-height: 100vh; opacity: 0; transition: opacity .4s; }
#app.show { opacity: 1; }

/* Rail */
.rail { width: var(--rail-w); flex: 0 0 var(--rail-w); position: sticky; top: 0; height: 100vh; z-index: 30;
  display: flex; flex-direction: column; align-items: center; padding: 16px 0;
  background: rgba(12,10,20,.6); backdrop-filter: blur(14px); border-right: 1px solid var(--glass-brd); }
.rail-logo { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(155deg, var(--accent-2), var(--accent-deep));
  display: grid; place-items: center; color: #fff; margin-bottom: 22px; box-shadow: 0 8px 24px -6px var(--accent-glow); }
.rail-logo svg { width: 26px; height: 26px; transform: rotate(-45deg); }
.rail-nav { display: flex; flex-direction: column; gap: 8px; width: 100%; align-items: center; }
.rail-btn { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--faint);
  cursor: pointer; transition: all .18s; position: relative; }
.rail-btn:hover { background: var(--panel-2); color: var(--text); }
.rail-btn.active { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--glass-brd); }
.rail-btn.active::before { content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.rail-btn svg { width: 23px; height: 23px; }
.rail-btn[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 56px; top: 50%; transform: translateY(-50%);
  background: #16131f; color: var(--text); font-size: 12px; white-space: nowrap; padding: 6px 11px; border-radius: 9px;
  border: 1px solid var(--glass-brd); z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.rail-spacer { flex: 1; }
.rail-avatar { width: 36px; height: 36px; border-radius: 50%; margin-top: 10px; background: linear-gradient(135deg, var(--accent-2), #db2777); border: 2px solid var(--glass-brd); }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.topbar { height: 64px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 26px;
  border-bottom: 1px solid var(--glass-brd); background: rgba(10,9,16,.55); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.page-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--faint); font-size: 12.5px; margin-top: 1px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--dim);
  border: 1px solid var(--glass-brd); padding: 6px 12px; border-radius: 999px; background: var(--panel-2); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.content { flex: 1; overflow-y: auto; padding: 24px 26px 90px; }
.wrap { max-width: 1280px; margin: 0 auto; }
.view { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* section headers */
.sec-head { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; }
.sec-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.sec-head .line { flex: 1; height: 1px; background: var(--glass-brd); }
.hint { color: var(--faint); font-size: 12.5px; }

/* =====================================================================
   DASHBOARD
   ===================================================================== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.sel { background: var(--panel-2); border: 1px solid var(--brd-2); border-radius: 10px; padding: 9px 12px; color: var(--text);
  font-size: 13px; outline: none; cursor: pointer; transition: border-color .2s; min-width: 150px; }
.sel:focus { border-color: var(--accent); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { padding: 18px 18px 16px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-soft); filter: blur(8px); }
.kpi .k-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 12px; }
.kpi .k-ic svg { width: 18px; height: 18px; }
.kpi .k-val { font-size: 27px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.kpi .k-lbl { color: var(--faint); font-size: 11.5px; margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }
.kpi .k-sub { color: var(--dim); font-size: 12px; margin-top: 8px; }
.kpi.accent .k-val { background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.chart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
.chart-card { padding: 18px; }
.chart-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.chart-card .cc-sub { color: var(--faint); font-size: 12px; margin-bottom: 14px; }
.chart-card.full { grid-column: 1 / -1; }
@media (max-width: 920px) { .chart-grid { grid-template-columns: 1fr; } }

/* bar list */
.barlist { display: flex; flex-direction: column; gap: 11px; }
.barrow { display: grid; grid-template-columns: 1fr auto; gap: 4px; }
.barrow .b-top { display: flex; justify-content: space-between; font-size: 12.5px; grid-column: 1 / -1; }
.barrow .b-name { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.barrow .b-val { color: var(--accent-2); font-weight: 600; }
.barrow .b-track { grid-column: 1 / -1; height: 8px; border-radius: 6px; background: rgba(255,255,255,.05); overflow: hidden; }
.barrow .b-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-deep), var(--accent-2)); box-shadow: 0 0 12px -2px var(--accent-glow); transition: width .6s cubic-bezier(.2,.7,.2,1); }

.legend { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.legend .lg { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.legend .lg .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .lg .lg-name { flex: 1; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend .lg .lg-val { color: var(--text); font-weight: 600; }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center .dc-val { font-size: 20px; font-weight: 800; }
.donut-center .dc-lbl { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }

.empty { text-align: center; padding: 60px 20px; color: var(--faint); }
.empty svg { width: 42px; height: 42px; margin-bottom: 12px; opacity: .5; }

/* =====================================================================
   TABLE
   ===================================================================== */
.table-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--brd-2);
  border-radius: 10px; padding: 8px 12px; min-width: 240px; flex: 1; max-width: 420px; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { width: 16px; height: 16px; color: var(--faint); }
.search-box input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 13.5px; }
.search-box kbd { font-size: 10.5px; color: var(--faint); border: 1px solid var(--brd-2); border-radius: 5px; padding: 1px 5px; }
.spacer { flex: 1; }

.table-scroll { overflow: auto; border-radius: var(--radius); border: 1px solid var(--glass-brd); background: var(--panel); backdrop-filter: blur(16px); max-height: calc(100vh - 260px); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.data thead th { position: sticky; top: 0; z-index: 2; background: #14111f; color: var(--dim); font-weight: 600; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 12px 14px; white-space: nowrap;
  border-bottom: 1px solid var(--glass-brd); cursor: pointer; user-select: none; }
table.data thead th:hover { color: var(--text); }
table.data thead th .arrow { opacity: .5; margin-left: 4px; font-size: 10px; }
table.data thead th.sorted { color: var(--accent-2); }
table.data tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,.045); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: rgba(139,92,246,.06); }
table.data tbody tr.sel { background: rgba(139,92,246,.12); }
table.data tbody tr.is-sent td { opacity: .5; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td b { color: var(--text); }
.cellchk { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--brd-2); cursor: pointer; display: inline-grid; place-items: center; }
.cellchk.on { background: var(--accent); border-color: var(--accent); }
.cellchk.on svg { width: 13px; height: 13px; color: #fff; }
.mini { font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.mini.ok { background: var(--green-soft); color: var(--green); }
.mini.no { background: var(--red-soft); color: var(--red); }
.mini.open { background: rgba(96,165,250,.14); color: var(--blue); }
.row-act { display: inline-flex; gap: 6px; }
.icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--brd-2); background: var(--panel-2); color: var(--dim); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.disc:hover { background: #5865F2; border-color: #5865F2; color: #fff; }
.table-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12.5px; color: var(--faint); }
.pager { display: flex; gap: 4px; margin-left: auto; }
.pager button { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--brd-2); background: var(--panel-2); color: var(--dim); cursor: pointer; font-size: 12.5px; }
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.pager button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager button:disabled { opacity: .35; cursor: default; }

/* col toggles menu */
.colmenu { position: relative; }
.colmenu-pop { position: absolute; right: 0; top: 40px; z-index: 30; width: 220px; max-height: 340px; overflow-y: auto; padding: 8px; }
.colmenu-pop .ci { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--dim); }
.colmenu-pop .ci:hover { background: var(--panel-2); color: var(--text); }

/* =====================================================================
   FILTERS (advanced)
   ===================================================================== */
.flt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; }
.flt-card { padding: 16px; }
.flt-card .fh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.flt-card .fh .ft { font-weight: 600; font-size: 13.5px; }
.flt-card .fh .fd { font-size: 11.5px; color: var(--faint); }
.seg { display: inline-flex; background: rgba(0,0,0,.3); border: 1px solid var(--brd-2); border-radius: 9px; padding: 2px; margin-left: auto; }
.seg button { border: none; background: none; color: var(--faint); font-size: 12px; padding: 5px 10px; border-radius: 7px; cursor: pointer; transition: .15s; }
.seg button:hover { color: var(--text); }
.seg button.on[data-m="include"] { background: var(--green); color: #06281c; font-weight: 600; }
.seg button.on[data-m="exclude"] { background: var(--red); color: #2a0a0a; font-weight: 600; }
.seg button.on[data-m="any"] { background: var(--faint); color: #14111f; font-weight: 600; }
.taginput { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(0,0,0,.28); border: 1px solid var(--brd-2); border-radius: 10px; padding: 7px 9px; min-height: 40px; align-items: center; }
.taginput.disabled { opacity: .4; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 1px solid var(--glass-brd); border-radius: 8px; padding: 3px 4px 3px 9px; font-size: 12px; color: var(--accent-2); }
.chip button { border: none; background: none; color: var(--accent-2); cursor: pointer; width: 17px; height: 17px; border-radius: 5px; display: grid; place-items: center; }
.chip button:hover { background: rgba(248,113,113,.2); color: var(--red); }
.taginput input { flex: 1; min-width: 110px; background: none; border: none; outline: none; color: var(--text); font-size: 13px; padding: 3px; }
.suggest-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.suggest { font-size: 11.5px; color: var(--dim); background: var(--panel-2); border: 1px dashed var(--brd-2); border-radius: 7px; padding: 3px 9px; cursor: pointer; transition: .15s; }
.suggest:hover { border-color: var(--accent); color: var(--accent-2); border-style: solid; }
.dcol { margin-top: 10px; }
.dlabel { font-size: 11.5px; font-weight: 700; margin-bottom: 6px; letter-spacing: .02em; }
.dlabel.inc { color: var(--green); }
.dlabel.exc { color: var(--red); }
.taginput.exclude { border-color: rgba(248,113,113,.28); }
.chip.include { background: var(--green-soft); border-color: rgba(52,211,153,.3); color: #6ee7b7; }
.chip.include button { color: #6ee7b7; }
.chip.exclude { background: var(--red-soft); border-color: rgba(248,113,113,.3); color: #fca5a5; }
.chip.exclude button { color: #fca5a5; }
.day-row { display: flex; flex-wrap: wrap; gap: 7px; }
.day-chip { padding: 6px 12px; border-radius: 9px; border: 1px solid var(--brd-2); background: var(--panel-2); color: var(--dim); font-size: 12.5px; cursor: pointer; transition: .15s; }
.day-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
.range-row { display: flex; gap: 10px; align-items: center; }
.inp { background: rgba(0,0,0,.28); border: 1px solid var(--brd-2); border-radius: 10px; padding: 9px 12px; color: var(--text); outline: none; font-size: 13px; width: 100%; transition: border-color .2s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.range-row .inp { width: 110px; }
.save-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 16px 0; margin-top: 8px;
  background: linear-gradient(transparent, var(--bg) 45%); }
.save-bar .msg { font-size: 13px; color: var(--green); }

/* =====================================================================
   SETTINGS / NOTIFICATIONS
   ===================================================================== */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 920px) { .set-grid { grid-template-columns: 1fr; } }
.card { padding: 20px; }
.card .card-h { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.card .card-h .ci { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.card .card-h .ci svg { width: 19px; height: 19px; }
.card .card-h h3 { font-size: 15px; font-weight: 700; }
.card .card-desc { color: var(--faint); font-size: 12.5px; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--dim); margin-bottom: 6px; font-weight: 500; }
.field .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .tr-txt { font-size: 13.5px; }
.toggle-row .tr-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.switch { width: 42px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.1); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); }
.switch.on::after { transform: translateX(18px); }

/* =====================================================================
   LOGS
   ===================================================================== */
.log-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.log-lvl { display: flex; gap: 5px; }
.log-lvl button { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--brd-2); background: var(--panel-2); color: var(--dim); font-size: 12px; cursor: pointer; transition: .15s; }
.log-lvl button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.log-list { border-radius: var(--radius); border: 1px solid var(--glass-brd); overflow: hidden; background: var(--panel); backdrop-filter: blur(16px); font-family: var(--mono); font-size: 12.5px; max-height: calc(100vh - 240px); overflow-y: auto; }
.log-line { display: grid; grid-template-columns: 150px 78px 1fr; gap: 12px; padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,.04); align-items: baseline; }
.log-line:hover { background: rgba(139,92,246,.05); }
.log-line .lt { color: var(--faint); }
.log-line .ll { font-weight: 700; font-size: 11px; }
.log-line .lm { color: var(--dim); font-family: var(--font); }
.ll.INFO { color: var(--blue); } .ll.SUCCESS { color: var(--green); } .ll.WARNING { color: var(--amber); }
.ll.ERROR { color: var(--red); } .ll.DEBUG { color: var(--faint); }

/* board (colonnes par catégorie) */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; min-height: 300px; }
.bcol { flex: 0 0 300px; width: 300px; max-height: calc(100vh - 200px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.bcol-head { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--glass-brd); position: sticky; top: 0; }
.bcol-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.bcol-dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.bcol-dot.muted { background: var(--faint); }
.bcol-name { font-weight: 700; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcol-count { font-size: 12px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; }
.bcol-body { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bcol-empty { text-align: center; color: var(--faint); font-size: 12.5px; padding: 24px 0; }
.bcard { background: rgba(0,0,0,.25); border: 1px solid var(--brd-2); border-left: 3px solid var(--accent); border-radius: 10px; padding: 11px 13px; }
.bcard.bc-new { animation: slidein .28s ease both; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bcard.opened { border-left-color: var(--blue); opacity: .7; }
.bc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bc-event { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-price { color: var(--accent-2); font-weight: 700; font-size: 14px; flex: none; }
.bc-meta { color: var(--dim); font-size: 12.5px; margin-top: 5px; }
.bc-place { color: var(--accent-2); font-size: 12px; margin-top: 5px; font-weight: 500; background: var(--accent-soft); border-radius: 7px; padding: 4px 8px; }
.bc-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; }
.bc-meta2 { color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-time { color: var(--faint); font-size: 11px; flex: none; }
.bc-actions { display: flex; gap: 6px; margin-top: 10px; align-items: stretch; }
.bc-open { flex: 1; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 13px; font-weight: 600; transition: filter .15s; }
.bc-open:hover { filter: brightness(1.14); }
.bc-open svg { width: 13px; height: 13px; }
.bc-open.locked { background: rgba(96,165,250,.16); color: var(--blue); cursor: pointer; font-weight: 600; }
.bc-open.locked:hover { background: rgba(96,165,250,.26); }
.bc-x { flex: none; width: 38px; border: 1px solid var(--brd-2); background: var(--panel-2); color: var(--faint); border-radius: 9px; cursor: pointer; display: grid; place-items: center; font-size: 15px; transition: .15s; }
.bc-x svg { width: 15px; height: 15px; }
.bc-x:hover { color: var(--text); border-color: var(--accent); }
.bc-x.send:hover { background: #5865F2; border-color: #5865F2; color: #fff; }
.bcard { padding: 13px 14px; }

/* categories */
.cat-list { display: flex; flex-direction: column; gap: 12px; }
.cat-card { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; cursor: pointer; transition: border-color .18s, transform .18s; }
.cat-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.cat-card.off { opacity: .55; }
.cat-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.cat-dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.cat-name { font-weight: 700; font-size: 15px; }
.cat-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.cat-act { display: flex; align-items: center; gap: 12px; flex: none; }
.ep-title.inp { font-size: 17px; font-weight: 700; }

/* modal / toast */
.modal-back { position: fixed; inset: 0; background: rgba(4,3,8,.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 80; opacity: 0; pointer-events: none; transition: .2s; }
.modal-back.show { opacity: 1; pointer-events: auto; }
.modal { width: 400px; max-width: 92vw; padding: 24px; transform: translateY(12px) scale(.98); transition: .22s cubic-bezier(.2,.7,.2,1); }
.modal-back.show .modal { transform: none; }
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal p { color: var(--dim); font-size: 13px; margin-bottom: 16px; }
.modal input, .modal textarea { width: 100%; margin-bottom: 12px; }
.modal textarea { font-family: var(--mono); font-size: 12px; min-height: 130px; resize: vertical; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); padding: 12px 18px; border-radius: 12px;
  font-size: 13.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 90; display: flex; align-items: center; gap: 9px;
  background: rgba(20,17,31,.9); backdrop-filter: blur(12px); border: 1px solid var(--glass-brd); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { border-color: rgba(52,211,153,.4); } #toast.ok svg { color: var(--green); }
#toast.err { border-color: rgba(248,113,113,.4); } #toast.err svg { color: var(--red); }
#toast svg { width: 17px; height: 17px; }

.menu-toggle { display: none; }
@media (max-width: 760px) {
  .content { padding: 18px 14px 80px; }
  .set-grid, .chart-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
