:root { --bg:#f5f6f8; --card:#fff; --line:#e3e6ea; --text:#1d1f23; --muted:#6b7280; --accent:#2da9e8; --ok:#1f9d55; --warn:#d97706; --bad:#dc2626; }
* { box-sizing:border-box; }
body { margin:0; font:14px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background:var(--bg); color:var(--text); }
.hidden { display:none !important; }
.login { min-height:100vh; display:flex; align-items:center; justify-content:center; }
.login form { background:var(--card); padding:32px; border-radius:12px; width:320px; display:flex; flex-direction:column; gap:10px; box-shadow:0 4px 24px rgba(0,0,0,.06); }
.login h1 { margin:0 0 8px; font-size:20px; }
input, select, textarea, button { font:inherit; }
input, select, textarea { padding:8px 10px; border:1px solid var(--line); border-radius:8px; width:100%; background:#fff; }
textarea { min-height:80px; resize:vertical; }
button { padding:8px 14px; border:0; border-radius:8px; background:var(--accent); color:#fff; cursor:pointer; }
button.ghost { background:#eef0f3; color:var(--text); }
button.danger { background:var(--bad); }
button.warn { background:var(--warn); }
button:disabled { opacity:.5; cursor:default; }
.err { color:var(--bad); min-height:18px; }
.ok { color:var(--ok); min-height:18px; }
header { display:flex; align-items:center; gap:24px; padding:10px 18px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.brand { font-weight:700; }
nav { display:flex; gap:4px; }
nav .tab { background:transparent; color:var(--muted); padding:6px 10px; }
nav .tab.active { background:#e8f5fd; color:var(--accent); font-weight:600; }
.badge { background:var(--accent); color:#fff; border-radius:10px; padding:0 7px; font-size:12px; }
.who { margin-left:auto; color:var(--muted); }
.banner { background:#fff7e6; color:#8a5a00; padding:8px 18px; border-bottom:1px solid #f3dfb3; }
.split { display:grid; grid-template-columns:340px 1fr; min-height:calc(100vh - 56px); }
.detailGrid { display:grid; grid-template-columns:1fr 330px; gap:16px; align-items:start; }
.cardCol { position:sticky; top:0; }
.ucard { background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.uhead { display:flex; gap:12px; align-items:center; padding:14px; background:linear-gradient(135deg,#e8f5fd,#f5f6f8); border-bottom:1px solid var(--line); }
.avatar { width:44px; height:44px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; flex:none; }
.uname { font-weight:700; font-size:15px; }
.usub { color:var(--muted); font-size:12px; margin-top:2px; }
.usec { padding:10px 14px; border-bottom:1px solid var(--line); font-size:13px; }
.usec h4 { margin:0 0 6px; font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.usec h4.sub { margin-top:8px; }
.kv { display:flex; justify-content:space-between; gap:10px; padding:3px 0; }
.kv span { color:var(--muted); flex:none; }
.kv b { font-weight:500; text-align:right; word-break:break-word; }
.chips { display:flex; flex-wrap:wrap; gap:4px; }
.chip { display:inline-block; padding:2px 8px; border-radius:10px; background:#eef0f3; font-size:11px; }
.chip.club { background:#e6f6ec; color:var(--ok); }
.chip.warn { background:#fdecec; color:var(--bad); }
.chip.mini { padding:0 6px; font-size:10px; }
.acc { padding:6px 8px; border-radius:8px; background:#f8fafc; margin-bottom:4px; border-left:3px solid var(--line); }
.acc.on { border-left-color:var(--ok); background:#f2fbf5; }
.accT { font-weight:600; }
.accD { color:var(--muted); font-size:12px; }
.pay { display:grid; grid-template-columns:auto 1fr auto; gap:8px; padding:3px 0; font-size:12px; }
.pay span:first-child { color:var(--muted); }
.pay.unpaid b { color:var(--warn); }
.muted { color:var(--muted); }
details summary { cursor:pointer; color:var(--muted); font-size:12px; margin-top:4px; }
.gcBtn { display:block; text-align:center; padding:10px; margin-bottom:10px; background:var(--accent); color:#fff; border-radius:10px; font-weight:600; text-decoration:none; }
.gcBtn:hover { background:#1b96d6; }
.card.current { border-left:3px solid var(--accent); }
.list { border-right:1px solid var(--line); background:var(--card); overflow:auto; max-height:calc(100vh - 56px); }
.filters { display:flex; gap:6px; padding:10px; border-bottom:1px solid var(--line); }
.filters select { flex:1; }
.filters button { width:40px; padding:6px; }
.list ul { list-style:none; margin:0; padding:0; }
.list li { padding:10px 12px; border-bottom:1px solid var(--line); cursor:pointer; }
.list li:hover { background:#f8fafc; }
.list li.active { background:#e8f5fd; }
.list .top { display:flex; justify-content:space-between; gap:8px; font-size:12px; color:var(--muted); }
.list .q { margin-top:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pill { display:inline-block; padding:1px 7px; border-radius:10px; font-size:11px; background:#eef0f3; }
.pill.ANSWER { background:#e6f6ec; color:var(--ok); }
.pill.ESCALATE { background:#fdecec; color:var(--bad); }
.pill.ROUTE_SALES, .pill.ROUTE_CURATOR, .pill.ROUTE_WELCOME, .pill.ROUTE_ARTEM, .pill.ROUTE_BACK, .pill.ROUTE_SUPPORT { background:#fff4e0; color:var(--warn); }
.pill.SKIP { background:#eef0f3; color:var(--muted); }
.detail { padding:18px 22px; overflow:auto; max-height:calc(100vh - 56px); }
.empty { color:var(--muted); padding:40px; text-align:center; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:12px; }
.card h3 { margin:0 0 8px; font-size:13px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; }
.meta { display:flex; flex-wrap:wrap; gap:8px 16px; color:var(--muted); font-size:13px; }
.meta a { color:var(--accent); }
.history { max-height:260px; overflow:auto; font-size:13px; }
.history .m { padding:6px 8px; border-radius:8px; margin-bottom:6px; background:#f8fafc; }
.history .m.student { background:#e8f5fd; }
.history .m .who { font-size:11px; color:var(--muted); }
.question { font-size:15px; white-space:pre-wrap; }
.attach { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
.attach a { display:inline-block; color:var(--accent); }
.shot { max-width:100%; max-height:420px; border:1px solid var(--line); border-radius:8px; display:block; cursor:zoom-in; background:#fff; }
.history .shot { max-height:220px; }
.reason { color:var(--muted); font-size:13px; margin-top:6px; }
.draft textarea { min-height:180px; font-size:14px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.pre { white-space:pre-wrap; font-size:13px; }
.pad { padding:18px 22px; }
.narrow { max-width:720px; }
.hint { color:var(--muted); }
.eventForm { display:grid; grid-template-columns:1fr 1fr; gap:8px; background:var(--card); padding:14px; border-radius:12px; border:1px solid var(--line); margin-bottom:14px; }
.eventForm #evTitle { grid-column:1 / -1; }
.eventForm .row { grid-column:1 / -1; display:flex; gap:8px; }
.launchForm { display:flex; flex-direction:column; gap:8px; background:var(--card); padding:14px; border-radius:12px; border:1px solid var(--line); margin-bottom:14px; }
.launchForm textarea { min-height:160px; }
.launchForm .row { flex-wrap:wrap; margin:0; }
.launchForm select { width:auto; }
tr.off td { color:var(--muted); }
.table { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.table th, .table td { padding:8px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; font-size:13px; }
.table th { background:#f8fafc; color:var(--muted); font-weight:600; }
.table a { color:var(--accent); word-break:break-all; }
.toggle { display:flex; align-items:center; gap:8px; margin:12px 0 6px; font-weight:600; }
.toggle input { width:auto; }
.flags span { display:inline-block; margin:4px 8px 4px 0; padding:3px 9px; border-radius:8px; background:#eef0f3; }
.flags span.on { background:#e6f6ec; color:var(--ok); }
.row { display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.row input[type=number] { width:80px; }
@media (max-width: 1200px) { .detailGrid { grid-template-columns:1fr; } .cardCol { position:static; } }
@media (max-width: 900px) { .split { grid-template-columns:1fr; } .list { max-height:40vh; border-right:0; border-bottom:1px solid var(--line); } }
