/* Diseño del panel: administración, caja, accesos y mozo. */
@font-face {
    font-family: Inter;
    font-weight: 400;
    font-display: swap;
    src: url(../assets/fonts/inter-regular.woff2?v=3.13) format("woff2");
}

@font-face {
    font-family: Inter;
    font-weight: 500;
    font-display: swap;
    src: url(../assets/fonts/inter-medium.woff2?v=3.13) format("woff2");
}

@font-face {
    font-family: Inter;
    font-weight: 700;
    font-display: swap;
    src: url(../assets/fonts/inter-bold.woff2?v=3.13) format("woff2");
}

.tema-panel {
    --fondo: #e9ebf0;
    --superficie: #fff;
    --suave: #f3f4f7;
    --tinta: #12161f;
    --texto: #4b5261;
    --apagado: #7b8291;
    --linea: #e6e8ee;
    --azul: #2470dc;
    --azul-suave: #e6effb;
    --azul-claro: #bdd5f6;
    --ambar: #e8a22b;
    --rojo: #e5566a;
    --rojo-texto: #b3263c;
    --verde-texto: #17794f;
    --oscuro: #0f1623;
    --azul-texto: #15549f;
    --rojo-suave: #fbe4e7;
    --rojo-rayas: #f3b8c1;
    --boton: #0f1623;
    --boton-hover: #262f40;
    --boton-texto: #fff;
    --grafico-area: #eceef2;
    --tarjeta-azul: #2470dc;
    --brand: var(--azul);
    --ink: var(--tinta);
    --muted: var(--apagado);
    --line: var(--linea);
    --radio: 24px;
    min-height: 100vh;
    margin: 0;
    background: var(--fondo);
    color: var(--tinta);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 14px;
}

.tema-panel a {
    color: var(--azul);
    text-decoration: none;
}

.tema-panel h1,
.tema-panel h2,
.tema-panel h3,
.tema-panel .h2 {
    color: var(--tinta);
    font-weight: 500;
    letter-spacing: -.01em;
}

/* Estructura general */
.panel-app {
    display: flex;
    gap: 20px;
    min-height: 100vh;
    padding: 20px;
}

.panel-main {
    flex: 1;
    min-width: 0;
}

.panel-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    flex: 0 0 236px;
    height: calc(100vh - 40px);
    padding: 16px 12px;
    overflow-y: auto;
    background: var(--superficie);
    border-radius: var(--radio);
}

.panel-marca {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 16px;
    color: var(--tinta);
}

.panel-marca:hover {
    color: var(--tinta);
}

.panel-marca img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    padding: 4px;
    background: var(--oscuro);
    border-radius: 11px;
}

.panel-marca-letra {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.panel-marca strong {
    display: block;
    font-weight: 500;
}

.panel-marca small {
    display: block;
    color: var(--apagado);
    font-size: 12px;
}

.panel-grupo {
    margin: 16px 10px 6px;
    color: var(--apagado);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.panel-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.panel-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    color: var(--texto);
    border-radius: 12px;
}

.panel-nav a i {
    color: var(--apagado);
    font-size: 18px;
    line-height: 1;
}

.panel-nav a:hover {
    background: var(--suave);
    color: var(--tinta);
}

.panel-nav a.activo {
    background: var(--azul-suave);
    color: var(--azul-texto);
    font-weight: 500;
}

.panel-nav a.activo i {
    color: var(--azul);
}

.panel-usuario {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px 8px 4px;
}

.panel-avatar {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    background: var(--azul);
    border-radius: 50%;
    color: #fff;
    font-weight: 500;
}

.panel-usuario div {
    min-width: 0;
    flex: 1;
}

.panel-usuario strong {
    display: block;
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-usuario small {
    color: var(--apagado);
    font-size: 12px;
    text-transform: capitalize;
}

.panel-usuario form {
    margin: 0;
}

.panel-salir {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: var(--suave);
    border: 0;
    border-radius: 50%;
    color: var(--texto);
}

.panel-salir:hover {
    background: var(--rojo-suave);
    color: var(--rojo-texto);
}

.panel-abrir,
.panel-fondo {
    display: none;
}

.panel-card {
    padding: 28px;
    background: var(--superficie);
    border-radius: var(--radio);
}

/* Elementos comunes */
.tema-panel .toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.tema-panel .toolbar h1,
.tema-panel .toolbar .h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 500;
}

.tema-panel .eyebrow {
    color: var(--apagado);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tema-panel .btn {
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
}

.tema-panel .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.tema-panel .btn-lg {
    padding: 12px 22px;
    font-size: 15px;
}

.tema-panel .btn-brand {
    background: var(--boton);
    border-color: var(--boton);
    color: var(--boton-texto);
}

.tema-panel .btn-brand:hover {
    background: var(--boton-hover);
    border-color: var(--boton-hover);
    color: var(--boton-texto);
}

/* Botón de agregar: muestra solo el + y se despliega al pasar el mouse */
.btn-agregar {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 11px;
    white-space: nowrap;
}

.btn-agregar i {
    font-size: 18px;
    line-height: 1;
}

.btn-agregar span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width .25s ease, margin-left .25s ease, opacity .2s ease;
}

.btn-agregar:hover span,
.btn-agregar:focus-visible span {
    max-width: 180px;
    margin-left: 6px;
    opacity: 1;
}

.tema-panel .btn-outline-secondary {
    background: var(--superficie);
    border-color: var(--linea);
    color: var(--tinta);
}

.tema-panel .btn-outline-secondary:hover {
    background: var(--suave);
    border-color: var(--linea);
    color: var(--tinta);
}

.tema-panel .form-control,
.tema-panel .form-select {
    padding: 10px 14px;
    background-color: var(--superficie);
    border: 1px solid var(--linea);
    border-radius: 14px;
    color: var(--tinta);
    font-size: 14px;
}

.tema-panel .form-select {
    padding-right: 34px;
}

.tema-panel .form-control:focus,
.tema-panel .form-select:focus {
    border-color: var(--azul);
    box-shadow: 0 0 0 3px var(--azul-suave);
}

.tema-panel .form-label {
    margin-bottom: 6px;
    color: var(--texto);
    font-size: 13px;
    font-weight: 500;
}

.tema-panel .card-soft {
    background: var(--superficie);
    border: 0;
    border-radius: var(--radio);
    box-shadow: none;
}

.panel-card .card-soft {
    background: var(--suave);
}

.tema-panel .pill {
    padding: 4px 10px;
    background: var(--suave);
    border: 0;
    border-radius: 999px;
    color: var(--texto);
    font-size: 12px;
    font-weight: 500;
}

.tema-panel .badge {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.tema-panel .badge.bg-primary {
    background: var(--azul-suave) !important;
    color: var(--azul-texto);
}

.tema-panel .badge.bg-secondary {
    background: var(--suave) !important;
    color: var(--apagado);
}

.tema-panel .alert {
    border: 0;
    border-radius: 14px;
}

.tema-panel .modal-content {
    border: 0;
    border-radius: var(--radio);
}

.tema-panel .modal-header,
.tema-panel .modal-footer {
    padding: 18px 22px;
    border: 0;
}

.tema-panel .modal-body {
    padding: 4px 22px;
}

.tema-panel .modal-title {
    font-weight: 500;
}

.tema-panel .swal2-popup {
    border-radius: var(--radio);
}

/* Tablas */
.tema-panel table.dataTable,
.tema-panel .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: var(--suave);
    color: var(--tinta);
}

.tema-panel table.table-bordered,
.tema-panel table.table-bordered th,
.tema-panel table.table-bordered td {
    border: 0;
}

.tema-panel .table>thead th {
    padding: 11px 12px;
    background: var(--suave);
    border: 0;
    color: var(--apagado);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;
}

.tema-panel .table>thead th:first-child {
    border-radius: 12px 0 0 12px;
}

.tema-panel .table>thead th:last-child {
    border-radius: 0 12px 12px 0;
}

.tema-panel .table>tbody td {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid var(--linea);
    vertical-align: middle;
}

.tema-panel .table>tbody tr:last-child td {
    border-bottom: 0;
}

.tema-panel .dataTables_scrollBody {
    border: 0 !important;
}

.tema-panel .dataTables_wrapper label {
    color: var(--texto);
    font-size: 13px;
}

.tema-panel .dataTables_length select {
    width: 68px;
    margin: 0 6px;
    padding: 6px 8px;
    background: var(--superficie);
    border: 1px solid var(--linea);
    border-radius: 10px;
    color: var(--tinta);
}

.tema-panel .dataTables_filter input {
    width: 200px;
    margin-left: 8px;
    padding: 7px 14px;
    border-radius: 999px;
}

.tema-panel .dataTables_info {
    padding: 0;
    color: var(--apagado);
    font-size: 13px;
}

.tema-panel .dt-buttons {
    gap: 10px;
}

.tema-panel .dt-buttons .btn {
    margin-left: 0 !important;
    border-radius: 12px !important;
}

.tema-panel .dt-buttons .btn {
    min-width: 38px;
    padding: 7px 10px !important;
    background: var(--suave);
    border: 0;
    border-radius: 12px;
    color: var(--texto);
    font-size: 14px;
}

.tema-panel .dt-buttons .btn:hover {
    filter: brightness(.95);
}

.tema-panel .dt-buttons .buttons-copy {
    background: #dff3e7;
    color: #17794f;
}

.tema-panel .dt-buttons .buttons-csv {
    background: #fdf0d5;
    color: #9a6700;
}

.tema-panel .dt-buttons .buttons-excel {
    background: #fbe4e7;
    color: #b3263c;
}

.tema-panel .dt-buttons .buttons-pdf {
    background: #e0f2f7;
    color: #17708a;
}

.tema-panel .dt-buttons .buttons-print {
    background: #e6effb;
    color: #2470dc;
}

.tema-panel .pagination {
    gap: 4px;
    margin: 0;
}

.tema-panel .page-link {
    padding: 6px 12px;
    background: transparent;
    border: 0;
    border-radius: 10px !important;
    color: var(--texto);
    font-size: 13px;
}

.tema-panel .page-item.active .page-link {
    background: var(--azul);
    color: #fff;
}

.tema-panel .page-item.disabled .page-link {
    background: transparent;
    color: var(--apagado);
}

.tema-panel #datos .btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 10px;
}

.tema-panel #datos .btn-primary {
    background: var(--azul-suave);
    color: var(--azul);
}

.tema-panel #datos .btn-danger {
    background: var(--rojo-suave);
    color: var(--rojo-texto);
}

/* Inicio */
.inicio-cabecera {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.inicio-cabecera h1 {
    margin: 0 0 4px;
    font-size: 34px;
    font-weight: 500;
}

.inicio-cabecera p {
    margin: 0;
    color: var(--texto);
}

.inicio-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inicio-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.05fr) minmax(280px, 1.05fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

.tarjeta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    background: var(--superficie);
    border-radius: var(--radio);
}

.tarjeta-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    margin-bottom: 14px;
}

.tarjeta-cabecera h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.boton-suave {
    padding: 6px 12px;
    background: var(--suave);
    border-radius: 999px;
    color: var(--tinta) !important;
    font-size: 13px;
    white-space: nowrap;
}

.boton-suave:hover {
    background: var(--linea);
}

.cola {
    grid-row: span 2;
}

.cola-destacada {
    display: flex;
    margin-bottom: 14px;
    color: inherit !important;
}

.cola-franja {
    display: flex;
    flex: 0 0 66px;
    align-items: flex-end;
    justify-content: center;
    padding: 12px 20px 12px 0;
    background: var(--azul);
    border-radius: 20px 0 0 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.cola-ficha {
    flex: 1;
    min-width: 0;
    margin-left: -20px;
    padding: 14px;
    background: var(--suave);
    border-radius: 20px;
    color: var(--tinta);
}

.cola-ficha-titulo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cola-ficha-titulo strong {
    font-size: 15px;
    font-weight: 500;
}

.cola-estado {
    padding: 3px 9px;
    background: var(--superficie);
    border-radius: 999px;
    color: var(--rojo-texto);
    font-size: 12px;
}

.cola-detalle {
    display: block;
    margin: 3px 0 12px;
    color: var(--apagado);
    font-size: 13px;
}

.cola-pie {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
}

.cola-pie span:first-child {
    color: var(--apagado);
}

.cola-vacia {
    margin-bottom: 14px;
    padding: 18px;
    background: var(--suave);
    border-radius: 20px;
    color: var(--apagado);
    text-align: center;
}

.cola-total {
    display: flex;
    justify-content: space-between;
    padding: 6px 2px 12px;
    border-bottom: 1px solid var(--linea);
    font-weight: 500;
}

.cola-grupo {
    border-bottom: 1px solid var(--linea);
}

.cola-grupo:last-of-type {
    border-bottom: 0;
}

.cola-grupo summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 2px;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.cola-grupo summary::-webkit-details-marker {
    display: none;
}

.cola-grupo summary i {
    color: var(--apagado);
    transition: transform .15s;
}

.cola-grupo[open] summary i {
    transform: rotate(90deg);
}

.cola-grupo summary b {
    margin-left: auto;
    font-weight: 500;
}

.cola-grupo a {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 2px 7px 26px;
    border-radius: 8px;
    color: var(--texto);
}

.cola-grupo a:hover {
    background: var(--suave);
    color: var(--tinta);
}

.cola-grupo div {
    padding-bottom: 8px;
}

.flujo {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--suave);
    border-radius: 18px;
}

.flujo-total {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.flujo-total strong {
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
}

.flujo-total span {
    color: var(--texto);
    font-size: 13px;
    line-height: 1.35;
}

.flujo-columnas {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(3, 1fr);
}

.flujo-columna {
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 0 8px;
    border-left: 1px solid var(--linea);
}

.flujo-columna:first-child {
    padding-left: 0;
    border-left: 0;
}

.flujo-columna:last-child {
    padding-right: 0;
}

.flujo-columna strong {
    font-weight: 500;
}

.flujo-columna small {
    color: var(--apagado);
    font-size: 12px;
}

.flujo-area {
    position: relative;
    display: flex;
    flex: 1;
    align-items: flex-end;
    margin-top: 10px;
}

.flujo-barra {
    width: 100%;
    min-height: 4px;
    border-radius: 12px 12px 4px 4px;
}

.flujo-barra.claro {
    background: var(--azul-claro);
}

.flujo-barra.azul {
    background: var(--azul);
}

.flujo-barra.rayas {
    background: repeating-linear-gradient(135deg, var(--rojo-suave) 0 5px, var(--rojo-rayas) 5px 6px);
    box-shadow: inset 0 0 0 1px var(--rojo);
}

.medidor {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.medidor svg {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.medidor-centro {
    position: absolute;
    top: 44%;
    left: 0;
    right: 0;
    text-align: center;
}

.medidor-centro strong {
    display: block;
    font-size: 38px;
    font-weight: 400;
    line-height: 1;
}

.medidor-centro span {
    color: var(--apagado);
    font-size: 12px;
}

.leyenda {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin: 14px 0;
    color: var(--texto);
    font-size: 13px;
}

.leyenda i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
}

.leyenda b {
    color: var(--tinta);
    font-weight: 500;
}

.boton-ancho {
    display: block;
    padding: 10px;
    background: var(--suave);
    border-radius: 999px;
    color: var(--tinta) !important;
    font-weight: 500;
    text-align: center;
}

.boton-ancho:hover {
    background: var(--linea);
}

.grafico {
    position: relative;
    height: 150px;
}

.grafico svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.grafico-fechas {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--apagado);
    font-size: 12px;
}

.grafico-tip {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    background: var(--superficie);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgb(15 22 35 / 16%);
    color: var(--tinta);
    font-size: 12px;
    pointer-events: none;
    transform: translate(-50%, -130%);
    white-space: nowrap;
}

.tarjeta-cifra {
    margin-top: 12px;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
}

.tarjeta-cifra small {
    font-size: 20px;
}

.tarjeta-nota {
    margin-top: 6px;
    color: var(--apagado);
    font-size: 13px;
}

.tarjeta-nota b {
    color: var(--verde-texto);
    font-weight: 500;
}

.tarjeta-nota b.baja {
    color: var(--rojo-texto);
}

.tarjeta.azul {
    background: var(--tarjeta-azul);
    color: #fff;
}

.tarjeta.azul h2,
.tarjeta.azul .grafico-fechas,
.tarjeta.azul .tarjeta-nota {
    color: #dbe8fa;
}

.tarjeta.azul .tarjeta-nota b {
    color: #fff;
}

/* Accesos */
.acceso-pagina {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
}

.acceso-tarjeta {
    width: min(100%, 420px);
    padding: 34px;
    background: var(--superficie);
    border-radius: var(--radio);
}

.acceso-tarjeta h1 {
    margin: 6px 0;
    font-size: 28px;
}

.acceso-tarjeta p {
    color: var(--texto);
}

/* Mozo */
.mozo-pagina {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px;
}

.mozo-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.mozo-cabecera h1 {
    margin: 0 0 4px;
    font-size: 30px;
}

.mozo-cabecera p {
    margin: 0;
    color: var(--texto);
}

.mozo-sesion {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-weight: 500;
}

.tema-panel .table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.tema-panel .table-card {
    display: block;
    width: 100%;
    padding: 22px;
    background: var(--superficie);
    border: 0;
    border-radius: var(--radio);
    box-shadow: none;
    color: var(--tinta);
    text-align: left;
}

.tema-panel .table-card:hover {
    box-shadow: inset 0 0 0 2px var(--azul-claro);
}

.tema-panel .table-card h3 {
    font-size: 18px;
}

.tema-panel .table-card p {
    color: var(--apagado);
}

.tema-panel .table-card.busy .pill {
    background: var(--azul);
    color: #fff;
}

@media (max-width: 1180px) {
    .inicio-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cola {
        grid-row: auto;
        grid-column: 1 / -1;
    }
}

/* Menú lateral replegado (solo en computadora) */
.panel-replegar {
    align-self: flex-end;
    width: 32px;
    height: 32px;
    margin-bottom: 6px;
    background: var(--suave);
    border: 0;
    border-radius: 10px;
    color: var(--texto);
}

@media (min-width: 901px) {
    .panel-menu-replegado .panel-sidebar { flex-basis: 72px; }
    .panel-menu-replegado .panel-replegar { align-self: center; }
    .panel-menu-replegado .panel-marca { justify-content: center; padding-left: 0; padding-right: 0; }
    .panel-menu-replegado .panel-marca span,
    .panel-menu-replegado .panel-grupo,
    .panel-menu-replegado .panel-usuario > div { display: none; }
    .panel-menu-replegado .panel-nav a { justify-content: center; padding-left: 0; padding-right: 0; font-size: 0; }
    .panel-menu-replegado .panel-nav a i { margin: 0; font-size: 20px; }
    .panel-menu-replegado .panel-usuario { flex-direction: column; align-items: center; gap: 8px; }
}

@media (max-width: 900px) {
    .panel-replegar { display: none; }
}

@media (max-width: 900px) {
    .panel-app {
        display: block;
        padding: 16px;
    }

    .panel-sidebar {
        position: fixed;
        z-index: 1060;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh;
        width: 260px;
        border-radius: 0 var(--radio) var(--radio) 0;
        transform: translateX(-105%);
        transition: transform .2s;
    }

    .panel-menu-abierto .panel-sidebar {
        transform: none;
    }

    .panel-menu-abierto .panel-fondo {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: block;
        background: rgb(15 22 35 / 40%);
    }

    .panel-abrir {
        display: inline-grid;
        place-items: center;
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
        padding: 0;
        background: var(--superficie);
        border: 0;
        border-radius: 50%;
        color: var(--tinta);
        font-size: 20px;
    }

    .panel-card {
        padding: 18px;
    }

    .inicio-cabecera,
    .tema-panel .toolbar {
        flex-wrap: wrap;
    }

    .inicio-cabecera h1 {
        font-size: 28px;
    }

    .inicio-grid {
        grid-template-columns: 1fr;
    }

    .tema-panel .dataTables_wrapper .d-flex {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Ajustes sobre estilos heredados */
.tema-panel .table-striped>tbody>tr>*,
.tema-panel table.dataTable tbody tr,
.tema-panel table.dataTable.table-striped tbody tr {
    --bs-table-accent-bg: transparent;
    background: transparent;
    box-shadow: none;
}

.tema-panel .table-hover>tbody>tr:hover>* {
    background: var(--suave);
}

.tema-panel .hero {
    margin: 0 0 20px;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    color: var(--texto);
}

.tema-panel .hero::before,
.tema-panel .hero::after {
    display: none;
}

.tema-panel .hero h1 {
    margin: 2px 0 4px;
    color: var(--tinta);
    font-size: 28px;
    font-weight: 500;
}

.tema-panel .table-grid {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.tema-panel .table-card:hover h3 {
    color: var(--tinta);
}

.tema-panel .table>tbody>tr>td {
    background: transparent !important;
    box-shadow: none !important;
}

.tema-panel .table-hover>tbody>tr:hover>td {
    background: var(--suave) !important;
}
/* Mesas del mozo */
.mozo-resumen { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.mozo-resumen span { padding: 7px 14px; background: var(--superficie); border-radius: 999px; color: var(--texto); font-size: 13px; }
.mozo-resumen b { color: var(--tinta); font-weight: 500; }
.tema-panel .table-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 148px; }
.mesa-estado { display: inline-flex; align-items: center; gap: 6px; color: var(--texto); font-size: 13px; }
.mesa-estado i { width: 8px; height: 8px; background: var(--azul); border-radius: 50%; }
.table-card.busy .mesa-estado i { background: var(--ambar); }
.mesa-monto { margin-top: auto; padding-top: 10px; color: var(--tinta); font-size: 20px; font-weight: 500; }
.mesa-monto small { color: var(--apagado); font-size: 13px; font-weight: 400; }
.mesa-mozo { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; color: var(--tinta); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.mesa-mozo i { color: var(--apagado); font-size: 14px; }
.mesa-mozo.vacia { color: var(--apagado); font-weight: 400; }
.mesa-qr { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--suave); border-radius: 999px; color: var(--tinta); font-size: 13px; font-weight: 500; }
.mesa-qr i { color: var(--azul); }
.mozo-cerrado { max-width: 460px; margin: 40px auto; padding: 32px 24px; background: var(--superficie); border-radius: 18px; text-align: center; }
.mozo-cerrado i { color: var(--apagado); font-size: 40px; }
.mozo-cerrado h2 { margin: 10px 0 6px; color: var(--tinta); font-size: 20px; font-weight: 600; }
.mozo-cerrado p { margin: 0; color: var(--texto); font-size: 14px; }
.inicio-dia { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--superficie); border-radius: 999px; color: var(--texto); font-size: 13px; }
.inicio-dia i { width: 8px; height: 8px; background: var(--verde-texto); border-radius: 50%; }

/* Mesa del mozo */
.tema-panel .mozo-mesa-page { max-width: 1200px; padding: 28px 20px; }
.tema-panel .mozo-mesa-header { align-items: center; padding: 0 0 20px; }
.tema-panel .mozo-mesa-header h1 { margin: 2px 0 0; font-size: 30px; font-weight: 500; }
.tema-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mozo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.tema-panel .mozo-cuenta-section h2 { margin: 0 0 12px; font-size: 16px; font-weight: 500; }
.mozo-comanda { margin-bottom: 12px; padding: 18px 20px; background: var(--superficie); border-radius: var(--radio); }
.mozo-comanda.anulada { opacity: .6; }
.mozo-comanda-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-weight: 500; }
.mozo-comanda-linea { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--linea); }
.mozo-comanda-linea:first-of-type { border-top: 0; }
.mozo-comanda small { display: block; margin-bottom: 4px; color: var(--apagado); }
.mozo-total { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--superficie); border-radius: var(--radio); }
.mozo-total h2 { margin: 0; font-size: 16px; font-weight: 500; }
.mozo-total-cifra { font-size: 38px; font-weight: 400; line-height: 1.1; }
.mozo-total-cifra small { font-size: 20px; }
.mozo-total p { margin: 0; color: var(--apagado); font-size: 13px; }
.mozo-total .btn { width: 100%; }
.tema-panel .mozo-cuenta-vacia { padding: 40px 20px; background: var(--superficie); border-radius: var(--radio); color: var(--apagado); text-align: center; }
.tema-panel .mozo-drawer-panel { background: var(--superficie); border-radius: var(--radio) 0 0 var(--radio); }
.tema-panel .mozo-drawer-header h2 { font-size: 22px; font-weight: 500; }
.tema-panel .mozo-drawer-body h3 { font-size: 15px; font-weight: 500; }
.tema-panel .mozo-nuevo-pedido { background: var(--suave); border: 0; border-radius: 18px; }
.tema-panel .mozo-nuevo-item { border-color: var(--linea); }
.tema-panel .mozo-nuevo-item-head { font-weight: 500; }
.tema-panel .mozo-nuevo-item-controls button, .tema-panel .mozo-cantidad-btn { background: var(--superficie); border: 1px solid var(--linea); border-radius: 50%; color: var(--tinta); }
.tema-panel .mozo-nuevo-item-controls input { border-color: var(--linea); border-radius: 10px; }
.tema-panel .mozo-producto-precio { font-weight: 500; }
.tema-panel .mozo-producto-info strong, .tema-panel .mozo-drawer-footer strong { font-weight: 500; }
.tema-panel .mozo-categoria-lista summary { font-weight: 500; }

@media (max-width: 900px) {
    .mozo-grid { grid-template-columns: 1fr; }
    .mozo-total { position: static; order: -1; }
    .tema-panel .mozo-drawer-panel { border-radius: 0; }
}

/* Modo oscuro del panel */
[data-bs-theme="dark"] .tema-panel {
    --fondo: #0f1218;
    --superficie: #1a1e27;
    --suave: #232834;
    --tinta: #f1f3f7;
    --texto: #b8bfcc;
    --apagado: #8f97a7;
    --linea: #2d3340;
    --azul: #3f85e6;
    --azul-suave: #1e3556;
    --azul-claro: #35557f;
    --azul-texto: #a9cbf7;
    --ambar: #bf8417;
    --rojo: #e0566d;
    --rojo-texto: #ff9aa8;
    --rojo-suave: #44242b;
    --rojo-rayas: #6c3440;
    --verde-texto: #6fd3a3;
    --boton: #f1f3f7;
    --boton-hover: #fff;
    --boton-texto: #0f1623;
    --grafico-area: #232834;
    color-scheme: dark;
}
[data-bs-theme="dark"] .tema-panel .table-responsive { background: transparent; }
[data-bs-theme="dark"] .tema-panel .dt-buttons .buttons-copy { background: #1c3a2c; color: #7fdcae; }
[data-bs-theme="dark"] .tema-panel .dt-buttons .buttons-csv { background: #3d3115; color: #f0c674; }
[data-bs-theme="dark"] .tema-panel .dt-buttons .buttons-excel { background: #44242b; color: #ff9aa8; }
[data-bs-theme="dark"] .tema-panel .dt-buttons .buttons-pdf { background: #173a45; color: #7fd0e6; }
[data-bs-theme="dark"] .tema-panel .dt-buttons .buttons-print { background: #1e3556; color: #a9cbf7; }
[data-bs-theme="dark"] .tema-panel .swal2-popup { background: var(--superficie); color: var(--tinta); }
[data-bs-theme="dark"] .tema-panel .swal2-title, [data-bs-theme="dark"] .tema-panel .swal2-html-container { color: var(--tinta); }
[data-bs-theme="dark"] .tema-panel .panel-marca img { background: #000; }

/* Alineación de las mesas del mozo y texto de la sesión */
.tema-panel #mesas-mozo { padding: 0; }
.tema-panel .panel-usuario small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Animaciones de entrada del panel */
@keyframes aparecer {
    from { opacity: 0; transform: translateY(14px); }
}

@keyframes crecer {
    from { transform: scaleY(0); }
}

@keyframes trazar {
    from { stroke-dashoffset: 1; opacity: 0; }
    5% { opacity: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes revelar {
    to { opacity: 1; }
}

@keyframes difuminar {
    from { opacity: 0; }
}

.panel-animado #panel-contenido.panel-card { animation: aparecer .45s ease backwards; }
.panel-animado .tarjeta { animation: aparecer .5s ease backwards; }
.panel-animado .tarjeta:nth-child(2) { animation-delay: .08s; }
.panel-animado .tarjeta:nth-child(3) { animation-delay: .16s; }
.panel-animado .tarjeta:nth-child(4) { animation-delay: .24s; }
.panel-animado .tarjeta:nth-child(5) { animation-delay: .32s; }
.panel-animado .flujo-barra { transform-origin: bottom; animation: crecer .7s .3s ease-out backwards; }
.panel-animado .inicio-cabecera { animation: aparecer .45s ease backwards; }
.panel-animado [data-contar]:not(.contando) { visibility: hidden; }
.panel-animado .medidor svg path { opacity: 0; }
.panel-animado table[id^="dt"]:not(.dataTable) { opacity: 0; animation: revelar 0s 1.5s forwards; }
.panel-animado .dataTables_wrapper { animation: difuminar .35s ease backwards; }
.fila-entrada { animation: aparecer .35s ease backwards; }
.trazo-animado { stroke-dasharray: 1; animation: trazar 1s .3s ease-out both; }
.relleno-animado { animation: difuminar .6s .8s ease backwards; }

/* Cobro y correcciones de caja */
.cobro-linea { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--linea); }
.cobro-total { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 0; font-size: 16px; font-weight: 500; }
.cobro-total strong { font-size: 24px; font-weight: 500; }
.cobro-vuelto { margin: 0 0 4px; color: var(--texto); }
.cobro-vuelto strong { color: var(--tinta); font-weight: 500; }
.tema-panel #datos .btn-brand { width: auto; padding: 0 16px; }
.tema-panel #datos .btn-outline-secondary, .tema-panel #datos .btn-outline-danger { display: inline-flex; width: auto; height: auto; padding: 6px 12px; }

/* Barra superior y notificaciones */
.panel-barra { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 14px; padding: 6px 8px 6px 18px; background: var(--superficie); border-radius: 18px; }
.panel-barra .panel-abrir { margin: 0; background: var(--suave); }
.panel-barra-titulo { flex: 1; min-width: 0; overflow: hidden; color: var(--texto); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.panel-campana { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: var(--suave); border: 0; border-radius: 50%; color: var(--tinta); font-size: 19px; }
.panel-campana:hover { background: var(--azul-suave); }
#contadorNotificaciones { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; background: var(--rojo); border: 2px solid var(--superficie); border-radius: 999px; color: #fff; font-size: 11px; font-weight: 500; line-height: 1; }
#contadorNotificaciones[hidden] { display: none; }
.panel-notificaciones { width: min(340px, calc(100vw - 32px)); max-height: 420px; padding: 8px; overflow-y: auto; background: var(--superficie); border: 1px solid var(--linea); border-radius: 18px; box-shadow: 0 10px 30px rgb(15 22 35 / 16%); }
.panel-notificaciones-titulo { padding: 8px 10px; color: var(--tinta); font-weight: 500; }
.notificacion { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 12px; color: var(--texto) !important; font-size: 13px; line-height: 1.35; }
.notificacion:hover { background: var(--suave); color: var(--tinta) !important; }
.notificacion i { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 5px; background: var(--azul); border-radius: 50%; }
.notificacion.aviso i { background: var(--ambar); }
.notificacion.alerta i { background: var(--rojo); }
.notificaciones-vacio { margin: 0; padding: 14px 10px; color: var(--apagado); font-size: 13px; text-align: center; }

/* Turno y cobro */
.panel-turno { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding: 14px 18px; background: var(--suave); border-radius: 18px; }
.panel-turno > div:first-child { flex: 1; min-width: 200px; }
.panel-turno strong { display: block; font-weight: 500; }
.panel-turno span { color: var(--texto); font-size: 13px; }
.panel-turno-cifra small { display: block; color: var(--apagado); font-size: 12px; }
.panel-turno-cifra strong { font-size: 20px; }
.pago-linea { display: grid; grid-template-columns: 1.1fr 1fr 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.pago-linea .pago-referencia { grid-column: 1 / 3; grid-row: 2; }
.pago-quitar { width: 34px; height: 34px; padding: 0; background: var(--suave); border: 0; border-radius: 50%; color: var(--texto); font-size: 18px; line-height: 1; }
.cobro-propina { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 0; padding: 10px 12px; background: var(--azul-suave); border-radius: 12px; color: var(--azul-texto); cursor: pointer; font-size: 13px; }
.cobro-propina input { margin-top: 3px; }
