/* Style of the e-forum.pro personal cabinet, taken from e-forum-tickets/app/static/admin.html */
:root {
  --bg: #f8fafc; --panel: #ffffff; --panel-2: #fafafa; --hover: #f1f5f9;
  --line: #e2e8f0; --line-strong: #cbd5e1; --field-line: #d9d9d9;
  --ink: #1b1b1b; --ink-body: #0a112f; --ink-dim: #686e7a; --ink-faint: #94a3b8; --title: #1e293b;
  --accent: #fc403a; --accent-deep: #ee0f13; --accent-soft: rgba(252,64,58,.08);
  --blue-soft: #f0f8ff; --blue-line: #d5e0ea; --tag: #e5f0ff; --blue: #7ab2ff;
  --danger: #ee0f13; --danger-soft: #fff5f5; --danger-line: #fdd0ce;
  --ok: #16a34a; --ok-soft: #f0fdf4; --ok-line: #bbf7d0;
  --warn: #b7791f; --warn-soft: #fffbeb; --warn-line: #fde68a;
  --display: 'Open Sans', 'OpenSans', system-ui, sans-serif;
  --sans: 'Open Sans', 'OpenSans', system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink-body); font-family: var(--sans); font-size: 14px; line-height: 20px; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

/* sidebar: cabinet menu items stacked vertically */
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 14px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
.brand { padding: 0 8px; }
.logo { display: block; font-weight: 800; font-size: 22px; line-height: 28px; color: var(--accent); letter-spacing: -.01em; }
.brand-sub { display: block; font-size: 13px; line-height: 18px; color: var(--ink-dim); margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; line-height: 18px; color: var(--ink-dim); padding: 8px 10px;
  border: 1px solid transparent; border-radius: 8px; text-decoration: none; transition: all .2s ease-in-out; white-space: nowrap; }
.nav a:hover, .nav a.on { color: var(--ink); background: var(--panel-2); border-color: var(--line); }
.nav a.on { color: var(--accent); }
.nav .cnt { font-size: 12px; line-height: 16px; color: var(--ink-faint); }
.nav .cnt.bad { color: var(--danger); font-weight: 600; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 4px; }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 0 8px; font-size: 13px; line-height: 18px; color: var(--ink-faint); }
.side-foot a { color: var(--ink-dim); }

main { min-width: 0; padding: 20px 28px 48px; }
.top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; margin: 0 0 20px; }
.top h1 { font-size: 24px; line-height: 32px; font-weight: 800; color: var(--title); margin: 0; }
.top .sub { color: var(--ink-dim); font-size: 14px; margin-top: 2px; }
.top-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: #fff; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: var(--danger); }
.dot.amber { background: var(--warn); }
.dot.sheet { background: var(--blue); }

/* controls */
.btn { font-family: var(--sans); font-size: 14px; line-height: 24px; font-weight: 400; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; transition: background .2s ease-in-out, border-color .2s; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:hover { background: var(--hover); color: var(--ink); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; line-height: 20px; }
.btn-icon { padding: 4px 8px; font-size: 12px; line-height: 18px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  font-family: var(--sans); font-size: 14px; line-height: 20px; color: var(--ink); background: #fff; border: 1px solid var(--field-line);
  border-radius: 8px; padding: 9px 12px; outline: none; width: 100%; transition: border-color .2s ease-in-out; }
input:hover, select:hover, textarea:hover, input:focus, select:focus, textarea:focus { border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: #bfbfbf; }
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.5; resize: vertical; }
select { appearance: none; cursor: pointer; padding-right: 34px; background-repeat: no-repeat; background-position: right 8px center; background-size: 20px;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.25 10.53l4.12 4.22c.27.27.99.27 1.26 0l4.12-4.22a.9.9 0 0 0-1.26-1.28L12 12.82 8.5 9.25a.9.9 0 0 0-1.25 1.28Z' fill='%23858585'/%3E%3C/svg%3E"); }
input[type=color] { width: 42px; height: 40px; border: 1px solid var(--field-line); border-radius: 8px; background: #fff; padding: 3px; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
label.f { display: grid; gap: 4px; font-size: 14px; line-height: 20px; font-weight: 300; letter-spacing: .02em; color: var(--ink-body); }
label.f small { font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--ink-faint); font-weight: 400; }
.sw { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.sw input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: .2s; margin: 0; }
.sw input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(10,17,47,.2); transition: .2s; }
.sw input:checked { background: var(--accent); }
.sw input:checked::after { left: 18px; }
.sw small { display: block; color: var(--ink-faint); font-size: 12px; line-height: 16px; }
.radio { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; color: var(--ink); }
.radio input { margin-top: 3px; }
.radio small { display: block; color: var(--ink-faint); font-size: 12px; line-height: 16px; }

/* layout bits */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; min-width: 0; }
.card h2, .result h2 { font-size: 18px; line-height: 24.5px; font-weight: 800; color: var(--title); margin: 0 0 4px; }
.card h3 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink-dim); margin: 0 0 10px; }
.card .desc { color: var(--ink-dim); font-size: 14px; margin: 0 0 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 16px; }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.mono { font-family: var(--mono); }
.small { font-size: 13px; line-height: 18px; }
.mt { margin-top: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 300px; }
.toolbar select { width: auto; min-width: 170px; }
.toolbar .grow { flex: 1; }
details summary { color: var(--ink-dim); }

.kpi { padding: 16px 20px; }
.kpi .lbl { font-size: 14px; color: var(--ink-dim); }
.kpi .val { font-size: 32px; line-height: 40px; font-weight: 800; color: var(--title); margin: 4px 0 2px; }
.kpi .val small { font-size: 16px; color: var(--ink-faint); font-weight: 400; }
.kpi .sub { font-size: 13px; line-height: 18px; color: var(--ink-dim); }
.kpi .sub a { color: var(--accent); }
.bar { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; margin-top: 12px; display: flex; }
.bar i { display: block; height: 100%; background: var(--accent); }
.bar i.ok { background: var(--ok); }
.bar i.bad { background: var(--danger); }

table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 400; font-size: 12px; line-height: 16px; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; background: #fff; z-index: 1; }
.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: var(--bg); }
.t td.code { font-weight: 600; letter-spacing: .03em; color: var(--title); white-space: nowrap; }
.t td.code a { color: var(--title); }
.t td.num { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t td.act { text-align: right; white-space: nowrap; }
.tablewrap { overflow: auto; max-height: 68vh; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.empty { padding: 30px; text-align: center; color: var(--ink-faint); }

.pill { display: inline-flex; align-items: center; font-size: 12px; line-height: 16px; padding: 3px 9px; border-radius: 6px; white-space: nowrap; color: var(--ink-dim); background: var(--hover); }
.pill.partial, .pill.issued, .pill.queued { color: var(--warn); background: var(--warn-soft); }
.pill.sending, .pill.assigned { color: #3d6fb6; background: var(--tag); }
.pill.sent, .pill.free { color: var(--ok); background: var(--ok-soft); }
.pill.error { color: var(--danger); background: var(--danger-soft); }
.pill.blocked, .pill.empty { color: var(--ink-faint); }

.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 8px; border: 1px solid; margin-bottom: 16px; font-size: 14px; color: var(--ink); }
.banner.bad { border-color: var(--danger-line); background: var(--danger-soft); }
.banner.info { border-color: var(--line); background: #fff; color: var(--ink-dim); }
.banner.amber { border-color: var(--blue-line); background: var(--blue-soft); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 18px; color: var(--ink); }
.feed li:last-child { border: 0; }
.feed .dot { margin-top: 5px; }
.feed .dot.info { background: var(--ink-faint); }
.feed .dot.ok { background: var(--ok); }
.feed .dot.warn { background: var(--warn); }
.feed .dot.error { background: var(--danger); }
.feed .dot.sheet { background: var(--blue); }
.feed time { display: block; font-size: 12px; color: var(--ink-faint); }

.codeblock { font-family: var(--mono); font-size: 13px; line-height: 1.55; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.codeblock.text { font-family: var(--sans); }
.bigcode { font-size: 22px; line-height: 30px; font-weight: 800; letter-spacing: .04em; color: var(--title); }

.checklist { max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.checklist label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; color: var(--ink); }
.checklist label:last-child { border: 0; }
.checklist label:hover { background: var(--bg); }
.checklist input { width: 16px; height: 16px; }
.checklist .city { margin-left: auto; color: var(--ink-faint); font-size: 12px; }

.result { border: 1px solid var(--blue-line); background: var(--blue-soft); border-radius: 16px; padding: 16px 20px; margin-bottom: 16px; }
.result-item { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--blue-line); }
.result-item:last-child { border: 0; }

/* drawer + modal */
.scrim { position: fixed; inset: 0; background: rgba(10,17,47,.28); z-index: 20; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(880px, 100vw); background: var(--bg); border-left: 1px solid var(--line); z-index: 21;
  transform: translateX(100%); transition: transform .25s ease; overflow: auto; padding: 24px 24px 40px; }
.drawer.on { transform: none; }
.drawer .close { position: absolute; top: 16px; right: 16px; }
.modal { position: fixed; z-index: 30; left: 50%; top: 50%; transform: translate(-50%, -48%); width: min(480px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; opacity: 0; pointer-events: none; transition: .2s; box-shadow: 0 16px 48px rgba(10,17,47,.14); }
.modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal h2 { font-size: 18px; line-height: 24.5px; font-weight: 800; color: var(--title); margin: 0 0 8px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); z-index: 40; background: var(--title); color: #fff;
  padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: grid; gap: 10px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.tabs button { font: 400 15px/18px var(--sans); background: none; border: 1px solid transparent; border-radius: 8px; color: var(--ink-dim); padding: 6px 8px; cursor: pointer; transition: all .2s ease-in-out; }
.tabs button:hover, .tabs button.on { color: var(--ink); background: var(--panel-2); border-color: var(--line); }
.ph { display: flex; flex-wrap: wrap; gap: 6px; }
.ph button { font: 400 12px/16px var(--mono); background: var(--tag); border: 0; color: var(--ink-dim); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.ph button:hover { color: var(--ink); background: #d6e7ff; }
.savebar { position: sticky; bottom: 0; margin-top: 16px; padding: 12px 0; background: linear-gradient(rgba(248,250,252,0), var(--bg) 35%); display: flex; justify-content: flex-end; gap: 10px; z-index: 3; }
@media (max-width: 1100px) { .g4 { grid-template-columns: 1fr 1fr; } .split, .tpl { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); gap: 12px; padding: 14px 15px; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav .sep, .side-foot { display: none; }
  main { padding: 16px 15px 40px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .drawer { padding: 20px 16px 32px; }
}

/* ---- event-quotas additions ---- */
.nav .grp { font-size: 12px; line-height: 16px; color: var(--ink-faint); padding: 10px 10px 2px; text-transform: uppercase; letter-spacing: .04em; }
.top .who { font-size: 13px; color: var(--ink-dim); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: min(420px, 100%); }
.login .logo { margin-bottom: 10px; }
.demo-users { display: grid; gap: 8px; margin-top: 8px; }
.demo-users .btn { justify-content: space-between; flex-wrap: wrap; white-space: normal; text-align: left; height: auto; gap: 2px 8px; }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi .val.sm { font-size: 24px; line-height: 32px; }
.pill.pending, .pill.offered, .pill.approval, .pill.skipped { color: var(--warn); background: var(--warn-soft); }
.pill.confirmed, .pill.done { color: var(--ok); background: var(--ok-soft); }
.pill.declined, .pill.cancelled, .pill.expired { color: var(--ink-faint); background: var(--hover); }
.pill.rejected { color: var(--danger); background: var(--danger-soft); }
.pill.admin { color: #3d6fb6; background: var(--tag); }
.pill.new { color: var(--ok); background: var(--ok-soft); }
.pill.update { color: #3d6fb6; background: var(--tag); }
.banner.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.banner.ok { border-color: var(--ok-line); background: var(--ok-soft); }
.cta { border: 1px solid var(--accent); background: var(--accent-soft); }
.cta .big { font-size: 28px; line-height: 36px; font-weight: 800; color: var(--title); }
.t tr.mine td { background: var(--accent-soft); }
.t tr.ghost td { color: var(--ink-faint); font-style: italic; }
.t tr.total td { font-weight: 600; background: var(--panel-2); }
.t tr.err td { background: var(--danger-soft); }
.t th.sort { cursor: pointer; user-select: none; }
.t th.sort:hover { color: var(--ink); }
.t td.wrap { white-space: normal; min-width: 180px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 400 13px/18px var(--sans); border: 1px solid var(--line); background: #fff; color: var(--ink-dim); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chips button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.modal { max-height: calc(100vh - 32px); overflow: auto; }
.modal.wide { width: min(720px, calc(100vw - 32px)); }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.modal .note { font-size: 13px; line-height: 18px; color: var(--ink-dim); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.rowlist { display: grid; gap: 8px; }
.rowlist .r { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.err-text { color: var(--danger); font-size: 13px; line-height: 18px; }
.warn-text { color: var(--warn); font-size: 13px; line-height: 18px; }
.tbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tbar h2 { margin: 0; }
.hint { font-size: 13px; line-height: 18px; color: var(--ink-faint); }
.section { margin-top: 16px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .val { font-size: 26px; line-height: 32px; }
  .nav .grp { display: none; }
  .top h1 { font-size: 20px; line-height: 26px; }
  .rowlist .r { grid-template-columns: 1fr; }
}
.ev-pick { display: grid; gap: 6px; padding: 12px; margin: 0 -2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.ev-pick .ev-lbl { font-size: 12px; line-height: 16px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.ev-pick select { font-weight: 600; background-color: #fff; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.ev-pick .ev-one { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--title); }
.ev-pick .ev-dates { font-size: 12px; line-height: 16px; color: var(--ink-dim); }
.people { display: flex; flex-wrap: wrap; gap: 8px; }
.person { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.hint.key { color: var(--ink-dim); font-size: 14px; }
