/* ==========================================================================
   Regex POS Farmacia – paleta verde / azul
   ========================================================================== */
:root {
    --rx-green:        #16a34a;
    --rx-green-dark:   #15803d;
    --rx-green-soft:   #dcfce7;
    --rx-blue:         #0284c7;
    --rx-blue-dark:    #075985;
    --rx-blue-soft:    #e0f2fe;
    --rx-ink:          #0f172a;
    --rx-muted:        #64748b;
    --rx-surface:      #f4f8f7;
    --rx-gradient:     linear-gradient(135deg, var(--rx-green) 0%, var(--rx-blue) 100%);

    /* Bootstrap: el color primario pasa a ser el verde farmacia */
    --bs-primary:      var(--rx-green);
    --bs-primary-rgb:  22, 163, 74;
    --bs-link-color:   var(--rx-blue-dark);
    --bs-link-color-rgb: 7, 89, 133;
    --bs-link-hover-color: var(--rx-blue);
    --bs-body-bg:      var(--rx-surface);
    --bs-body-color:   var(--rx-ink);
}

body {
    background-color: var(--rx-surface);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.btn-primary {
    --bs-btn-bg: var(--rx-green);
    --bs-btn-border-color: var(--rx-green);
    --bs-btn-hover-bg: var(--rx-green-dark);
    --bs-btn-hover-border-color: var(--rx-green-dark);
    --bs-btn-active-bg: var(--rx-green-dark);
    --bs-btn-active-border-color: var(--rx-green-dark);
    --bs-btn-focus-shadow-rgb: 22, 163, 74;
}
.btn-outline-primary {
    --bs-btn-color: var(--rx-green-dark);
    --bs-btn-border-color: var(--rx-green);
    --bs-btn-hover-bg: var(--rx-green);
    --bs-btn-hover-border-color: var(--rx-green);
    --bs-btn-active-bg: var(--rx-green-dark);
    --bs-btn-active-border-color: var(--rx-green-dark);
}
.btn-info {
    --bs-btn-bg: var(--rx-blue);
    --bs-btn-border-color: var(--rx-blue);
    --bs-btn-hover-bg: var(--rx-blue-dark);
    --bs-btn-hover-border-color: var(--rx-blue-dark);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}
.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--rx-green);
    box-shadow: 0 0 0 .25rem rgba(22, 163, 74, .2);
}
.form-check-input:checked { background-color: var(--rx-green); border-color: var(--rx-green); }
.text-rx-green { color: var(--rx-green-dark) !important; }
.text-rx-blue  { color: var(--rx-blue-dark) !important; }
.bg-rx-gradient { background: var(--rx-gradient); }

/* Alertas flotantes (window.rxAlert) */
.rx-alerts {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    width: min(420px, calc(100vw - 2rem));
}

/* --------------------------------------------------------------------------
   Estructura: barra lateral izquierda + contenido
   -------------------------------------------------------------------------- */
:root { --rx-sidebar-w: 264px; }

.rx-shell { display: flex; min-height: 100vh; }

.rx-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #fff;
    background: linear-gradient(180deg, var(--rx-green-dark) 0%, var(--rx-blue-dark) 100%);
}
.rx-sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0;
    overflow-y: auto;
}
@media (min-width: 992px) {
    .rx-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        flex: 0 0 var(--rx-sidebar-w);
        width: var(--rx-sidebar-w);
    }
    .rx-sidebar-inner { box-shadow: 4px 0 18px rgba(2, 132, 199, .18); }
}
@media (max-width: 991.98px) {
    .rx-sidebar { --bs-offcanvas-width: var(--rx-sidebar-w); border: 0; }
}

.rx-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.1rem 1.1rem .9rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.rx-sidebar-brand:hover { color: #fff; }
.rx-sidebar-brand-text { min-width: 0; line-height: 1.15; }
.rx-sidebar-brand-text small { font-size: .7rem; }
.rx-brand-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #fff;
    color: var(--rx-green);
    font-size: 1.25rem;
}

.rx-sidebar-nav { padding: .75rem .75rem; flex-grow: 1; }
.rx-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem .8rem;
    margin-bottom: .15rem;
    border-radius: .6rem;
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-size: .93rem;
    transition: background .15s, color .15s;
}
.rx-nav-link .bi { font-size: 1.05rem; width: 1.25rem; text-align: center; }
.rx-nav-link:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.rx-nav-link.active {
    background: #fff;
    color: var(--rx-green-dark);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
}
.rx-nav-sub { padding-left: 2.35rem; font-size: .9rem; }
.rx-nav-sub .bi { font-size: .95rem; }

.rx-nav-section { margin-top: .75rem; }
.rx-nav-section-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .5rem .8rem;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .6);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;
}
.rx-nav-section-title .bi:first-child { font-size: 1rem; width: 1.25rem; text-align: center; }
.rx-nav-section-title:hover { color: #fff; }
.rx-nav-caret { margin-left: auto; font-size: .75rem !important; transition: transform .2s; }
.rx-nav-section-title[aria-expanded="true"] .rx-nav-caret { transform: rotate(180deg); }

.rx-sidebar-footer {
    padding: .9rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .88rem;
}
.rx-avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    font-size: 1.1rem;
}
.rx-logout { color: rgba(255, 255, 255, .75); font-size: 1.2rem; }
.rx-logout:hover { color: #fff; }

.rx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rx-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 62px;
    padding: .6rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e6eeeb;
}
.rx-topbar-title { line-height: 1.2; }
.rx-content { padding: 1.5rem 1.25rem; }
@media (min-width: 992px) { .rx-content { padding: 1.75rem 2rem; } }

/* --------------------------------------------------------------------------
   Utilidades de catálogos: buscador, tablas, listas
   -------------------------------------------------------------------------- */
.rx-search { max-width: 380px; }
.rx-table thead th {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--rx-muted);
    background: #f8fbfa;
    border-bottom-width: 1px;
}
.rx-table td, .rx-table th { padding: .7rem .9rem; }
.rx-icon-sm { width: 38px; height: 38px; border-radius: 10px; font-size: 1.1rem; }
.rx-badge-green { background: var(--rx-green-soft); color: var(--rx-green-dark); }

.rx-cat-list .list-group-item { padding: .8rem 1rem; border-color: #eef3f1; }
.rx-cat-list .list-group-item.active {
    background: var(--rx-green-soft);
    border-color: #eef3f1;
    color: var(--rx-ink);
    box-shadow: inset 4px 0 0 var(--rx-green);
}
.rx-cat-list .list-group-item.active .text-muted { color: var(--rx-green-dark) !important; }
.rx-row-actions { opacity: 0; transition: opacity .15s; white-space: nowrap; }
.list-group-item:hover .rx-row-actions,
.list-group-item.active .rx-row-actions { opacity: 1; }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.rx-login-body {
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 10% 10%, rgba(255,255,255,.18), transparent 60%),
        radial-gradient(900px 500px at 90% 90%, rgba(255,255,255,.14), transparent 60%),
        var(--rx-gradient);
    display: grid;
    place-items: center;
    padding: 1.5rem;
}
.rx-login-card {
    width: min(920px, 100%);
    border: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .28);
}
.rx-login-side {
    background: linear-gradient(160deg, var(--rx-green-dark), var(--rx-blue-dark));
    color: #fff;
}
.rx-login-side .rx-cross {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: rgba(255,255,255,.14);
    display: grid; place-items: center;
    font-size: 2.2rem;
}
.rx-login-side ul li { opacity: .9; }
.rx-login-form .form-floating > label { color: var(--rx-muted); }
.rx-login-form .input-group .btn { border-color: var(--bs-border-color); }

/* --------------------------------------------------------------------------
   Tarjetas
   -------------------------------------------------------------------------- */
.rx-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
}
.rx-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e6eeeb;
    font-weight: 600;
    border-radius: 1rem 1rem 0 0 !important;
}
.rx-icon-tile {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.4rem;
}
.rx-icon-tile.green { background: var(--rx-green-soft); color: var(--rx-green-dark); }
.rx-icon-tile.blue  { background: var(--rx-blue-soft);  color: var(--rx-blue-dark); }

/* --------------------------------------------------------------------------
   Inventario: pestañas, partidas y totales
   -------------------------------------------------------------------------- */
.rx-badge-blue { background: var(--rx-blue-soft); color: var(--rx-blue-dark); }
.rx-pills .nav-link { color: var(--rx-muted); font-weight: 500; }
.rx-pills .nav-link.active { background: var(--rx-green); color: #fff; }
.rx-linebar { background: #f8fbfa; border: 1px dashed #cfe3da; border-radius: .75rem; padding: .75rem; }
.rx-lines tbody td { padding: .4rem .5rem; }
.rx-totals { background: #f8fbfa; border-radius: .75rem; padding: 1rem 1.25rem; }
.rx-totals > div + div { margin-top: .4rem; }
.rx-tipo-card { border: 1px solid transparent; cursor: pointer; transition: transform .12s, border-color .12s; }
.rx-tipo-card:hover { transform: translateY(-2px); border-color: var(--rx-green); }

/* --------------------------------------------------------------------------
   Personal: pestañas, avatares y matriz de permisos
   -------------------------------------------------------------------------- */
.rx-tabs .nav-link { color: var(--rx-muted); font-weight: 500; border: 0; border-bottom: 2px solid transparent; }
.rx-tabs .nav-link.active { color: var(--rx-green-dark); background: transparent; border-bottom-color: var(--rx-green); }
.rx-nav-single { margin-top: .75rem; }
.rx-avatar-ini {
    display: inline-grid; place-items: center; flex: 0 0 auto;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--rx-blue-soft); color: var(--rx-blue-dark);
    font-weight: 700; font-size: .85rem; letter-spacing: .03em;
}
.rx-perm-group { background: #f8fbfa; border-radius: .75rem; padding: .75rem 1rem; height: 100%; }
.rx-perm-head { padding-bottom: .35rem; margin-bottom: .35rem; border-bottom: 1px solid #e6eeeb; }

/* Selector de productos (rxProductoPicker) */
.rx-picker { position: absolute; z-index: 1060; width: min(560px, 100%); max-height: 320px; overflow-y: auto; margin-top: .25rem; }
.rx-linebar { position: relative; }

/* --------------------------------------------------------------------------
   Punto de venta
   -------------------------------------------------------------------------- */
.rx-pos { display: grid; grid-template-columns: 1fr 360px; gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) { .rx-pos { grid-template-columns: 1fr; } }
.rx-pos-cart { min-height: 320px; }
.rx-pos-cart .l-cant { width: 72px; }
.rx-pos-total { font-size: 2rem; font-weight: 800; color: var(--rx-green-dark); line-height: 1; }
.rx-pos-locked { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(244, 248, 247, .92); border-radius: 1rem; }
.rx-pos-wrap { position: relative; }
.rx-pay-btn.active { background: var(--rx-green); color: #fff; border-color: var(--rx-green); }
.rx-kbd { font-family: ui-monospace, monospace; font-size: .7rem; background: #e6eeeb; border-radius: 4px; padding: 1px 5px; color: var(--rx-muted); }
.rx-turno-pill { background: var(--rx-green-soft); color: var(--rx-green-dark); border-radius: 999px; padding: .25rem .75rem; font-weight: 600; font-size: .85rem; }
.rx-turno-pill.off { background: #fee2e2; color: #991b1b; }
.rx-corte dt { font-weight: 500; color: var(--rx-muted); }
.rx-corte dd { text-align: right; font-weight: 600; }

/* ===== DataTables (rxTabla) dentro de las tarjetas ===== */
.rx-card .dt-container > .row { margin: 0; }
.rx-card .dt-container > .row:not(.dt-layout-table) {
    padding: .55rem .9rem;
    border-top: 1px solid #eef3f1;
    font-size: .85rem;
    color: var(--rx-muted);
}
.rx-card .dt-container > .dt-layout-table { margin-top: 0 !important; }
/* Solo la tabla se desplaza a lo ancho; la paginación se queda fija. */
.rx-card .dt-container > .dt-layout-table > div { padding: 0; overflow-x: auto; }
.rx-card .dt-container table.dataTable { margin: 0 !important; }
.dt-container .dt-length select { width: auto; display: inline-block; margin-right: .35rem; }
.dt-container .dt-info { padding-top: 0; }
.dt-container .pagination { margin: 0; }
.dt-container .page-link { color: var(--rx-green-dark); }
.dt-container .page-item.active > .page-link { background: var(--rx-green); border-color: var(--rx-green); color: #fff; }
.dt-container .page-link:focus { box-shadow: 0 0 0 .2rem rgba(22, 163, 74, .2); }
.dt-container .dt-processing.card { border: 0; box-shadow: 0 .5rem 1.5rem rgba(15, 23, 42, .12); z-index: 5; }
/* El encabezado ordenable conserva el estilo de .rx-table. */
.rx-table.dataTable thead th.dt-orderable-asc:hover,
.rx-table.dataTable thead th.dt-orderable-desc:hover { color: var(--rx-ink); }

/* Semáforo de caducidad (rxCaducidad) */
.rx-cad { font-weight: 600; letter-spacing: .01em; }
.rx-cad-caducado { background: #991b1b; color: #fff; }
.rx-cad-rojo     { background: #fee2e2; color: #b91c1c; }
.rx-cad-naranja  { background: #ffedd5; color: #c2410c; }
.rx-cad-amarillo { background: #fef9c3; color: #a16207; }
.rx-cad-azul     { background: var(--rx-blue-soft); color: var(--rx-blue-dark); }
.rx-cad-verde    { background: var(--rx-green-soft); color: var(--rx-green-dark); }
.rx-semaforo { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; }
.rx-semaforo .rx-sem { border-radius: .6rem; padding: .55rem .75rem; border: 1px solid transparent; }
.rx-semaforo .rx-sem .rx-sem-num { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.rx-semaforo .rx-sem small { display: block; opacity: .85; }
.rx-semaforo .rx-sem.vacio { opacity: .45; }
.rx-semaforo .rx-sem-gris { background: #f1f5f9; color: #475569; }
.rx-lote-cell .form-control { min-width: 0; }

/* Kardex: distribución de cuartos */
.rx-cuarto { border-left: 4px solid var(--rx-green); }
.rx-cuarto.ocupado { border-left-color: var(--rx-blue); }
.rx-cuarto.lleno { border-left-color: #f59e0b; }
.rx-cuarto .rx-paciente { display: block; padding: .5rem .65rem; border-radius: .6rem; background: #f8fbfa; color: inherit; text-decoration: none; border: 1px solid #e6efeb; }
.rx-cuarto .rx-paciente:hover { background: var(--rx-blue-soft); border-color: #bae6fd; }
.rx-buscador-lista { max-height: 260px; overflow: auto; }

/* --------------------------------------------------------------------------
   Entradas › carga por escaneo (lectura con IA)
   -------------------------------------------------------------------------- */
.rx-drop { display: block; cursor: pointer; text-align: center; padding: 2rem 1rem; background: #f8fbfa; border: 2px dashed #cfe3da; border-radius: 1rem; transition: border-color .12s, background .12s; }
.rx-drop:hover, .rx-drop.sobre { border-color: var(--rx-green); background: var(--rx-green-soft); }
.rx-pasos li { display: flex; align-items: center; gap: .5rem; padding: .2rem 0; color: #94a3b8; }
.rx-pasos li.activo { color: inherit; font-weight: 600; }
.rx-pasos li.listo { color: var(--rx-green-dark); }
.rx-pasos .rx-paso-icono { width: 1rem; display: inline-flex; justify-content: center; }
.rx-nuevo { background: #fffbeb; border: 1px solid #fde68a; border-radius: .5rem; padding: .4rem .5rem; }

/* --------------------------------------------------------------------------
   Estadísticas: indicadores y gráficas (assets/graficas.js)
   -------------------------------------------------------------------------- */
.rx-num { font-variant-numeric: tabular-nums; }
.rx-kpi .rx-kpi-label { font-size: .8rem; color: var(--rx-muted); display: flex; align-items: center; gap: .35rem; }
.rx-kpi { container-type: inline-size; }
/* El número se ajusta al ancho de la tarjeta para no partirse ($-17,090.40). */
.rx-kpi .rx-kpi-valor { font-size: clamp(1.15rem, 8.5cqi, 1.75rem); white-space: nowrap; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; margin: .2rem 0 .15rem; }
.rx-kpi .rx-kpi-sub { font-size: .8rem; color: var(--rx-muted); }
.rx-delta { font-size: .78rem; font-weight: 600; display: inline-block; }
.rx-delta.sube { color: #006300; }
.rx-delta.baja { color: #b42318; }
.rx-delta.neutro { color: var(--rx-muted); }
.rx-metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem 1.25rem; }
.rx-metricas .rx-metrica small { display: block; color: var(--rx-muted); font-size: .75rem; }
.rx-metricas .rx-metrica strong { font-size: 1rem; }
.rx-periodo-texto { font-weight: 600; }
.rx-cargando { opacity: .45; transition: opacity .15s; pointer-events: none; }

.rx-svg { display: block; overflow: visible; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.rx-svg .rx-eje text { font-size: 11px; fill: #6b6a64; font-variant-numeric: tabular-nums; }
.rx-svg .rx-zona { outline: none; cursor: default; }
.rx-svg .rx-zona:focus-visible { outline: 2px solid var(--rx-blue); outline-offset: -2px; }

.rx-leyenda { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .8rem; color: #52514e; }
.rx-leyenda-item { display: inline-flex; align-items: center; gap: .4rem; }
.rx-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; }
.rx-swatch.linea { width: 14px; height: 2px; border-radius: 1px; }

.rx-tip { position: fixed; z-index: 1090; pointer-events: none; opacity: 0; transition: opacity .08s; min-width: 150px; max-width: 280px;
    padding: .5rem .65rem; border-radius: .5rem; background: #fff; color: #0b0b0b; font-size: .8rem;
    box-shadow: 0 6px 20px rgba(11, 11, 11, .14), 0 0 0 1px rgba(11, 11, 11, .08); }
.rx-tip.visible { opacity: 1; }
.rx-tip-titulo { font-size: .75rem; color: #52514e; margin-bottom: .25rem; }
.rx-tip-fila { display: flex; align-items: center; gap: .45rem; line-height: 1.5; }
.rx-tip-fila strong { font-variant-numeric: tabular-nums; }
.rx-tip-nombre { color: #52514e; }
.rx-tip-llave { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; }
.rx-tip-llave.linea { height: 2px; width: 12px; }

.rx-hbar { display: flex; flex-direction: column; gap: .15rem; container-type: inline-size; }
.rx-hbar-fila { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; align-items: center; gap: .75rem; padding: .3rem .25rem; border-radius: .4rem; outline: none; }
.rx-hbar-fila:hover, .rx-hbar-fila:focus-visible { background: #f6f7f5; }
.rx-hbar-et { min-width: 0; line-height: 1.2; }
.rx-hbar-nombre { display: block; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-hbar-et small { display: block; font-size: .72rem; color: var(--rx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-hbar-pista { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.rx-hbar-barra { height: 14px; border-radius: 0 4px 4px 0; flex: 0 0 auto; max-width: calc(100% - 4.5rem); }
.rx-hbar-val { font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* En tarjetas angostas el nombre va arriba de la barra. */
@container (max-width: 420px) {
    .rx-hbar-fila { grid-template-columns: 1fr; gap: .2rem; }
}

.rx-stack { display: flex; gap: 2px; height: 16px; border-radius: 4px; overflow: hidden; margin-bottom: .75rem; }
.rx-stack-parte { flex-basis: 0; min-width: 3px; outline: none; }
.rx-stack-parte:focus-visible { box-shadow: inset 0 0 0 2px #0b0b0b; }
.rx-stack-leyenda { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; }
.rx-stack-item { display: flex; align-items: flex-start; gap: .5rem; line-height: 1.25; }
.rx-stack-item .rx-swatch { margin-top: .3rem; }

.rx-rank { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .75rem; font-weight: 700; background: #f1f5f9; color: #475569; }
.rx-rank.oro { background: #fef3c7; color: #92400e; }
.rx-participacion { height: 6px; border-radius: 3px; background: #eef0ec; overflow: hidden; min-width: 60px; }
.rx-participacion > span { display: block; height: 100%; background: #2a78d6; border-radius: 3px; }
.min-w-0 { min-width: 0; }

/* Totales: siempre a la vista, aunque la lista muestre solo las primeras filas. */
.rx-table tfoot td { border-top: 2px solid #dfe3dc; border-bottom: 0; background: #f8faf7; font-weight: 600; }
.rx-ver-mas td { text-align: center; padding: .35rem .5rem; font-size: .8rem; background: #fcfcfb; }
.rx-ver-mas .btn-link { font-size: .8rem; padding: 0 .4rem; vertical-align: baseline; }
.rx-total-linea { display: flex; flex-wrap: wrap; gap: .2rem .9rem; font-size: .8rem; color: var(--rx-muted); padding: .45rem .65rem; background: #f8faf7; border-radius: .5rem; margin-bottom: .75rem; }
.rx-total-linea strong { color: #0b0b0b; font-variant-numeric: tabular-nums; }
.rx-stack-total { border-top: 1px solid #e5e7eb; padding-top: .35rem; margin-top: .1rem; font-weight: 600; }
.rx-stack-total .rx-swatch { visibility: hidden; }

/* Estadísticas › Productos */
.rx-campeon .rx-campeon-nombre { font-weight: 700; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .15rem 0 .1rem; }
.rx-campeon .rx-campeon-nombre a { color: inherit; text-decoration: none; }
.rx-campeon .rx-campeon-nombre a:hover { text-decoration: underline; }
.rx-campeon-siguen { list-style: none; padding: .5rem 0 0; margin: .6rem 0 0; border-top: 1px dashed #e5e7eb; font-size: .78rem; }
.rx-campeon-siguen li { display: flex; gap: .5rem; align-items: baseline; padding: .1rem 0; }
.rx-campeon-siguen li a { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.rx-campeon-siguen li a:hover { text-decoration: underline; }
.rx-campeon-siguen li span { color: var(--rx-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rx-clase { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: .35rem; font-size: .75rem; font-weight: 700; }
.rx-clase.A { background: #dbeafe; color: #1e40af; }
.rx-clase.B { background: #f1f5f9; color: #475569; }
.rx-clase.C { background: #fff; color: #6b7280; border: 1px solid #e5e7eb; }
.rx-ranking tbody tr[data-id] { cursor: pointer; }
.rx-ranking th[data-orden] { cursor: pointer; user-select: none; white-space: nowrap; }
.rx-ranking th[data-orden]:hover { color: var(--rx-blue-dark); }
.rx-ranking th.ordenado { color: var(--rx-blue-dark); }
.rx-table .rx-prod { min-width: 190px; max-width: 290px; }
.rx-table .rx-prod .fw-semibold, .rx-table .rx-prod small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-ranking td small { white-space: nowrap; }
.rx-ranking > :not(caption) > * > * { padding-left: .5rem; padding-right: .5rem; }
.rx-mov { list-style: none; padding: 0; margin: 0; }
.rx-mov li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid #f1f3ef; }
.rx-mov li:last-child { border-bottom: 0; }
.rx-mov li a { flex: 1 1 auto; min-width: 0; color: inherit; text-decoration: none; }
.rx-mov li a:hover .rx-mov-nombre { text-decoration: underline; }
.rx-mov .rx-mov-nombre { display: block; font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-mov small { color: var(--rx-muted); font-size: .75rem; }
.rx-mov .rx-mov-val { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .85rem; }

/* Aviso de fin de horario del empleado (assets/app.js). */
.rx-aviso-horario { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1075; width: min(560px, calc(100vw - 2rem)); }
/* Lleva .d-flex (display !important): oculto, se oculta de verdad. */
.rx-aviso-horario[hidden] { display: none !important; }

/* ---------- Inicio por rol (templates/dashboard/index.html.twig) ---------- */
.rx-in-rol { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--rx-green-dark); }
.rx-in-hola { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.rx-aviso { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #eef2f6; }
.rx-aviso:last-child { border-bottom: 0; }
.rx-aviso-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 1rem; }
.rx-aviso-ico.rojo { background: #fee2e2; color: #b91c1c; }
.rx-aviso-ico.naranja { background: #ffedd5; color: #c2410c; }
.rx-aviso-ico.azul { background: var(--rx-blue-soft); color: var(--rx-blue-dark); }
.rx-aviso-ico.verde { background: var(--rx-green-soft); color: var(--rx-green-dark); }
.rx-in-barra { height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.rx-in-barra span { display: block; height: 100%; background: var(--rx-green); border-radius: 4px; }
.rx-persona { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.rx-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.rx-dot.verde { background: var(--rx-green); } .rx-dot.gris { background: #94a3b8; } .rx-dot.rojo { background: #dc2626; }
.rx-hero { background: var(--rx-gradient); color: #fff; border: 0; }
.rx-hero .rx-hero-label { font-size: .78rem; color: rgba(255, 255, 255, .82); }
.rx-hero .rx-hero-num { font-size: clamp(1.45rem, 5vw, 1.9rem); font-weight: 800; line-height: 1.1; white-space: nowrap; }
.rx-hero .btn-light { color: var(--rx-green-dark); font-weight: 700; }
.rx-in-num { font-size: 1.35rem; font-weight: 800; line-height: 1.15; }
.rx-progreso { height: 10px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.rx-progreso span { display: block; height: 100%; background: var(--rx-green); }
.rx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; font-size: .8rem; }
.rx-precio { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; }
.rx-precio.primero { border: 2px dashed #cbd5e1; }
.rx-in-tile { display: flex; align-items: center; gap: 12px; }

/* ---------- Configuración › Ticket ---------- */
.rx-logo-caja { height: 120px; border: 2px dashed #cbd5e1; border-radius: 12px; display: grid; place-items: center; background: #fff; padding: 8px; }
.rx-logo-caja img { max-width: 100%; max-height: 100px; object-fit: contain; }
.rx-tipo-letra { line-height: 1.3; padding: .5rem .75rem; }
.btn-check:checked + .rx-tipo-letra { background: var(--rx-green-soft); border-color: var(--rx-green); color: var(--rx-ink); }
.btn-check:checked + .rx-tipo-letra .text-muted { color: var(--rx-green-dark) !important; }
@media (min-width: 1200px) { .rx-ticket-lateral { position: sticky; top: 1rem; } }
.rx-ticket-mesa { background: #e2e8f0; display: flex; justify-content: center; max-height: calc(100vh - 12rem); overflow: auto; padding: 1rem; }
.rx-ticket-vista { border: 0; background: #fff; box-shadow: 0 2px 12px rgba(15, 23, 42, .18); min-height: 300px; flex: none; }

