/* Caldeirería Bouzamar · sistema visual compartido (web + ERP)
   Acero, chapa galvanizada y minio de imprimación naval. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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: "Archivo";
  src: url("/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

:root {
  --zinc: #E9EDEF;          /* fondo: chapa galvanizada */
  --zinc-2: #DDE3E6;
  --paper: #F8FAFA;
  --line: #CBD3D8;
  --line-soft: #DFE5E8;
  --steel-950: #151C21;
  --steel-900: #1F2A31;     /* texto principal */
  --steel-700: #3B4B56;
  --steel-500: #637582;
  --steel-300: #9AA8B2;
  --minio: #C2461C;         /* imprimación de minio: acento único */
  --minio-ink: #A33A15;
  --minio-wash: #F6E3DA;
  --ria: #155E6E;           /* azul ría para datos secundarios */
  --ria-wash: #DDEDF0;
  --ok: #2E7A4C;
  --ok-wash: #DFF0E5;
  --warn: #A86A12;
  --warn-wash: #F7EBD3;
  --bad: #B3261E;
  --bad-wash: #F8DEDB;
  --arc: #8FD3F0;           /* arco de soldadura: solo en 3D */

  --radius-s: 4px;
  --radius-m: 6px;
  --chamfer: 14px;
  --shadow: 0 1px 0 rgba(21, 28, 33, .06), 0 6px 18px -10px rgba(21, 28, 33, .28);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --zinc: #12181C; --zinc-2: #192127; --paper: #1A2228; --line: #2E3B44; --line-soft: #243038;
    --steel-950: #F1F4F6; --steel-900: #E3E9EC; --steel-700: #C2CDD3; --steel-500: #8E9DA7; --steel-300: #5D6D78;
    --minio: #E2683D; --minio-ink: #F08A63; --minio-wash: #3A2219; --ria: #5AB2C4; --ria-wash: #173138;
    --ok: #5FBF85; --ok-wash: #183326; --warn: #E0A64A; --warn-wash: #352A16; --bad: #EF6B60; --bad-wash: #3B1E1C;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --zinc: #12181C; --zinc-2: #192127; --paper: #1A2228; --line: #2E3B44; --line-soft: #243038;
  --steel-950: #F1F4F6; --steel-900: #E3E9EC; --steel-700: #C2CDD3; --steel-500: #8E9DA7; --steel-300: #5D6D78;
  --minio: #E2683D; --minio-ink: #F08A63; --minio-wash: #3A2219; --ria: #5AB2C4; --ria-wash: #173138;
  --ok: #5FBF85; --ok-wash: #183326; --warn: #E0A64A; --warn-wash: #352A16; --bad: #EF6B60; --bad-wash: #3B1E1C;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--steel-900);
  background: var(--zinc);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--minio); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 700; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wide { font-stretch: 118%; }
.xwide { font-stretch: 125%; }
.narrow { font-stretch: 85%; }
.muted { color: var(--steel-500); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }

/* chapa con esquina achaflanada: el gesto propio de la marca */
.cut { clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%); }
.cut-both { clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); }

/* botones */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  min-height: 40px; padding: .55em 1.1em; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--paper); color: var(--steel-900); text-decoration: none; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--steel-500); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--minio); border-color: var(--minio); color: #fff; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); border-radius: 0; }
.btn-primary:hover { background: var(--minio-ink); border-color: var(--minio-ink); }
.btn-dark { background: var(--steel-900); border-color: var(--steel-900); color: var(--zinc); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--zinc-2); border-color: transparent; }
.btn-sm { min-height: 32px; padding: .35em .75em; font-size: 13px; }

/* etiquetas de estado */
.tag { display: inline-flex; align-items: center; gap: .35em; padding: .12em .55em; border-radius: 3px; font-size: 12.5px; font-weight: 600; background: var(--zinc-2); color: var(--steel-700); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.tag.plain::before { display: none; }
.tag.ok { background: var(--ok-wash); color: var(--ok); }
.tag.warn { background: var(--warn-wash); color: var(--warn); }
.tag.bad { background: var(--bad-wash); color: var(--bad); }
.tag.ria { background: var(--ria-wash); color: var(--ria); }
.tag.minio { background: var(--minio-wash); color: var(--minio-ink); }

/* formularios */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--steel-700); }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: .5em .75em; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--paper); color: var(--steel-900);
}
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--minio); box-shadow: 0 0 0 3px var(--minio-wash); }
.err { color: var(--bad); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--steel-900); text-decoration: none; }
.logo-light { color: #E9EDEF; }
.logo-mark { flex: none; }
.logo-text { display: grid; line-height: 1; }
.logo-name { font-stretch: 125%; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.logo-sub { font-size: 11.5px; color: var(--steel-500); margin-top: 3px; }
.logo-light .logo-sub { color: #9AA8B2; }

[hidden] { display: none !important; }
