/*
 * Visual SKWADRA.OS, o mesmo do Portal (skwadra.com.br). Tokens copiados de C:\dev\SKWADRA\src\app\globals.css
 * (bloco @theme e tema escuro), só traduzidos para variáveis CSS comuns. Mudou lá? Copie de novo para cá.
 *   terracota (`fixed`)       = o que é FIXO (marca, rótulos, "precisa de você")
 *   verde-petróleo (`accent`) = o que é VIVO (seleção, foco, progresso, trabalhando)
 * Títulos em Newsreader fina, texto em Inter leve (300), rótulos em JetBrains Mono maiúsculo espaçado.
 */

/* ---------- fontes (as mesmas do Portal, guardadas aqui: o Hub funciona sem internet) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap; src: url("fonts/newsreader-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- tema claro ---------- */
:root {
  color-scheme: light;
  --color-ground: #f7f5f0;
  --color-ground-2: #efebe3;
  --color-surface: #ffffff;
  --color-ink: #17171b;
  --color-white: #ffffff;
  --color-muted: #5f5b53;
  --color-muted-2: #3f3c36;
  --color-faint: #8e897f;
  --color-line: #e2ddd2;
  --color-line-soft: #efebe3;
  --color-line-strong: #cfc8ba;
  --color-chip: #efebe3;
  --color-field: #ffffff;
  --color-accent: #0b7f78;
  --color-accent-hi: #0b7f78;
  --color-fixed: #c2613f;
  --color-fixed-hi: #c2613f;
  --color-on-ink: #ffffff;

  --color-status-approved-bg: #e3f2ea;
  --color-status-approved-fg: #1d6b47;
  --color-status-approved-dot: #2c8a5c;
  --color-status-changes-bg: #f8ebe5;
  --color-status-changes-fg: #a24e30;
  --color-status-changes-dot: #c2613f;
  --color-status-review-bg: #e2f1f0;
  --color-status-review-fg: #0b6a64;
  --color-status-review-dot: #0b7f78;
  --color-status-production-bg: #efebe3;
  --color-status-production-fg: #3f3c36;
  --color-status-production-dot: #8e897f;

  --color-alert-bg: rgb(178 70 60 / 0.06);
  --color-alert-line: rgb(178 70 60 / 0.35);
  --color-alert-fg: #b2463c;
  --color-alert-strong: #b2463c;

  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Newsreader", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Newsreader", Georgia, serif;

  --text-label: 10.5px;
  --text-meta: 12.5px;
  --text-sub: 13.5px;
  --text-row: 14.5px;
  --text-body: 15px;
  --spacing-ctl-sm: 36px;
  --spacing-ctl: 44px;
  --spacing-ctl-lg: 58px;
  --radius-card: 14px;
  --radius-tile: 10px;
  --radius-ctl: 8px;

  --shadow-os: 0 1px 0 rgb(23 23 27 / 0.02), 0 24px 48px -32px rgb(23 23 27 / 0.25);

  /* canais RGB para transparências */
  --ink-rgb: 23 23 27;
  --shade-rgb: 23 23 27;
  --paper-rgb: 255 255 255;
  --accent-rgb: 11 127 120;
  --fixed-rgb: 194 97 63;
  --scan: rgb(0 0 0 / 0.025);
}

/* ---------- tema escuro: segue o Windows até o Filipe escolher no sol/lua (data-theme) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink-rgb: 240 236 228;
    --shade-rgb: 0 0 0;
    --paper-rgb: 44 47 53;
    --accent-rgb: 31 199 193;
    --fixed-rgb: 217 119 87;
    --scan: rgb(0 0 0 / 0.10);
    --color-ground: #18191c;
    --color-ground-2: #202328;
    --color-surface: rgb(44 47 53 / 0.97);
    --color-ink: #f0ece4;
    --color-on-ink: #18191c;
    --color-muted: #a29e96;
    --color-muted-2: #d6d1c7;
    --color-faint: #8a867f;
    --color-line: rgb(240 236 228 / 0.12);
    --color-line-soft: rgb(240 236 228 / 0.075);
    --color-line-strong: rgb(240 236 228 / 0.28);
    --color-chip: rgb(240 236 228 / 0.08);
    --color-field: rgb(33 36 40 / 0.92);
    --color-accent: #1fc7c1;
    --color-accent-hi: #1fc7c1;
    --color-fixed: #d97757;
    --color-fixed-hi: #d97757;
    --color-status-approved-bg: rgb(111 211 160 / 0.12);
    --color-status-approved-fg: #6fd3a0;
    --color-status-approved-dot: #6fd3a0;
    --color-status-changes-bg: rgb(217 119 87 / 0.14);
    --color-status-changes-fg: #e8a08a;
    --color-status-changes-dot: #d97757;
    --color-status-review-bg: rgb(31 199 193 / 0.12);
    --color-status-review-fg: #5fd9d4;
    --color-status-review-dot: #1fc7c1;
    --color-status-production-bg: rgb(240 236 228 / 0.08);
    --color-status-production-fg: #d6d1c7;
    --color-status-production-dot: #6e6a63;
    --color-alert-bg: rgb(255 122 107 / 0.08);
    --color-alert-line: rgb(255 122 107 / 0.35);
    --color-alert-fg: #ff7a6b;
    --color-alert-strong: #ff7a6b;
    --shadow-os: 0 30px 60px -30px rgb(0 0 0 / 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink-rgb: 240 236 228;
  --shade-rgb: 0 0 0;
  --paper-rgb: 44 47 53;
  --accent-rgb: 31 199 193;
  --fixed-rgb: 217 119 87;
  --scan: rgb(0 0 0 / 0.10);
  --color-ground: #18191c;
  --color-ground-2: #202328;
  --color-surface: rgb(44 47 53 / 0.97);
  --color-ink: #f0ece4;
  --color-on-ink: #18191c;
  --color-muted: #a29e96;
  --color-muted-2: #d6d1c7;
  --color-faint: #8a867f;
  --color-line: rgb(240 236 228 / 0.12);
  --color-line-soft: rgb(240 236 228 / 0.075);
  --color-line-strong: rgb(240 236 228 / 0.28);
  --color-chip: rgb(240 236 228 / 0.08);
  --color-field: rgb(33 36 40 / 0.92);
  --color-accent: #1fc7c1;
  --color-accent-hi: #1fc7c1;
  --color-fixed: #d97757;
  --color-fixed-hi: #d97757;
  --color-status-approved-bg: rgb(111 211 160 / 0.12);
  --color-status-approved-fg: #6fd3a0;
  --color-status-approved-dot: #6fd3a0;
  --color-status-changes-bg: rgb(217 119 87 / 0.14);
  --color-status-changes-fg: #e8a08a;
  --color-status-changes-dot: #d97757;
  --color-status-review-bg: rgb(31 199 193 / 0.12);
  --color-status-review-fg: #5fd9d4;
  --color-status-review-dot: #1fc7c1;
  --color-status-production-bg: rgb(240 236 228 / 0.08);
  --color-status-production-fg: #d6d1c7;
  --color-status-production-dot: #6e6a63;
  --color-alert-bg: rgb(255 122 107 / 0.08);
  --color-alert-line: rgb(255 122 107 / 0.35);
  --color-alert-fg: #ff7a6b;
  --color-alert-strong: #ff7a6b;
  --shadow-os: 0 30px 60px -30px rgb(0 0 0 / 0.5);
}

/* ---------- base (a mesma do Portal) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-tap-highlight-color: transparent;
  background: var(--color-ground);
}
/* Papel com um brilho suave no alto e linhas de varredura bem finas, como a janela do SKWADRA.OS. */
body {
  isolation: isolate;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--color-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-ground);
  background-image: radial-gradient(ellipse 70% 50% at 50% 30%, var(--color-ground-2), transparent 70%);
  background-attachment: fixed;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: repeating-linear-gradient(0deg, var(--scan) 0 1px, transparent 1px 3px);
}
button, select, textarea, input { font: inherit; font-weight: 300; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 400; }
:focus-visible { outline: 1px solid var(--color-accent); outline-offset: 3px; }
::selection { background: rgb(var(--accent-rgb) / 0.14); }
h2, h3 { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.01em; }
input::placeholder, textarea::placeholder { color: var(--color-faint); }
/* Barras de rolagem finas, recuadas e sem setas, na turquesa do SKWADRA (como .scroll-skwadra no Portal). */
*::-webkit-scrollbar { width: 14px; height: 14px; }
*::-webkit-scrollbar-button { display: none; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb { border: 6px solid transparent; border-radius: 0; background-clip: padding-box; background-color: rgb(var(--accent-rgb) / 0.4); }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: rgb(var(--accent-rgb) / 0.4) transparent; }
}

/* Padrão tipográfico: título, rótulo, detalhe. */
.os-title { font-family: var(--font-display); font-weight: 300; font-size: 22px; line-height: 1.12; letter-spacing: -0.01em; color: var(--color-ink); }
.os-kicker { font-family: var(--font-mono); font-size: 10.5px; font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--color-muted); }
.os-meta { font-family: var(--font-sans); font-size: 12.5px; font-weight: 300; color: var(--color-faint); }
