/* ============================================================
   SIA Portal — forest green & steel theme (matches habbosia.com)
   ============================================================ */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-primary:    #0a0f0b;
  --bg-secondary:  #0d1310;
  --bg-card:       #111a14;
  --bg-card-hover: #16241a;
  --bg-alt:        #070b08;

  --green:         #2ec27e;
  --green-hover:   #25a169;
  --green-dim:     rgba(46, 194, 126, 0.09);
  --green-border:  rgba(46, 194, 126, 0.24);
  --green-glow:    rgba(46, 194, 126, 0.30);
  --green-deep:    #1c5e3c;

  --silver:        #c3cfc8;
  --silver-dim:    rgba(195, 207, 200, 0.10);

  --border:        rgba(255, 255, 255, 0.07);
  --border-light:  rgba(255, 255, 255, 0.12);
  --overlay-hover:        rgba(255, 255, 255, 0.05);
  --overlay-hover-strong: rgba(255, 255, 255, 0.09);

  --text-primary:  #e4f1e7;
  --text-secondary:#7c9b83;
  --text-muted:    #46604e;

  /* status colours (promotion eligibility, security checks) */
  --c-green:  #2ec27e;
  --c-blue:   #4da3ff;
  --c-red:    #f0655f;
  --c-yellow: #e8b93c;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-green: 0 4px 24px var(--green-glow);

  --font-head: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

/* ---------- light theme (toggle in the sidebar / auth screen) ---------- */
html[data-theme="light"] {
  --bg-primary:    #eef3ef;
  --bg-secondary:  #f6f9f6;
  --bg-card:       #ffffff;
  --bg-card-hover: #f2f7f3;
  --bg-alt:        #e6ece7;

  --green:         #1d9e63;
  --green-hover:   #178a55;
  --green-dim:     rgba(29, 158, 99, 0.10);
  --green-border:  rgba(29, 158, 99, 0.32);
  --green-glow:    rgba(29, 158, 99, 0.22);
  --green-deep:    #9fc7b0;

  --silver:        #55665c;
  --silver-dim:    rgba(85, 102, 92, 0.10);

  --border:        rgba(10, 40, 22, 0.10);
  --border-light:  rgba(10, 40, 22, 0.18);
  --overlay-hover:        rgba(10, 40, 22, 0.05);
  --overlay-hover-strong: rgba(10, 40, 22, 0.09);

  --text-primary:  #14261a;
  --text-secondary:#4a6a55;
  --text-muted:    #7f978a;

  --c-green:  #1d9e63;
  --c-blue:   #1f6fd6;
  --c-red:    #d5443d;
  --c-yellow: #b3830f;

  --shadow-sm: 0 1px 4px rgba(20, 45, 30, 0.10);
  --shadow-md: 0 4px 20px rgba(20, 45, 30, 0.14);
  --shadow-green: 0 4px 18px var(--green-glow);

  color-scheme: light;
}
html[data-theme="light"] .orb-a { background: rgba(29, 158, 99, 0.13); }
html[data-theme="light"] .orb-b { background: rgba(29, 158, 99, 0.07); }
html[data-theme="light"] ::selection { background: var(--green); color: #ffffff; }
html[data-theme="light"] #sidebar { background: rgba(255, 255, 255, 0.85); }
html[data-theme="light"] #modal-backdrop { background: rgba(24, 40, 30, 0.35); }

* { box-sizing: border-box; }
html {
  scrollbar-width: thin;
  scrollbar-color: var(--green-deep) var(--bg-alt);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.55;
}
.hidden { display: none !important; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--green); color: #04120a; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

h1, h2, h3 { margin: 0 0 12px; font-family: var(--font-head); }
h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
#main > h2 { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
#main > h2 + p.muted { margin: -16px 0 20px; }
h3 {
  font-size: 11.5px; color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.14em; font-weight: 600;
}

/* faint green spotlight behind everything */
#bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(100px); }
.orb-a { width: 560px; height: 560px; background: rgba(46, 194, 126, 0.16); top: -240px; left: 50%; transform: translateX(-50%); }
.orb-b { width: 420px; height: 420px; background: rgba(46, 194, 126, 0.06); bottom: -220px; right: -140px; }
.orb-c { display: none; }

/* ---------- icons ---------- */
.ico { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }
.yes { color: var(--green); font-weight: 700; }
.no { color: var(--text-muted); }

/* ---------- auth ---------- */
#auth-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-box {
  width: 420px; max-width: 94vw;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-md);
  animation: rise 0.35s ease-out;
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .logo-mark { width: 54px; height: 54px; filter: drop-shadow(0 4px 16px var(--green-glow)); }
.auth-brand h1 { font-size: 23px; margin: 12px 0 2px; letter-spacing: 0.02em; }
.auth-sub {
  margin: 0; color: var(--text-secondary); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; }

/* ---------- layout ---------- */
#app-screen { display: flex; min-height: 100vh; }
#sidebar {
  width: 272px; flex-shrink: 0;
  background: rgba(9, 14, 10, 0.82);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: 0.01em;
  padding: 20px 18px; border-bottom: 1px solid var(--border);
}
.brand .logo-mark { width: 32px; height: 32px; flex-shrink: 0; filter: drop-shadow(0 2px 10px var(--green-glow)); }
#nav { flex: 1; overflow-y: auto; padding: 12px; }
#nav button {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left; padding: 12px 14px; margin: 3px 0;
  background: none; border: none; border-left: 3px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; font-family: inherit; font-weight: 500;
  transition: all var(--transition);
}
#nav button:hover { background: var(--overlay-hover); color: var(--text-primary); }
#nav button.active {
  background: var(--green-dim);
  border-left-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.nav-ico { display: inline-flex; width: 21px; flex-shrink: 0; }
.nav-ico .ico { width: 21px; height: 21px; }
.nav-count {
  margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-red); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.sidebar-actions { display: flex; gap: 8px; }
.sidebar-actions .btn { flex: 1; }
#theme-btn { flex: 0 0 auto; width: 38px; padding: 6px; }
#whoami { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 4px 2px; }
#whoami .who-text { display: flex; flex-direction: column; min-width: 0; }
#whoami b { color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#whoami .who-text span { color: var(--text-secondary); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#main { flex: 1; padding: 30px 38px 56px; max-width: 1240px; min-width: 0; }
#main > * { animation: rise 0.28s ease-out backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- avatars (Habbo imaging) ----------
   Habbo imaging returns pixel art at fixed sizes (head m = 54x62, body m = 64x110,
   body l = 128x220). Always show them 1:1 — any browser resampling makes them blurry. */
.avatar { image-rendering: pixelated; flex-shrink: 0; vertical-align: middle; }
.avatar-head, .avatar-side {
  width: 54px; height: 62px; object-fit: none; object-position: center top;
  border-radius: var(--radius-sm);
  background: var(--silver-dim);
  border: 1px solid var(--border-light);
}
.avatar-hero { width: 128px; height: 220px; object-fit: none; object-position: center bottom; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6)); }
.avatar-profile { width: 64px; height: 110px; object-fit: none; object-position: center bottom; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6)); }
.avatar-broken { visibility: hidden; }
.user-cell { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card > h3 { margin-bottom: 14px; }

/* dashboard hero */
.hero {
  display: flex; gap: 28px; align-items: center;
  padding: 26px 30px;
  background:
    radial-gradient(560px 220px at 8% 0%, rgba(46, 194, 126, 0.12), transparent 65%),
    var(--bg-card);
  overflow: hidden;
}
.hero:hover { border-color: var(--green-border); }
.hero-avatar { display: flex; align-items: flex-end; justify-content: center; width: 128px; height: 220px; flex-shrink: 0; }
.hero-name { font-family: var(--font-head); font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 9px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.hero-meta { color: var(--text-secondary); font-size: 13px; }
.hero-meta b { color: var(--text-primary); }

/* ---------- forms ---------- */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label {
  font-size: 11px; color: var(--text-secondary); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
input, select, textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border-light); color: var(--text-primary);
  border-radius: var(--radius-md); padding: 10px 12px; font-size: 14px; font-family: inherit; min-width: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-dim);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 70px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 14px; }
.checkbox-row input { min-width: auto; }
input[type="checkbox"] { accent-color: var(--green); }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: #04120a; border: none; border-radius: var(--radius-md);
  padding: 10px 18px; font-size: 13.5px; cursor: pointer; font-weight: 700; font-family: inherit;
  box-shadow: var(--shadow-green);
  transition: all var(--transition);
}
.btn::before {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg); transition: left 0.55s ease; pointer-events: none;
}
.btn:hover::before { left: 130%; }
.btn:hover { background: var(--green-hover); transform: translateY(-1px); box-shadow: 0 6px 32px var(--green-glow); }
.btn:active { transform: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:disabled::before { display: none; }
.btn-ghost {
  background: var(--overlay-hover); color: var(--text-primary);
  border: 1px solid var(--border-light); box-shadow: none; font-weight: 600;
}
.btn-ghost:hover { background: var(--overlay-hover-strong); border-color: var(--green-border); color: var(--green); box-shadow: none; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-green { background: var(--c-green); color: #04120a; }
.btn-blue { background: var(--c-blue); color: #041220; box-shadow: 0 4px 20px rgba(77, 163, 255, 0.25); }
.btn-blue:hover { background: #3d92ee; box-shadow: 0 6px 28px rgba(77, 163, 255, 0.3); }
.btn-red { background: var(--c-red); color: #1c0505; box-shadow: 0 4px 20px rgba(240, 101, 95, 0.25); }
.btn-red:hover { background: #e35550; box-shadow: 0 6px 28px rgba(240, 101, 95, 0.3); }
.btn-yellow { background: var(--c-yellow); color: #201600; box-shadow: 0 4px 20px rgba(232, 185, 60, 0.25); }
.btn-yellow:hover { background: #d9aa2e; box-shadow: 0 6px 28px rgba(232, 185, 60, 0.3); }
.btn-danger { background: transparent; border: 1px solid rgba(240, 101, 95, 0.45); color: var(--c-red); box-shadow: none; font-weight: 600; }
.btn-danger:hover { background: rgba(240, 101, 95, 0.1); box-shadow: none; }
.btn-danger::before, .btn-ghost::before { display: none; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; color: var(--text-secondary); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.12em;
}
th, td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--overlay-hover); }

/* ---------- pagination (history lists) ---------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; font-size: 13px; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap; letter-spacing: 0.02em;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-green  { background: var(--green-dim); color: var(--c-green); border-color: var(--green-border); }
.badge-blue   { background: rgba(77, 163, 255, 0.09); color: var(--c-blue); border-color: rgba(77, 163, 255, 0.24); }
.badge-red    { background: rgba(240, 101, 95, 0.09); color: var(--c-red); border-color: rgba(240, 101, 95, 0.24); }
.badge-yellow { background: rgba(232, 185, 60, 0.09); color: var(--c-yellow); border-color: rgba(232, 185, 60, 0.24); }
.badge-gray   { background: var(--silver-dim); color: var(--silver); border-color: rgba(195, 207, 200, 0.24); }
.badge-purple { background: rgba(88, 101, 242, 0.1); color: #98a3f5; border-color: rgba(88, 101, 242, 0.3); }
.badge-accent { background: var(--green-dim); color: var(--c-green); border-color: var(--green-border); }

/* ---------- result banners (security check, previews) ---------- */
.result-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 18px; border-radius: var(--radius-md);
  font-family: var(--font-head); font-size: 17px; font-weight: 700; margin: 16px 0;
  border: 1px solid; animation: rise 0.25s ease-out;
}
.result-green  { background: rgba(46, 194, 126, 0.08);  border-color: rgba(46, 194, 126, 0.45);  color: var(--c-green); }
.result-red    { background: rgba(240, 101, 95, 0.08);  border-color: rgba(240, 101, 95, 0.45);  color: var(--c-red); }
.result-yellow { background: rgba(232, 185, 60, 0.08);  border-color: rgba(232, 185, 60, 0.45);  color: var(--c-yellow); }
.result-blue   { background: rgba(77, 163, 255, 0.08);  border-color: rgba(77, 163, 255, 0.45);  color: var(--c-blue); }

/* ---------- autocomplete ---------- */
.ac-wrap { position: relative; }
/* fixed-positioned (placed by JS at the input's viewport coords) so card
   overflow can never crop the suggestions */
.ac-list {
  position: fixed; z-index: 120;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  max-height: 300px; overflow-y: auto; padding: 4px;
}
.ac-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 7px 10px; border: none; background: none; text-align: left;
  color: var(--text-primary); font-family: inherit; font-size: 14px;
  border-radius: var(--radius-sm); cursor: pointer;
}
.ac-item:hover, .ac-item.active { background: var(--green-dim); color: var(--green); }
/* size=m head (54x62) at exactly half — integer ratio keeps the pixel art clean */
.ac-item .avatar { width: 27px; height: 31px; border-radius: 4px; }

/* ---------- tab-order editor (Admin Panel) ---------- */
.order-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 5px; max-width: 420px; }
.order-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}
.order-list li .ord-name { flex: 1; font-size: 14px; font-weight: 500; }
.order-list li .btn { padding: 4px 8px; }

/* ---------- misc ---------- */
.muted { color: var(--text-secondary); font-size: 13px; }
.mono {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  background: var(--bg-alt); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: var(--radius-sm); font-size: 12.5px;
}
.code-display {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 20px; font-weight: 700; letter-spacing: 0.05em; text-align: center;
  background: var(--bg-alt);
  border: 1px dashed var(--green-border); border-radius: var(--radius-md);
  padding: 16px; margin: 14px 0; user-select: all;
  color: var(--green);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-title h3 { margin: 0; }

/* ---------- rank list / ladders (matches habbosia.com rank-list) ---------- */
.division:hover { border-color: var(--green-border); box-shadow: var(--shadow-green); }
.division-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.division-head h3 {
  margin: 0; font-size: 15px; color: var(--text-primary);
  text-transform: none; letter-spacing: -0.01em; font-weight: 700;
}
.division-meta { margin: 4px 0 12px; color: var(--text-secondary); font-size: 12px; }
.rank-ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rank-ladder li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  transition: all var(--transition);
}
.rank-ladder li:hover { border-color: var(--green-border); background: var(--green-dim); transform: translateX(4px); }
.rank-ladder li.top { background: var(--green-dim); border-color: var(--green-border); }
.rank-ladder li.top .rl-name { color: var(--green); font-weight: 700; }
.rank-ladder li.top .rl-num { background: var(--green); border-color: var(--green); color: #051b0d; }
.rl-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; flex-shrink: 0;
  border: 1px solid var(--border-light); border-radius: 50%;
  background: var(--bg-alt); color: var(--text-secondary);
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rl-num.first { background: var(--green); border-color: var(--green); color: #051b0d; }
.rl-name { font-size: 13.5px; font-weight: 500; color: var(--text-primary); }

/* dashboard online list */
.online-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.online-cell {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}
.online-cell b { font-size: 14px; }

/* leaderboard */
.lb-list { list-style: none; margin: 0; padding: 0; }
.lb-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 6px; border-bottom: 1px solid var(--border);
}
.lb-list li:last-child { border-bottom: none; }
.lb-count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green); }

/* profile modal header */
.profile-head { display: flex; gap: 20px; align-items: center; margin-bottom: 14px; }
.profile-head .avatar { align-self: flex-end; }

/* ---------- modal / toasts ---------- */
#modal-backdrop {
  position: fixed; inset: 0; background: rgba(4, 8, 5, 0.78);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
#modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 24px; width: 540px; max-width: 95vw; max-height: 85vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: pop 0.2s ease-out;
}
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
/* toasts sit above the radio widget's corner so they never cover it */
#toasts { position: fixed; bottom: 86px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--bg-card-hover); border: 1px solid var(--border-light);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-md); padding: 12px 16px; max-width: 380px; font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: slidein 0.18s ease-out;
}
.toast-error { border-left-color: var(--c-red); }
.toast-ok { border-left-color: var(--green); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- website radio widget ---------- */
#radio-widget {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; max-width: 330px;
  background: var(--bg-card); border: 1px solid var(--green-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  animation: pop 0.2s ease-out;
}
.radio-info { min-width: 0; }
.radio-title {
  display: block; font-weight: 600; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 175px;
}
.radio-sub { display: block; font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }
.radio-btn { padding: 6px 8px; }
.radio-btn .ico { width: 16px; height: 16px; display: block; }

/* tiny equalizer — animates while this browser is actually listening */
.radio-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.radio-eq i { width: 3px; border-radius: 1px; background: var(--green); height: 5px; animation: radio-eq 0.9s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: 0.25s; }
.radio-eq i:nth-child(3) { animation-delay: 0.5s; }
.radio-eq i:nth-child(4) { animation-delay: 0.12s; }
.radio-eq.paused i { animation: none; height: 5px; background: var(--text-muted); }
@keyframes radio-eq { 0%, 100% { height: 5px; } 50% { height: 16px; } }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--green-deep); border-radius: 6px; border: 3px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid2 { grid-template-columns: 1fr; }
  #sidebar { width: 74px; }
  .brand { justify-content: center; padding: 14px 8px; }
  .brand #brand, #whoami .who-text { display: none; }
  #nav button { justify-content: center; padding: 12px 4px; border-left: none; }
  #nav button.active { border-left: none; }
  .nav-label, .nav-count { display: none; }
  #whoami { justify-content: center; }
  #main { padding: 18px 14px 40px; }
  .hero { flex-direction: column; text-align: center; padding: 22px 16px; }
  .hero-tags { justify-content: center; }
}

/* theme toggle on the login screen */
#auth-theme-btn { position: fixed; top: 14px; right: 14px; z-index: 10; width: 40px; padding: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .rank-ladder li:hover { transform: none; }
  #nav button:hover { transform: none; }
}
