/* =====================================================================
   Walkirya OS — dark theme for every portal page (loaded after portal.css)
   Black glass + one aggressive accent (red), bright blue/gold only as contrast.
   Page skins live in portal-os-<area>.css (kb, db, apps…), loaded after this file.
   ===================================================================== */
:root {
  /* palette — the single source of truth (the home page uses the same tokens) */
  --os-black: #050506;
  --os-0: #08090b;          /* desktop */
  --os-1: #0e1014;          /* window body */
  --os-2: #14171c;          /* panels, cards */
  --os-3: #1b1f26;          /* hover, raised */
  --os-4: #242932;          /* inputs, list headers */
  --os-line: rgba(255, 255, 255, .07);
  --os-line-2: rgba(255, 255, 255, .13);
  --os-text: #f2f4f7;
  --os-text-2: #b9bfca;
  --os-muted: #7d8595;
  --os-red: #ff2b38;        /* accent: aggressive, used sparingly */
  --os-red-hi: #ff5e55;
  --os-red-lo: #b0101b;
  --os-red-glow: rgba(255, 43, 56, .35);
  --os-blue: #2f9bff;       /* contrast: links, info */
  --os-gold: #ffc23d;       /* contrast: rewards, prices */
  --os-green: #3ddc6a;
  --os-ui: 'PT Sans', 'Segoe UI', Tahoma, sans-serif;
  --os-logo: 'Exo 2', 'PT Sans', sans-serif;
  --os-mono: 'PT Mono', Consolas, monospace;
  --os-r: 6px;
  --os-ease: cubic-bezier(.2, .8, .2, 1);

  /* the old portal tokens now point at the OS palette, so every existing component follows */
  --bg-void: var(--os-0);
  --bg-obsidian: var(--os-1);
  --bg-card: var(--os-2);
  --bg-card-hover: var(--os-3);
  --bg-elevated: var(--os-3);
  --border-subtle: var(--os-line);
  --border-strong: rgba(255, 43, 56, .55);
  --border-teal: rgba(47, 155, 255, .35);
  --gold: var(--os-red);
  --gold-bright: var(--os-red-hi);
  --gold-dim: var(--os-red-lo);
  --teal: var(--os-blue);
  --teal-dim: rgba(47, 155, 255, .14);
  --crimson: var(--os-red);
  --emerald: var(--os-green);
  --amber: var(--os-gold);
  --text-primary: var(--os-text);
  --text-secondary: var(--os-text-2);
  --text-muted: var(--os-muted);
  --font-display: var(--os-logo);
  --font-sans: var(--os-ui);
  --font-mono: var(--os-mono);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, .55);
  --shadow-glow: 0 0 24px var(--os-red-glow);
}

/* ---------- desktop ---------- */
body.os-site {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(255, 43, 56, .16), transparent 62%),
    radial-gradient(800px 600px at 100% 0%, rgba(47, 155, 255, .07), transparent 60%),
    linear-gradient(rgba(5, 5, 6, .9), rgba(5, 5, 6, .97)),
    url('/assets/img/v7/wallpaper.webp') center top / cover fixed,
    var(--os-black);
  color: var(--os-text);
  font-family: var(--os-ui);
  font-size: 15.5px;
}
body.os-site::selection, body.os-site ::selection { background: var(--os-red); color: #fff; }
body.os-site a { color: var(--os-blue); }
body.os-site a:hover { color: #8fc8ff; }
body.os-site h1, body.os-site h2, body.os-site h3 { font-family: var(--os-logo); letter-spacing: .01em; color: var(--os-text); }
body.os-site h1 { font-style: italic; font-weight: 800; }
@media (max-width: 760px) {
  body.os-site { background-attachment: scroll, scroll, scroll, scroll; }
}

/* ---------- taskbar (site header) ---------- */
body.os-site .site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(#1a1d23, #0b0c0f 55%, #060607);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 6px 18px rgba(0, 0, 0, .55);
  backdrop-filter: none;
}
body.os-site .header-inner { min-height: 52px; gap: 10px; max-width: none; padding: 0 10px 0 6px; }
body.os-site .brand { gap: 9px; padding: 4px 14px 4px 4px; border-radius: 26px; color: var(--os-text); transition: background .2s; }
body.os-site .brand:hover { background: rgba(255, 255, 255, .05); }
body.os-site .brand-mark {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 50% 28%, #ff8a80 0, var(--os-red) 38%, var(--os-red-lo) 78%, #4d0408 100%);
  border: 1px solid #2a0003; color: #fff; font-size: 0;
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .45), inset 0 -4px 8px rgba(0, 0, 0, .35), 0 0 16px var(--os-red-glow);
  transition: transform .25s var(--os-ease), box-shadow .25s;
}
body.os-site .brand:hover .brand-mark { transform: scale(1.06); box-shadow: inset 0 2px 1px rgba(255, 255, 255, .5), inset 0 -4px 8px rgba(0, 0, 0, .35), 0 0 26px rgba(255, 43, 56, .6); }
body.os-site .brand-mark svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
body.os-site .brand-title { font-family: var(--os-logo); font-style: italic; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
body.os-site .brand-sub { color: var(--os-muted); font-size: 10.5px; }
body.os-site .nav-links { gap: 3px; }
body.os-site .nav-links a {
  position: relative; padding: 7px 13px; border-radius: 4px; border: 1px solid transparent;
  color: var(--os-text-2); font-weight: 700; font-size: 14px; letter-spacing: .01em;
  transition: background .18s, border-color .18s, color .18s;
}
body.os-site .nav-links a:hover { color: #fff; background: linear-gradient(rgba(255, 255, 255, .1), rgba(255, 255, 255, .03)); border-color: rgba(255, 255, 255, .12); }
body.os-site .nav-links a.active {
  color: #fff; border-color: rgba(255, 255, 255, .16);
  background: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
body.os-site .nav-links a.active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--os-red); box-shadow: 0 0 10px var(--os-red);
}
body.os-site .header-actions { gap: 8px; }
body.os-site .status-pill {
  border-radius: 4px; background: rgba(255, 255, 255, .04); border: 1px solid var(--os-line-2); color: var(--os-text-2);
  font-size: 12.5px; padding: 5px 9px;
}
body.os-site .lang-switch a { border-radius: 3px; font-size: 11px; font-weight: 700; color: var(--os-text-2); }
body.os-site .lang-switch a.active { background: var(--os-red); color: #fff; }
body.os-site .nav-toggle { border-radius: 4px; background: rgba(255, 255, 255, .06); border: 1px solid var(--os-line-2); color: #fff; }

/* ---------- the page is a window ---------- */
body.os-site main.os-desk { padding: 22px 16px 34px; }
.os-win {
  max-width: 1280px; margin: 0 auto; border-radius: 8px; overflow: hidden;
  background: var(--os-1);
  border: 1px solid #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 24px 70px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 43, 56, .08);
  animation: os-win-open .32s var(--os-ease) both;
}
@keyframes os-win-open { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.os-tb {
  position: relative; display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 6px 0 10px;
  background: linear-gradient(#262a32, #15171c 60%, #101216);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  user-select: none;
}
.os-tb::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--os-red) 18%, var(--os-red) 50%, transparent 82%); opacity: .75; }
.os-tb-ic { width: 20px; height: 20px; color: var(--os-red); flex: none; filter: drop-shadow(0 0 6px var(--os-red-glow)); }
.os-tb-ic svg { width: 20px; height: 20px; display: block; }
.os-tb-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e8ebf0; font-weight: 700; font-size: 13.5px; text-shadow: 0 1px 2px #000; }
.os-tb-btns { display: flex; gap: 3px; }
.os-tb-b {
  width: 32px; height: 22px; display: grid; place-items: center; border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, .7); background: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); color: #dfe3ea; transition: background .15s;
}
a.os-tb-b:hover { background: linear-gradient(rgba(255, 255, 255, .24), rgba(255, 255, 255, .08)); }
.os-tb-close { width: 44px; background: linear-gradient(#e2554c, var(--os-red-lo)); border-color: #3a0005; }
.os-tb-close:hover { background: linear-gradient(#ff7a70, var(--os-red)) !important; box-shadow: 0 0 12px var(--os-red-glow); }
.os-tb-b i { display: block; position: relative; }
.os-tb-b i.m { width: 9px; height: 2px; background: currentColor; margin-top: 6px; }
.os-tb-b i.x2 { width: 9px; height: 8px; border: 1.5px solid currentColor; border-top-width: 2.5px; opacity: .5; }
.os-tb-b i.c { width: 11px; height: 11px; }
.os-tb-b i.c::before, .os-tb-b i.c::after { content: ''; position: absolute; left: 50%; top: 50%; width: 13px; height: 2px; background: #fff; translate: -50% -50%; rotate: 45deg; border-radius: 1px; }
.os-tb-b i.c::after { rotate: -45deg; }
.os-wb { position: relative; padding: 6px 0 24px; }
.os-wb > section:first-child, .os-wb > .section:first-child { padding-top: 22px; }
.os-wb .container { max-width: 1220px; }

/* ---------- footer = system status bar ---------- */
body.os-site .site-footer {
  background: linear-gradient(#0d0e11, #060607); border-top: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); color: var(--os-text-2);
}
body.os-site .footer-title { font-family: var(--os-logo); font-style: italic; color: #fff; letter-spacing: .02em; }
body.os-site .footer-list a { color: var(--os-text-2); }
body.os-site .footer-list a:hover { color: #fff; }

/* ---------- components (shared by every page) ---------- */
body.os-site .card {
  background: linear-gradient(var(--os-2), #111318); border: 1px solid var(--os-line); border-radius: var(--os-r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 22px rgba(0, 0, 0, .35);
}
body.os-site .card-interactive { transition: transform .22s var(--os-ease), border-color .22s, box-shadow .22s; }
body.os-site .card-interactive:hover { transform: translateY(-3px); border-color: rgba(255, 43, 56, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 43, 56, .15); }

body.os-site .btn {
  border-radius: 4px; border: 1px solid rgba(0, 0, 0, .85); color: #eef1f5; font-weight: 700; letter-spacing: .01em;
  background: linear-gradient(#3a3f49, #22262d 50%, #1a1d23 51%, #23272e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .6);
  transition: transform .15s var(--os-ease), box-shadow .2s, filter .2s;
}
body.os-site .btn:hover { transform: translateY(-1px); filter: brightness(1.12); color: #fff; }
body.os-site .btn:active { transform: translateY(0); filter: brightness(.95); }
body.os-site .btn-gold, body.os-site .btn-primary {
  color: #fff; border-color: #3a0005;
  background: linear-gradient(#ff6a60, var(--os-red) 48%, #d81421 52%, var(--os-red-lo));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px rgba(255, 43, 56, .25), 0 6px 18px rgba(255, 43, 56, .25);
}
body.os-site .btn-gold:hover, body.os-site .btn-primary:hover { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 22px rgba(255, 43, 56, .55); }
body.os-site .btn-teal {
  color: #fff; border-color: #001a33;
  background: linear-gradient(#6cbaff, var(--os-blue) 48%, #1a7fe0 52%, #0f58a8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 16px rgba(47, 155, 255, .22);
}
body.os-site .btn-ghost { background: linear-gradient(rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); border-color: var(--os-line-2); color: var(--os-text-2); box-shadow: none; }
body.os-site .btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, .28); }
body.os-site .btn-danger { color: #fff; background: linear-gradient(#5a1015, #2a0609); border-color: #000; }

body.os-site .badge { border-radius: 3px; font-weight: 700; letter-spacing: .02em; background: rgba(255, 255, 255, .06); border: 1px solid var(--os-line-2); color: var(--os-text-2); }
body.os-site .badge-gold { background: rgba(255, 43, 56, .14); border-color: rgba(255, 43, 56, .45); color: #ff8d86; }
body.os-site .badge-teal { background: rgba(47, 155, 255, .13); border-color: rgba(47, 155, 255, .4); color: #8cc8ff; }
body.os-site .badge-green { background: rgba(61, 220, 106, .13); border-color: rgba(61, 220, 106, .4); color: #8ff0ab; }
body.os-site .badge-red { background: rgba(255, 43, 56, .16); border-color: rgba(255, 43, 56, .5); color: #ff8d86; }
body.os-site .text-gold { color: var(--os-gold) !important; }
body.os-site .muted { color: var(--os-text-2); }

body.os-site .input, body.os-site input[type='text'], body.os-site input[type='email'], body.os-site input[type='password'], body.os-site input[type='search'], body.os-site input[type='number'], body.os-site select, body.os-site textarea {
  background: #07080a; border: 1px solid #2b303a; border-radius: 4px; color: var(--os-text);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
}
body.os-site .input:focus, body.os-site input:focus, body.os-site select:focus, body.os-site textarea:focus {
  outline: none; border-color: var(--os-red); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6), 0 0 0 3px rgba(255, 43, 56, .22);
}
body.os-site .form-label { color: var(--os-text-2); font-weight: 700; }

body.os-site .table-wrap { border: 1px solid #000; border-radius: 4px; background: #0b0c0f; box-shadow: inset 0 0 0 1px var(--os-line); }
body.os-site table th {
  background: linear-gradient(#262a31, #1a1d22); color: var(--os-text-2); font-weight: 700; font-size: 12.5px; text-transform: none; letter-spacing: .02em;
  border-bottom: 1px solid #000; border-right: 1px solid rgba(0, 0, 0, .6);
}
body.os-site table td { border-bottom: 1px solid rgba(255, 255, 255, .05); }
body.os-site table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .015); }
body.os-site table tbody tr:hover td { background: rgba(255, 43, 56, .08); }

body.os-site .tabs { gap: 2px; border-bottom: 1px solid #000; }
body.os-site .tab-btn {
  border-radius: 4px 4px 0 0; border: 1px solid #000; border-bottom: 0; background: linear-gradient(#20242b, #15181d);
  color: var(--os-text-2); font-weight: 700;
}
body.os-site .tab-btn.active, body.os-site .tab-btn:hover { color: #fff; background: linear-gradient(#323741, #1c1f25); box-shadow: inset 0 2px 0 var(--os-red); }

body.os-site .breadcrumbs { color: var(--os-muted); font-size: 13px; }
body.os-site .breadcrumbs a { color: var(--os-text-2); }
body.os-site .section-head h2 { font-style: italic; font-weight: 800; }
body.os-site .section-head h2::after { content: ''; display: block; width: 46px; height: 3px; margin-top: 8px; border-radius: 2px; background: var(--os-red); box-shadow: 0 0 10px var(--os-red-glow); }
body.os-site .stat-value { font-family: var(--os-logo); font-style: italic; color: #fff; }
body.os-site .dot.online { background: var(--os-green); box-shadow: 0 0 8px var(--os-green); }
body.os-site .dot.offline { background: var(--os-red); box-shadow: 0 0 8px var(--os-red); }
body.os-site hr { border-color: var(--os-line); }
body.os-site code { background: #07080a; border: 1px solid #262a32; border-radius: 3px; color: #ffd27a; padding: 1px 5px; }

/* scrollbars like the OS */
body.os-site { scrollbar-color: #3a3f48 #0b0c0f; }
body.os-site ::-webkit-scrollbar { width: 12px; height: 12px; }
body.os-site ::-webkit-scrollbar-track { background: #0b0c0f; }
body.os-site ::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #3a3f48, #2a2e35); border: 2px solid #0b0c0f; border-radius: 6px; }
body.os-site ::-webkit-scrollbar-thumb:hover { background: var(--os-red-lo); }

/* ---------- phone ---------- */
@media (max-width: 980px) {
  body.os-site .nav-links { background: linear-gradient(#17191e, #0b0c0f); border: 1px solid #000; box-shadow: 0 20px 50px rgba(0, 0, 0, .7); border-radius: 0 0 8px 8px; }
  body.os-site .nav-links a { padding: 12px 14px; }
  body.os-site .nav-links a.active::after { left: 0; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; }
}
@media (max-width: 760px) {
  body.os-site main.os-desk { padding: 10px 6px 22px; }
  .os-win { border-radius: 6px; }
  .os-tb { height: 36px; }
  .os-tb-b:not(.os-tb-close) { display: none; }
  body.os-site .brand-sub { display: none; }
  body.os-site .status-pill { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .os-win { animation: none; }
  body.os-site .btn, body.os-site .card-interactive, body.os-site .brand-mark { transition: none; }
}
