/* app-inventarios · base común (copiada de app-barber)
   Colores oficiales de FARO: verde #0B4A3B · verde oscuro #083A2E · amarillo #FFC90A · amarillo oscuro #E0A800
   marfil #F7F5EE · negro #151515. Letra: Inter (en lugar de Manrope, hasta tener sus archivos).
   Toque de barbería: las rayas del poste de barbero solo aparecen para avisar un retraso. */
@font-face { font-family: "Inter"; src: url("/shared/fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/shared/fonts/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/shared/fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/shared/fonts/inter-extrabold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  --green: #0b4a3b;
  --green-dark: #083a2e;
  --green-2: #135c4a;
  --green-soft: #e3ece8;
  --yellow: #ffc90a;
  --yellow-dark: #e0a800;
  --yellow-soft: #fff4cc;
  --ivory: #f7f5ee;
  --ivory-2: #eeebe1;
  --white: #ffffff;
  --black: #151515;
  --ink-2: #5a615d;
  --line: #e2ded2;
  --line-2: #cbc6b8;
  --late: #a3263a;
  --late-soft: #fbe9ec;
  --done: #1f7a5c;
  --done-soft: #def0e8;
  --sans: "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 8px;
  --pole: repeating-linear-gradient(135deg, var(--late) 0 6px, #fff 6px 12px, #23508f 12px 18px, #fff 18px 24px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--sans); color: var(--black); background: var(--ivory); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; line-height: 1.12; margin: 0; letter-spacing: -.015em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--line-2); background: var(--white); color: var(--black); border-radius: var(--r); padding: .5rem 1rem; cursor: pointer; min-height: 40px; font-weight: 600; transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--green); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); }
.btn-yellow { background: var(--yellow); color: var(--green-dark); border-color: var(--yellow); }
.btn-yellow:hover { background: #ffd43d; border-color: #ffd43d; }
.btn-on-green { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .35); }
.btn-on-green:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-danger { color: var(--late); border-color: rgba(163, 38, 58, .4); background: var(--white); }
.btn-danger:hover { border-color: var(--late); background: var(--late-soft); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { color: var(--black); border-color: transparent; background: var(--ivory-2); }

/* Selector de idioma FR / EN / ES */
.langs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; padding: 2px; background: var(--white); }
.langs button { border: 0; background: transparent; border-radius: 99px; padding: .25rem .65rem; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--ink-2); min-height: 30px; }
.langs button[aria-pressed="true"] { background: var(--green); color: var(--white); }
.langs-dark { border-color: rgba(255, 255, 255, .3); background: transparent; }
.langs-dark button { color: rgba(255, 255, 255, .8); }
.langs-dark button[aria-pressed="true"] { background: var(--yellow); color: var(--green-dark); }

/* Campos */
label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r); padding: .55rem .75rem; background: var(--white); color: var(--black); min-height: 42px; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(255, 201, 10, .5); outline-offset: 0; }
textarea { resize: vertical; }
.stack { display: flex; flex-direction: column; gap: .35rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.form-error { color: var(--late); margin: .2rem 0; font-size: .88rem; font-weight: 500; }
.form-error:empty { display: none; }

/* Puerta: cuenta del salón + NIP */
.gate { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 1.3rem; padding: 4.5rem 1rem 3rem; background: var(--green); color: var(--white); position: relative; }
.gate-top { position: absolute; top: 1rem; right: 1rem; }
.gate-mark { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; color: var(--yellow); }
.gate-card { width: min(380px, 100%); background: var(--white); color: var(--black); border-radius: 16px; padding: 2rem 1.8rem 1.7rem; }
.gate-title { font-size: 1.6rem; margin-bottom: .3rem; }
.gate-help { color: var(--ink-2); margin: 0 0 1.3rem; }
.gate-card .btn-primary { margin-top: .7rem; width: 100%; min-height: 46px; }
.gate-out { color: rgba(255, 255, 255, .75); }
.gate-out:hover { color: var(--yellow); background: transparent; }
.pin-dots { display: flex; gap: 1rem; justify-content: center; margin: .3rem 0 1.4rem; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--green); transition: background-color .12s; }
.pin-dots span.on { background: var(--green); }
.pin-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; justify-items: center; }
.pin-key { font-size: 1.5rem; font-weight: 600; width: 70px; height: 70px; border-radius: 50%; border: 1px solid var(--line); background: var(--ivory); cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color .12s, border-color .12s; }
.pin-key:hover { border-color: var(--green); }
.pin-key:active { background: var(--yellow-soft); border-color: var(--yellow-dark); }
.pin-key.del { font-size: 1.2rem; background: transparent; border-color: transparent; color: var(--ink-2); }

/* Ventanas */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 2rem)); max-height: calc(100% - 3rem); background: var(--white); color: var(--black); box-shadow: 0 24px 60px rgba(8, 58, 46, .3); }
dialog::backdrop { background: rgba(8, 58, 46, .55); }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.3rem 1.5rem .9rem; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 1.35rem; }
.dlg-sub { display: block; font-size: .9rem; color: var(--ink-2); margin-top: .25rem; font-weight: 500; letter-spacing: 0; }
.dlg-body { padding: 1.1rem 1.5rem 1.3rem; display: flex; flex-direction: column; gap: .9rem; }
.dlg-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.5rem 1.2rem; background: var(--ivory); flex-wrap: wrap; border-radius: 0 0 16px 16px; }
.dlg-foot .spacer { flex: 1; }

.toast { position: fixed; left: 50%; bottom: 2.6rem; transform: translateX(-50%); background: var(--green-dark); color: var(--white); padding: .7rem 1.2rem; border-radius: var(--r); z-index: 50; max-width: calc(100% - 2rem); border-left: 4px solid var(--yellow); font-weight: 500; }
.toast-err { background: var(--late); border-left-color: var(--white); }

/* Firmas: abajo a la derecha */
.faro-sign { position: fixed; right: .75rem; bottom: .45rem; font-size: .68rem; line-height: 1.4; color: var(--ink-2); pointer-events: none; z-index: 40; text-align: right; }
.faro-sign .ver { font-variant-numeric: tabular-nums; }
body.on-dark .faro-sign { color: rgba(255, 255, 255, .65); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
