.tabs { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin: 0 0 16px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { appearance: none; border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; min-height: 38px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.tab { display: grid; gap: 18px; animation: rise .35s var(--ease) both; }
.tab h2 { margin: 0; font-size: 20px; }
.tab h3 { margin: 6px 0 0; font-size: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.form-grid label > span:first-child, .form-grid label { color: var(--ink-soft); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--olive); }
.help { color: var(--muted); font-size: 13.5px; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; background: var(--surface); cursor: pointer; font-weight: 500; }
.chip input { width: 16px; height: 16px; min-height: 0; accent-color: var(--olive); }
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bg { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); display: grid; box-shadow: var(--shadow-sm); }
.bg img, .bg .ph { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--surface-2); display: block; }
.bg.off img { filter: grayscale(1) opacity(.45); }
.bg .b { padding: 8px 10px 10px; display: grid; gap: 4px; font-size: 13px; }
.bg .n { font-weight: 700; font-size: 14px; }
.bg .m { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface-2); }
.stat b { display: block; font-size: 22px; font-family: var(--display); }
.stat span { color: var(--muted); font-size: 13px; }
.scroll { overflow-x: auto; }
.marks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.mark-box { border-radius: 16px; padding: 22px; display: grid; justify-items: center; gap: 10px; border: 1px solid var(--line); }
.mark-box img { height: 150px; width: auto; }
.mark-box span { font-size: 13px; }
.mark-box.light { background: radial-gradient(120% 90% at 50% 30%, #fffdf7, #efe5cf); color: #6a5c35; }
.mark-box.dark { background: linear-gradient(180deg, #2c3a33, #121a16); color: #e9e2cf; }
.mark-box.dark img { filter: brightness(0) invert(1); }

/* ------------------------------------------------------------ switches */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; min-height: 40px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.switch .track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-strong); transition: background .2s var(--ease); }
.switch .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--olive); }
@media (prefers-color-scheme: dark) { .switch input:checked + .track { background: var(--gold-light); } }
.switch input:checked + .track::after { transform: translateX(-18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }
.switch-label { font-size: 14.5px; }
.set { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.set h3 { margin: 0; }
select.compact { min-height: 38px; padding: 6px 12px; padding-left: 36px; font-size: 14px; width: auto; border-radius: 999px; }

/* ------------------------------------------------------------ accounts */
.new-user summary { list-style: none; display: inline-flex; width: auto; }
.new-user summary::-webkit-details-marker { display: none; }
.new-user[open] summary { margin-bottom: 12px; }
.new-user-body { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.user-list { display: grid; gap: 14px; }
.user-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.user-card.super { border-color: var(--gold); background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 60%, var(--surface)), var(--surface)); }
.user-card.off { opacity: .78; }
.user-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 19px; color: #fffaf0; background: linear-gradient(160deg, #8a7744, #5f5131); }
.user-name { font-weight: 700; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.you { font-size: 12px; font-weight: 600; color: var(--brand); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; }
.user-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 13.5px; }
.user-times { display: grid; gap: 2px; color: var(--muted); font-size: 12.5px; text-align: start; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink-soft); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.title { background: var(--accent-soft); color: var(--brand); }
.super-note { margin: 0; color: var(--brand); font-weight: 500; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.perm-group { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface-2); }
.perm-group h4 { margin: 2px 0 4px; font-size: 13.5px; color: var(--muted); }
.preset-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ------------------------------------------------------------ reports */
.bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 56px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.bar-row i { display: block; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--gold-light), var(--olive)); min-width: 4px; }
.bar-row b { color: var(--ink); font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nowrap { white-space: nowrap; }
@media (max-width: 700px) {
  .user-head { grid-template-columns: auto 1fr; }
  .user-times { grid-column: 1 / -1; }
  .two { grid-template-columns: 1fr; }
}
