/* ============================================================
   tema.css — Modo día / modo noche (Relievo · cliente Breaking Hot)
   El modo día es el diseño de cada página (identidad Relievo);
   aquí solo están el botón y las correcciones del modo noche,
   con la paleta Relievo oscura (verdes muy oscuros + oro satinado).
   Los documentos (certificado, volante, liquidación, imágenes
   exportadas) siempre quedan en papel blanco con bordes negros.
   ============================================================ */

/* ---------- Botón ---------- */
.bh-tema-wrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.bh-tema{
  display:inline-flex;align-items:center;gap:7px;cursor:pointer;
  padding:7px 13px;border-radius:999px;border:1px solid #D8D0BF;
  background:#FFFFFF;color:#1B2A1C;
  font-family:'Montserrat',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:11px;font-weight:600;letter-spacing:1.4px;text-transform:uppercase;
  box-shadow:0 1px 2px rgba(27,42,28,.06);
  transition:border-color .2s, background .2s, color .2s;
}
.bh-tema:hover{border-color:#1E441F;color:#1E441F;background:#F6F1E7}
.bh-tema:focus-visible{outline:3px solid #D3BA78;outline-offset:2px}
.bh-tema svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bh-tema .luna{color:#1E441F}
.bh-tema .sol{display:none}
.bh-tema-flotante{position:fixed;top:16px;right:16px;z-index:3000;box-shadow:0 1px 2px rgba(27,42,28,.06), 0 8px 24px rgba(27,42,28,.08)}
@media (max-width:700px){ .bh-tema .txt{display:none} .bh-tema{padding:8px} }
@media print{ .bh-tema{display:none !important} }

/* ============================================================
   MODO NOCHE — paleta Relievo oscura
   fondo #0F1A10 · barras #142016 · campos #1A2A1C · superficies #1F3121
   texto #EEF2EA · secundario #A9B5A8 · bordes rgba(238,242,234,.12) · oro #D3BA78
   ============================================================ */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0F1A10; --surface:#142016; --card:#1F3121; --border:rgba(238,242,234,.12);
  --cream:#EEF2EA; --text:#EEF2EA; --muted:#A9B5A8; --muted-soft:#7F8C80;
  --gold:#D3BA78; --green:#7FC98A; --yellow:#E8C766; --purple:#B79AE0; --teal:#6CC4BC; --ok:#9FD3A0;
  --shadow:0 8px 28px rgba(0,0,0,.40);
}
html[data-theme="dark"] .bh-tema{background:#1F3121;border-color:rgba(238,242,234,.16);color:#EEF2EA;box-shadow:none}
html[data-theme="dark"] .bh-tema:hover{border-color:#D3BA78;color:#D3BA78;background:#1A2A1C}
html[data-theme="dark"] .bh-tema .luna{display:none}
html[data-theme="dark"] .bh-tema .sol{display:inline;color:#D3BA78}

/* Marca Relievo (bloque .rlv-marca) sobre fondo oscuro */
html[data-theme="dark"] .rlv-marca-nombre{color:#EEF2EA}
html[data-theme="dark"] .rlv-cliente{background:rgba(211,186,120,.16);color:#D3BA78}
html[data-theme="dark"] .rlv-cliente::before{background:#D3BA78}
html[data-theme="dark"] ::selection{background:rgba(211,186,120,.35);color:#EEF2EA}

/* Fondo general */
html[data-theme="dark"] body{
  background-color:#0F1A10 !important;
  background-image:none !important;
  color:var(--text);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#2B3F2D}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:#0F1A10}

/* Campos */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
  background:#1A2A1C !important;color:var(--text) !important;
  border:1px solid rgba(238,242,234,.12) !important;
  box-shadow:none !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus{
  border-color:#D3BA78 !important;box-shadow:0 0 0 3px rgba(211,186,120,.25) !important;
}
html[data-theme="dark"] input[type=date],
html[data-theme="dark"] input[type=month],
html[data-theme="dark"] input[type=time]{color-scheme:dark}
html[data-theme="dark"] input[type=file]{background:transparent !important;box-shadow:none !important;border:0 !important}
html[data-theme="dark"] input[type=checkbox],
html[data-theme="dark"] input[type=radio]{box-shadow:none !important;accent-color:#D3BA78}
html[data-theme="dark"] option,
html[data-theme="dark"] optgroup{background:#142016;color:var(--text)}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#7F8C80}

/* Superficies (paneles, tarjetas, modales) */
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .rep-card,
html[data-theme="dark"] .doc{
  background:#1F3121 !important;
  border-color:rgba(238,242,234,.12) !important;
  box-shadow:0 8px 24px rgba(0,0,0,.35) !important;
  backdrop-filter:none !important;-webkit-backdrop-filter:none !important;
}
/* En la ficha de Gestión humana, .panel es solo una pestaña dentro del modal */
html[data-theme="dark"] .modal .panel{background:transparent !important;box-shadow:none !important;border:0 !important;backdrop-filter:none !important}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .main > .topbar{
  background:#142016 !important;border-color:rgba(238,242,234,.12) !important;
}
html[data-theme="dark"] .sidebar{border-right-color:rgba(238,242,234,.12) !important}
html[data-theme="dark"] .toast{background:#1F3121 !important;color:var(--text);border-color:rgba(238,242,234,.12)}
html[data-theme="dark"] .modal-overlay{background:rgba(5,10,6,.66) !important}
html[data-theme="dark"] .turno-menu,
html[data-theme="dark"] .tm-submenu{box-shadow:0 10px 30px rgba(0,0,0,.5)}

/* Tarjetas pequeñas */
html[data-theme="dark"] .total-chip,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .gth-grupo,
html[data-theme="dark"] .import-res .k,
html[data-theme="dark"] .gen-doc,
html[data-theme="dark"] .tb-config{
  background:#1A2A1C !important;border-color:rgba(238,242,234,.12) !important;
  box-shadow:0 2px 10px rgba(0,0,0,.28) !important;
}
/* Día de la planilla: sin !important en el fondo para respetar el color de estado */
html[data-theme="dark"] .dia-card{background:#1A2A1C;box-shadow:0 2px 10px rgba(0,0,0,.28) !important;border-color:rgba(238,242,234,.12)}
html[data-theme="dark"] .rep-card.extra{background:rgba(232,199,102,.08) !important}

/* Tablas */
html[data-theme="dark"] th,
html[data-theme="dark"] td{border-color:rgba(238,242,234,.10) !important}
html[data-theme="dark"] thead th{background:#142016 !important}
html[data-theme="dark"] thead .col-emp{background:#142016 !important}
/* El hover no toca el papel de los documentos (#doc): sus grises de encabezado/total se mantienen */
html[data-theme="dark"] tr:hover td:where(:not(#doc td)){background:rgba(238,242,234,.04)}
html[data-theme="dark"] .gth-tabla tbody tr:hover td{background:rgba(211,186,120,.06)}
html[data-theme="dark"] .semana-h{background:#1A2A1C !important}
html[data-theme="dark"] .cell{background:#1A2A1C;color:#A9B5A8}

/* Botones y chips */
html[data-theme="dark"] .btn-ghost{color:var(--text);border-color:rgba(238,242,234,.16)}
html[data-theme="dark"] .btn-ghost:hover{color:#D3BA78;border-color:#D3BA78}
/* --green oscuro es claro (#7FC98A): el botón de éxito usa el verde de estado para que el texto blanco tenga contraste AA */
html[data-theme="dark"] .btn-success{background:#2E6B30;color:#fff}
html[data-theme="dark"] .pronto{background:#1A2A1C;border-color:rgba(238,242,234,.12);color:#A9B5A8}
html[data-theme="dark"] .doc.off .ico{background:rgba(238,242,234,.06)}

/* Mensajes legibles sobre fondo oscuro */
html[data-theme="dark"] .msg.ok,
html[data-theme="dark"] .badge.def{color:#9FD3A0}
html[data-theme="dark"] .msg.err{color:#F2A49C}
html[data-theme="dark"] .aviso{color:#E8C766}

/* Login (heredado): esquinas recortadas del logo viejo, si aún existe */
html[data-theme="dark"] .bh-logo-wrap::before,
html[data-theme="dark"] .bh-logo-wrap::after{background:#0F1A10 !important}

/* Vista previa de documentos: la mesa se oscurece, el papel sigue blanco */
html[data-theme="dark"] .preview-wrap{background:#142016 !important;border-color:rgba(238,242,234,.08) !important}
html[data-theme="dark"] #certificado,
html[data-theme="dark"] #volante{color-scheme:light}
html[data-theme="dark"] #volante th,
html[data-theme="dark"] #volante td{border-color:#000 !important}
html[data-theme="dark"] #volante .v-datos td{border-color:transparent !important}
html[data-theme="dark"] #volante tr:hover td{background:transparent}
html[data-theme="dark"] #certificado a,
html[data-theme="dark"] #volante a{color:inherit}
/* Liquidación, soporte de cesantías y vacaciones */
html[data-theme="dark"] #doc{color-scheme:light}
html[data-theme="dark"] #doc th,
html[data-theme="dark"] #doc td{border-color:#000 !important}
html[data-theme="dark"] #doc a{color:inherit}

/* Móvil (barra inferior) */
@media (max-width:700px){
  html[data-theme="dark"] .sidebar{background:#142016 !important;border-top-color:rgba(238,242,234,.12) !important}
}
