:root {
  color-scheme: dark;
  --navy-950: #07121d;
  --navy-900: #081522;
  --navy-850: #0b1b2a;
  --navy-800: #102538;
  --navy-700: #18364f;
  --blue: #2c5372;
  --blue-mid: #426a89;
  --blue-light: #5d86a5;
  --gold: #c7b475;
  --red: #e83948;
  --red-mid: #bf404f;
  --ice: #eaeff5;
  --white: #f8fafc;
  --muted: #9db0c0;
  --line: rgba(160, 190, 211, .19);
  --font: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-family: var(--font);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--navy-950); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(ellipse at 50% -18%, rgba(66, 106, 137, .25), transparent 48%),
    linear-gradient(145deg, #091827 0%, #07131f 56%, #0a1927 100%);
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.ambient { position: fixed; z-index: 0; pointer-events: none; filter: blur(1px); opacity: .32; }
.ambient-one { width: 430px; height: 430px; top: 16%; right: -210px; border: 1px solid rgba(93,134,165,.23); border-radius: 50%; box-shadow: 0 0 0 42px rgba(93,134,165,.025), 0 0 0 90px rgba(93,134,165,.02); }
.ambient-two { width: 330px; height: 330px; bottom: -240px; left: -130px; border-radius: 50%; background: rgba(44,83,114,.34); filter: blur(60px); }
.app-frame { position: relative; z-index: 1; width: min(1440px, 100%); min-height: 100vh; margin: 0 auto; padding: 0 42px; display: flex; flex-direction: column; }

.topbar { height: 88px; flex: 0 0 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand-symbol { width: 54px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(199,180,117,.32); border-radius: 13px; background: linear-gradient(145deg, rgba(44,83,114,.5), rgba(8,21,34,.82)); box-shadow: inset 0 1px rgba(255,255,255,.07), 0 7px 20px rgba(0,0,0,.18); }
.brand-symbol svg { width: 38px; height: 32px; overflow: visible; }
.pillar-blue { fill: var(--blue-light); }
.pillar-gold { fill: var(--gold); }
.pillar-red { fill: var(--red); }
.brand-wordmark { display: flex; flex-direction: column; gap: 4px; }
.brand-wordmark strong { font-size: 13px; font-weight: 800; letter-spacing: .13em; }
.brand-wordmark span { color: #9db4c7; font-size: 10px; letter-spacing: .22em; font-weight: 600; }
.topbar-meta { display: flex; align-items: center; gap: 24px; }
.topbar-label { color: #7693a9; font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.connection { display: inline-flex; align-items: center; gap: 8px; color: #b6c4cf; font-size: 11px; }
.connection i, .status-led { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #5bbd9b; box-shadow: 0 0 0 4px rgba(91,189,155,.12), 0 0 12px rgba(91,189,155,.55); }

.main-content { flex: 1; padding: 42px 0 30px; }
.welcome-row { position: relative; min-height: 184px; display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 26px 4px; overflow: hidden; }
.welcome-copy { position: relative; z-index: 1; max-width: 690px; }
.eyebrow, .section-kicker { margin: 0 0 13px; color: var(--blue-light); font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 26px; height: 2px; background: var(--red); }
h1 { margin: 0; color: var(--white); font-size: clamp(32px, 4vw, 49px); line-height: 1.1; font-weight: 700; letter-spacing: -.055em; }
h1 em { color: var(--gold); font-style: normal; }
.welcome-description { max-width: 560px; margin: 17px 0 0; color: #a7b8c6; font-size: 13px; line-height: 1.75; }
.welcome-art { position: absolute; width: 295px; height: 190px; right: 28px; bottom: 0; opacity: .92; }
.welcome-art svg { position: relative; width: 100%; height: 100%; }
.art-glow { position: absolute; width: 220px; height: 130px; right: 10px; bottom: 4px; border-radius: 50%; background: rgba(66,106,137,.2); filter: blur(48px); }
.art-blue { fill: var(--blue-light); opacity: .92; }
.art-gold { fill: var(--gold); }
.art-red { fill: var(--red); }
.art-cut { fill: var(--navy-900); }

.channel-console { position: relative; padding: 27px 30px 21px; border: 1px solid rgba(93,134,165,.35); border-radius: 22px; background: linear-gradient(150deg, rgba(20,43,63,.94), rgba(10,27,42,.96)); box-shadow: 0 24px 70px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.035); overflow: hidden; }
.channel-console::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--blue-light), var(--gold) 52%, var(--red)); opacity: .9; }
.console-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.console-heading .section-kicker { margin-bottom: 7px; }
h2 { margin: 0; color: var(--white); font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.console-subtitle { margin: 8px 0 0; color: #9aafbf; font-size: 11px; line-height: 1.6; }
.channel-count { width: 78px; height: 64px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid rgba(199,180,117,.25); border-radius: 13px; background: rgba(7,18,29,.3); flex-shrink: 0; }
.channel-count strong { color: var(--gold); font-size: 23px; line-height: 1; font-weight: 800; }
.channel-count span { margin-top: 5px; color: #9aafbf; font-size: 9px; text-transform: uppercase; letter-spacing: .13em; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 23px 0 17px; }
.search-box { width: min(420px, 100%); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid rgba(157,176,192,.24); border-radius: 10px; background: rgba(5,17,28,.38); transition: border-color .18s, background .18s; }
.search-box:focus-within { border-color: var(--gold); background: rgba(5,17,28,.62); }
.search-box svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #9bb1c1; stroke-width: 1.8; stroke-linecap: round; }
.search-box input { width: 100%; min-width: 0; padding: 0; color: var(--white); border: 0; outline: 0; background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #7890a3; }
kbd { min-width: 20px; padding: 3px 5px; border: 1px solid rgba(157,176,192,.25); border-radius: 5px; color: #8fa5b7; background: rgba(255,255,255,.035); font: 700 9px var(--font); text-align: center; }
.page-controls { display: inline-flex; align-items: center; gap: 11px; }
.page-button { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(157,176,192,.26); border-radius: 50%; color: var(--ice); background: rgba(4,16,27,.34); cursor: pointer; transition: .18s ease; }
.page-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page-button:not(:disabled):hover { color: var(--navy-950); border-color: var(--gold); background: var(--gold); transform: scale(1.06); }
.page-button:disabled { opacity: .35; cursor: not-allowed; }
.page-indicator { min-width: 48px; color: #9db0c0; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .08em; text-align: center; }

.channel-stage { min-height: 318px; position: relative; padding: 12px; border: 1px solid rgba(157,176,192,.15); border-radius: 17px; background: linear-gradient(155deg, rgba(4,14,24,.48), rgba(17,39,57,.46)); box-shadow: inset 0 1px 14px rgba(0,0,0,.14); }
.channel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(136px, auto)); gap: 12px; }
.channel-card { --accent: var(--blue); position: relative; isolation: isolate; min-width: 0; min-height: 136px; display: flex; flex-direction: column; justify-content: space-between; padding: 16px 17px 14px; color: #143047; text-decoration: none; border: 1px solid rgba(255,255,255,.78); border-radius: 15px; background: linear-gradient(150deg, #f5f7f9 0%, #e4ebf0 60%, #d8e2e9 100%); box-shadow: 0 4px 0 rgba(4,18,31,.2), 0 9px 20px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.95); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.channel-card::before { content: ''; position: absolute; z-index: -1; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.channel-card::after { content: ''; position: absolute; z-index: -1; width: 170px; height: 170px; top: -110px; right: -75px; border-radius: 50%; background: rgba(255,255,255,.5); filter: blur(2px); }
.channel-card:hover, .channel-card:focus-visible { z-index: 2; transform: translateY(-5px) scale(1.015); border-color: var(--accent); box-shadow: 0 8px 0 rgba(4,18,31,.18), 0 17px 28px rgba(0,0,0,.28), 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.channel-card:active { transform: translateY(-1px) scale(.995); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.channel-icon { width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0; border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, white); }
.channel-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.card-category { margin-top: 3px; color: #61798c; font-size: 8px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; text-align: right; }
.card-copy { min-width: 0; margin-top: 13px; }
.card-title { display: block; color: #102d43; font-size: 15px; line-height: 1.25; font-weight: 800; letter-spacing: -.025em; }
.card-description { display: block; margin-top: 5px; color: #5d7181; font-size: 9px; line-height: 1.45; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: #557086; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.card-open { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--accent); }
.card-open svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.accent-blue { --accent: var(--blue); }
.accent-red { --accent: var(--red); }
.accent-gold { --accent: #a58e4e; }
.accent-slate { --accent: var(--blue-light); }

.empty-channel { min-height: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 12px; border: 1px dashed rgba(157,176,192,.22); border-radius: 15px; color: #8198aa; background: rgba(8,22,35,.22); text-align: center; }
.empty-plus { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(199,180,117,.35); border-radius: 50%; color: var(--gold); font-size: 19px; font-weight: 400; }
.empty-channel strong { color: #9db0bf; font-size: 9px; font-weight: 700; }
.empty-channel span:last-child { color: #6e8496; font-size: 8px; }
.empty-search { min-height: 290px; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #9db0c0; text-align: center; }
.empty-search:not([hidden]) { display: flex; }
.empty-search-icon { color: var(--gold); font-size: 40px; line-height: 1; }
.empty-search strong { color: var(--ice); font-size: 14px; }
.empty-search span:last-child { font-size: 11px; }
.console-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px 0; }
.console-hint { display: inline-flex; align-items: center; gap: 8px; color: #95aabb; font-size: 9px; }
.hint-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 9px rgba(199,180,117,.45); }
.keyboard-hint { display: inline-flex; align-items: center; gap: 6px; color: #7d94a7; font-size: 8px; }
.keyboard-hint span { margin-right: 5px; }

.quick-note { display: flex; align-items: center; gap: 12px; margin: 20px 3px 0; color: #91a7b8; }
.note-mark { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(93,134,165,.45); border-radius: 50%; color: var(--blue-light); font: 700 12px Georgia, serif; }
.quick-note p { margin: 0; font-size: 9px; line-height: 1.6; }
.quick-note strong { color: #bdcbd5; font-weight: 700; }
.bottom-bar { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); }
.bottom-brand { display: flex; align-items: center; gap: 9px; color: #8ca1b1; font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.bottom-brand b { color: var(--red); }
.mini-pillars { display: flex; align-items: flex-end; gap: 2px; height: 15px; }
.mini-pillars i { width: 4px; display: block; border-radius: 3px 3px 0 0; }
.mini-pillars i:nth-child(1) { height: 10px; background: var(--blue-light); }
.mini-pillars i:nth-child(2) { height: 14px; background: var(--gold); }
.mini-pillars i:nth-child(3) { height: 12px; background: var(--red); }
.digital-clock { display: flex; align-items: baseline; gap: 9px; color: #71899c; }
.digital-clock strong { color: #c5d0d8; font-size: 17px; font-weight: 600; letter-spacing: .09em; font-variant-numeric: tabular-nums; }
.digital-clock span { font-size: 9px; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; color: #8298a9; font-size: 9px; }
.footer-status .status-led { width: 6px; height: 6px; }

@media (max-width: 1040px) {
  .app-frame { padding: 0 28px; }
  .channel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto; }
  .channel-stage { min-height: 300px; }
  .welcome-art { right: 0; opacity: .62; }
}
@media (max-width: 760px) {
  .app-frame { padding: 0 18px; }
  .topbar { height: 76px; flex-basis: 76px; }
  .topbar-label { display: none; }
  .welcome-row { min-height: 170px; padding-bottom: 20px; }
  .welcome-art { width: 195px; right: -12px; opacity: .32; }
  .welcome-copy { max-width: 590px; }
  .channel-console { padding: 23px 18px 18px; border-radius: 18px; }
  .channel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .channel-stage { min-height: 0; }
  .toolbar { align-items: stretch; }
  .search-box { flex: 1; }
}
@media (max-width: 520px) {
  .app-frame { padding: 0 12px; }
  .topbar-meta { gap: 0; }
  .connection { font-size: 9px; }
  .brand-symbol { width: 47px; height: 42px; }
  .brand-wordmark strong { font-size: 11px; }
  .brand-wordmark span { font-size: 8px; }
  .main-content { padding-top: 27px; }
  .welcome-row { min-height: 165px; }
  h1 { font-size: 34px; }
  .welcome-description { max-width: 90%; font-size: 11px; }
  .welcome-art { width: 155px; right: -18px; opacity: .22; }
  .console-heading { align-items: flex-start; }
  h2 { font-size: 19px; }
  .console-subtitle { max-width: 270px; }
  .channel-count { width: 65px; height: 57px; }
  .toolbar { flex-direction: column; gap: 11px; }
  .search-box { width: 100%; }
  .page-controls { justify-content: flex-end; }
  .channel-console { padding: 20px 12px 15px; }
  .channel-stage { padding: 8px; }
  .channel-grid { gap: 8px; }
  .channel-card { min-height: 143px; padding: 12px 11px 11px; }
  .channel-icon { width: 34px; height: 34px; border-radius: 10px; }
  .channel-icon svg { width: 20px; height: 20px; }
  .card-title { font-size: 12px; }
  .card-description { font-size: 8px; }
  .card-category { font-size: 7px; }
  .empty-channel { min-height: 143px; }
  .console-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .quick-note { align-items: flex-start; }
  .bottom-bar { flex-wrap: wrap; min-height: 72px; padding: 12px 0; }
  .bottom-brand { flex: 1 1 60%; }
  .digital-clock { order: 3; flex: 1 1 100%; }
  .footer-status { margin-left: auto; }
}
@media (max-width: 360px) {
  .channel-grid { grid-template-columns: 1fr; }
  .channel-card { min-height: 128px; }
  .empty-channel { min-height: 105px; }
  .welcome-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
