/* Arrow Studio License Portal — 2026 redesign (matches Arrow Studio Docs). Same classes, routes and forms as before. */
:root {
  --brand: #00d981; --brand-2: #5cf2b5; --brand-ink: #022b1a;
  --bg: #06090a; --bg-2: #0a0f10;
  --panel: rgba(255, 255, 255, .03); --panel-2: rgba(255, 255, 255, .055); --panel-solid: #0c1213;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
  --text: #eef4f1; --muted: #9aa9a2; --faint: #6b7873;
  --accent: var(--brand); --accent2: var(--brand-2); --soft: rgba(0, 217, 129, .1);
  --ok: #3ee58f; --warn: #ffc25c; --bad: #ff6f7a;
  --shadow: 0 30px 80px -34px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
html[data-theme="light"] {
  --brand: #00a862; --brand-2: #00c475;
  --bg: #f6f8f7; --bg-2: #eef2f0;
  --panel: rgba(10, 30, 20, .025); --panel-2: rgba(10, 30, 20, .05); --panel-solid: #fff;
  --line: rgba(10, 30, 20, .1); --line-2: rgba(10, 30, 20, .17);
  --text: #0b1512; --muted: #4f5d57; --faint: #7f8a85;
  --soft: rgba(0, 168, 98, .09);
  --ok: #00955a; --warn: #b7791f; --bad: #d23b4a;
  --shadow: 0 26px 60px -34px rgba(10, 40, 25, .3);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.65 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before, body::after { content: ""; position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); animation: drift 26s var(--ease) infinite alternate; }
body::before { width: 640px; height: 640px; left: -180px; top: -280px; background: radial-gradient(circle, rgba(0, 217, 129, .2), transparent 65%); }
body::after { width: 560px; height: 560px; right: -160px; bottom: -260px; background: radial-gradient(circle, rgba(60, 140, 255, .1), transparent 65%); animation-delay: -12s; }
html[data-theme="light"] body::before, html[data-theme="light"] body::after { opacity: .5; }
@keyframes drift { to { transform: translate3d(50px, 40px, 0) scale(1.08); } }
::selection { background: rgba(0, 217, 129, .3); }
a { color: inherit; }
button, a, input, select, textarea { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

/* ---------- shell & top bar ---------- */
.shell { position: relative; z-index: 1; max-width: 1360px; margin: 0 auto; padding: 0 32px 24px; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 72px; margin: 0 -32px 34px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brandmark { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; transition: transform .5s var(--ease); display: grid; place-items: center; font-weight: 800; }
span.brandmark { background: var(--soft); color: var(--brand); border: 1px solid var(--line-2); }
.brand:hover .brandmark { transform: rotate(-10deg) scale(1.06); }
.brand b { display: block; white-space: nowrap; font: 800 17px/1.15 var(--display); letter-spacing: -.02em; }
.brand small { display: inline-block; margin-top: 3px; font: 700 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--brand); padding: 4px 6px; border-radius: 6px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent); }
.top-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.btn, .ghost, .iconbtn, .langbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .25s, color .2s;
}
.btn:hover, .ghost:hover, .iconbtn:hover, .langbtn:hover { background: var(--panel-2); border-color: color-mix(in srgb, var(--brand) 40%, var(--line-2)); }
.btn:active, .ghost:active, .iconbtn:active { transform: scale(.97); }
.iconbtn, .langbtn { width: 40px; padding: 0; font-size: 16px; }
.ghost { color: var(--muted); }
.ghost:hover { color: var(--text); }
.btn.primary { color: var(--brand-ink); background: var(--brand); border-color: transparent; font-weight: 700; box-shadow: 0 10px 28px -12px var(--brand); }
html[data-theme="light"] .btn.primary { color: #fff; }
.btn.primary:hover { background: var(--brand-2); transform: translateY(-1px); box-shadow: 0 16px 36px -14px var(--brand); }
.btn.success { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.btn.danger { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 15%, transparent); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.discord {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 18px;
  border-radius: 14px; border: 0; color: #fff !important; font-weight: 700; font-size: 15.5px; text-decoration: none;
  background: linear-gradient(180deg, #6974ff, #5865f2); box-shadow: 0 14px 34px -14px #5865f2, inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform .25s var(--ease), box-shadow .25s, filter .2s;
}
.discord::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.3 4.4A19.8 19.8 0 0 0 15.4 3l-.6 1.3a18.3 18.3 0 0 0-5.6 0L8.6 3a19.7 19.7 0 0 0-4.9 1.4C.6 9 0 13.6.3 18.1a19.9 19.9 0 0 0 6 3l1.3-2a12.9 12.9 0 0 1-2-1l.5-.4a14.2 14.2 0 0 0 12 0l.5.4c-.6.4-1.3.7-2 1l1.3 2a19.8 19.8 0 0 0 6-3c.5-5.2-.8-9.7-3.6-13.7ZM8.7 15.4c-1.2 0-2.1-1.1-2.1-2.4s.9-2.4 2.1-2.4 2.2 1.1 2.1 2.4c0 1.3-.9 2.4-2.1 2.4Zm6.6 0c-1.2 0-2.1-1.1-2.1-2.4s.9-2.4 2.1-2.4 2.2 1.1 2.1 2.4c0 1.3-.9 2.4-2.1 2.4Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.3 4.4A19.8 19.8 0 0 0 15.4 3l-.6 1.3a18.3 18.3 0 0 0-5.6 0L8.6 3a19.7 19.7 0 0 0-4.9 1.4C.6 9 0 13.6.3 18.1a19.9 19.9 0 0 0 6 3l1.3-2a12.9 12.9 0 0 1-2-1l.5-.4a14.2 14.2 0 0 0 12 0l.5.4c-.6.4-1.3.7-2 1l1.3 2a19.8 19.8 0 0 0 6-3c.5-5.2-.8-9.7-3.6-13.7ZM8.7 15.4c-1.2 0-2.1-1.1-2.1-2.4s.9-2.4 2.1-2.4 2.2 1.1 2.1 2.4c0 1.3-.9 2.4-2.1 2.4Zm6.6 0c-1.2 0-2.1-1.1-2.1-2.4s.9-2.4 2.1-2.4 2.2 1.1 2.1 2.4c0 1.3-.9 2.4-2.1 2.4Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.discord:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px #5865f2, inset 0 1px 0 rgba(255, 255, 255, .25); filter: brightness(1.05); }

/* ---------- typography ---------- */
h1 { margin: 8px 0 12px; font: 800 clamp(30px, 3.6vw, 42px)/1.1 var(--display); letter-spacing: -.035em; }
h2 { letter-spacing: -.02em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
code { font: 500 .88em var(--mono); padding: .15em .45em; border-radius: 6px; color: var(--brand); background: var(--soft); }
.break-all { white-space: normal; overflow-wrap: anywhere; word-break: break-word; line-height: 1.5; }
.rtl { text-align: right; }
.workspace-label { font-size: 12.5px; padding: 7px 12px; border-radius: 99px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); }
.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.split p { margin: 0; color: var(--muted); }

/* ---------- cards ---------- */
.card {
  position: relative; padding: 26px; border-radius: 22px; overflow: visible;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)); border: 1px solid var(--line);
  box-shadow: var(--shadow); animation: rise .6s var(--ease) both;
}
html[data-theme="light"] .card { background: var(--panel-solid); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.stack > .card:nth-child(2), .grid > *:nth-child(2) { animation-delay: .06s; }
.card h1, .card h2, .card h3 { margin: 0 0 6px; }
.card h2 { font: 700 19px/1.3 var(--display); }
.card p { margin: 4px 0 16px; color: var(--muted); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title h2 { margin: 0; }
.section-title .dot { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 15px; color: var(--brand); background: var(--soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; }
.stack { display: grid; gap: 22px; align-content: start; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 30%, var(--line)); }

/* hero / profile */
.hero { padding: 26px 28px; margin-bottom: 6px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(600px 200px at 0% 0%, rgba(0, 217, 129, .14), transparent 60%); }
.profile { position: relative; display: flex; align-items: center; gap: 16px; }
.hero .avatar, .profile .brandmark { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid color-mix(in srgb, var(--brand) 50%, transparent); box-shadow: 0 0 0 5px var(--soft); }
.profile strong { display: block; font: 800 22px/1.2 var(--display); letter-spacing: -.02em; }
.profile span { display: block; color: var(--muted); font-size: 13.5px; }
.profile span.brandmark { display: grid; place-items: center; flex: none; font: 800 24px/1 var(--display); color: var(--brand); }

/* license key */
.license-key {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 20px;
  border-radius: 14px; font: 600 15px/1.4 var(--mono); letter-spacing: .06em; color: var(--text); overflow-wrap: anywhere;
  background: linear-gradient(90deg, rgba(0, 217, 129, .07), transparent 60%), #070b0c; border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
html[data-theme="light"] .license-key { background: linear-gradient(90deg, rgba(0, 168, 98, .07), transparent 60%), #f8faf9; }
.license-key span { color: var(--brand); }
.key-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.key-actions button { font-size: 12.5px; }

/* details */
.details { display: grid; }
.detail { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail:last-child { border-bottom: 0; padding-bottom: 0; }
.detail span:first-child { color: var(--muted); }
.detail strong { font-weight: 650; text-align: right; overflow-wrap: anywhere; min-width: 0; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; font: 700 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.active { color: var(--ok); background: color-mix(in srgb, var(--ok) 11%, transparent); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.badge.active::before { box-shadow: 0 0 8px currentColor; animation: pulse 2s ease-in-out infinite; }
.badge.suspended { color: var(--warn); background: color-mix(in srgb, var(--warn) 11%, transparent); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.revoked { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
@keyframes pulse { 50% { opacity: .35; } }

/* servers */
.server { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.server:hover { border-color: var(--line-2); background: var(--panel-2); }
.server small { display: block; color: var(--muted); font-size: 12.5px; }
.server .mono { overflow-wrap: anywhere; }

/* notices & flashes */
.notice { padding: 14px 16px; border-radius: 14px; font-size: 13.5px; line-height: 1.65; color: var(--muted); background: linear-gradient(90deg, var(--soft), transparent 80%), var(--panel); border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line)); }
.notice b { color: var(--text); }
.flash { padding: 13px 16px 13px 44px; margin-bottom: 14px; border-radius: 13px; position: relative; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; animation: rise .5s var(--ease) both; }
.flash::before { position: absolute; left: 15px; top: 12px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 800 12px/1 var(--font); }
.flash.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 9%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent); }
.flash.ok::before { content: "✓"; background: color-mix(in srgb, var(--ok) 20%, transparent); }
.flash.err { color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 28%, transparent); }
.flash.err::before { content: "!"; background: color-mix(in srgb, var(--bad) 20%, transparent); }
.empty { padding: 42px 24px; text-align: center; color: var(--muted); border-radius: 20px; border: 1px dashed var(--line-2); background: var(--panel); }

/* forms */
label { display: grid; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
label small { font-weight: 400; color: var(--faint); }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; outline: none; color: var(--text); font-size: 14px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s, background .2s;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line-2)); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa9a2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.formrow { display: flex; gap: 10px; align-items: end; }
.formrow > * { flex: 1; }
.formrow > .btn, .formrow > button { flex: none; }
.formrow-tight { align-items: center; }
.formrow-tight > * { min-width: 0; }
.formrow-tight select { min-width: 110px; }
.formrow-tight input[type=number] { min-width: 90px; }
summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "›"; display: inline-block; font-size: 16px; line-height: 1; transition: transform .3s var(--ease); }
details[open] > summary::before { transform: rotate(90deg); }
details[open] > summary { margin-bottom: 14px; color: var(--text); }
.advanced-options { grid-column: 1 / -1; padding: 16px; border-radius: 14px; border: 1px dashed var(--line-2); background: var(--panel); }
.advanced-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 6px; }
details.action-menu { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.license-actions { display: grid; gap: 8px; min-width: 250px; }
.license-actions-secondary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- admin: tabs, stats, tables ---------- */
.tabs { display: flex; gap: 4px; padding: 5px; margin-bottom: 26px; overflow-x: auto; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); scrollbar-width: none; }
.tabs a { padding: 9px 16px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; transition: color .2s, background .2s; }
.tabs a:hover { color: var(--text); background: var(--panel-2); }
.tabs a.active { color: var(--brand-ink); background: var(--brand); box-shadow: 0 8px 22px -10px var(--brand); }
html[data-theme="light"] .tabs a.active { color: #fff; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat { position: relative; overflow: hidden; padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; animation: rise .6s var(--ease) both; }
.stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.stat::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 217, 129, .14), transparent 70%); }
.stat:after { content: ""; position: absolute; top: 22px; right: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); }
.stat b { display: block; font: 800 34px/1.1 var(--display); letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 12.5px; }
.statgrid .stat:nth-child(2) { animation-delay: .05s; } .statgrid .stat:nth-child(3) { animation-delay: .1s; } .statgrid .stat:nth-child(4) { animation-delay: .15s; }
.table-wrap { overflow-x: auto; overflow-y: visible; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.tall-wrap { max-height: none; }
.table { width: 100%; min-width: 720px; border-collapse: collapse; }
.table th { position: sticky; top: 0; padding: 13px 16px; text-align: left; font: 700 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 16px; font-size: 13.5px; line-height: 1.5; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table tbody tr { transition: background .15s; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--panel-2); }
.table tr[hidden] { display: none; }
.licenses-table { min-width: 1020px; }
.licenses-table td { vertical-align: top; padding-top: 16px; padding-bottom: 16px; }
.licenses-table td:nth-child(3) { min-width: 230px; max-width: 300px; }
.licenses-table td:nth-child(7) { min-width: 260px; }
.stacked-cell { display: grid; gap: 4px; min-width: 0; }
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.table-tools input { flex: 1; max-width: 420px; min-width: 180px; padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa9a2' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; background-size: 16px; }
.table-tools select { width: 180px; }
.table-tools .result-count { margin-left: auto; color: var(--muted); font: 12px var(--mono); }
.table-pager { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 18px; }
.table-pager span { color: var(--muted); font-size: 12.5px; }
.table-empty { padding: 36px; text-align: center; color: var(--muted); }

/* ---------- login ---------- */
.login-wrap { max-width: 520px; margin: 40px auto 70px; }
.login-card { padding: 36px; overflow: hidden; text-align: left; }
.login-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 55%, transparent), transparent 40%, transparent 70%, rgba(88, 101, 242, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.login-banner { display: block; max-width: none; width: calc(100% + 72px); max-height: 190px; object-fit: cover; margin: -36px -36px 30px; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.login-card .brand { display: none; }
.login-card h1 { margin: 14px 0 14px; font-size: clamp(30px, 5vw, 38px); }
.login-card p { margin: 0 0 26px; font-size: 15.5px; color: var(--muted); }
.login-card .notice { font-size: 12.5px; }

/* toast, skip link, footer */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 60; max-width: min(400px, 90vw); padding: 14px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--brand-ink); background: var(--brand); box-shadow: 0 18px 44px -16px var(--brand); animation: rise .4s var(--ease) both; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 100; padding: 10px 14px; border-radius: 10px; font-weight: 700; color: var(--brand-ink); background: var(--brand); }
.skip-link:focus { top: 12px; }
footer { margin-top: 48px; padding: 24px 0 8px; text-align: center; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); }
footer a { color: var(--brand); text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .shell { padding: 0 16px 20px; }
  .topbar { height: 64px; margin: 0 -16px 24px; padding: 0 16px; }
  .brand b { font-size: 15px; }
  .brand small { display: none; }
  .brandmark { width: 32px; height: 32px; }
  .top-actions { gap: 6px; }
  .top-actions .ghost { padding: 0 11px; font-size: 13px; }
  .workspace-label { display: none; }
  .split { flex-direction: column; align-items: flex-start; }
  .card { padding: 20px; border-radius: 18px; }
  .hero { padding: 20px; }
  .formgrid, .advanced-fields { grid-template-columns: 1fr; }
  .formrow { flex-direction: column; align-items: stretch; }
  .stat { padding: 18px; }
  .stat b { font-size: 28px; }
  .login-wrap { margin: 16px auto 40px; }
  .login-card { padding: 24px; }
  .login-banner { width: calc(100% + 48px); margin: -24px -24px 24px; }
  .table-tools .result-count { width: 100%; margin: 0; }
  .server { flex-wrap: wrap; }
  .profile span { font-size: 12px; overflow-wrap: anywhere; }
  .table-pager { justify-content: space-between; }
}
@media (max-width: 480px) {
  .top-actions .ghost:has(~ .ghost) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
