/* 9Friends back office. Colors and type from the design "9Friends Gen Z UI" › Admin: near-black, lime accent,
   pop pink/orange/cyan/violet for numbers, Unbounded for headings and figures, Be Vietnam Pro for text. */
:root {
  --bg: #0F0F12; --side: #131317; --card: #17171C; --line: #26262D; --line2: #34343C;
  --text: #F5F5F0; --muted: #A2A2AB; --lime: #D4FF3A; --pink: #FF6BB5; --orange: #FFB23F;
  --cyan: #7CF6FF; --violet: #9B8CFF; --olive: #3A3F2A; --red: #FF5C5C;
  --head: Unbounded, system-ui, sans-serif; --body: 'Be Vietnam Pro', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 14px; }
a { color: var(--lime); }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--muted); }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; flex-shrink: 0; background: var(--side); border-right: 1.5px solid var(--line); padding: 28px 18px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 0 6px 22px; }
.wordmark { font-family: var(--head); font-weight: 900; font-size: 22px; letter-spacing: -1px; }
.wordmark span:nth-child(5n+1) { color: var(--lime); } .wordmark span:nth-child(5n+2) { color: var(--pink); }
.wordmark span:nth-child(5n+3) { color: var(--orange); } .wordmark span:nth-child(5n+4) { color: var(--cyan); }
.wordmark span:nth-child(5n) { color: var(--violet); }
.tag { padding: 3px 8px; border-radius: 999px; border: 1.5px solid var(--line2); color: var(--muted); font-size: 11px;
  font-weight: 700; letter-spacing: .6px; transform: rotate(-4deg); }
.nav a { height: 44px; padding: 0 14px; border-radius: 14px; color: var(--text); text-decoration: none; display: flex;
  align-items: center; gap: 12px; font-weight: 700; }
.nav a:hover { background: var(--card); }
.nav a[aria-current] { background: var(--lime); color: var(--bg); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--pink);
  color: var(--bg); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.rule { margin-top: auto; padding: 14px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.4; }
.rule b { display: block; color: var(--lime); margin-bottom: 4px; }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; }
.avatar { width: 36px; height: 36px; border-radius: 13px; background: var(--lime); color: var(--bg); font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; text-transform: uppercase; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me .who { display: flex; flex-direction: column; min-width: 0; }
.me .who span:first-child { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 12px; text-align: left; }
.linkbtn:hover { color: var(--text); }
main { flex: 1; min-width: 0; padding: 28px 32px 60px; display: flex; flex-direction: column; gap: 20px; }
header.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
header.top .titles { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 200px; }
h1 { margin: 0; font-family: var(--head); font-weight: 900; font-size: 30px; letter-spacing: -1px; }
h2 { margin: 0 0 12px; font-family: var(--head); font-weight: 700; font-size: 16px; letter-spacing: -.3px; }
.sub { color: var(--muted); }

/* building blocks */
.grid { display: grid; gap: 14px; }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2 { grid-template-columns: 2fr 1fr; }
.split { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 14px; align-items: start; }
.split.side-r { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); } .g-cucu { grid-template-columns: 1fr 1.4fr; }
.card { padding: 20px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); min-width: 0; }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .big { margin-top: 10px; font-family: var(--head); font-weight: 900; font-size: 28px; letter-spacing: -1px; }
.stat .note { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.c-lime { color: var(--lime); } .c-pink { color: var(--pink); } .c-orange { color: var(--orange); }
.c-cyan { color: var(--cyan); } .c-violet { color: var(--violet); } .c-red { color: var(--red); } .c-muted { color: var(--muted); }
.input { height: 44px; padding: 0 16px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line);
  outline: none; min-width: 0; }
.input:focus { border-color: var(--lime); }
textarea.input { height: auto; min-height: 110px; padding: 12px 16px; border-radius: 16px; width: 100%; resize: vertical; line-height: 1.5; }
.btn { height: 40px; padding: 0 18px; border-radius: 20px; border: 1.5px solid var(--line2); background: var(--card);
  font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.btn.danger { background: transparent; color: var(--pink); border-color: var(--pink); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { height: 36px; padding: 0 14px; border-radius: 18px; border: 1.5px solid var(--line); background: transparent;
  font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px;
  font-weight: 700; background: var(--line); color: var(--text); white-space: nowrap; }
.pill.ok { background: var(--olive); color: var(--lime); } .pill.warn { background: #3d2f1a; color: var(--orange); }
.pill.bad { background: #3d1a2c; color: var(--pink); } .pill.info { background: #1a3438; color: var(--cyan); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; } tr.click:hover td { background: #1c1c22; } tr.sel td { background: #1f2214; }
.num { font-family: var(--head); font-weight: 700; font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list .item:last-child { border-bottom: 0; }
.list .item.click { cursor: pointer; border-radius: 14px; padding: 12px; border-bottom: 0; }
.list .item.click:hover { background: #1c1c22; } .list .item.sel { background: #1f2214; outline: 1.5px solid var(--olive); }
.mini { width: 32px; height: 32px; border-radius: 11px; font-size: 13px; }
.meter { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--lime); border-radius: 5px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.bars .bar i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: var(--line2); min-height: 2px; }
.bars .bar:last-child i { background: var(--lime); }
.bars .bar small { font-size: 11px; color: var(--muted); }
.bars.two .bar { flex-direction: column; }
.bars.two .pair { display: flex; gap: 2px; width: 100%; align-items: flex-end; flex: 1; }
.bars.two .pair i { flex: 1; } .bars.two .pair i:first-child { background: var(--lime); } .bars.two .pair i:last-child { background: var(--pink); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--c); }
.photo { position: relative; border-radius: 18px; overflow: hidden; background: var(--line); aspect-ratio: 4 / 5; max-height: 420px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.blur img { filter: blur(28px) saturate(.6); transform: scale(1.1); }
.photo button { position: absolute; inset: 0; margin: auto; width: max-content; height: 40px; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kv div { padding: 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.kv small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .4px; text-transform: uppercase; margin-bottom: 4px; }
pre { margin: 0; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); overflow: auto;
  font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 360px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; font-family: var(--head); font-size: 18px; color: var(--lime); margin-bottom: 6px; }
.banner { padding: 14px 18px; border-radius: 18px; border: 1.5px dashed var(--orange); color: var(--orange); background: #1d1810; }
.clock { font-family: var(--head); font-weight: 900; font-size: 22px; color: var(--orange); }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login .card { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.login .input { width: 100%; }
.login .code { letter-spacing: 10px; font-family: var(--head); font-size: 22px; text-align: center; }
.err { color: var(--pink); min-height: 1.2em; font-size: 13px; }

/* modal + toast */
.veil { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.modal { width: 100%; max-width: 520px; padding: 26px; border-radius: 24px; background: var(--card); border: 1.5px solid var(--line2);
  display: flex; flex-direction: column; gap: 14px; }
.modal p { margin: 0; line-height: 1.5; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 20px; border-radius: 22px;
  background: var(--lime); color: var(--bg); font-weight: 700; z-index: 11; animation: pop .35s cubic-bezier(.16, 1, .3, 1); }
.toast.bad { background: var(--pink); }
@keyframes pop { from { transform: translate(-50%, 20px) scale(.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

@media (max-width: 1100px) { .g5 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); }
  .g2, .split, .split.side-r, .g3, .g-cucu { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .shell { flex-direction: column; } .side { width: auto; height: auto; position: static; padding: 16px; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; } .rule { display: none; } main { padding: 20px 16px; }
  .g5, .g4 { grid-template-columns: 1fr 1fr; } .kv { grid-template-columns: 1fr 1fr; } .scrollx { overflow-x: auto; } }
