/* =====================================================================
   Midass Market - Hoja de estilos de la aplicacion (base SAT MIDASS).

   Identidad Midass (la misma que la web): barra lateral y cabecera en
   tinta casi negra, rojo #C41413 como color de accion, ambar #F8B916 de
   acento, lienzo gris muy claro y tarjetas blancas.
   Inter para el texto y Poppins para titulos y marca.

   El azul (#3699FF) se queda SOLO como color informativo de estados
   (pendiente, en stock, abierto...): pasarlos a rojo los haria parecer
   errores.
   ===================================================================== */

:root {
    --dark:        #141416;
    --dark-soft:   #232327;
    --primary:     #C41413;
    --primary-dk:  #8E0E0E;
    --primary-rgb: 196, 20, 19;
    --accent:      #F8B916;
    --success:     #1BC5BD;
    --success-dk:  #0BB7AF;
    --warning:     #F8B916;
    --danger:      #F64E60;
    --danger-dk:   #EE2D41;
    --info:        #8950FC;
    --gray:        #A2A3B7;
    --gray-soft:   #B5B5C3;
    --secondary:   #3D3D3D;
    --light:       #F5F6F8;
    --line:        #E5E7EB;
    --text:        #3D3D3D;
    --text-strong: #1A1A1A;

    --radius:      10px;
    --radius-lg:   14px;
    --shadow-sm:   0 0 20px 0 rgba(76, 87, 125, .06);
    --shadow:      0 0 30px 0 rgba(82, 63, 105, .10);
    --shadow-lg:   0 10px 40px 0 rgba(82, 63, 105, .18);

    --sidebar-w:   220px;
    --header-h:    50px;

    /* Curvas de movimiento (las de serie de CSS se quedan cortas) */
    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; outline: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: Inter, -apple-system, "Segoe UI", Helvetica, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--light);
    line-height: 1.5;
    overflow-x: hidden;
}

button, label, .info-box h2 { user-select: none; }
a { color: var(--primary); text-decoration: none; }
hr { border: 0; border-top: 1px dashed #E4E4E4; }
code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    background: var(--light); padding: 1px 6px; border-radius: 4px;
    font-size: .85em; color: var(--text-strong);
}
::selection { background: var(--secondary); color: var(--light); }

/* Barras de desplazamiento discretas, como el original */
::-webkit-scrollbar { width: 0; height: 0; }
textarea::-webkit-scrollbar, .scroll-y::-webkit-scrollbar { width: 6px; height: 6px; }
textarea::-webkit-scrollbar-thumb, .scroll-y::-webkit-scrollbar-thumb {
    background: var(--gray-soft); border-radius: 3px;
}

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- carga */
#boot-loading {
    position: fixed; inset: 0; background: var(--light);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}
#boot-loading i { font-size: 34px; color: var(--primary); }

/* =====================================================================
   1. Acceso
   ===================================================================== */
.auth-screen {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px; background: radial-gradient(circle at 30% 20%, #2a1416 0%, var(--dark) 62%);
}
.auth-card {
    width: 100%; max-width: 420px; background: #fff;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 38px 34px 30px;
}
.auth-brand { text-align: center; margin-bottom: 26px; letter-spacing: .5px; }
.brand-mark {
    background: var(--primary); color: #fff; font-weight: 700; font-size: 20px;
    padding: 4px 9px; border-radius: 6px; margin-right: 7px;
}
.brand-name { font-weight: 600; font-size: 20px; color: var(--dark); letter-spacing: 2px; }
.auth-title { font-size: 21px; font-weight: 600; color: var(--text-strong); text-align: center; margin-bottom: 24px; }
.auth-hint { margin-top: 20px; text-align: center; font-size: 12.5px; color: var(--gray); }

/* =====================================================================
   2. Estructura
   ===================================================================== */
.container { min-height: 100vh; }

.header {
    position: fixed; top: 0; left: 0; right: 0; height: var(--header-h);
    background: var(--dark); display: flex; align-items: center; gap: 4px;
    padding: 0 14px 0 8px; z-index: 60;
}
.header-right { margin-left: auto; display: flex; align-items: center; gap: 2px; position: relative; }

.header-btn {
    background: none; border: 0; color: #fff; width: 40px; height: 38px;
    border-radius: var(--radius); cursor: pointer; font-size: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, opacity .15s;
}
.header-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .10); }
.header-btn:disabled { opacity: .32; cursor: default; }

.header-user {
    display: flex; align-items: center; gap: 10px; color: #fff; cursor: pointer;
    padding: 4px 4px 4px 16px; margin-left: 8px; border-left: 1px solid rgba(255, 255, 255, .14);
    font-size: 13.5px; font-weight: 500;
}
.header-user i { font-size: 26px; color: var(--primary); }

.user-menu {
    position: absolute; top: 46px; right: 0; background: #fff; min-width: 232px;
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 80;
}
.user-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; background: none;
    border: 0; padding: 9px 12px; border-radius: var(--radius); cursor: pointer;
    font: inherit; font-size: 13.5px; color: var(--text); text-align: left;
}
.user-menu button:hover { background: var(--light); }
.user-menu button.danger { color: var(--danger); }
.user-menu button i { width: 16px; color: var(--gray); }
.user-menu button.danger i { color: var(--danger); }
.user-menu hr { margin: 6px 4px; }

/* -------------------------------------------------------- menu lateral */
.side-menu {
    position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w);
    background: var(--dark); display: flex; flex-direction: column; z-index: 50;
    overflow-y: auto; padding-top: 10px;
}
.side-menu-links { flex: 1; }
.side-menu button {
    display: flex; align-items: center; gap: 14px; width: 100%; background: none;
    border: 0; border-left: 3px solid transparent; padding: 12px 18px; cursor: pointer;
    font: inherit; font-size: 13.5px; color: var(--gray); text-align: left;
    transition: color .15s, background .15s;
}
.side-menu button i { width: 20px; font-size: 15px; text-align: center; }
.side-menu button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-menu button:hover { color: #fff; background: rgba(255, 255, 255, .04); }
/* Activo: texto en BLANCO (el rojo sobre tinta no se lee); el rojo va en la
   barra vertical y en el icono. Decision de Sergio sobre la maqueta (06-10). */
.side-menu button.active { color: #fff; border-left-color: var(--primary); background: rgba(255, 255, 255, .06); }
.side-menu button.active i { color: var(--primary); }

.button-submenu { background: rgba(0, 0, 0, .18); padding: 4px 0; }
.button-submenu button { padding: 8px 18px 8px 55px; font-size: 13px; }
.button-submenu button.active { color: #fff; font-weight: 600; border-left-color: transparent; background: none; }
.button-submenu button.active i { color: inherit; }

.side-menu-version {
    padding: 12px 18px; font-size: 11px; color: #565672;
    font-family: ui-monospace, Consolas, monospace; letter-spacing: .5px;
}

/* ------------------------------------------------------------ contenido */
.content-wrapper { margin-left: var(--sidebar-w); padding-top: var(--header-h); min-height: 100vh; }

.content-header {
    background: #fff; height: 52px; display: flex; align-items: center;
    padding: 0 22px; gap: 12px; position: sticky; top: var(--header-h); z-index: 40;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}
.content-header h1 { font-size: 17px; font-weight: 500; color: var(--text-strong); }
.content-header-btns { margin-left: auto; display: flex; gap: 8px; align-items: center; }

#content { padding: 26px 0 60px; }

.responsive-container    { width: 95%; max-width: 1000px; margin: 0 auto; }
.responsive-container-sm { width: 95%; max-width: 620px;  margin: 0 auto; }
.responsive-container-xl { width: 95%; max-width: 1200px; margin: 0 auto; }
.responsive-container-xxl{ width: 96%; max-width: 1480px; margin: 0 auto; }

/* =====================================================================
   3. Tarjetas y bloques
   ===================================================================== */
.card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
    margin-bottom: 22px; overflow: hidden;
}
.card-header {
    padding: 18px 24px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 12px;
}
.card-title { font-size: 16px; font-weight: 500; color: var(--text-strong); }
.card-title-center { text-align: center; width: 100%; }
.card-body   { padding: 22px 24px; }
.card-footer {
    padding: 16px 24px; border-top: 1px solid var(--line);
    display: flex; align-items: center; gap: 10px;
}
.card-footer .right { margin-left: auto; display: flex; gap: 10px; }
.card-flat { box-shadow: none; border: 1px solid var(--line); }

.subtitle { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.subtitle h2 { font-size: 15px; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.subtitle h2 i { color: var(--primary); margin-right: 6px; }
.subtitle hr { flex: 1; }

/* Widgets numericos del inicio */
.widget-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.widget {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 22px 10px; text-align: center; cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.widget:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.widget-value { font-size: 32px; font-weight: 700; line-height: 1.1; }
.widget-label { font-size: 13px; color: var(--text); margin-top: 4px; }

/* Rejilla de accesos (Administracion, Estadisticas) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.tile {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 30px 16px; text-align: center; cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile i { font-size: 34px; color: var(--primary); display: block; margin-bottom: 14px; }
.tile.accent i { color: var(--danger); }
.tile span { font-size: 14px; color: var(--text); }

/* Fichas de resumen lateral */
.aside-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 18px; }
.aside-card h3 { font-size: 14.5px; font-weight: 600; color: var(--text-strong); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.aside-card h3 i { color: var(--gray); }
.aside-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.aside-row .label { color: var(--text); }
.aside-row .value { font-weight: 500; color: var(--text-strong); text-align: right; }
.aside-row.total { border-top: 1px dashed #E4E4E4; margin-top: 8px; padding-top: 10px; }
.aside-row.total .value { color: var(--success-dk); font-weight: 600; }

/* =====================================================================
   4. Formularios
   ===================================================================== */
.form-input { margin-bottom: 16px; }
.form-input label,
.form-label {
    display: block; font-size: 13px; color: var(--text); margin-bottom: 5px;
}
.form-input label .optional { font-size: 10.5px; color: var(--gray); vertical-align: super; }

input[type=text], input[type=password], input[type=email], input[type=tel],
input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
    width: 100%; background: #F3F6F9; border: 1px solid transparent;
    border-radius: var(--radius); padding: 10px 13px; font: inherit; font-size: 13.5px;
    color: var(--text-strong); transition: background .15s, border-color .15s;
}
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--primary); }
input:disabled, select:disabled, textarea:disabled { color: var(--gray); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--gray-soft); }
textarea { min-height: 92px; resize: vertical; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23A2A3B7' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}

.form-checkbox { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.form-checkbox input { display: none; }
.form-checkbox .checkmark {
    width: 18px; height: 18px; border-radius: 4px; background: #F3F6F9;
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    transition: background .15s;
}
.form-checkbox input:checked + .checkmark { background: var(--primary); }
.form-checkbox input:checked + .checkmark::after {
    content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    color: #fff; font-size: 10px;
}

/* Rejilla de campos */
.row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; }
.col-12 { grid-column: span 12; } .col-6 { grid-column: span 6; }
.col-4  { grid-column: span 4; }  .col-3 { grid-column: span 3; }
.col-8  { grid-column: span 8; }  .col-9 { grid-column: span 9; }
.col-5  { grid-column: span 5; }  .col-7 { grid-column: span 7; }
.col-2  { grid-column: span 2; }

/* Selector de tres opciones (Anonimo / Nuevo / Buscar) */
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 20px; }
.choice {
    background: #fff; border: 1px solid var(--primary); color: var(--primary);
    border-radius: var(--radius); padding: 11px; font: inherit; font-size: 14px;
    cursor: pointer; transition: background .15s, color .15s;
}
.choice:hover { background: rgba(var(--primary-rgb), .06); }
.choice.active { background: var(--primary); color: #fff; }

/* =====================================================================
   5. Botones
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: var(--radius); padding: 10px 17px; cursor: pointer;
    font: inherit; font-size: 13.5px; font-weight: 500; white-space: nowrap;
    transition: background-color .15s ease, opacity .15s ease, transform .16s var(--ease-out);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled)   { background: var(--primary-dk); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled)   { background: var(--success-dk); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)    { background: var(--danger-dk); }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-info      { background: var(--info); color: #fff; }
.btn-secondary { background: #E4E6EF; color: #7E8299; }
.btn-secondary:hover:not(:disabled) { background: #D6D8E3; }
.btn-light     { background: var(--light); color: var(--text); }
.btn-ghost     { background: none; color: var(--primary); }
.btn-ghost:hover:not(:disabled) { background: rgba(var(--primary-rgb), .08); }
.btn-outline   { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }

.btn-icon { width: 34px; height: 32px; padding: 0; }

/* =====================================================================
   6. Tablas
   ===================================================================== */
.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.table-scroll { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
    text-align: left; font-weight: 500; color: var(--text-strong); font-size: 13.5px;
    padding: 17px 20px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; transition: background .12s; }
table.data tbody tr.clickable:hover { background: #F7F8FC; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--gray); font-style: italic; }
table.data .strong { color: var(--text-strong); font-weight: 500; }

.empty-state { padding: 54px 20px; text-align: center; color: var(--gray); }
.empty-state i { font-size: 40px; display: block; margin-bottom: 14px; opacity: .5; }

/* Etiquetas de estado */
.badge {
    display: inline-block; padding: 4px 11px; border-radius: var(--radius);
    font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap;
}
.badge-soft { background: rgba(var(--primary-rgb), .10); color: var(--primary); }
.badge-success { background: rgba(27, 197, 189, .14); color: var(--success-dk); }
.badge-warning { background: rgba(255, 168, 0, .14); color: #B37800; }
.badge-danger  { background: rgba(246, 78, 96, .14); color: var(--danger-dk); }
.badge-gray    { background: #EEF0F8; color: #7E8299; }

/* Paginacion */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0 4px; }
.pagination button {
    background: #fff; border: 0; border-radius: var(--radius); width: 38px; height: 34px;
    cursor: pointer; color: var(--text); box-shadow: var(--shadow-sm);
}
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination .page { background: #fff; padding: 7px 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); font-size: 13.5px; }

/* Filtros */
.filter-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.filter-head {
    padding: 18px 24px; display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 16px; font-weight: 500; color: var(--text-strong);
}
.filter-head .chev { margin-left: auto; color: var(--gray); transition: transform .2s; }
.filter-card.open .filter-head .chev { transform: rotate(180deg); }
.filter-body { padding: 0 24px 20px; border-top: 1px solid var(--line); padding-top: 18px; }
/* Pie de acciones del panel de filtros: como en el original, alineado a la derecha. */
.filter-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.filter-actions .btn { padding: 7px 16px; font-size: 13px; }
/* Interruptor verde de la etiqueta de descuento del TPV (importe/porcentaje). */
.badge-toggle {
  border: 0; cursor: pointer; float: right;
  background: var(--success); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 10px;
}
.badge-toggle i { margin-right: 3px; }
.badge-toggle:hover { filter: brightness(1.08); }
/* El lapiz de editar nombre, pegado al titulo del modal. */
.modal-header h2 .btn-icon { margin-left: 8px; vertical-align: middle; color: var(--gray); }

/* Pestanas de ficha */
.tabs { display: flex; gap: 6px; padding: 14px 16px; background: #fff; border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.tabs button {
    background: none; border: 0; border-radius: var(--radius); padding: 8px 14px;
    cursor: pointer; font: inherit; font-size: 13.5px; color: var(--text);
    display: inline-flex; align-items: center; gap: 8px;
}
.tabs button i { color: var(--gray); }
.tabs button:hover { background: var(--light); }
.tabs button.active { background: var(--primary); color: #fff; }
.tabs button.active i { color: #fff; }
.tab-panel { background: #fff; border-radius: 0 0 var(--radius) var(--radius); }

/* Chips de categoria */
.chip-row { display: flex; gap: 8px; padding: 4px 0 18px; overflow-x: auto; }
.chip {
    background: #fff; border: 0; border-radius: var(--radius); padding: 7px 14px;
    cursor: pointer; font: inherit; font-size: 13px; color: var(--text);
    white-space: nowrap; box-shadow: var(--shadow-sm);
}
.chip.active { background: var(--dark); color: #fff; }

/* =====================================================================
   7. TPV
   ===================================================================== */
.tpv { position: fixed; inset: var(--header-h) 0 0 0; display: grid; grid-template-columns: 1fr 380px; }
.tpv-main { display: flex; flex-direction: column; background: var(--light); min-width: 0; }
.tpv-search { background: #fff; display: flex; align-items: center; gap: 14px; padding: 0 22px; height: 52px; }
.tpv-search i { color: var(--gray); font-size: 17px; }
.tpv-search input { background: none; border: 0; font-size: 18px; padding: 0; }
.tpv-results { flex: 1; overflow-y: auto; }
.tpv-results table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
.tpv-results th {
    position: sticky; top: 0; background: var(--light); text-align: left;
    font-size: 12.5px; font-weight: 600; color: var(--text-strong); padding: 10px 22px;
}
.tpv-results td { padding: 11px 22px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tpv-results tr:hover td { background: #F7F8FC; }
.tpv-results .meta { display: block; font-size: 11.5px; color: var(--gray); }
.tpv-results .num { text-align: right; white-space: nowrap; }

.tpv-cart { background: var(--dark-soft); color: #fff; display: flex; flex-direction: column; }
.tpv-customer {
    display: flex; align-items: center; gap: 14px; padding: 8px 14px; height: 52px;
    background: var(--dark); cursor: pointer;
}
.tpv-customer .avatar {
    width: 34px; height: 34px; border-radius: var(--radius); background: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex: none;
}
.tpv-customer span { font-size: 14px; color: #E4E6EF; }
.tpv-cart-label { padding: 8px 16px; font-size: 12px; color: #8C8CA1; border-bottom: 1px dashed #45455C; }
.tpv-lines { flex: 1; overflow-y: auto; }
.tpv-line {
    display: flex; align-items: center; gap: 12px; padding: 11px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer;
}
.tpv-line:hover { background: rgba(255, 255, 255, .04); }
.tpv-line .info { flex: 1; min-width: 0; }
.tpv-line .name { font-size: 13.5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpv-line .price { font-size: 11.5px; color: #9B9BB0; }
.tpv-line .units { font-size: 14px; color: #fff; }
.tpv-totals { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }
.tpv-totals .r { display: flex; justify-content: space-between; padding: 3px 0; color: #C9C9D6; }
.tpv-totals .serie { color: var(--primary); cursor: pointer; background: none; border: 0; font: inherit; padding: 0; }
.tpv-total {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 12px 16px; border-top: 1px dashed #45455C; font-size: 20px; font-weight: 600; color: #fff;
}
.tpv-checkout {
    border: 0; background: var(--primary); color: #fff; font: inherit;
    font-size: 22px; font-weight: 700; letter-spacing: 1px; padding: 20px; cursor: pointer;
}
.tpv-checkout:hover { background: var(--primary-dk); }
.tpv-checkout:disabled { background: #4A4A5F; color: #8C8CA1; cursor: not-allowed; }

/* =====================================================================
   8. Modales, avisos y buscador
   ===================================================================== */
.modal-host {
    position: fixed; inset: 0; background: rgba(30, 30, 45, .45); z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: fade .16s ease;
}
.modal {
    background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
    animation: pop .18s cubic-bezier(.2, .9, .3, 1.2);
}
.modal.wide { max-width: 820px; }
.modal-header { padding: 22px 26px 8px; text-align: center; }
.modal-header h2 { font-size: 19px; font-weight: 600; color: var(--text-strong); }
.modal-body { padding: 16px 26px; }
.modal-footer { padding: 16px 26px 22px; display: flex; align-items: center; gap: 10px; }
.modal-footer .right { margin-left: auto; display: flex; gap: 10px; }
.modal-icon { text-align: center; font-size: 54px; margin: 18px 0 6px; }
.modal-icon.ok { color: var(--success); } .modal-icon.err { color: var(--danger); }
.modal-icon.warn { color: var(--warning); } .modal-icon.info { color: var(--primary); }
.modal-text { text-align: center; color: var(--text); padding: 0 10px 6px; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { opacity: 0; transform: scale(.94) translateY(8px); } }

.notice {
    display: flex; gap: 12px; background: #F3F6F9; border-radius: var(--radius);
    padding: 13px 16px; font-size: 13px; color: var(--text); margin-bottom: 16px;
}
.notice i { color: var(--gray); margin-top: 2px; }
.notice.warn { background: rgba(255, 168, 0, .1); }
.notice.warn i { color: var(--warning); }
.notice.danger { background: rgba(246, 78, 96, .09); }
.notice.danger i { color: var(--danger); }

.toast-stack { position: fixed; top: 62px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 13px 18px; display: flex; align-items: center; gap: 12px;
    font-size: 13.5px; min-width: 260px; max-width: 380px;
    animation: slide .2s ease; border-left: 4px solid var(--primary);
}
.toast.ok   { border-left-color: var(--success); }
.toast.err  { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warning); }
.toast i { font-size: 16px; color: var(--primary); }
.toast.ok i { color: var(--success); } .toast.err i { color: var(--danger); }
.toast.warn i { color: var(--warning); }
@keyframes slide { from { opacity: 0; transform: translateX(24px); } }

.global-search { position: fixed; inset: 0; background: rgba(30, 30, 45, .55); z-index: 250; padding-top: 90px; }
.global-search-box { width: 92%; max-width: 660px; margin: 0 auto; }
.global-search-input {
    background: #fff; border-radius: var(--radius); display: flex; align-items: center;
    gap: 14px; padding: 0 18px; height: 56px; box-shadow: var(--shadow-lg);
}
.global-search-input i { color: var(--gray); font-size: 17px; }
.global-search-input input { background: none; border: 0; font-size: 17px; padding: 0; }
.global-search-close { background: none; border: 0; color: var(--gray); font-size: 18px; cursor: pointer; }
.global-search-results { background: #fff; border-radius: var(--radius); margin-top: 12px; max-height: 55vh; overflow-y: auto; }
.global-search-results:empty { display: none; }
.gs-item { display: flex; align-items: center; gap: 14px; padding: 13px 18px; cursor: pointer; border-bottom: 1px solid var(--line); }
.gs-item:hover { background: var(--light); }
.gs-item .ico { width: 34px; height: 34px; border-radius: var(--radius); background: var(--light); display: flex; align-items: center; justify-content: center; color: var(--primary); flex: none; }
.gs-item .t { font-size: 14px; color: var(--text-strong); }
.gs-item .s { font-size: 12px; color: var(--gray); }

/* Identificacion de empleado */
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.employee-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 14px 18px; display: flex; align-items: center; gap: 16px; cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.employee-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.employee-card .avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--secondary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 500; flex: none;
}
.employee-card .name { font-size: 16px; color: var(--text-strong); }

/* Firma */
.sign-pad { background: #fff; border: 1px dashed var(--gray-soft); border-radius: var(--radius); touch-action: none; width: 100%; height: 220px; display: block; }

/* Graficas */
.chart-box { position: relative; height: 300px; }
.chart-box canvas { position: absolute; inset: 0; }
.stat-row { display: flex; gap: 40px; margin-bottom: 20px; }
.stat-row .stat .label { font-size: 12.5px; color: var(--gray); }
.stat-row .stat .value { font-size: 20px; font-weight: 600; color: var(--text-strong); }

/* Utilidades */
.mt-1 { margin-top: 6px; }   .mt-2 { margin-top: 12px; }  .mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }  .mt-5 { margin-top: 34px; }
.mb-1 { margin-bottom: 6px; }.mb-2 { margin-bottom: 12px; }.mb-3 { margin-bottom: 18px; }
.mb-4 { margin-bottom: 24px; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-muted { color: var(--gray); } .text-danger { color: var(--danger); }
.text-success { color: var(--success-dk); } .text-primary { color: var(--primary); }
.text-strong { color: var(--text-strong); font-weight: 500; }
.small { font-size: 12.5px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.ml-auto { margin-left: auto; }
.nowrap { white-space: nowrap; }
.c-pointer { cursor: pointer; }
.split-2 { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }

.only-mobile { display: none; }

/* =====================================================================
   9. Adaptacion a pantallas pequenas
   ===================================================================== */
@media (max-width: 1100px) {
    .split-2 { grid-template-columns: 1fr; }
    .tpv { grid-template-columns: 1fr 320px; }
}

@media (max-width: 860px) {
    .no-mobile { display: none !important; }
    .only-mobile { display: flex; }

    .content-wrapper { margin-left: 0; padding-bottom: 68px; }
    .content-header { padding: 0 16px; }
    #content { padding: 18px 0 40px; }

    .row { grid-template-columns: repeat(2, 1fr); }
    .col-12, .col-8, .col-9, .col-7 { grid-column: span 2; }
    .col-6, .col-4, .col-3, .col-5, .col-2 { grid-column: span 1; }

    .mobile-menu {
        position: fixed; left: 0; right: 0; bottom: 0; height: 62px; background: #fff;
        display: flex; align-items: center; justify-content: space-around; z-index: 70;
        box-shadow: 0 -2px 18px rgba(82, 63, 105, .12);
    }
    .mobile-menu button {
        background: none; border: 0; color: var(--gray); cursor: pointer; font: inherit;
        display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px;
        padding: 6px 10px;
    }
    .mobile-menu button i { font-size: 17px; }
    .mobile-menu button.active { color: var(--primary); }
    .mobile-menu button.important {
        background: var(--primary); color: #fff; width: 50px; height: 50px;
        border-radius: 50%; justify-content: center; margin-top: -18px;
        box-shadow: 0 4px 14px rgba(var(--primary-rgb), .40);
    }
    .mobile-menu button.important i { font-size: 19px; }

    .mobile-drawer {
        position: fixed; inset: 0 0 62px 0; background: #fff; z-index: 69;
        overflow-y: auto; padding: 14px 0;
    }
    .mobile-drawer button {
        display: flex; align-items: center; gap: 14px; width: 100%; background: none;
        border: 0; padding: 15px 22px; font: inherit; font-size: 14.5px; color: var(--text);
        border-bottom: 1px solid var(--line); cursor: pointer; text-align: left;
    }
    .mobile-drawer button i { width: 22px; color: var(--primary); }

    .tpv { grid-template-columns: 1fr; inset: var(--header-h) 0 62px 0; }
    .tpv-cart { position: fixed; inset: auto 0 62px 0; max-height: 58vh; z-index: 44; }
    .tpv-main { padding-bottom: 190px; }

    .toast-stack { left: 14px; right: 14px; }
    .toast { min-width: 0; max-width: none; }
    .widget-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-body, .card-header, .card-footer { padding-left: 16px; padding-right: 16px; }
    table.data th, table.data td { padding: 12px 14px; }
}

@media print {
    .header, .side-menu, .mobile-menu, .content-header-btns { display: none !important; }
    .content-wrapper { margin: 0; padding: 0; }
    body { background: #fff; }
}

/* =====================================================================
   10. Modo TPV: ocupa la pantalla completa, sin menú lateral
   ===================================================================== */
body.tpv-mode .side-menu        { display: none; }
body.tpv-mode .content-wrapper  { margin-left: 0; padding-top: 0; }
body.tpv-mode #content          { padding: 0; }

/* =====================================================================
   11. Pantalla de cliente (segundo monitor de la caja)
   ===================================================================== */
.cd { position: fixed; inset: 0; background: var(--dark); color: #fff; display: flex; flex-direction: column; }

.cd-head {
    padding: 20px 34px; border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex; align-items: center; gap: 10px;
}
.cd-shop { margin-left: auto; color: #8C8CA1; font-size: 15px; }

.cd-body { flex: 1; display: flex; min-height: 0; }

.cd-idle, .cd-done {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 14px; font-size: 30px; font-weight: 500;
}
.cd-idle i { font-size: 64px; color: #3A3A52; }
.cd-done i { font-size: 64px; color: var(--success); }
.cd-idle-sub { font-size: 17px; color: #8C8CA1; font-weight: 400; }

.cd-cart { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cd-lines { flex: 1; overflow-y: auto; padding: 20px 34px; }
.cd-line {
    display: flex; align-items: baseline; gap: 20px; padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 21px;
}
.cd-line .n { flex: 1; min-width: 0; }
.cd-line .n .u { color: #8C8CA1; font-size: 17px; }
.cd-line .p { font-variant-numeric: tabular-nums; white-space: nowrap; }

.cd-totals { padding: 18px 34px; background: var(--dark-soft); }
.cd-totals .r {
    display: flex; justify-content: space-between; padding: 4px 0;
    color: #C9C9D6; font-size: 17px;
}
.cd-total {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: 12px; padding-top: 14px; border-top: 1px dashed #45455C;
    font-size: 38px; font-weight: 700;
}

.cd-foot { padding: 16px 34px; text-align: center; color: #565672; font-size: 14px; }

/* La pantalla del cliente no lleva nada de la interfaz de trabajo:
   la mira quien paga, no quien cobra. */
body.display-mode .header,
body.display-mode .side-menu,
body.display-mode .mobile-menu,
body.display-mode .content-wrapper { margin-left: 0; padding-top: 0; }
body.display-mode #content { padding: 0; }

/* ---------- Tests del equipo (ficha de servicio) ----------------------
   Rejilla de tres, cada test con su icono y sus botones Sí/No, como el
   original. En pantallas estrechas baja a dos y luego a una. */
.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 1200px) { .test-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .test-grid { grid-template-columns: 1fr; } }

.test-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.test-card > i { color: var(--primary); width: 18px; text-align: center; font-size: 15px; }
.test-card .test-name { flex: 1; font-size: 13.5px; color: var(--text); }

.test-btn {
  border: 0; cursor: pointer;
  padding: 4px 11px; border-radius: 5px;
  font-size: 12px; font-weight: 600; line-height: 1.4;
  background: var(--light); color: var(--gray);
}
.test-btn.yes.on { background: var(--success); color: #fff; }
.test-btn.no.on  { background: var(--danger);  color: #fff; }
.test-btn:hover  { filter: brightness(.96); }

/* ---------- Mapa de calor de ingresos (Estadísticas) ------------------
   Como en el original: los días son columnas (empezando en domingo) y las
   horas filas, de 08:00 a 22:00, con una columna de total por hora y una
   fila de total por día. La intensidad la pone el JS con `opacity`, contra
   el máximo del propio mapa. */
.activity-table { display: flex; overflow-x: auto; padding-bottom: 6px; }
.activity-table-days {
  display: grid; grid-template-columns: repeat(8, var(--heat-col, 92px));
  order: 2; align-self: flex-start;
}
.activity-table-days span {
  font-size: 12px; color: var(--gray); text-align: center; padding-bottom: 6px;
}
.activity-table-hours {
  display: grid; grid-auto-rows: var(--heat-row, 26px); order: 1;
  padding-top: 22px;
}
.activity-table-hours span {
  font-size: 12px; color: var(--gray); padding-right: 10px;
  display: flex; align-items: center; justify-content: flex-end; white-space: nowrap;
}
/* El contenedor de celdas va debajo de la fila de días: el orden visual lo
   dan `order` y este margen negativo, no el orden del marcado. */
.activity-table-right { order: 3; margin-left: calc(var(--heat-col, 92px) * -8); padding-top: 22px; }
.activity-table-cells {
  display: grid; grid-template-columns: repeat(8, var(--heat-col, 92px));
  grid-auto-rows: var(--heat-row, 26px); gap: 1px;
}
.activity-table-cells > div {
  background: var(--primary); border-radius: 2px; cursor: default;
}
.activity-table-cells > div.total {
  background: #fff; opacity: 1 !important; color: var(--dark);
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; white-space: nowrap;
}

/* Conmutador de dos botones (Afluencia / Ingresos). */
.btns-select { gap: 0; }
.select-btn button {
  width: 100%; border: 1px solid var(--line); background: #fff; color: var(--gray);
  padding: 10px 12px; cursor: pointer; font: inherit; font-weight: 500;
}
.select-btn:first-child button { border-radius: var(--radius) 0 0 var(--radius); }
.select-btn:last-child  button { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }
.select-btn button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Ingresos por tiendas: lista, no tabla (como el original). */
.shop-earnings { list-style: none; margin: 0; padding: 0; }
.shop-earnings li { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.shop-earnings li i { color: var(--gray); }

/* Gastos e ingresos: nueve tarjetas de cifra, en tres columnas como el original. */
.stat-money-col { margin-bottom: 24px; }
.stat-money p {
    font-weight: 500; font-size: 18px; margin: 0 0 12px;
    border-bottom: 1px dashed var(--gray); padding-bottom: 4px;
}
.stat-money p i { margin-right: 8px; }
.stat-money span { font-size: 20px; font-weight: 600; white-space: nowrap; }
.stat-money-ok  { color: #4CAF50; }
.stat-money-ko  { color: #F27474; }
.stat-money-net { color: #3085D6; }

/* Estadisticas de productos: beneficio, margen y avisos de coste. */
.stats-benefit-positive { color: #009442; font-weight: 600; }
.stats-benefit-negative { color: #F32626; font-weight: 600; }
.stats-margin  { margin-left: 6px; font-size: 12px; color: var(--gray); }
.stats-empty   { color: #B5B5B5; }
.text-warning  { color: var(--warning); }
.stats-table-note { margin-top: 20px; font-size: 13px; color: var(--gray); padding-left: 4px; }

/* Detalle de un movimiento de caja (y otras fichas cortas en modal). */
.detail-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.detail-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.detail-list li:last-child { border-bottom: 0; }
.detail-list b { color: var(--dark); margin-right: 6px; }
.text-link { color: var(--primary); cursor: pointer; }
.text-link:hover { text-decoration: underline; }

/* Categorías: pestañas de ámbito y lista jerárquica (como el original). */
.category-menu {
  display: flex; margin-bottom: 20px; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: #fff;
}
.category-menu-item {
  flex: 1; padding: 15px 20px; text-align: center; cursor: pointer;
  border-right: 1px solid var(--line); font-weight: 500; color: var(--gray);
  transition: background .2s, color .2s;
}
.category-menu-item:last-child { border-right: 0; }
.category-menu-item:hover { background: #F8F9FA; }
.category-menu-item.active { background: var(--primary); color: #fff; }
.category-menu-item i { margin-right: 8px; }

.cat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 15px; border-bottom: 1px solid #EEE; cursor: pointer;
  transition: background .2s;
}
.cat-row:hover { background: #F8F9FA; }
.cat-row:last-child { border-bottom: 0; }
.cat-count { color: var(--gray); font-size: 13px; margin-left: 15px; }
.cat-flag  { color: var(--gray); font-size: 12px; margin-left: 15px; }
.cat-flag.on { color: #009688; }
.cat-actions { display: flex; gap: 5px; align-items: center; }

/* Ficha de empleado: clave que se puede mostrar y pulsera NFC. */
.label-btn {
  float: right; font-size: 12px; font-weight: 500; color: var(--primary);
  cursor: pointer; user-select: none;
}
.label-btn:hover { text-decoration: underline; }

.nfc-input {
  display: flex; align-items: center; width: 100%; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 5px; background: #FAFBFF;
  color: var(--gray); cursor: pointer; transition: all .2s;
}
.nfc-input:hover, .nfc-input:focus { border-color: #64B0FF; background: #EEF6FF; }
.nfc-input > i { margin-right: 10px; font-size: 17px; color: var(--primary); }
.nfc-input-text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nfc-input-cta {
  flex: none; margin-left: 10px; padding: 0 8px; line-height: 22px; font-size: 12px;
  color: #6B6D80; background: var(--light); border-radius: .33rem;
}
.nfc-input.is-linked { border-color: #A5E2C9; background: #F4FDF9; }
.nfc-input.is-linked > i { color: #22C58B; }
.nfc-input.is-linked .nfc-input-text { color: var(--dark); letter-spacing: 3px; }
.nfc-input.is-linked .nfc-input-cta { color: #0F8F63; background: #D9F5E9; }

/* Avatar en la cabecera de una ficha (empleado). */
.card-title .avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--secondary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; margin-right: 10px; vertical-align: middle;
}

/* Fichaje: cronómetro, botones y calendario del mes. */
.clock-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.clock-bar #work-time { font-size: 29px; font-weight: 600; }
.clock-bar #work-time i { margin-right: 8px; }
.clock-bar .right { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.calendar-header, .calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-header { margin-top: 16px; margin-bottom: 6px; }
.calendar-header div { text-align: center; font-size: 12px; color: var(--gray); font-weight: 600; }
.day {
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 8px; height: 80px; position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.day.empty { background: var(--light); border-style: dashed; }
.day strong { font-size: 13px; }
.day span { font-size: 11px; color: var(--gray); z-index: 1; }
.day .color {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(54, 153, 255, .18);
}

/* Niveles de acceso: lista larga de permisos en dos columnas. */
.perm-item { padding: 5px 0; }
.perm-code {
  float: right; font-size: 11px; color: var(--gray);
  background: var(--light); padding: 1px 6px; border-radius: 3px;
}
.subtitle h2 { font-size: 16px; margin: 0 0 10px; }
.subtitle h2 i { margin-right: 8px; color: var(--gray); }

/* Soporte: icono redondo de la cabecera del formulario. */
.support-avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none;
}

/* Pantalla de cliente: recepción de un equipo (datos, tests, condiciones, firma). */
.cd-step { flex: 1; display: flex; flex-direction: column; padding: 24px 32px; overflow: auto; }
.cd-step h2 { font-size: 26px; margin: 0 0 20px; text-align: center; }
.cd-data-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
.cd-data-item .l { font-size: 13px; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }
.cd-data-item .v { font-size: 19px; font-weight: 500; }
.cd-test-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.cd-test { font-size: 18px; padding: 6px 0; }
.cd-test.ok i { color: #1BC5BD; }
.cd-test.ko i { color: #F64E60; }
.cd-paper {
  background: #fff; color: var(--dark); padding: 22px 26px; border-radius: 8px;
  font-size: 15px; line-height: 1.6; white-space: pre-wrap; overflow: auto;
}
.cd-actions { display: flex; gap: 2px; }
.cd-actions button {
  flex: 1; border: 0; padding: 22px; font: inherit; font-size: 18px; font-weight: 600;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.cd-deny   { background: #F64E60; }
.cd-accept { background: #1BC5BD; }
#cd-sign-pad canvas { background: #fff; border-radius: 8px; width: 100%; max-width: 640px; }
#cd-sign-pad { display: flex; justify-content: center; }

/* Conversación de un ticket de soporte. */
.tk-thread { display: flex; flex-direction: column; gap: 14px; }
.tk-msg {
  background: var(--light); border-radius: 10px; padding: 12px 14px;
  max-width: 88%; align-self: flex-start;
}
.tk-msg.mine { background: rgba(var(--primary-rgb), .08); align-self: flex-end; }
.tk-who { font-size: 12px; color: var(--gray); margin-bottom: 4px; }


/* =====================================================================
   Marca Midass: logo del lateral, cabecera, tipografia y movimiento
   ===================================================================== */
h1, h2, h3, h4, .auth-title, .content-header h1 { font-family: Poppins, Inter, sans-serif; }
.content-header h1 { font-weight: 600; }

/* Una linea roja bajo la cabecera, como la franja de la web */
.header { box-shadow: inset 0 -2px 0 var(--primary); }
.header-user i { color: var(--primary); }

.auth-brand { margin-bottom: 22px; }
.auth-logo { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; }

.side-menu .side-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 16px 16px; margin-bottom: 6px;
    border: 0; border-bottom: 1px solid var(--dark-soft); border-radius: 0;
    background: none; cursor: pointer; width: 100%; text-align: left;
}
.side-menu .side-brand:hover, .side-menu .side-brand.active { background: none; box-shadow: none; }
.side-brand img { width: 34px; height: 34px; border-radius: 50%; flex: none;
    box-shadow: 0 0 0 2px rgba(248, 185, 22, .35); }
.side-brand b { font: 700 15px/1.1 Poppins, sans-serif; color: #fff; letter-spacing: .5px; }
.side-brand b span { display: block; margin-top: 3px; color: var(--accent);
    font-size: 10px; font-weight: 600; letter-spacing: 2px; }

/* El lateral se usa decenas de veces al dia: transicion corta y solo de
   color y fondo, nada que se mueva. */
.side-menu button { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.side-menu button i { transition: color .15s ease; }
@media (hover: hover) and (pointer: fine) {
    .side-menu button:hover i { color: #fff; }
    .side-menu button.active:hover i { color: var(--primary); }
}

/* Lo que se pulsa responde al dedo */
.header-btn, .side-menu button, .choice { -webkit-tap-highlight-color: transparent; }
.header-btn { transition: background-color .15s ease, opacity .15s ease, transform .16s var(--ease-out); }
.header-btn:active:not(:disabled) { transform: scale(.94); }

@media (prefers-reduced-motion: reduce) {
    .btn, .header-btn { transition: background-color .15s ease, opacity .15s ease; }
    .btn:active:not(:disabled), .header-btn:active:not(:disabled) { transform: none; }
}

/* Consentimientos en la pantalla del cliente (paso de condiciones) */
.cd-consents { display: grid; gap: 10px; margin-top: 16px; font-size: 16px; }
.cd-consents-title { margin: 0; font-weight: 600; color: var(--text-strong); }
