/* Tipografía de Ánfora (ADR 0042): Fraunces (títulos), Inter Tight (interfaz), JetBrains Mono (montos y códigos). */
@font-face { font-family: "Fraunces Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/fraunces-latin-wonk-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "Inter Tight Variable"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations"); }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"); }
/* Paleta cálida como Ánfora (ADR 0042, sobre ADR 0040/0041): lienzo crema, tinta café, terracota de acento y
   naranja encendido en hover/activo del menú; de noche, café oscuro (nunca negro puro). Cada área con su tono. */
:root {
  color-scheme: light;
  --bg: #faf7f2; --surface: #ffffff; --surface-2: #f1ece3; --text: #2a1d16; --muted: #6b5b4e;
  --line: #e3dcd0; --line-strong: #8c7b6a;
  --brand: #c2410c; --brand-hover: #9a3412; --brand-text: #ffffff; --accent: #f59e0b;
  --link: #a3400b; --focus: #d94e06; --danger: #b4402f;
  --success: #3f6f55; --success-bg: #e7efe9; --warning: #8a5a00; --warning-bg: #fbf0d5;
  --danger-bg: #fae9e5; --info: #1d4ed8; --info-bg: #e9f0fd; --warn: #8a5a00;
  --m-a: #f4a259; --m-b: #5b8e7d; --m-c: #8e7dbe; --eye: #ffffff; --pupil: #2a1d16;
  /* Marco (cabecera + menú). Claro: blanco cálido con acento naranja (como Ánfora); oscuro: café oscuro */
  --chrome: #ffffff; --chrome-2: #ffffff; --chrome-line: #ece5da;
  --chrome-text: #2a1d16; --chrome-muted: #7a6a5c; --chrome-hover: #f6f1e8; --chrome-hover-strong: #efe8dc;
  --nav-text: #4a3b30; --nav-active-bg: #fdece0; --chrome-active-text: #c2410c; --nav-glow: none;
  /* Naranja «encendido»: acento de interacción (menú, casillas, foco, botón del hero) */
  --hot: #ea580c; --hot-strong: #c2410c; --hot-soft: rgb(234 88 12 / .09); --hot-tint: #fff1e3; --hot-text: #b84a00; --hot-ink: #1d0f00;
  /* Tonos por área (icono/acento: ≥3:1 sobre su -bg y sobre blanco) */
  --c-sales: #0a7fbf; --c-sales-bg: #dcf0fb;
  --c-cash: #0c8a4e; --c-cash-bg: #dcf5e8;
  --c-stock: #d46200; --c-stock-bg: #ffeedd;
  --c-reports: #6a44d4; --c-reports-bg: #ece6fd;
  --c-sunat: #1f5fd1; --c-sunat-bg: #e1eafd;
  --c-settings: #56667e; --c-settings-bg: #e9eef4;
  /* Medios de pago (dona y chips) */
  --pay-cash: #16804f; --pay-yape: #8a3ab9; --pay-plin: #1590b8; --pay-card: #4b4fc9; --pay-transfer: #b77a06; --pay-credit: #c2456b;
  /* Bordes de luz: claro → línea suave; oscuro → blanco translúcido con cenit */
  --edge: rgb(42 29 22 / .09); --edge-top: rgb(42 29 22 / .09);
  --tint-a: rgb(234 88 12 / .06); --tint-b: rgb(245 158 11 / .06);
  --radius: 14px; --radius-field: 12px; --radius-btn: 12px; --radius-pill: 999px; --gap: 16px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --nav-h: 60px; --side-w: 232px;
  /* Letra como la que se ve en Ánfora: la del sistema (Segoe UI en Windows, Roboto en Android, San Francisco en iPhone). Fraunces queda solo para el logo «bama». */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --font-brand: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --shadow-1: 0 1px 2px rgb(42 29 22 / .05), 0 2px 8px rgb(42 29 22 / .06);
  --shadow-2: 0 6px 18px rgb(42 29 22 / .10), 0 2px 4px rgb(42 29 22 / .06);
  --shadow-3: 0 16px 40px rgb(42 29 22 / .18);
  --z-nav: 10; --z-panel: 20; --z-modal: 30; --z-toast: 40;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1); --ease-spring: cubic-bezier(.22, 1, .36, 1);
  --t-slow: 360ms; --ease-in: cubic-bezier(.4, 0, 1, 1); --ok: #3f6f55;
  --r-fur: #aab3be; --r-lt: #eef1f4; --r-dk: #4a5462; --r-line: #6c7785; --r-eye: #1c232c; --r-nose: #2a313b; --r-blush: #e7a6a6;
  --dur-1: 120ms; --dur-2: 160ms; --dur-3: 200ms; --dur-4: 260ms; --dur: 160ms;
}
/* «Oscuro» = café cálido como Ánfora: sin negro puro ni azul */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17120f; --surface: #211a16; --surface-2: #2b221c; --text: #f5eee7; --muted: #b3a090;
  --line: #3a2e26; --line-strong: #7a6757;
  --brand: #f97316; --brand-hover: #fb923c; --brand-text: #1d0f00; --accent: #fbbf24;
  --link: #fb923c; --focus: #fb923c; --danger: #e0705c; --danger-bg: #331b16;
  --success: #6fb08e; --success-bg: #1e2e25; --warning: #fbbf24; --warning-bg: #3a2c0e;
  --info: #7aa7f5; --info-bg: #17233d; --warn: #fbbf24; --ok: #6fb08e;
  --chrome: #1e1713; --chrome-2: #261d18; --chrome-line: rgb(255 255 255 / .07);
  --chrome-text: #f5eee7; --chrome-muted: #b3a090; --chrome-hover: rgb(255 255 255 / .07); --chrome-hover-strong: rgb(255 255 255 / .12);
  --nav-text: #c9b8a8; --nav-active-bg: #431407; --chrome-active-text: #fb923c; --nav-glow: 0 0 14px rgb(255 138 31 / .35);
  --hot: #f97316; --hot-strong: #fb923c; --hot-soft: rgb(255 138 31 / .17); --hot-tint: #3a1c0b; --hot-text: #fdba74;
  --c-sales: #4cb3e8; --c-sales-bg: #12303f; --c-cash: #4ec98a; --c-cash-bg: #123424;
  --c-stock: #fb923c; --c-stock-bg: #3a2210; --c-reports: #a58cf5; --c-reports-bg: #2a2147;
  --c-sunat: #6f9cf5; --c-sunat-bg: #17254a; --c-settings: #b3a090; --c-settings-bg: #2e2620;
  --edge: rgb(255 255 255 / .08); --edge-top: rgb(255 255 255 / .12);
  --tint-a: rgb(249 115 22 / .07); --tint-b: rgb(251 191 36 / .04);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .25);
  --shadow-2: 0 6px 18px rgb(0 0 0 / .4), 0 2px 4px rgb(0 0 0 / .3);
  --shadow-3: 0 16px 40px rgb(0 0 0 / .55);
  --pupil: #1c232c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
    --bg: #17120f; --surface: #211a16; --surface-2: #2b221c; --text: #f5eee7; --muted: #b3a090;
    --line: #3a2e26; --line-strong: #7a6757;
    --brand: #f97316; --brand-hover: #fb923c; --brand-text: #1d0f00; --accent: #fbbf24;
    --link: #fb923c; --focus: #fb923c; --danger: #e0705c; --danger-bg: #331b16;
    --success: #6fb08e; --success-bg: #1e2e25; --warning: #fbbf24; --warning-bg: #3a2c0e;
    --info: #7aa7f5; --info-bg: #17233d; --warn: #fbbf24; --ok: #6fb08e;
    --chrome: #1e1713; --chrome-2: #261d18; --chrome-line: rgb(255 255 255 / .07);
    --chrome-text: #f5eee7; --chrome-muted: #b3a090; --chrome-hover: rgb(255 255 255 / .07); --chrome-hover-strong: rgb(255 255 255 / .12);
    --nav-text: #c9b8a8; --nav-active-bg: #431407; --chrome-active-text: #fb923c; --nav-glow: 0 0 14px rgb(255 138 31 / .35);
    --hot: #f97316; --hot-strong: #fb923c; --hot-soft: rgb(255 138 31 / .17); --hot-tint: #3a1c0b; --hot-text: #fdba74;
    --c-sales: #4cb3e8; --c-sales-bg: #12303f; --c-cash: #4ec98a; --c-cash-bg: #123424;
    --c-stock: #fb923c; --c-stock-bg: #3a2210; --c-reports: #a58cf5; --c-reports-bg: #2a2147;
    --c-sunat: #6f9cf5; --c-sunat-bg: #17254a; --c-settings: #b3a090; --c-settings-bg: #2e2620;
    --edge: rgb(255 255 255 / .08); --edge-top: rgb(255 255 255 / .12);
    --tint-a: rgb(249 115 22 / .07); --tint-b: rgb(251 191 36 / .04);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .25);
    --shadow-2: 0 6px 18px rgb(0 0 0 / .4), 0 2px 4px rgb(0 0 0 / .3);
    --shadow-3: 0 16px 40px rgb(0 0 0 / .55);
    --pupil: #1c232c;
  }
}
:root[data-theme="light"] { color-scheme: light; }
/* Tono activo de un bloque: data-tone="sales|cash|stock|reports|sunat|settings" */
[data-tone="sales"] { --tone: var(--c-sales); --tone-bg: var(--c-sales-bg); }
[data-tone="cash"] { --tone: var(--c-cash); --tone-bg: var(--c-cash-bg); }
[data-tone="stock"] { --tone: var(--c-stock); --tone-bg: var(--c-stock-bg); }
[data-tone="reports"] { --tone: var(--c-reports); --tone-bg: var(--c-reports-bg); }
[data-tone="sunat"] { --tone: var(--c-sunat); --tone-bg: var(--c-sunat-bg); }
[data-tone="settings"] { --tone: var(--c-settings); --tone-bg: var(--c-settings-bg); }
