/* vtunnel dashboard — shared tokens and components */
:root {
  --red: #ED3237;            /* VerifAI brand red, as in the ddns dashboard */
  --red-dark: #D42A2F;
  --red-tint: #FDECEC;
  --red-deep: #A51B23;
  --ink: #1C1C1E;
  --text: #2D2F34;
  --label: #6B7280;
  --muted: #8A8F98;
  --line: #E6E7EA;
  --line-strong: #2B2B2B;
  --bg: #F6F6F7;
  --card: #FFFFFF;
  --inset: #F3F4F6;
  --inset-hover: #E9EAEE;
  --input-bg: #FFFFFF;
  --placeholder: #A9ADB5;
  --name: #4F6A8F;
  --shadow: rgba(28, 28, 30, .08);
  --shadow-strong: rgba(28, 28, 30, .14);
  --contrast-bg: #1C1C1E;
  --contrast-fg: #FFFFFF;
  --ok: #22A95B;
  --ok-bg: #E6F7EC;
  --warn: #D97706;
  --warn-bg: #FEF3E2;
  --bar: #3B7DED;
  --bar-track: #E9ECF1;
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Oswald", "Poppins", "Segoe UI", sans-serif;   /* condensed caps for the fleet numbers */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* night mode - picked with the top-bar toggle, or inherited from the OS on first visit */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F3F4F6;
  --text: #D5D7DC;
  --label: #A2A7B1;
  --muted: #7D828C;
  --line: #26262B;
  --line-strong: #C9CBD1;
  --bg: #0B0B0D;
  --card: #151518;
  --inset: #1E1E23;
  --inset-hover: #27272D;
  --input-bg: #0F0F12;
  --placeholder: #6B7079;
  --name: #8FB0DA;
  --ok-bg: #17351F;
  --warn-bg: #3A2A12;
  --bar-track: #2E3137;
  --shadow: rgba(0, 0, 0, .45);
  --shadow-strong: rgba(0, 0, 0, .6);
  --contrast-bg: #F3F4F6;
  --contrast-fg: #121214;
}
/* night-mode backdrop: near-black with a faint grid and red glows, as in the VerifAI AI-Agent app */
:root[data-theme="dark"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1400px 760px at 100% -10%, rgba(237, 50, 55, .34), transparent 64%),
    radial-gradient(1300px 860px at -10% 108%, rgba(237, 50, 55, .36), transparent 64%),
    radial-gradient(1000px 640px at 104% 70%, rgba(237, 50, 55, .16), transparent 64%),
    radial-gradient(900px 600px at -4% 32%, rgba(237, 50, 55, .14), transparent 64%),
    linear-gradient(180deg, rgba(237, 50, 55, .07), transparent 28%, transparent 68%, rgba(237, 50, 55, .09)),
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 44px 44px,
    #0B0B0D;
}
:root[data-theme="dark"] .top, :root[data-theme="dark"] .tabs { background: rgba(13, 13, 16, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
:root[data-theme="dark"] .panel, :root[data-theme="dark"] .card { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 40px rgba(0, 0, 0, .35); }
* { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; }   /* min-, not fixed: a sticky header needs the body to grow with the page */
body {
  font: 400 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* brand lockup: the VerifAI logo (same files as the ddns dashboard) + product name */
.brand { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 5px; line-height: 1; text-decoration: none; }
.brand img { display: block; height: 44px; width: auto; }
.brand .sub { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; font-weight: 600; font-size: 12px;
              letter-spacing: 1.2px; text-transform: uppercase; color: var(--red); }
.brand .sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.brand.small { gap: 4px; }
.brand.small img { height: 34px; }
.brand.small .sub { font-size: 11.5px; letter-spacing: 1px; }
.brand.small .sub::before { width: 7px; height: 7px; }
.brand img.dark { display: none; }                       /* white wordmark only in night mode */
:root[data-theme="dark"] .brand img.light { display: none; }
:root[data-theme="dark"] .brand img.dark { display: block; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none;
  background: var(--inset); color: var(--text); transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--inset-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--contrast-bg); color: var(--contrast-fg); }
.btn-dark:hover { opacity: .88; }
.btn-outline { background: var(--card); border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--inset); }
.btn-ghost { background: transparent; color: var(--label); padding: 8px 12px; }
.btn-ghost:hover { background: var(--inset); color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 500; color: var(--ink); font-size: 14px; }
.input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--ink); transition: border-color .15s;
}
.input::placeholder { color: var(--placeholder); }
.input:focus { border-color: var(--line-strong); outline: none; }
.input:focus-visible { outline: none; }
.hint { color: var(--muted); font-size: 12.5px; }
.error { color: var(--red-dark); font-size: 13px; min-height: 18px; }
.error:empty { display: none; }

/* fleet stat tiles, shown in the top bar on every page */
.stats { display: flex; gap: 0 34px; margin: 0 auto; padding: 0 32px; align-items: flex-start; }
.stat { line-height: 1; }
.stat .n { font: 600 24px/1 var(--display); color: var(--ink); letter-spacing: .5px; }
.stat .n b { color: var(--red); font-weight: 600; }
.stat .n small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat .k { font: 600 11px var(--display); text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink); margin-top: 5px; }
.stat .s { font-size: 11px; color: var(--label); margin-top: 3px; }
@media (max-width: 1000px) { .stats { display: none; } }

/* header accents: brand stripe along the top edge and a diagonal red wedge behind the profile area */
.top { border-top: 3px solid var(--red); }
.top::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(104deg, transparent 0 68%, rgba(237, 50, 55, .07) 68.1%, rgba(237, 50, 55, .16) 100%);
}
.top .in { position: relative; z-index: 1; }
:root[data-theme="dark"] .top::before {
  background: linear-gradient(104deg, transparent 0 68%, rgba(237, 50, 55, .22) 68.1%, rgba(237, 50, 55, .55) 100%),
              radial-gradient(600px 160px at 100% 50%, rgba(237, 50, 55, .35), transparent 70%);
}

/* day-mode backdrop: the same grid and red glows, kept light so the cards stay crisp */
:root[data-theme="light"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1400px 760px at 100% -10%, rgba(237, 50, 55, .16), transparent 64%),
    radial-gradient(1300px 860px at -10% 108%, rgba(237, 50, 55, .17), transparent 64%),
    radial-gradient(1000px 640px at 104% 70%, rgba(237, 50, 55, .07), transparent 64%),
    radial-gradient(900px 600px at -4% 32%, rgba(237, 50, 55, .06), transparent 64%),
    linear-gradient(rgba(28, 28, 30, .055) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(28, 28, 30, .055) 1px, transparent 1px) 0 0 / 44px 44px,
    #F6F6F7;
}
:root[data-theme="light"] .top, :root[data-theme="light"] .tabs { background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
