:root {
  --bg: #0d111a; --side: #0a0d14; --card: #171d2b; --inner: #1f2636; --hover: #2a3347; --line: #232b3c;
  --text: #e8eef7; --text-2: #c3cede; --muted: #93a1b5; --faint: #8796ab;
  --g: linear-gradient(135deg, #5b8cff 0%, #a43ce0 45%, #e0279c 100%);
  --mag: #e0279c; --mag-t: #3d1530; --mag-f: #f07ac0; --vio-t: #2c1f4a; --vio-f: #d2a8ff; --off: #323c50;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, sans-serif; }
a { color: var(--mag-f); }
button { font: inherit; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.banner-bg { position: absolute; top: 0; left: 0; right: 0; height: 250px; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13,17,26,0) 0%, rgba(13,17,26,.3) 60%, #0d111a 100%), url('/assets/banner.jpg?v=3') center top / max(100%, 1300px) auto no-repeat;
  animation: bannerOut linear both; animation-timeline: scroll(root block); animation-range: 0 240px; }
.banner { position: relative; z-index: 1; min-height: 120px; padding: 16px 32px 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  animation: bannerOut linear both; animation-timeline: scroll(root block); animation-range: 0 220px; }
@keyframes bannerOut { to { opacity: 0; transform: translateY(-40px); } }
@media (prefers-reduced-motion: reduce) { .banner-bg, .banner { animation: none; } }
.banner-logo { width: 74px; height: 74px; flex: none; border-radius: 16px 0 16px 0; }
.banner-title { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.banner-srv { display: flex; align-items: center; gap: 12px; background: rgba(13,17,26,.62); padding: 8px 16px 8px 8px; border-radius: 12px 0 12px 0; }
.banner-srv img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }

.root { position: relative; min-height: 100vh; }
.layout { position: relative; z-index: 1; display: flex; flex-wrap: wrap; }
aside { flex: 1 1 232px; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; }
main { flex: 999 1 560px; min-width: 0; padding: 22px 28px 48px 14px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 820px) { main { padding: 12px 16px 40px; } aside { padding: 12px 16px; } }

.srv-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--card); border: 0; border-radius: 12px 0 12px 0; padding: 10px 12px; color: var(--text); cursor: pointer; min-height: 54px; text-align: left; }
.srv-btn img, .srv-it img { border-radius: 50%; object-fit: cover; flex: none; }
.srv-menu { background: var(--card); border-radius: 0 0 12px 0; padding: 6px; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.srv-it { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 8px 0 8px 0; padding: 8px 10px; min-height: 44px; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.srv-it.on, .srv-it:hover { background: var(--hover); }
.sect { font-size: 11px; color: var(--faint); font-weight: 500; letter-spacing: .06em; padding: 0 12px 6px; }
nav { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; padding: 0 12px; border-radius: 10px 0 10px 0; font-size: 14px; cursor: pointer; text-align: left; min-height: 40px; background: transparent; color: var(--text-2); }
.nav:hover { background: #1c2333; }
.nav.on { background: var(--g); color: #fff; font-weight: 600; }
.me-card { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px 0 12px 0; padding: 10px 10px 10px 12px; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 8px 0 8px 0; background: var(--g); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.invite { background: var(--card); border-radius: 14px 0 14px 0; padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }

.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 6px; }
.head h1 { margin: 0; font-size: 15px; font-weight: 600; }

.card { background: var(--card); border-radius: 14px 0 14px 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.h2 { margin: 0; font-size: 15px; font-weight: 600; }
.sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.lbl { display: block; font-size: 13px; color: var(--text-2); font-weight: 500; margin-bottom: 6px; }
.inp { width: 100%; background: var(--inner); border: 0; border-radius: 10px 0 10px 0; padding: 10px 12px; color: var(--text); font: inherit; font-size: 14px; outline: none; min-height: 42px; }
.inp:focus { box-shadow: 0 0 0 2px #a43ce0; }
textarea.inp { resize: vertical; line-height: 1.5; }
select.inp option { background: var(--card); }
.btn { border: 0; border-radius: 10px 0 10px 0; padding: 0 16px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-p { background: var(--g); color: #fff; }
.btn-p:hover:not(:disabled) { filter: brightness(1.12); }
.btn-s { background: #222a3b; color: var(--text); }
.btn-s:hover:not(:disabled) { background: var(--hover); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12px; font-weight: 500; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px 0 6px 0; white-space: nowrap; }
.c-open { background: var(--mag-t); color: var(--mag-f); }
.c-wait { background: var(--vio-t); color: var(--vio-f); }
.c-closed { background: #222a3b; color: var(--text-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--inner); padding: 4px; border-radius: 10px 0 10px 0; }
.tab { border: 0; font-size: 13px; font-weight: 500; padding: 0 12px; min-height: 32px; border-radius: 8px 0 8px 0; cursor: pointer; background: transparent; color: var(--muted); }
.tab.on { background: var(--g); color: #fff; }
.tab.plain.on { background: #2f3a50; color: var(--text); }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 0; }
.row + .row { box-shadow: 0 -1px 0 var(--line); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tg { width: 40px; height: 24px; flex: none; border: 0; border-radius: 6px 0 6px 0; padding: 3px; cursor: pointer; display: flex; justify-content: flex-start; background: var(--off); }
.tg span { width: 18px; height: 18px; border-radius: 4px; background: #fff; display: block; }
.tg.on { background: var(--g); justify-content: flex-end; }
.optrow { display: flex; align-items: center; gap: 14px; background: var(--inner); border-radius: 10px 0 10px 0; padding: 12px 14px; }
.optrow > span { flex: 1; min-width: 0; }
.optrow b { display: block; font-size: 14px; font-weight: 500; }
.optrow small { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
.mini { background: var(--inner); border-radius: 10px 0 10px 0; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.big { font-size: 26px; font-weight: 700; }
.hero { background: var(--g); color: #fff; border-radius: 14px 0 14px 0; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-width: 0; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
.th { font-size: 11px; color: var(--faint); font-weight: 500; text-align: left; padding: 9px 12px; background: var(--inner); }
.th:first-child { border-radius: 8px 0 0 8px; } .th:last-child { border-radius: 0 8px 8px 0; }
.td { padding: 12px; font-size: 13px; vertical-align: middle; }
.scroll-x { overflow-x: auto; }
.empty { color: var(--muted); font-size: 13px; padding: 14px 0; }
.chart { height: 200px; display: flex; gap: 8px; position: relative; }
.chart .mid { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.chart .colm { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.chart .up, .chart .dn { flex: 1; width: 100%; display: flex; justify-content: center; }
.chart .up { align-items: flex-end; padding-bottom: 2px; } .chart .dn { align-items: flex-start; padding-top: 2px; }
.chart .up i { width: 70%; max-width: 30px; background: linear-gradient(180deg, #e0279c, #a43ce0 60%, #5b8cff); border-radius: 6px; display: block; }
.chart .dn i { width: 70%; max-width: 30px; background: var(--off); border-radius: 6px; display: block; }
.months { display: flex; gap: 8px; } .months span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); }
.preview-wrap { background: #313338; border-radius: 12px 0 12px 0; padding: 16px; display: flex; gap: 14px; }
.preview-wrap img.av { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.preview-img { max-width: 100%; display: block; margin-top: 8px; }
.sticky { position: sticky; top: 16px; }
.swatch { display: flex; align-items: center; gap: 10px; background: var(--inner); border-radius: 10px 0 10px 0; padding: 8px 10px; cursor: pointer; min-height: 48px; }
.swatch input { width: 30px; height: 30px; border: 0; padding: 0; background: transparent; cursor: pointer; flex: none; }
.emo { width: 42px; height: 42px; border: 0; border-radius: 10px 0 10px 0; background: var(--inner); font-size: 18px; cursor: pointer; }
.emo.on { background: #2f3a50; }
.list-btn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 10px 0 10px 0; padding: 10px 12px; min-height: 56px; cursor: pointer; text-align: left; background: transparent; color: var(--text); }
.list-btn.on, .list-btn:hover { background: var(--hover); }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--card); color: var(--text); padding: 12px 16px; border-radius: 12px 0 12px 0; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 14px; max-width: 360px; }
.toast.err { background: #3d1530; color: #ffd3ec; }
.login { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login .banner-bg { height: 100%; animation: none; }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 400px; background: rgba(23,29,43,.94); border-radius: 18px 0 18px 0; padding: 36px 30px; display: flex; flex-direction: column; gap: 22px; }
.tree-ch { padding: 7px 10px; border-radius: 8px 0 8px 0; background: var(--inner); font-size: 14px; }
.donut { position: relative; width: 170px; height: 170px; align-self: center; }
.donut > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (max-width: 640px) {
  .banner-bg { height: 190px; } .banner { min-height: 90px; padding: 12px 16px 8px; }
  .banner-logo { width: 52px; height: 52px; } .banner-title { font-size: 20px; }
  .sticky { position: static; }
}
