:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030604;
  color: #eef8f0;
  --panel: rgba(8, 15, 10, .9);
  --panel-solid: #08100b;
  --line: rgba(96, 255, 140, .13);
  --line-strong: rgba(96, 255, 140, .32);
  --green: #54f287;
  --green-bright: #7cff9f;
  --text: #eef8f0;
  --muted: #83998a;
  --danger: #ff7e8e;
  --warning: #ffd166;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb, #69574a) transparent;
}

*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #526159, #35413a);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #64766c, #435249);
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(84, 242, 135, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 242, 135, .025) 1px, transparent 1px),
    radial-gradient(circle at 12% 5%, rgba(26, 158, 71, .20), transparent 32%),
    radial-gradient(circle at 88% 88%, rgba(10, 88, 41, .18), transparent 34%),
    #030604;
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(84, 242, 135, .025) 50%, transparent 65%); }
::selection { color: #031006; background: var(--green); }
.shell { width: min(100% - 32px, 1320px); margin: 0 auto; padding: 42px 0 56px; }
.top { display: flex; justify-content: space-between; gap: 28px; align-items: end; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--green); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(84, 242, 135, .45); border-radius: 9px; color: #041108; background: var(--green); box-shadow: 0 0 24px rgba(84, 242, 135, .28); }
h1 { margin: 12px 0 8px; font-size: clamp(32px, 5vw, 48px); line-height: 1; letter-spacing: -.055em; }
.lead { margin: 0; color: var(--muted); line-height: 1.55; max-width: 620px; }
.actions { display: flex; gap: 10px; align-items: center; }
.stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: #9fb4a4; background: rgba(7, 17, 10, .8); font-size: 13px; white-space: nowrap; }

.card { position: relative; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 28px 90px rgba(0, 0, 0, .56), inset 0 1px 0 rgba(255, 255, 255, .025); backdrop-filter: blur(20px); }
.card::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 255, 159, .7), transparent); }
.toolbar { display: flex; gap: 16px; align-items: end; margin-bottom: 17px; }
.search { flex: 1; }
.search label { display: block; margin-bottom: 8px; color: #bad0bf; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
input { width: 100%; padding: 13px 15px; border: 1px solid rgba(121, 159, 130, .25); border-radius: 12px; outline: none; color: var(--text); background: #050b07; font: inherit; transition: border-color .2s, box-shadow .2s, background .2s; }
input::placeholder { color: #526458; }
input:focus { border-color: var(--green); background: #071009; box-shadow: 0 0 0 4px rgba(84, 242, 135, .11), 0 0 24px rgba(84, 242, 135, .08); }
.notice { min-width: 240px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: #94aa99; background: rgba(84, 242, 135, .045); font-size: 13px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 15px; background: rgba(3, 8, 5, .55); scrollbar-color: #245a35 #071009; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; text-align: left; border-bottom: 1px solid rgba(84, 242, 135, .075); font-size: 13px; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; color: var(--green); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: #071009; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background .16s, box-shadow .16s; }
tbody tr:hover { background: rgba(84, 242, 135, .055); box-shadow: inset 3px 0 var(--green); }
.mono { color: #bfd0c2; font-variant-numeric: tabular-nums; }
.sub { margin-top: 4px; color: #657b6b; font-size: 12px; font-weight: 500; white-space: nowrap; }
.muted { color: #657b6b; }
.ok { color: var(--green-bright); }
.warn { color: var(--warning); }
.bad { color: var(--danger); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(126, 154, 133, .14); border-radius: 999px; color: #b8c8bb; background: rgba(255, 255, 255, .035); font-size: 11px; font-weight: 800; }
.chip-on { color: var(--green-bright); border-color: rgba(84, 242, 135, .24); background: rgba(84, 242, 135, .10); }
.chip-bad { color: #ffb4be; border-color: rgba(255, 126, 142, .20); background: rgba(255, 126, 142, .10); }
.block { margin-top: 8px; }
.block h3 { margin: 18px 0 4px; color: var(--green); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.status-line { margin: 8px 0 4px; font-size: 13px; }
.actions-cell { display: flex; flex-direction: column; gap: 8px; min-width: 118px; }

.mini, .ghost, .download-option { font: inherit; }
.mini, .ghost { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: #c9d9cc; background: rgba(255, 255, 255, .04); text-decoration: none; font-size: 12px; font-weight: 800; cursor: pointer; transition: .18s ease; }
.mini:hover, .ghost:hover { color: var(--green-bright); border-color: var(--line-strong); background: rgba(84, 242, 135, .08); }
.mini-primary { color: #031006; border-color: var(--green); background: var(--green); }
.mini-primary:hover { color: #020d05; background: var(--green-bright); box-shadow: 0 0 20px rgba(84, 242, 135, .18); }

.modal { position: fixed; inset: 0; padding: 24px; display: grid; place-items: center; z-index: 30; background: rgba(0, 4, 1, .82); backdrop-filter: blur(8px); }
.modal-card { width: min(100%, 480px); padding: 26px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel-solid); box-shadow: 0 28px 100px #000, 0 0 50px rgba(22, 132, 59, .10); }
.modal-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.modal-lead { margin: 10px 0 18px; color: var(--muted); line-height: 1.5; }
.download-options { display: grid; gap: 10px; }
.download-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; color: inherit; background: rgba(255, 255, 255, .025); text-align: left; cursor: pointer; transition: .18s ease; }
.download-option:hover { border-color: var(--green); background: rgba(84, 242, 135, .07); transform: translateY(-1px); }
.download-option:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.download-option b { display: block; font-size: 15px; }
.download-option span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 500; }
.drawer-actions { display: flex; gap: 8px; margin-top: 16px; }

.primary, .ghost-btn { padding: 12px 16px; border-radius: 12px; font-weight: 850; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s, background .18s; }
.primary { color: #031006; border: 1px solid var(--green); background: var(--green); box-shadow: 0 8px 26px rgba(37, 189, 85, .15); }
.primary:hover { background: var(--green-bright); transform: translateY(-1px); box-shadow: 0 10px 32px rgba(37, 189, 85, .26); }
.ghost-btn { color: #caddce; border: 1px solid var(--line); background: rgba(84, 242, 135, .045); }
.ghost-btn:hover { color: var(--green-bright); border-color: var(--line-strong); background: rgba(84, 242, 135, .09); transform: translateY(-1px); }
.primary:disabled, .mini:disabled, .ghost-btn:disabled { opacity: .5; cursor: wait; transform: none; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

.drawer { position: fixed; inset: 0; display: grid; place-items: end; z-index: 20; background: rgba(0, 4, 1, .82); backdrop-filter: blur(6px); }
.drawer-card { width: min(100%, 560px); height: 100%; overflow: auto; padding: 28px; border-left: 1px solid var(--line-strong); background: var(--panel-solid); box-shadow: -30px 0 90px rgba(0, 0, 0, .55); }
.drawer-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.eyebrow { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
h2 { margin: 8px 0 0; font-size: 28px; letter-spacing: -.035em; }
.drawer-body { margin-top: 22px; display: grid; gap: 10px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row span:first-child { color: var(--muted); }
.devices { display: grid; gap: 8px; margin-top: 8px; }
.device { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(84, 242, 135, .035); font-size: 13px; }
.hidden { display: none !important; }

@media (max-width: 800px) {
  .shell { width: min(100% - 20px, 1320px); padding-top: 24px; }
  .top, .toolbar { flex-direction: column; align-items: stretch; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .stat { grid-column: 1 / -1; text-align: center; }
  .notice { min-width: 0; }
  .card { padding: 14px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Refined workspace layout */
body { background: #080a09; }
body::before { display: none; }
.shell { width: min(100% - 64px, 1500px); padding: 0 0 64px; }
.masthead { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #242a26; }
.brand { color: #edf4ef; font-size: 12px; letter-spacing: .12em; }
.brand-mark { width: 34px; height: 34px; border: 0; border-radius: 10px; box-shadow: none; }
.top { align-items: center; margin: 0; padding: 30px 0 24px; }
h1 { margin: 0 0 10px; font-size: clamp(34px, 4vw, 46px); }
.lead { color: #89958d; font-size: 14px; }
.actions { gap: 10px; }
.primary, .ghost-btn { min-height: 44px; padding: 0 18px; border-radius: 9px; font-size: 13px; font-weight: 700; }
.primary { background: #65e88d; border-color: #65e88d; box-shadow: none; }
.ghost-btn { background: #141a16; border-color: #303b33; }
.card { padding: 0; border: 1px solid #242d27; border-radius: 16px; background: #101411; box-shadow: 0 22px 65px #0005; backdrop-filter: none; }
.card::before { display: none; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 26px 20px; }
.card-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.card-heading p { margin: 6px 0 0; color: #77847b; font-size: 12px; }
.stat { background: #171e19; border-color: #2b382e; color: #a9c5af; font-size: 12px; }
.toolbar { align-items: end; margin: 0; padding: 0 26px 22px; }
.search { max-width: 480px; }
.search label { color: #a3afa6; font-size: 11px; letter-spacing: .04em; }
input { min-height: 44px; background: #0b0e0c; border-color: #303a33; border-radius: 9px; font-size: 13px; }
.notice { margin-left: auto; padding: 12px 0; border: 0; background: transparent; text-align: right; color: #7e9083; }
.table-wrap { border: 0; border-top: 1px solid #273028; border-radius: 0; background: #101411; }
th, td { padding: 17px 16px; border-color: #252d27; }
th { color: #829187; background: #151b17; font-size: 10px; letter-spacing: .08em; }
td { color: #d6ded8; line-height: 1.5; }
.account-extras-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(39px, 1fr)); min-height: 82px; overflow: hidden; border: 1px solid #2d342f; border-radius: 7px; }
.account-extras .extra-line { display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 1px; min-width: 0; padding: 4px 6px; border-right: 1px solid #2d342f; border-bottom: 1px solid #2d342f; }
.account-extras .extra-line:nth-child(3) { border-right: 0; }
.account-extras .extra-line:nth-child(n+4) { border-bottom: 0; }
.account-extras .extra-line:nth-child(4) { grid-column: span 2; }
.account-extras .extra-line:last-child { border-right: 0; }
.extra-line > span:first-child { color: #9bad9f; font-size: 10px; line-height: 1.15; }
.extra-value { display: grid; justify-items: start; min-width: 0; text-align: left; }
.extra-value b { color: inherit; font-size: 11px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.extra-value small { max-width: 78px; margin-top: 1px; color: #8e9b92; font-size: 9px; line-height: 1.2; overflow-wrap: anywhere; }
.chat-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(39px, 1fr)); min-height: 82px; overflow: hidden; border: 1px solid #2d342f; border-radius: 7px; }
.chat-metric { display: grid; align-content: center; gap: 1px; min-width: 0; padding: 4px 6px; border-right: 1px solid #2d342f; border-bottom: 1px solid #2d342f; }
.chat-metric:nth-child(3) { border-right: 0; }
.chat-metric:nth-child(n+4) { border-bottom: 0; }
.chat-metric:last-child { border-right: 0; }
.chat-metric span { color: #9bad9f; font-size: 10px; line-height: 1.15; }
.chat-metric b { color: #d6ded8; font-size: 11px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.registration-summary-grid { display: grid; grid-template-columns: minmax(64px, .8fr) minmax(100px, 1.2fr); grid-template-rows: 40px 40px; height: 82px; min-height: 0; overflow: hidden; border: 1px solid #2d342f; border-radius: 7px; }
.registration-metric { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 10px 14px; align-content: center; gap: 2px; min-width: 0; padding: 3px 6px; border-right: 1px solid #2d342f; border-bottom: 1px solid #2d342f; }
.registration-metric:nth-child(2) { border-right: 0; }
.registration-metric span { color: #9bad9f; font-size: 9px; line-height: 10px; white-space: nowrap; }
.registration-metric b { display: block; min-width: 0; color: #d6ded8; font-size: 10px; font-weight: 550; line-height: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.registration-dc { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr; align-items: center; gap: 6px; padding-block: 4px; border-right: 0; border-bottom: 0; }
.core-field { display: grid; grid-template-rows: 29px minmax(0, 1fr); min-height: 82px; min-width: 0; padding: 0; overflow: hidden; border: 1px solid #2d342f; border-radius: 7px; }
.core-field > span { display: flex; align-items: center; padding: 0 7px; border-bottom: 1px solid #2d342f; color: #9bad9f; font-size: 10px; line-height: 1.15; }
.core-field-value { display: flex; align-items: center; min-width: 0; padding: 5px 7px; color: #d6ded8; font-size: 10.5px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.core-field-value.mono { font-size: 10px; font-variant-numeric: tabular-nums; }
.core-field .country { align-items: center; gap: 2px 5px; }
.core-field .country-code { font-size: 9px; }
.account-info-grid { display: grid; grid-template-rows: repeat(3, minmax(26px, 1fr)); min-height: 82px; overflow: hidden; border: 1px solid #2d342f; border-radius: 7px; }
.account-info-line { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0; padding: 3px 7px; border-bottom: 1px solid #2d342f; }
.account-info-line:last-child { border-bottom: 0; }
.account-info-line > span { color: #9bad9f; font-size: 9px; line-height: 1.15; }
.account-info-line b { min-width: 0; color: #d6ded8; font-size: 10.5px; font-weight: 500; line-height: 1.2; overflow-wrap: anywhere; }
.account-info-line .mono { font-size: 10px; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: #18231b; box-shadow: inset 3px 0 #65e88d; }
.actions-cell { display: grid; grid-template-columns: minmax(0, 1fr) 40px; grid-template-rows: repeat(2, 36px); gap: 6px; min-width: 170px; }
.mini, .ghost { border-radius: 8px; padding: 8px 11px; }
.mini-primary { background: #65e88d; border-color: #65e88d; }
.actions-cell .mini { min-height: 0; height: 100%; }
.tool-btn { display: grid; place-items: center; padding: 0; color: #aebbb2; }
.tool-btn svg, .tool-btn .action-glyph { width: 17px; height: 17px; }
.tool-btn:hover { color: #d9e5dc; border-color: #506057; background: #263029; }
.modal-card, .drawer-card { background: #111713; }
.modal:not(.hidden) .modal-card { animation: modal-in .22s ease-out; }
.drawer:not(.hidden) .drawer-card { animation: drawer-in .25s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { transform: translateX(30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
button:focus-visible { outline: 2px solid #8bffa9; outline-offset: 3px; }
@media (max-width: 800px) {
  .shell { width: min(100% - 32px, 1500px); padding-top: 0; }
  .masthead { height: 66px; }
  .top { padding: 22px 0 18px; gap: 16px; }
  .actions { display: flex; flex-wrap: wrap; }
  .actions button { flex: 1; }
  .card { padding: 0; }
  .card-heading { padding: 20px; flex-wrap: wrap; }
  .toolbar { padding: 0 20px 20px; }
  .search { max-width: none; }
  .notice { margin: 0; text-align: left; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

/* Workspace details and compact screens */
.brand svg, .actions svg, .actions .action-glyph { width: 18px; height: 18px; flex: none; }
.filter-toggle .action-glyph { width: 14px; height: 14px; flex: none; }
.brand small { display: block; margin-top: 3px; color: #697a6e; font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.indicator { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #65e88d; box-shadow: 0 0 12px #65e88d88; }
.actions button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.primary { box-shadow: 0 5px 20px #4fdd7920; }
.search-field { position: relative; display: grid; }
.search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: #829487;
  pointer-events: none;
}
.search input { padding-left: 40px; }
.drawer { background: #000b; }
.drawer-card { width: min(100%, 590px); padding: 0; background: #0e1410; }
.drawer-head { position: sticky; top: 0; z-index: 2; align-items: center; padding: 27px 30px; border-bottom: 1px solid #29342c; background: #121a15f5; backdrop-filter: blur(15px); }
.drawer-head h2 { font-size: 26px; }
.drawer-body { gap: 14px; margin: 0; padding: 24px 30px 36px; }
.drawer-body > .badges { margin-bottom: -4px; }
.drawer-body .status-line { margin: 0; padding: 12px 14px; border: 1px solid #28382d; border-radius: 10px; background: #17231a; }
.drawer-added { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 0 14px; font-size: 12px; }
.drawer-added span:first-child { color: var(--muted); }
.drawer-added span:last-child { font-variant-numeric: tabular-nums; }
.drawer-body .block { margin: 0; padding: 18px; border: 1px solid #27332a; border-radius: 14px; background: #141c16; }
.drawer-body .block h3 { margin: 0 0 10px; font-size: 10px; }
.drawer-body .row { padding: 11px 0; border-color: #29342c; }
.drawer-body .row:last-child { border-bottom: 0; padding-bottom: 0; }
.row span:last-child { text-align: right; overflow-wrap: anywhere; }
.drawer-actions { position: sticky; bottom: 0; margin: 0; padding: 14px; border: 1px solid #2d3c31; border-radius: 12px; background: #19231c; box-shadow: 0 8px 25px #0008; }
.drawer-actions .mini { flex: 1; }
.close-btn { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; font-size: 24px; font-weight: 400; line-height: 1; }
.modal-card { max-height: 100%; overflow-y: auto; padding: 28px; border-color: #344a39; border-radius: 18px; background: #111914; }
.modal-head { align-items: flex-start; }
.modal-head .close-btn { flex: 0 0 38px; }
.modal-head .close-btn svg, .login-codes-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modal-head h2 { font-size: 24px; }
.download-option { min-height: 72px; background: #18221a; }
.download-option > span:last-child { color: #83ef9c; font-size: 12px; }
.download-option > span:last-child::after { content: ' ↓'; font-size: 17px; }
.download-option:disabled > span:last-child { color: #718176; }
.login-codes { margin-top: 18px; border-top: 1px solid #27332a; }
.login-codes summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding-top: 6px;
  list-style: none;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.login-codes summary::-webkit-details-marker { display: none; }
.login-codes-chevron { transition: transform .18s ease; }
.login-codes[open] .login-codes-chevron { transform: rotate(180deg); }
.login-codes-hint { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }
#login-codes-list { display: grid; gap: 8px; max-height: 240px; overflow: auto; }
.login-codes-loading { display: grid; min-height: 48px; place-items: center; }
.login-codes-spinner { width: 25px; height: 25px; border: 2px solid #314637; border-top-color: var(--green); border-radius: 50%; animation: login-codes-spin .75s linear infinite; }
.login-codes-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@keyframes login-codes-spin { to { transform: rotate(360deg); } }
.login-code { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: inherit; background: #18221a; text-align: left; cursor: pointer; transition: .18s ease; }
.login-code:hover { border-color: var(--green); background: rgba(84, 242, 135, .07); }
.login-code.copied { border-color: var(--green); background: rgba(84, 242, 135, .12); }
.login-code-value { font-size: 20px; font-weight: 800; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--green-bright); }
.login-code-when { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions button { min-width: 0; padding: 0 10px; font-size: 12px; }
  .card-heading { align-items: start; }
  .card-heading .stat { white-space: normal; }
  .drawer-card { width: 100%; }
  .drawer-head { padding: 20px; }
  .drawer-body { padding: 18px 16px 30px; }
  .drawer-body .block { padding: 15px; }
  .modal { padding: 16px; }
  .modal-card { padding: 22px; }
}
@media (max-width: 800px) {
  .top, .toolbar { align-items: stretch; }
  .search { width: 100%; }
}

.toolbar, .search { min-width: 0; }
.search input { min-width: 0; max-width: 100%; }
.search-tools { display: flex; flex: 1 1 590px; min-width: 0; align-items: end; gap: 10px; }
.filter-toggle { display: inline-flex; align-items: center; gap: 7px; flex: none; white-space: nowrap; }
.filter-toggle .column-icon { margin: 0; }
.filter-toggle[aria-expanded="true"] { border-color: var(--line-strong); color: var(--green-bright); }
.filter-count { min-width: 18px; padding: 2px 5px; border-radius: 999px; background: #23462d; color: #a3f5b8; font-size: 10px; }
.account-filters { display: grid; gap: 16px; margin: 0 26px 22px; padding: 16px; border: 1px solid #29362d; border-radius: 12px; background: #141c16; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.filter-grid label { display: grid; min-width: 0; align-content: start; gap: 5px; color: #a3afa6; font-size: 12px; }
.filter-grid input, .filter-grid select { min-height: 38px; min-width: 0; width: 100%; padding: 7px 9px; border: 1px solid #303a33; border-radius: 8px; color: #e3ede5; background: #0b0e0c; font: inherit; }
.filter-grid :is(input, select):focus-visible { outline: 1px solid var(--green); }
.filter-grid select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23a8bbad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 16px;
  cursor: pointer;
}
.filter-grid select:hover { border-color: #4d6854; }
@supports (appearance: base-select) and selector(select::picker(select)) {
  .filter-grid select, .filter-grid select::picker(select) { appearance: base-select; }
  .filter-grid select { align-items: center; padding-right: 6px; background-image: none; }
  .filter-grid select::picker-icon {
    content: "";
    flex: 0 0 16px;
    height: 16px;
    margin-inline-start: auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23a8bbad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .15s ease;
  }
  .filter-grid select:open { border-color: #65e88d; }
  .filter-grid select:open::picker-icon { transform: rotate(180deg); }
  .filter-grid select::picker(select) {
    margin: 5px 0;
    padding: 4px;
    max-height: min(280px, 45vh);
    overflow: auto;
    border: 1px solid #3b5542;
    border-radius: 10px;
    background: #141d17;
    color: #e3ede5;
    box-shadow: 0 10px 26px #0009;
  }
  .filter-grid select option {
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
  }
  .filter-grid select option::checkmark { order: 1; margin-inline-start: auto; color: #8af4a6; }
  .filter-grid select option:checked { background: #203c28; color: #b8f8c8; font-weight: 650; }
  .filter-grid select option:is(:hover, :focus-visible) { background: #2a4733; color: #f1faf3; }
}
.filter-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; color: #a3afa6; font-size: 12px; }
@media (max-width: 800px) {
  .search-tools { flex-basis: auto; }
  .account-filters { margin-inline: 20px; }
}
@media (max-width: 420px) {
  .filter-toggle { padding-inline: 10px; }
  .account-filters { margin-inline: 14px; }
}
.column-icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -3px;
  color: #82c896;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
img.column-icon {
  display: inline-block;
  object-fit: contain;
  stroke: none;
}
th:first-child .column-icon { margin-right: 0; }
.country { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.country-code { color: #9ab5a0; font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.row-number { color: #9ab5a0; }
.trash-btn { display: grid; flex: 0 0 36px; place-items: center; padding: 0; color: #e8a1a6; }
.trash-btn svg, .trash-btn .action-glyph { width: 17px; height: 17px; }
.action-glyph {
  display: block;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  -webkit-mask-image: var(--glyph);
  mask-image: var(--glyph);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.trash-btn:hover { color: #ffb2ba; border-color: #693a40; background: #42262a; }
.table-wrap { overflow: visible; }
.table-wrap td, .table-wrap .sub { overflow-wrap: anywhere; white-space: normal; }
.country { flex-wrap: wrap; white-space: normal; gap: 2px 6px; }
.table-wrap .chip { white-space: nowrap; }
.actions-cell .mini { white-space: nowrap; overflow-wrap: normal; }
@container accounts (width >= 1140px) {
  .table-wrap table { table-layout: fixed; }
  .table-wrap th, .table-wrap td { padding: 12px 8px; vertical-align: middle; }
  .table-wrap th { white-space: nowrap; letter-spacing: .04em; }
  .table-wrap th:nth-child(1) { width: 2.7%; }
  .table-wrap th:nth-child(2) { width: 8.4%; }
  .table-wrap th:nth-child(3) { width: 11.5%; }
  .table-wrap th:nth-child(4) { width: 210px; }
  .table-wrap th:nth-child(5) { width: 220px; }
  .table-wrap th:nth-child(6) { width: 190px; }
  .table-wrap th:nth-child(7) { width: 220px; }
  .table-wrap th:nth-child(8) { width: 7.1%; }
  .table-wrap th:nth-child(9) { width: 194px; }
  .table-wrap td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .actions-cell { display: grid; grid-template-columns: minmax(0, 1fr) 34px; grid-template-rows: repeat(2, 36px); min-width: 0; gap: 6px; }
  .actions-cell .mini { min-height: 36px; padding: 0 6px; font-size: 11px; }
  .actions-cell .trash-btn { padding: 0; }
}
@container accounts (width < 1140px) {
  .table-wrap { background: transparent; }
  table, tbody, tr, td { display: block; width: 100%; min-width: 0; }
  thead { display: none; }
  tbody { display: grid; gap: 10px; padding: 14px; }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; padding: 14px; border: 1px solid #29362d; border-radius: 12px; background: #141c16; }
  tbody tr:hover { box-shadow: none; }
  tbody td { min-width: 0; padding: 9px 0; border-bottom: 1px solid #27322a; }
  tbody td::before { display: block; margin-bottom: 4px; color: #788a7d; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  tbody td:nth-child(1)::before { content: '№'; }
  tbody td:nth-child(2)::before { content: 'Страна'; }
  tbody td:nth-child(3)::before { content: 'Телефон'; }
  tbody td:nth-child(4)::before { content: 'Информация об аккаунте'; }
  tbody td:nth-child(5)::before { content: 'Чаты'; }
  tbody td:nth-child(6)::before { content: 'Регистрация'; }
  tbody td:nth-child(7)::before { content: 'Premium и подарки'; }
  tbody td:nth-child(8)::before { content: 'Статус'; }
  tbody td:nth-child(9)::before { content: none; }
  tbody td:nth-child(4), tbody td:nth-child(5), tbody td:nth-child(6), tbody td:nth-child(7), tbody td:nth-child(9) { grid-column: 1 / -1; }
  tbody td:nth-child(9) { padding: 12px 0 0; border: 0; }
  .actions-cell { grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: repeat(2, 40px); min-width: 0; }
  .actions-cell button { min-height: 0; }
  .account-extras-grid { min-height: 0; }
  .account-extras .extra-line { min-height: 40px; }
  .chat-summary-grid { min-height: 0; }
  .chat-metric { min-height: 40px; }
  .registration-summary-grid { height: 82px; min-height: 0; }
  .account-core::before { display: none; }
  .core-field { min-height: 72px; }
  .account-info::before { display: none; }
  .empty-row td { grid-column: 1 / -1 !important; border: 0 !important; }
  .empty-row td::before { content: none !important; }
}
@container accounts (730px <= width < 1140px) {
  tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .empty-row { grid-column: 1 / -1; }
}

.toast {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 50;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid #3d6b4a;
  border-radius: 14px;
  color: #e7f7ea;
  background: #132018;
  box-shadow: 0 18px 50px #0009, 0 0 28px #65e88d22;
  font-size: 14px;
  font-weight: 650;
}
.toast:not(.hidden) { animation: toast-in .45s ease; }
.toast b { color: #7cff9f; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px) translateY(-8px); }
  to { opacity: 1; transform: none; }
}
tbody tr.row-enter {
  background-image: linear-gradient(105deg, #65e88d10, #65e88d42 42%, transparent 78%);
  background-repeat: no-repeat;
  background-size: 190% 100%;
  animation: account-arrival .75s ease-out both;
}
@keyframes account-arrival {
  0% { background-position: 100% 0; opacity: .55; box-shadow: inset 3px 0 #65e88d; }
  45% { opacity: 1; }
  100% { background-position: 0 0; background-size: 0 100%; box-shadow: inset 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  tbody tr.row-enter { background-image: none; }
}

/* Dashboard shell and theme */
:root {
  --green: #56d9a3;
  --green-bright: #94ebc7;
  --muted: #a6a6a6;
  --text: #ededed;
  --sidebar-width: 214px;
  --dashboard-bg: #101010;
  --dashboard-panel: #151515;
  --dashboard-border: #2b2b2b;
  background: var(--dashboard-bg);
  color: var(--text);
}
body { background: var(--dashboard-bg); }
body.nav-compact { --sidebar-width: 58px; }
.admin-main { min-width: 0; margin-inline-start: var(--sidebar-width); }
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 16;
  width: var(--sidebar-width);
  padding: 10px 8px;
  background: #111;
  border-inline-end: 1px solid var(--dashboard-border);
}
.admin-sidebar .brand {
  height: 42px;
  margin-bottom: 15px;
  padding-inline: 4px;
  color: #eee;
  font-size: 12px;
  letter-spacing: .02em;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}
.brand-mark {
  flex: 0 0 33px;
  width: 33px;
  height: 33px;
  color: #e9e9e9;
  background: #242424;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
}
.admin-nav { display: grid; gap: 3px; }
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  margin: 0 0 16px;
  padding: 5px 8px;
  border: 1px solid #343434;
  border-radius: 8px;
  background: #1a1a1a;
  color: #b1b1b1;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.sidebar-search kbd { margin-left: auto; padding: 2px 4px; border-radius: 4px; background: #292929; color: #a8a8a8; font: inherit; white-space: nowrap; }
.sidebar-search:hover { background: #242424; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #c8c8c8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.admin-nav a:hover { background: #1f1f1f; color: #f0f0f0; }
.admin-nav a[aria-current] { color: #f5f5f5; background: #282828; border-color: #303030; }
.admin-nav svg, .nav-toggle svg, .sidebar-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-compact .admin-sidebar :is(.brand-name, .admin-nav a span, .sidebar-search span, .sidebar-search kbd) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.nav-backdrop { display: none; }
.nav-toggle.sidebar-close { display: none; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  height: 49px;
  padding-inline: 22px;
  border-color: var(--dashboard-border);
  background: #131313f5;
  backdrop-filter: blur(12px);
}
.masthead-start { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: grid; width: 32px; height: 32px; padding: 0; place-items: center; }
.masthead-title { color: #e2e2e2; font-size: 13px; font-weight: 600; }
.admin-nav a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.shell {
  width: min(100% - 44px, 1420px);
  padding: 22px 0 40px;
  container: accounts / inline-size;
}
#account-list, #statistics { scroll-margin-top: 70px; }
.top { margin: 0 0 16px; padding: 0; }
.top h1 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.04em; line-height: 1.12; }
.hero-heading .lead { color: #aaa; font-size: 13px; }
.primary { background: #e8e8e8; border-color: #e8e8e8; color: #171717; box-shadow: none; }
.primary:hover { background: #fff; border-color: #fff; box-shadow: none; }
.ghost-btn { background: #202020; border-color: #363636; }

.admin-metrics { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(220px, 1fr); gap: 12px; margin-bottom: 16px; }
.overview-card { min-width: 0; border: 1px solid var(--dashboard-border); border-radius: 12px; background: var(--dashboard-panel); }
.overview-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 15px 16px 12px; }
.overview-head h2 { margin: 0; font-size: 15px; letter-spacing: -.02em; }
.overview-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.overview-total { display: grid; justify-items: end; gap: 3px; white-space: nowrap; }
.overview-total b { font-size: 25px; font-variant-numeric: tabular-nums; line-height: 1; }
.overview-total span { color: var(--muted); font-size: 11px; }
.activity-plot { display: grid; grid-template-columns: repeat(var(--days, 7), minmax(0, 1fr)); padding: 0; margin: 6px 16px 16px; list-style: none; }
.activity-plot li { display: grid; grid-template-rows: 132px auto; min-width: 0; text-align: center; }
.activity-track { display: flex; align-items: flex-end; justify-content: center; background: repeating-linear-gradient(to top, #2a302d 0 1px, transparent 1px 25%); }
.activity-bar { display: grid; place-items: start center; width: min(72%, 52px); height: var(--height); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #56d9a3, #1d5442); color: #071f16; font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; }
.activity-day { min-width: 0; padding-top: 8px; color: #adadad; font-size: 10px; white-space: nowrap; }
.health-card .overview-head { border-bottom: 1px solid var(--dashboard-border); }
.health-summary { display: grid; gap: 9px; padding: 12px 16px 10px; }
.health-row > div:first-child, .premium-summary { display: flex; justify-content: space-between; gap: 8px; color: #cecece; font-size: 12px; }
.health-row b, .premium-summary b { color: #eee; font-variant-numeric: tabular-nums; }
.health-track { height: 4px; margin-top: 4px; border-radius: 99px; background: #282828; overflow: hidden; }
.health-track span { display: block; width: var(--share); height: 100%; background: #737373; }
.health-live .health-track span { background: #56d9a3; }
.health-dead .health-track span { background: #ce7b86; }
.analytics-heading { align-items: center; }
.analytics-heading .lead { color: #aaa; font-size: 13px; }
.analytics-link { align-self: center; color: #caf4e1; font-size: 12px; text-decoration: none; white-space: nowrap; }
.analytics-link:hover { text-decoration: underline; }
.analytics-link span { margin-left: 3px; }
.analytics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.analytics-kpi {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--dashboard-border);
  border-radius: 11px;
  background: linear-gradient(145deg, #1c1e1d, #151515 72%);
}
.analytics-kpi > span { color: #c3cac6; font-size: 12px; font-weight: 650; }
.analytics-kpi > b { color: #f0f0f0; font-size: clamp(23px, 3vw, 31px); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.analytics-kpi > small { color: #aaa; font-size: 11px; }
.kpi-live { background: linear-gradient(145deg, #182a22, #151817 75%); border-color: #32443b; }
.kpi-live > b { color: #b0ebd1; }
.activity-head { align-items: center; flex-wrap: wrap; }
.activity-period { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid #303030; border-radius: 8px; background: #111; }
.activity-period button { padding: 6px 9px; border: 0; border-radius: 5px; color: #a5a5a5; background: transparent; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; }
.activity-period button:hover { color: #fff; }
.activity-period button[aria-pressed="true"] { color: #cbf9e5; background: #254134; }
.health-summary { gap: 16px; padding: 16px; }
.health-row b { white-space: nowrap; }
.health-row b small { margin-left: 4px; color: #a2a2a2; font-size: 10px; font-weight: 500; }
.health-track { height: 6px; margin-top: 6px; }
.analytics-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.analytics-details .overview-head { border-bottom: 1px solid var(--dashboard-border); }
.analytics-rows { margin: 0; padding: 3px 16px 6px; }
.analytics-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #272727; }
.analytics-rows > div:last-child { border-bottom: 0; }
.analytics-rows dt { display: grid; gap: 5px; min-width: 0; color: #c8c8c8; font-size: 12px; overflow-wrap: anywhere; }
.analytics-rows dd { display: flex; gap: 7px; align-items: baseline; margin: 0; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.analytics-rows dd small { min-width: 28px; color: #a0a0a0; font-size: 10px; font-weight: 500; text-align: right; }
.analytics-row-track { height: 3px; overflow: hidden; border-radius: 999px; background: #292929; }
.analytics-row-track span { display: block; height: 100%; background: #6e9d8a; }
@container accounts (width < 900px) {
  .analytics-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container accounts (width < 570px) {
  .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .analytics-details { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .analytics-heading { align-items: start; }
  .analytics-heading .analytics-link { align-self: start; }
}

.card { background: var(--dashboard-panel); border-color: var(--dashboard-border); border-radius: 10px; box-shadow: none; }
.card-heading { padding: 15px 16px 10px; }
.card-heading h2 { font-size: 17px; }
.stat { padding: 0; border: 0; background: transparent; color: #a9b5ac; white-space: normal; text-align: right; }
.stat:empty { display: none; }
.toolbar { padding: 0 16px 14px; }
.search input { background: #111; border-color: #363636; }
.notice { color: #a5a5a5; overflow-wrap: anywhere; }
.account-filters { margin-inline: 16px; background: #181818; border-color: #393939; }
.filter-grid :is(input, select) { background-color: #111; border-color: #393939; }
.table-wrap { background: var(--dashboard-panel); border-color: var(--dashboard-border); }
.table-wrap th { background: #202020; color: #c6c6c6; }
.table-wrap td { border-color: #303030; }
.table-wrap .sub { color: #a9a9a9; }
.table-wrap .muted { color: #a1a1a1; }
.table-wrap tbody tr:hover { background: #232323; box-shadow: none; }
.account-name { font-weight: 650; }
.actions-cell .mini-primary { color: #edeeee; background: #292929; border-color: #424242; }
.actions-cell .mini-primary:hover { color: #fff; background: #363636; border-color: #5a5a5a; box-shadow: none; }
.trash-btn:hover { color: #ffc1c8; background: #392429; border-color: #694049; }

.modal-card, .drawer-card { background: #181818; border-color: #393939; }
.session-card { position: relative; width: min(100%, 700px); padding: 22px; overflow: hidden; border: 1px solid #344039; border-radius: 18px; background: linear-gradient(145deg, #151c18, #101512 72%); box-shadow: 0 28px 80px #000b, 0 0 0 1px #ffffff05 inset; }
.session-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.session-section { padding: 18px; border: 1px solid #2e3932; border-radius: 14px; background: #0e1411aa; }
.session-section + .session-section { margin-top: 12px; }
.session-heading { display: flex; align-items: center; gap: 9px; margin: 0 48px 15px 0; color: #edf5f0; font-size: 15px; font-weight: 720; letter-spacing: -.01em; text-transform: none; }
.session-heading svg, .pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.session-heading svg { color: #3ddc6e; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid #2e7547; border-radius: 9px; color: #f3fff6; background: linear-gradient(180deg, #249e52, #1a8743); box-shadow: 0 1px 0 #ffffff12 inset; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.pill:hover { border-color: #4cce76; background: linear-gradient(180deg, #2ab35d, #21964c); transform: translateY(-1px); }
.pill:active { transform: translateY(0); }
.session-section:first-of-type .pill { border-color: #365345; color: #c8f6d5; background: #18231d; }
.session-section:first-of-type .pill:hover { border-color: #4c8060; background: #203128; }
.pill:disabled { opacity: .45; cursor: not-allowed; }
#login-codes-list { margin-top: 14px; }
#login-codes-list:empty { display: none; }
.qr-card { width: min(100%, 560px); padding: 0; overflow: hidden; border: 1px solid #344039; border-radius: 18px; background: linear-gradient(145deg, #151c18, #101512 72%); box-shadow: 0 28px 80px #000b; }
#qr-modal { z-index: 40; }
.qr-card .modal-head { padding: 19px 20px 16px; border-bottom: 1px solid #2c3731; background: #18201c99; }
.qr-card .modal-head h2 { margin: 0; color: #f0f5f2; font-size: 18px; letter-spacing: -.02em; }
.qr-card .modal-lead { margin: 0; padding: 16px 20px 0; color: #aab7af; font-size: 13px; line-height: 1.55; }
.qr-drop { display: grid; place-items: center; align-content: center; gap: 16px; min-height: 220px; margin: 18px 20px 20px; padding: 26px 20px; border: 1px dashed #405247; border-radius: 14px; background: radial-gradient(circle at 50% 40%, #1b2a2159, transparent 54%), #0b100e; transition: border-color .16s, background .16s; }
.qr-drop > svg { width: 52px; height: 52px; fill: none; stroke: #83968b; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qr-drop.dragover { border-color: #3ddc6e; background: #142018; }
#qr-status { min-height: 0; margin: -6px 20px 18px; color: #9aafa0; font-size: 13px; }
#qr-status:empty { display: none; }
#qr-status.ok { color: #8ef0a8; }
#qr-status.bad { color: #ffb4be; }
.drawer-head { background: #202020f5; border-color: #343434; }
.drawer-body .block, .download-option { background: #202020; border-color: #363636; }
.drawer-body .status-line { background: #203328; border-color: #3a5746; }
.close-btn { color: #c8d2cc; background: #202823; border-color: #3a4840; transition: color .15s, background .15s, border-color .15s, transform .15s; }
.close-btn:hover { color: #fff; background: #2b3630; border-color: #53655b; transform: rotate(2deg); }
.close-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 620px) {
  .session-card { padding: 14px; border-radius: 16px; }
  .session-section { padding: 15px; }
  .session-heading { margin-right: 42px; font-size: 14px; }
  .pill-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .pill { width: 100%; }
  .qr-card .modal-head { padding: 16px; }
  .qr-card .modal-lead { padding: 14px 16px 0; }
  .qr-drop { min-height: 190px; margin: 16px; }
}

@container accounts (width < 1140px) {
  .table-wrap tbody tr { background: #1b1b1b; border-color: #333; }
  .table-wrap tbody td::before { color: #aaa; }
}
@media (max-width: 960px) {
  .admin-main { margin-inline-start: 0; }
  .admin-sidebar {
    width: min(230px, 75vw);
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform .2s, visibility .2s;
  }
  .nav-open .admin-sidebar { visibility: visible; transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-toggle.sidebar-close { display: grid; position: absolute; top: 14px; right: 10px; }
  .nav-open .nav-backdrop { position: fixed; inset: 0; z-index: 15; display: block; width: 100%; border: 0; background: #0009; }
  .nav-compact .admin-sidebar :is(.brand-name, .admin-nav a span, .sidebar-search span, .sidebar-search kbd) { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
@media (max-width: 800px) {
  .masthead { padding-inline: 14px; }
  .shell { width: calc(100% - 28px); padding-top: 16px; }
  .top { gap: 12px; }
  .admin-metrics { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .card-heading { gap: 8px; }
}
@media (max-width: 420px) {
  .search input { padding-left: 34px; font-size: 11px; }
  .search-icon { left: 9px; }
  .stat { text-align: left; }
}

/* Wider, lower account catalogue on desktop */
@container accounts (width >= 1140px) {
  .table-wrap th,
  .table-wrap td {
    padding: 9px 7px;
  }

  .table-wrap th:nth-child(1) { width: 2.5%; }
  .table-wrap th:nth-child(2) { width: 8.7%; }
  .table-wrap th:nth-child(3) { width: 11.2%; }
  .table-wrap th:nth-child(4) { width: 220px; }
  .table-wrap th:nth-child(5) { width: 225px; }
  .table-wrap th:nth-child(6) { width: 200px; }
  .table-wrap th:nth-child(7) { width: 225px; }
  .table-wrap th:nth-child(8) { width: 7.2%; }
  .table-wrap th:nth-child(9) { width: 190px; }

  .core-field,
  .account-info-grid,
  .chat-summary-grid,
  .account-extras-grid {
    min-height: 74px;
  }

  .registration-summary-grid {
    height: 74px;
    grid-template-rows: 36px 36px;
  }

  .core-field {
    grid-template-rows: 26px minmax(0, 1fr);
  }

  .account-info-grid {
    grid-template-rows: repeat(3, minmax(23px, 1fr));
  }

  .chat-summary-grid,
  .account-extras-grid {
    grid-template-rows: repeat(2, minmax(35px, 1fr));
  }

  .actions-cell {
    grid-template-rows: repeat(2, 33px);
    gap: 5px;
  }

  .actions-cell .mini {
    min-height: 33px;
  }

  .table-wrap table {
    border-collapse: separate;
    border-spacing: 0 5px;
    padding: 0 5px 5px;
  }

  .table-wrap tbody td {
    padding-block: 8px;
    border-top: 1px solid #3d4340;
    border-bottom: 1px solid #3d4340;
    background: #191b1a;
    transition: border-color .16s, background .16s;
  }

  .table-wrap tbody td:first-child {
    border-left: 1px solid #3d4340;
    border-radius: 10px 0 0 10px;
  }

  .table-wrap tbody td:last-child {
    border-right: 1px solid #3d4340;
    border-radius: 0 10px 10px 0;
  }

  .table-wrap tbody tr:hover td {
    border-color: #5a6f61;
    background: #202521;
  }

  #account-list .table-wrap thead th {
    border-top: 1px solid #3d4340;
    border-bottom: 1px solid #3d4340;
  }

  #account-list .table-wrap thead th:first-child {
    border-left: 1px solid #3d4340;
    border-radius: 10px 0 0 10px;
  }

  #account-list .table-wrap thead th:last-child {
    border-right: 1px solid #3d4340;
    border-radius: 0 10px 10px 0;
  }
}

#account-list .card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#account-list .table-wrap {
  overflow: visible;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 5px 0;
}

.catalog-pagination[hidden] {
  display: none;
}

.pagination-btn {
  display: grid;
  width: 36px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #3d4340;
  border-radius: 9px;
  color: #d9e4dd;
  background: #191b1a;
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s, transform .16s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #5a6f61;
  color: #fff;
  background: #202521;
  transform: translateY(-1px);
}

.pagination-btn:disabled {
  color: #636b66;
  background: #141615;
  cursor: default;
  opacity: .65;
}

.pagination-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination-status {
  min-width: 112px;
  color: #aeb9b2;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Workspace theme */
:root {
  --dashboard-bg: #0d0d0d;
  --dashboard-panel: #171615;
  --dashboard-border: #312c27;
  --raised: #211e1b;
  --divider: #2d2824;
  --accent: #ffa347;
  --accent-hover: #ffbb78;
  --accent-text: #ffdec0;
  --accent-ink: #241204;
  --accent-surface: #332317;
  --accent-border: #77502f;
  --text: #faf3eb;
  --muted: #b8aba0;
  --green: #75ddae;
  --green-bright: #9cebc7;
  --danger: #ff9cad;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
  --sidebar-width: 218px;
  --scroll-thumb: #69574a;
}

.shell {
  width: min(100% - clamp(28px, 4vw, 64px), 1640px);
  padding-block: 26px 48px;
}

.admin-sidebar {
  padding: 14px 12px;
  background: #131211;
  border-color: var(--dashboard-border);
}

.admin-sidebar .brand {
  gap: 10px;
  margin-bottom: 23px;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -.025em;
}

.brand-mark {
  overflow: visible;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.brand-mark :is(img, svg) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Compact honeycomb identity: aligned with the sidebar navigation grid. */
.admin-sidebar .brand {
  min-height: 44px;
  gap: 9px;
  margin-bottom: 20px;
  padding: 3px 5px 3px 2px;
  border-radius: 10px;
  color: #f6eee6;
  line-height: 1;
  transition: background-color .18s ease, color .18s ease;
}

.admin-sidebar .brand:hover {
  color: #fffaf5;
  background: rgba(255, 173, 62, .055);
}

.admin-sidebar .brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
}

.admin-sidebar .brand-mark :is(img, svg) {
  width: 38px;
  height: 36px;
  filter: drop-shadow(0 6px 10px rgba(241, 121, 18, .16));
  transform: translateY(-1px);
  transition: transform .2s var(--ease-out), filter .2s ease;
}

.admin-sidebar .brand:hover .brand-mark :is(img, svg) {
  filter: drop-shadow(0 7px 13px rgba(241, 121, 18, .24));
  transform: translateY(-1px) scale(1.035);
}

.admin-sidebar .brand-name {
  color: inherit;
  font-size: 13px;
  font-weight: 740;
  letter-spacing: -.02em;
  line-height: 1;
}

@media (min-width: 961px) {
  .nav-compact .admin-sidebar .brand-mark {
    flex-basis: 38px;
  }
}

.sidebar-search {
  gap: 7px;
  min-height: 38px;
  margin-bottom: 22px;
  border-color: var(--dashboard-border);
  background: #1a1816;
  color: var(--muted);
}

.sidebar-search:hover { background: var(--raised); color: var(--text); }
.sidebar-search kbd { background: #2b2520; color: #d7c5b4; }
.admin-nav { gap: 5px; }
.admin-nav a {
  min-height: 42px;
  color: var(--muted);
  border-radius: 9px;
  transition: color .18s, background-color .18s, border-color .18s;
}

.admin-nav a:hover { color: var(--text); background: var(--raised); }
.admin-nav a[aria-current] {
  color: var(--accent-text);
  background: var(--accent-surface);
  border-color: var(--accent-border);
}

.admin-nav a > svg,
.admin-nav a > .nav-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  padding: 5px;
  border-radius: 7px;
  transition: color .18s, background-color .18s;
}

.admin-nav a > .nav-icon {
  display: grid;
  place-items: center;
  padding: 0;
}

.nav-icon b {
  display: block;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask-image: var(--glyph);
  mask-image: var(--glyph);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.admin-nav a[aria-current] > svg,
.admin-nav a[aria-current] > .nav-icon {
  color: var(--accent-ink);
  background: var(--accent);
}

.masthead {
  display: flex;
  height: 57px;
  padding-inline: clamp(16px, 2.5vw, 36px);
  border-color: var(--dashboard-border);
  background: #131211eb;
}

.masthead-start { gap: 14px; }
.masthead-title { color: #dfd1c4; font-weight: 620; }
.masthead .nav-toggle { color: var(--text); background: var(--raised); border-color: var(--dashboard-border); }
.masthead .nav-toggle:hover { border-color: var(--accent-border); color: var(--accent); }

@media (min-width: 961px) {
  .admin-main { transition: margin-inline-start .24s var(--ease-out); }
  .admin-sidebar {
    overflow: hidden;
    transition: width .24s var(--ease-out), padding .24s var(--ease-out);
  }
  body.nav-compact { --sidebar-width: 64px; }
  .nav-compact .admin-sidebar { padding-inline: 10px; }
  .nav-compact .admin-sidebar :is(.brand, .sidebar-search, .admin-nav a) {
    justify-content: center;
    padding-inline: 0;
  }
}

.shell > section:not([hidden]) { animation: workspace-in .28s var(--ease-out) both; }
@keyframes workspace-in { from { opacity: 0; transform: translateY(5px); } }

.shell .top h1 {
  color: var(--text);
  font-size: clamp(27px, 3.2vw, 42px);
  font-weight: 735;
  letter-spacing: -.05em;
  line-height: 1.08;
}

.shell .top .lead { color: var(--muted); font-size: 14px; }
.catalog-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title actions";
  align-items: center;
  gap: clamp(12px, 2cqw, 28px);
  min-height: 124px;
  padding: 14px clamp(18px, 3vw, 36px);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #42362e;
  border-radius: 16px;
  background: #1d1d1d;
}

.catalog-hero .actions { grid-area: actions; margin-block: 0; }
.catalog-hero .hero-heading { grid-area: title; min-width: 0; }
.catalog-art {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-end: 0;
  display: block;
  width: 53%;
  height: 100%;
  object-fit: cover;
  --honeycomb-position: center 45%;
  object-position: var(--honeycomb-position);
  /* The mask is traced in the image's own 3:1 coordinates. */
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%222172%22%20height%3D%22724%22%20viewBox%3D%220%200%202172%20724%22%3E%3Cpath%20d%3D%22M213%200V73L110%20133V269L213%20326V453L322%20512V638L213%20699V724H2172V0Z%22%2F%3E%3C%2Fsvg%3E") var(--honeycomb-position) / cover no-repeat;
  pointer-events: none;
  animation: catalog-art-in .45s var(--ease-out) both;
}

@keyframes catalog-art-in { from { opacity: 0; } }

.catalog-hero .primary {
  background: var(--accent);
  border-color: #ffbd74;
  color: var(--accent-ink);
  box-shadow: 0 4px 18px #170a0066;
}

.catalog-hero .primary:hover:not(:disabled) { background: var(--accent-hover); border-color: #ffd0a2; }
.shell .ghost-btn { background: var(--raised); border-color: var(--dashboard-border); color: var(--text); }
.shell .ghost-btn:hover:not(:disabled) { background: var(--accent-surface); border-color: var(--accent-border); }
.catalog-hero :is(.primary, .ghost-btn):disabled {
  opacity: 1;
  background: #241d17;
  color: #a6988b;
  border-color: #4b3523;
  box-shadow: none;
}
.catalog-hero :is(.primary, .ghost-btn), .shell .filter-toggle { font-weight: 650; }
.shell :is(button, a, input, select):focus-visible,
.admin-sidebar :is(button, a):focus-visible,
.masthead button:focus-visible,
:is(.drawer-card, .modal-card) button:focus-visible { outline-color: var(--accent); }

#account-list .card-heading { padding: 0 0 12px; }
#account-list .card-heading h2 { font-size: 19px; }
#account-list .toolbar { padding: 0 0 14px; }
#account-list .stat { color: var(--muted); font-variant-numeric: tabular-nums; }
#account-list .search-tools { min-width: 0; }
#account-list .search label {
  color: #d8c5b5;
  font-size: 12px;
  font-weight: 610;
  letter-spacing: 0;
  text-transform: none;
}

#account-list .search input {
  background: #1a1816;
  border-color: var(--dashboard-border);
  font-size: 14px;
}

#account-list .search input::placeholder { color: var(--muted); }
#account-list .search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #ffa34730; }
#account-list .search-icon, #account-list .column-icon { color: #db9860; }
#account-list .filter-toggle[aria-expanded="true"] { background: var(--accent-surface); border-color: var(--accent-border); color: var(--accent-text); }
#account-list .filter-count { background: #613b1c; color: var(--accent-text); }
#account-list .account-filters { margin-inline: 0; background: var(--dashboard-panel); border-color: var(--dashboard-border); }
#account-list .account-filters:not(.hidden) { animation: workspace-in .22s var(--ease-out) both; }
.filter-grid label, .filter-footer { color: #dbcbbd; }
.filter-grid :is(input, select) { background-color: #141311; border-color: var(--dashboard-border); }
.filter-grid select:hover { border-color: var(--accent-border); }
.filter-grid :is(input, select):focus-visible { outline-color: var(--accent); }
@supports (appearance: base-select) {
  .filter-grid select::picker(select) { background: var(--dashboard-panel); border-color: var(--dashboard-border); }
  .filter-grid select:open { border-color: var(--accent); }
  .filter-grid select option::checkmark { color: var(--accent); }
  .filter-grid select option:checked { background: var(--accent-surface); color: var(--accent-text); }
  .filter-grid select option:is(:hover, :focus-visible) { background: #433021; color: var(--text); }
}
#account-list .notice { color: var(--muted); font-size: 12px; }

#account-list .table-wrap .sub { color: var(--muted); }
#account-list .table-wrap tbody td .muted { color: var(--muted); }
#account-list :is(.core-field, .account-info-grid, .chat-summary-grid, .registration-summary-grid, .account-extras-grid) {
  background: #141311;
  border-color: var(--divider);
  border-radius: 8px;
}

#account-list :is(.core-field > span, .account-info-line, .chat-metric, .registration-metric, .extra-line) { border-color: var(--divider); }
#account-list :is(.core-field > span, .account-info-line > span, .chat-metric span, .registration-metric span, .extra-line > span:first-child) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.18;
}

#account-list :is(.core-field-value, .account-info-line b, .chat-metric b, .registration-metric b, .extra-value b) { font-size: 12px; line-height: 1.22; }
#account-list :is(.core-field-value, .account-info-line b, .chat-metric b, .registration-metric b) { color: var(--text); }
#account-list .country-code { color: var(--accent-text); font-size: 9px; }
#account-list .country { align-content: center; gap: 3px 6px; }
#account-list .account-info-line { grid-template-columns: 54px minmax(0, 1fr); }
#account-list .registration-summary-grid { height: auto; min-height: 76px; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); grid-template-rows: repeat(2, minmax(34px, auto)); }
#account-list .registration-metric:not(.registration-dc) { grid-template-rows: auto auto; }
#account-list .registration-metric b { white-space: normal; overflow-wrap: normal; }
#account-list .row-number { color: var(--muted); }

.status-badge {
  display: inline;
  color: inherit;
  font-weight: 650;
  line-height: 1.35;
}

.status-badge .live-dot { width: 6px; height: 6px; margin-right: 5px; box-shadow: none; }
.status-badge .live-dot::after { display: none; }
#account-list .account-status.ok { color: #ffa347; }
#account-list .account-status.bad,
#account-list .account-status.warn { color: #ff4d5a; }
.account-status .sub { margin-top: 5px; font-size: 11px; }
#account-list .actions-cell .mini { background: var(--raised); border-color: var(--dashboard-border); color: var(--text); font-weight: 640; }
#account-list .actions-cell .mini:hover:not(:disabled) { background: var(--accent-surface); border-color: var(--accent-border); color: var(--accent-text); }
#account-list .actions-cell .mini-primary { background: var(--accent-surface); border-color: #674429; }
#account-list .actions-cell .trash-btn { color: #e3a4b4; }
#account-list .actions-cell .trash-btn:hover { border-color: #794655; color: #ffd1db; background: #352223; }
#account-list .actions-cell .mini:disabled { opacity: .5; }

@container accounts (width >= 1140px) {
  #account-list .table-wrap table { border-collapse: separate; border-spacing: 0 7px; padding: 0; }
  #account-list .table-wrap th { padding: 11px 7px; background: var(--raised); color: #dbccbd; font-size: 10px; white-space: normal; }
  #account-list .table-wrap :is(thead th, tbody td) { border-color: var(--dashboard-border); }
  #account-list .table-wrap th:nth-child(1) { width: 3%; }
  #account-list .table-wrap th:nth-child(2) { width: 8.5%; }
  #account-list .table-wrap th:nth-child(3) { width: 10.5%; }
  #account-list .table-wrap th:nth-child(4) { width: 15%; }
  #account-list .table-wrap th:nth-child(5) { width: 15%; }
  #account-list .table-wrap th:nth-child(6) { width: 14%; }
  #account-list .table-wrap th:nth-child(7) { width: 15%; }
  #account-list .table-wrap th:nth-child(8) { width: 7.5%; }
  #account-list .table-wrap th:nth-child(9) { width: 11.5%; }
  #account-list .table-wrap th:first-child, #account-list td.row-number { padding-inline: 5px; text-align: center; }
  #account-list .table-wrap tbody tr:hover { background: transparent; }
  #account-list .table-wrap tbody td { background: var(--dashboard-panel); }
  #account-list .table-wrap tbody tr:hover td { background: #241b14; border-color: var(--accent-border); }
  #account-list .table-wrap tbody tr:last-child td { border-bottom: 1px solid var(--dashboard-border); }
  #account-list .actions-cell .mini { font-size: 11px; padding-inline: 3px; }
  #account-list .table-wrap .account-core .mono { overflow-wrap: normal; white-space: nowrap; font-size: 11px; }
}

@container accounts (width < 1140px) {
  #account-list tbody { padding: 0; }
  #account-list tbody tr { gap: 7px 12px; padding: 14px; border-color: var(--dashboard-border); border-radius: 13px; background: var(--dashboard-panel); }
  #account-list tbody td { padding: 0; border: 0; }
  #account-list tbody td::before { color: var(--muted); letter-spacing: .03em; }
  #account-list tbody td:nth-child(1) { grid-area: 1 / 1; align-self: center; }
  #account-list tbody td:nth-child(1)::before { display: inline; margin-inline-end: 6px; }
  #account-list tbody td:nth-child(8) { grid-area: 1 / 2; justify-self: end; text-align: right; }
  #account-list tbody td:nth-child(8)::before { display: none; }
  #account-list tbody td:nth-child(9) { padding-top: 5px; }
  #account-list .core-field { min-height: 64px; }
}

#account-list tbody .empty-row td {
  grid-area: auto;
  grid-column: 1 / -1;
  padding: 27px 14px;
  color: var(--text);
  text-align: center;
}

#account-list .empty-row td::before { content: none; }
#account-list .empty-row .sub { display: block; }

#rows > .account-spoiler { position: relative; }

#rows > .account-spoiler > td > :not(.spoiler-reveal),
#rows > .account-spoiler > td::before {
  filter: blur(6px);
  opacity: .48;
  user-select: none;
}

.spoiler-collapse,
.spoiler-reveal {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.spoiler-collapse {
  min-width: 24px;
  min-height: 28px;
  padding: 0 3px;
  border-radius: 6px;
}

.spoiler-collapse:hover { color: var(--accent-text); background: var(--accent-surface); }

.spoiler-reveal {
  position: absolute;
  z-index: 2;
  inset: 1px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: repeating-linear-gradient(135deg, #ffa34709 0 1px, transparent 1px 8px), #18120e45;
}

.spoiler-reveal span {
  padding: 7px 13px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  color: var(--accent-text);
  background: #251c15;
  font-size: 12px;
  font-weight: 650;
}

.spoiler-reveal:is(:hover, :focus-visible) span { background: var(--accent-surface); border-color: var(--accent); }
.spoiler-reveal:focus-visible { outline-color: var(--accent); outline-offset: -3px; }

@media (hover: none) and (pointer: coarse) {
  #rows > tr[data-id] {
    -webkit-touch-callout: none;
    user-select: none;
  }
}

.pagination-btn { background: var(--raised); border-color: var(--dashboard-border); color: var(--accent-text); }
.pagination-btn:hover:not(:disabled) { background: var(--accent-surface); border-color: var(--accent-border); }
.pagination-status { color: var(--muted); }

.analytics-heading { margin-bottom: 22px; }
.analytics-link {
  padding: 9px 13px;
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  background: var(--accent-surface);
  color: var(--accent-text);
  font-size: 13px;
}
.analytics-link:hover { background: #433021; text-decoration: none; }
.analytics-kpi, .overview-card { border-radius: 14px; }
.analytics-kpi { background: linear-gradient(142deg, #2a2119, #1a1816 75%); padding: 18px; }
.analytics-kpi.kpi-live { background: linear-gradient(142deg, #1a2a23, #191a17 75%); border-color: #34443b; }
.analytics-kpi > small, .activity-day, .analytics-rows dd small { color: var(--muted); }
.analytics-kpi > span, .health-row > div:first-child { color: #e1d4c8; font-size: 13px; }
.analytics-kpi > b { font-size: clamp(28px, 3.1vw, 39px); }
.analytics-kpi > small, .overview-head p { font-size: 12px; }
.overview-head { padding: 16px 18px 13px; }
.overview-head h2 { color: var(--text); font-size: 16px; }
.activity-period { border-color: var(--dashboard-border); background: #131211; }
.activity-period button { padding: 7px 10px; color: #d7c5b4; font-weight: 600; }
.activity-period button[aria-pressed="true"] { color: var(--accent-text); background: #54351d; }
.activity-track { background: repeating-linear-gradient(to top, var(--divider) 0 1px, transparent 1px 25%); }
.activity-bar {
  color: var(--accent-ink);
  background: linear-gradient(var(--accent-hover), #d66b1c);
  transform-origin: center bottom;
  animation: chart-in .3s var(--ease-out) both;
}
@keyframes chart-in { from { opacity: .35; transform: scaleY(.55); } }
.activity-plot { margin-inline: 18px; }
.activity-plot li { grid-template-rows: 155px auto; }
.activity-day { font-size: 11px; }
.health-track { background: var(--divider); }
.health-dead .health-track span { background: var(--danger); }
.analytics-rows > div { border-color: var(--divider); }
.analytics-rows dt { color: #e1d4c8; font-size: 13px; }
.analytics-row-track { background: var(--divider); }
.analytics-row-track span { background: #dc924c; }

.drawer-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #141311;
  border-color: var(--dashboard-border);
}
.drawer-head { position: static; background: var(--raised); border-color: var(--dashboard-border); }
.drawer-head .eyebrow { color: var(--accent); }
.drawer-head h2 { overflow-wrap: anywhere; }
.drawer-body { align-content: start; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 20px; }
.drawer-body .block { background: var(--dashboard-panel); border-color: var(--dashboard-border); }
.drawer-body .block h3 { color: var(--accent); font-size: 11px; }
.drawer-body .row { border-color: var(--divider); }
.drawer-body .status-line { background: var(--raised); border-color: var(--dashboard-border); }
.drawer-body .status-line.ok { color: #ffa347; }
.drawer-body .status-line.bad,
.drawer-body .status-line.warn { color: #ff4d5a; }
.drawer-body .status-line .live-dot { box-shadow: none; }
.drawer-actions {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px clamp(14px, 4vw, 30px);
  border: 0;
  border-top: 1px solid var(--dashboard-border);
  border-radius: 0;
  background: var(--raised);
  box-shadow: none;
}
.drawer-actions .mini { min-width: 0; padding-inline: 4px; }

:is(.drawer-card, .session-card, .qr-card) .close-btn {
  flex: 0 0 38px;
  color: var(--text);
  background: var(--raised);
  border-color: var(--dashboard-border);
}
:is(.drawer-card, .session-card, .qr-card) .close-btn:hover {
  color: var(--accent-text);
  background: var(--accent-surface);
  border-color: var(--accent-border);
}
.drawer-actions .mini, .session-card .pill, .qr-card .pill {
  color: var(--text);
  background: var(--raised);
  border-color: var(--dashboard-border);
  box-shadow: none;
  font-weight: 650;
}
.drawer-actions .mini:hover:not(:disabled), .session-card .pill:hover:not(:disabled), .qr-card .pill:hover:not(:disabled) {
  color: var(--accent-text);
  background: var(--accent-surface);
  border-color: var(--accent-border);
}
.drawer-actions .mini-primary {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}
.drawer-actions .mini-primary:hover:not(:disabled) {
  color: var(--accent-ink);
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.modal { background: rgb(0 0 0 / 78%); }
.session-card, .qr-card {
  overflow-y: auto;
  background: var(--dashboard-panel);
  border-color: var(--dashboard-border);
}
.session-section { background: #131211; border-color: var(--dashboard-border); }
.session-heading, .session-heading svg { color: var(--accent-text); }
.session-card .session-section:first-of-type .pill { color: var(--text); background: var(--raised); border-color: var(--dashboard-border); }
.session-card .session-section:first-of-type .pill:hover:not(:disabled) { background: var(--accent-surface); border-color: var(--accent-border); }
.session-card #reset-authorizations { color: #ecc2ca; background: #2d2020; border-color: #543737; }
.qr-card .modal-head { background: var(--raised); border-color: var(--dashboard-border); }
.qr-card .modal-lead { color: var(--muted); }
.qr-drop { background: #131211; border-color: var(--accent-border); }
.qr-drop > svg { stroke: #db9860; }
.qr-drop.dragover { background: var(--accent-surface); border-color: var(--accent); }
#qr-status:not(.ok, .bad) { color: var(--muted); }

.mirrors-empty {
  display: grid;
  min-height: 260px;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 26px;
}

.mirrors-empty h2 { margin: 0; font-size: 17px; }
.mirrors-symbol { position: relative; display: block; width: 65px; height: 51px; }
.mirrors-symbol i { position: absolute; inset: 0 13px 9px 0; border: 1px solid var(--accent-border); border-radius: 10px; background: var(--accent-surface); transform: rotate(-8deg); }
.mirrors-symbol i:last-child { inset: 9px 0 0 14px; border-color: var(--accent-border); background: linear-gradient(135deg, #65401f, #2a1b10); transform: rotate(7deg); }

@media (max-width: 800px) {
  .shell { padding-top: 17px; }
}

@container accounts (width < 760px) {
  .catalog-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "actions";
    min-height: 0;
    padding: 18px;
    row-gap: 16px;
  }
  .catalog-art { width: 55%; opacity: .45; }
  .catalog-hero .hero-heading { text-shadow: 0 1px 4px #111; }
}

@media (max-width: 520px) {
  .catalog-hero .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .catalog-hero .actions button { padding-inline: 6px; font-size: 12px; gap: 5px; white-space: normal; }
  .catalog-hero .actions button svg { flex-shrink: 0; }
  #account-list .filter-toggle { min-width: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .shell > section:not([hidden]), .catalog-art, .activity-bar,
  #account-list .account-filters:not(.hidden), #account-list tbody tr.row-enter { animation: none; }
}
