@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #08111e;
  --bg-soft: #0d1929;
  --panel: #101f32;
  --panel-raised: #14263b;
  --line: #22364e;
  --text: #edf4fb;
  --muted: #9aacc1;
  --dim: #687d94;
  --brand-accent: #22d3ee;
  --blue: #5294ff;
  --green: #51d6a3;
  --amber: #ffbd64;
  --red: #ff7a88;
  --radius: 18px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 16% 6%, color-mix(in srgb, var(--brand-accent) 12%, transparent), transparent 34rem),
    radial-gradient(ellipse at 85% 14%, #377fff13, transparent 31rem),
    var(--bg);
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 74px);
  border-bottom: 1px solid #ffffff0c;
  background: #08111edb;
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; flex: none; object-fit: contain;
  border: 1px solid #ffffff18; border-radius: 12px; background: #102239;
}
.brand span { display: grid; gap: 3px; min-width: 0; }
.brand b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px/1.1 "Manrope", sans-serif; letter-spacing: -.2px; }
.brand small { color: var(--dim); font: 500 9px/1 "DM Mono", monospace; letter-spacing: 1.25px; }
.top-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 99px; color: var(--muted);
  background: #ffffff04; font-size: 11px;
}
.top-pill i, .pulse-dot, .status-indicator, .release-dot {
  width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 12px #51d6a355;
}

.public-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero {
  min-height: 568px; display: grid; grid-template-columns: 1fr .93fr;
  align-items: center; gap: 38px; padding: 56px 0 34px;
}
.hero-copy { position: relative; z-index: 1; max-width: 570px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px; color: var(--brand-accent);
  font: 500 10px/1.3 "DM Mono", monospace; letter-spacing: 1.5px; text-transform: uppercase;
}
.hero h1 {
  margin: 22px 0 15px; font: 800 clamp(40px, 5.2vw, 68px)/1.08 "Manrope", sans-serif;
  letter-spacing: -3.6px;
}
.hero h1 em { color: var(--brand-accent); font-style: normal; }
.hero-text { max-width: 450px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 30px; }
.button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 0 17px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); background: var(--panel); font-weight: 700; cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.button:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand-accent) 70%, var(--line)); }
.button.primary {
  color: #04131e; border-color: transparent;
  background: linear-gradient(112deg, color-mix(in srgb, var(--brand-accent) 90%, white), #58a8ff);
  box-shadow: 0 10px 32px color-mix(in srgb, var(--brand-accent) 20%, transparent);
}
.button.primary:hover { box-shadow: 0 14px 38px color-mix(in srgb, var(--brand-accent) 32%, transparent); }
.button.secondary { background: #ffffff08; }
.hero-button { min-width: 208px; min-height: 54px; justify-content: space-between; padding: 0 17px; font-size: 14px; }
.button-icon { font-size: 19px; }
.button-arrow { margin-left: 10px; font-size: 17px; transition: transform .2s; }
.hero-button:hover .button-arrow { transform: translateX(3px); }
.text-link { color: var(--muted); font-size: 12px; font-weight: 650; }
.text-link:hover, .back-link:hover { color: var(--brand-accent); }
.hero-note { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; color: var(--dim); font-size: 10px; line-height: 1.6; }
.shield-icon { color: var(--green); font-size: 15px; }

.hero-visual { position: relative; min-height: 410px; display: grid; place-items: center; }
.device-frame {
  position: relative; z-index: 2; width: min(100%, 440px); min-height: 330px; padding: 10px;
  overflow: hidden; border: 1px solid #5a75904d; border-radius: 20px;
  background: linear-gradient(145deg, #172a40, #0b1625 80%); box-shadow: 0 35px 100px #0008, 0 0 80px color-mix(in srgb, var(--brand-accent) 9%, transparent);
  transform: perspective(900px) rotateY(-7deg) rotateX(3deg);
}
.device-top { height: 21px; display: flex; align-items: center; gap: 5px; padding: 0 7px; }
.device-top span { width: 5px; height: 5px; border-radius: 50%; background: #516982; }
.device-content { padding: 15px 15px 10px; border: 1px solid #ffffff0d; border-radius: 13px; background: #0b1726; }
.device-brand { display: flex; align-items: center; gap: 7px; color: #e9f3ff; font: 700 10px "Manrope", sans-serif; }
.device-brand img { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; }
.device-status { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: #93abc1; font: 500 8px "DM Mono", monospace; letter-spacing: .7px; }
.status-indicator { width: 6px; height: 6px; }
.device-chart { position: relative; height: 130px; margin-top: 12px; overflow: hidden; border: 1px solid #ffffff0d; border-radius: 9px; }
.chart-grid { position: absolute; inset: 0; opacity: .48; background-image: linear-gradient(#ffffff0a 1px, transparent 1px), linear-gradient(90deg, #ffffff0a 1px, transparent 1px); background-size: 100% 25%, 12.5% 100%; }
.device-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-fill { fill: url(#fill); }
.chart-line { fill: none; stroke: var(--brand-accent); stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--brand-accent) 60%, transparent)); }
.device-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.device-stats div { padding: 8px 9px; border: 1px solid #ffffff0b; border-radius: 8px; background: #ffffff04; }
.device-stats small, .device-stats b { display: block; }
.device-stats small { color: #778da4; font: 500 7px "DM Mono", monospace; letter-spacing: .5px; }
.device-stats b { margin-top: 5px; color: #e6f1fd; font: 700 13px "Manrope", sans-serif; }
.device-stats i { color: #83a0b9; font: 500 8px "DM Sans", sans-serif; }
.device-footer { display: flex; justify-content: space-between; margin-top: 11px; color: #688099; font: 500 7px "DM Mono", monospace; letter-spacing: .3px; }
.device-footer span:last-child { color: var(--green); }
.orbit { position: absolute; width: 400px; height: 400px; border: 1px solid #3a85bd1c; border-radius: 50%; }
.orbit-a { width: 360px; height: 360px; }
.orbit-b { width: 470px; height: 470px; border-style: dashed; animation: orbit 40s linear infinite; }
.floating-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #36516d; border-radius: 11px; background: #102137f2; box-shadow: 0 12px 30px #0005; color: #d6e6f4; font-size: 10px; font-weight: 650; }
.floating-chip span { color: var(--green); font-size: 13px; }
.chip-one { top: 48px; right: -6px; animation: float 5s ease-in-out infinite; }
.chip-two { bottom: 48px; left: -4px; animation: float 6s ease-in-out infinite reverse; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes orbit { to { transform: rotate(360deg); } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px 0 31px; }
.feature { display: flex; align-items: flex-start; gap: 12px; min-height: 92px; padding: 18px; border: 1px solid #ffffff10; border-radius: 14px; background: linear-gradient(135deg, #ffffff08, #ffffff02); }
.feature-icon { width: 30px; height: 30px; display: grid; flex: none; place-items: center; border: 1px solid color-mix(in srgb, var(--brand-accent) 23%, transparent); border-radius: 9px; color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 8%, transparent); font-size: 17px; }
.feature b { font: 700 12px "Manrope", sans-serif; }
.feature p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.release-strip { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid #ffffff0c; border-radius: 10px; color: var(--muted); background: #ffffff04; font-size: 10px; }
.release-dot { width: 6px; height: 6px; flex: none; background: var(--brand-accent); }
.release-strip b { color: var(--text); }
.release-separator { color: var(--dim); }
.release-strip a { margin-left: auto; color: var(--brand-accent); font-weight: 700; }
.site-footer { display: flex; align-items: center; gap: 19px; min-height: 69px; color: var(--dim); font-size: 10px; }
.admin-link { margin-left: auto; color: #72859b; font-size: 10px; transition: color .2s; }
.admin-link:hover { color: var(--text); }

.admin-shell { width: min(1100px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 60px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.admin-heading h1, .auth-card h1 { margin: 9px 0 7px; font: 800 clamp(28px, 4vw, 38px)/1.1 "Manrope", sans-serif; letter-spacing: -1.3px; }
.admin-heading p, .auth-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
.admin-card, .auth-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #112137, #0d1a2a); box-shadow: 0 14px 42px #0002; }
.admin-card + .admin-card { margin-top: 16px; }
.section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 19px; }
.section-heading .step { width: 28px; height: 28px; display: grid; flex: none; place-items: center; border: 1px solid color-mix(in srgb, var(--brand-accent) 25%, var(--line)); border-radius: 8px; color: var(--brand-accent); background: color-mix(in srgb, var(--brand-accent) 8%, transparent); font: 500 10px "DM Mono", monospace; }
.section-heading h2 { margin: 1px 0 4px; font: 700 16px "Manrope", sans-serif; }
.section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.form-stack { display: grid; gap: 13px; }
.form-stack label, .password-form label { display: grid; gap: 6px; color: #dce8f4; font-size: 11px; font-weight: 650; }
.form-stack label small { color: var(--dim); font-size: 9px; font-weight: 400; line-height: 1.5; }
.form-stack input, .form-stack select, .password-form input {
  width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid #2b4059; border-radius: 9px;
  outline: none; color: var(--text); background: #091727; font-size: 12px; transition: border .18s, box-shadow .18s;
}
.form-stack input:focus, .form-stack select:focus, .password-form input:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 12%, transparent); }
.form-stack input[type="color"] { width: 68px; min-height: 40px; padding: 4px; }
.form-stack input[type="file"] { padding: 8px; color: var(--muted); }
.form-stack input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 9px; border: 0; border-radius: 7px; color: #dbe9f7; background: #20354d; font-size: 10px; cursor: pointer; }
.form-stack select option { background: #102137; }
.button.full { width: 100%; margin-top: 3px; }
.current-logo { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.current-logo img { width: 43px; height: 43px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #0a1727; }
.callout { margin-top: 15px; padding: 11px 12px; border: 1px solid #315773; border-radius: 9px; color: #9ab2c8; background: #0c2030; font-size: 10px; line-height: 1.55; }
.callout b { color: #c5e1f3; }
.releases-card, .password-card { margin-top: 16px !important; }
.empty-state { display: grid; gap: 5px; padding: 21px; border: 1px dashed #30465e; border-radius: 11px; text-align: center; }
.empty-state b { font: 700 12px "Manrope", sans-serif; }
.empty-state span { color: var(--muted); font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #ffffff0b; text-align: left; vertical-align: middle; font-size: 10px; }
th { color: var(--dim); font: 500 9px "DM Mono", monospace; letter-spacing: .7px; text-transform: uppercase; }
td { color: #d5e2ed; }
td small { display: block; margin-top: 3px; color: var(--dim); font-size: 9px; }
.platform-tag { padding: 4px 7px; border: 1px solid #34516d; border-radius: 6px; color: #b9dbef; background: #1a344c; font: 500 8px "DM Mono", monospace; }
.hash { color: #8aa0b4; font: 9px "DM Mono", monospace; }
.table-link, .danger-link { display: inline-block; margin-right: 9px; padding: 0; border: 0; color: var(--brand-accent); background: transparent; font-size: 9px; font-weight: 700; cursor: pointer; }
.danger-link { color: var(--red); }
.inline-form { display: inline; }
.password-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 12px; }
.password-form .button { min-height: 42px; white-space: nowrap; }
.admin-footnote { margin: 18px 0 0; color: var(--dim); font-size: 10px; text-align: center; }
.auth-shell { display: grid; min-height: calc(100vh - 74px); place-items: center; padding-top: 30px; padding-bottom: 45px; }
.auth-card { width: min(470px, 100%); padding: clamp(22px, 5vw, 34px); }
.auth-card .form-stack { margin-top: 23px; }
.back-link { display: inline-block; margin-top: 18px; color: var(--muted); font-size: 11px; }
.logout-form { margin: 0; }
.quiet-button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #ffffff05; font-size: 11px; cursor: pointer; }
.quiet-button:hover { border-color: var(--red); color: var(--red); }
.notice { margin: 0 0 15px; padding: 11px 13px; border: 1px solid #30506c; border-radius: 10px; color: #c1d4e4; background: #10263a; font-size: 11px; line-height: 1.55; }
.notice-success { border-color: #286c58; color: #a8ebd0; background: #0c2a27; }
.notice-warning { border-color: #77572d; color: #ffd294; background: #322717; }
.notice-error { border-color: #713e4b; color: #ffc0c8; background: #321c26; }
.muted { color: var(--muted); }
code { font-family: "DM Mono", monospace; }

@media (max-width: 860px) {
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 14px; padding-top: 54px; }
  .hero-copy { max-width: 660px; }
  .hero-visual { min-height: 390px; }
  .device-frame { width: min(100%, 500px); transform: none; }
  .chip-one { right: max(0px, calc((100% - 500px) / 2 - 10px)); }
  .chip-two { left: max(0px, calc((100% - 500px) / 2 - 10px)); }
}
@media (max-width: 680px) {
  .topbar { height: 64px; padding: 0 17px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand b { max-width: 220px; font-size: 12px; }
  .top-pill { padding: 7px 9px; font-size: 9px; }
  .public-shell { width: min(100% - 34px, 520px); }
  .hero { padding-top: 43px; }
  .hero h1 { margin-top: 18px; font-size: clamp(40px, 12vw, 58px); letter-spacing: -2.5px; }
  .hero-text { font-size: 14px; }
  .hero-actions { gap: 16px; }
  .hero-visual { min-height: 320px; margin: 0 -8px; }
  .device-frame { min-height: 290px; padding: 8px; border-radius: 16px; }
  .device-content { padding: 11px; }
  .device-chart { height: 105px; }
  .orbit-a { width: 310px; height: 310px; }
  .orbit-b { width: 370px; height: 370px; }
  .chip-one { top: 18px; right: 0; }
  .chip-two { bottom: 15px; left: 0; }
  .features { grid-template-columns: 1fr; padding-top: 6px; }
  .feature { min-height: 70px; padding: 13px; }
  .release-strip { flex-wrap: wrap; }
  .site-footer { flex-wrap: wrap; gap: 8px 15px; padding: 18px 0; }
  .admin-link { width: 100%; margin: 4px 0 0; }
  .admin-shell { width: calc(100% - 28px); padding-top: 29px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; gap: 13px; }
  .admin-card { padding: 18px; }
  .password-form { grid-template-columns: 1fr; }
  .password-form .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
