/* ==========================================================================
   KROMOS SPA & SALÓN UNISEX - DESIGN SYSTEM & STYLESHEET
   Identidad Oficial: Manual de Marca Kromos
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Nunito+Sans:ital,opsz,wght@0,6..12,300..900;1,6..12,300..900&display=swap');

:root {
    /* Paleta Oficial Kromos */
    --primary: #776B5D;          /* Taupe / Bronce cálido */
    --primary-dark: #5c5246;     /* Bronce profundo */
    --primary-light: #8e8070;    /* Taupe claro */
    --secondary: #B0A695;        /* Piedra suave / Gris cálido */
    --light: #EBE3D5;            /* Arena claro / Marfil medio */
    --bg: #F3EEEA;               /* Marfil / Off-white (fondo general) */
    --dark: #1A1A1A;             /* Negro azabache */
    --white: #FFFFFF;
    
    /* Estados y Semántica */
    --success: #3E7B54;
    --success-bg: #EAF3ED;
    --warning: #B87A28;
    --warning-bg: #FDF4E7;
    --danger: #9B3B3B;
    --danger-bg: #FBEFEF;
    --info: #46687D;
    --info-bg: #EDF3F7;

    /* Tipografías */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Sombras y Elevaciones */
    --shadow-sm: 0 2px 6px rgba(119, 107, 93, 0.08);
    --shadow-md: 0 6px 18px rgba(119, 107, 93, 0.12);
    --shadow-lg: 0 12px 32px rgba(119, 107, 93, 0.16);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    /* Transiciones */
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y Bases */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Tipografía de Marca */
h1, h2, h3, .font-display {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.3px;
    color: var(--dark);
}

/* Layout del Sistema */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Sidebar para Desktop */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid rgba(176, 166, 149, 0.35);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(176, 166, 149, 0.25);
}

.sidebar-logo {
    height: 38px;
    width: auto;
    max-width: 82px;
    object-fit: contain;
    background: #111111;
    padding: 5px 9px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--dark);
    line-height: 1.1;
}

.sidebar-subtitle {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--primary);
    font-weight: 700;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg);
    color: var(--primary-dark);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, #463b33 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(70, 59, 51, 0.35);
    border-left: 4px solid #f3ba42;
    position: relative;
    font-weight: 700;
}

.nav-link.active svg {
    color: #f3ba42 !important;
    stroke-width: 2.2;
}

.nav-link.active small {
    color: rgba(255, 255, 255, 0.92) !important;
    font-weight: 500;
}

.nav-link.active::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f3ba42;
    margin-left: auto;
    box-shadow: 0 0 8px #f3ba42;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(176, 166, 149, 0.25);
    background: rgba(243, 238, 234, 0.4);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--secondary);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: capitalize;
}

/* Área Principal de Contenido */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid rgba(176, 166, 149, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.mobile-logo-header {
    height: 30px;
    width: auto;
    background: #111111;
    padding: 4px 8px;
    border-radius: 6px;
    object-fit: contain;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-date {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-user-badge {
    font-weight: 700;
}

.main-content {
    flex: 1;
    padding: 28px;
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
    box-sizing: border-box;
}

/* Tarjetas y Contenedores */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid rgba(176, 166, 149, 0.35);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    transition: var(--transition);
}

/* Grid de Configuración / Admin Responsivo */
.admin-layout-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 24px;
    align-items: start;
    min-width: 0;
}

.admin-layout-grid > div {
    min-width: 0;
    max-width: 100%;
}

/* Filas de formulario de 2 columnas responsivas */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Filas de métodos de pago en caja */
.pago-row-grid {
    display: grid;
    grid-template-columns: 140px 1fr 1fr;
    gap: 8px;
    align-items: center;
}

/* Listado de Personal: Tabla Desktop y Tarjetas Móvil */
.staff-desktop-table {
    display: block;
    width: 100%;
}

.staff-mobile-cards {
    display: none;
}

.staff-card-item {
    background: var(--white);
    border: 1px solid rgba(176, 166, 149, 0.4);
    border-radius: var(--radius-sm);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.staff-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.staff-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
    background: var(--bg);
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.staff-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(176, 166, 149, 0.2);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(176, 166, 149, 0.2);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Grid de Métricas / KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.kpi-card {
    background: var(--white);
    border: 1px solid rgba(176, 166, 149, 0.35);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.kpi-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #666;
    font-weight: 700;
    margin-bottom: 6px;
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: var(--dark);
    line-height: 1.1;
    margin-bottom: 6px;
}

.kpi-sub {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(119, 107, 93, 0.28);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--light);
    color: var(--primary-dark);
    border: 1px solid var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 14px 26px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Formularios */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    border: 1px solid rgba(176, 166, 149, 0.5);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--dark);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(119, 107, 93, 0.18);
}

.input-error {
    border: 1.5px solid var(--danger) !important;
    background-color: var(--danger-bg) !important;
    box-shadow: 0 0 0 3px rgba(155, 59, 59, 0.25) !important;
    animation: shakeError 0.35s ease-in-out;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Selector Rápido de Servicios para Barberos / Móvil */
.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.cat-pill {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--white);
    border: 1px solid var(--secondary);
    color: var(--dark);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.cat-pill.active, .cat-pill:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.service-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.service-item-card {
    background: var(--white);
    border: 1.5px solid rgba(176, 166, 149, 0.4);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-item-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.service-item-card.selected {
    border-color: var(--primary);
    background: rgba(235, 227, 213, 0.35);
    box-shadow: 0 0 0 2px var(--primary);
}

.service-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--dark);
}

.service-item-cat {
    font-size: 0.76rem;
    color: #666;
    margin-bottom: 10px;
}

.service-item-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 600;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background: var(--bg);
    color: var(--dark);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid rgba(176, 166, 149, 0.4);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(176, 166, 149, 0.25);
    font-size: 0.92rem;
    vertical-align: middle;
}

.table tr:hover td {
    background-color: rgba(243, 238, 234, 0.45);
}

/* Badges de Estado */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-pendiente {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(184, 122, 40, 0.3);
}

.badge-por_validar {
    background: #FFF3CD;
    color: #925800;
    border: 1.5px solid #F5C067;
    box-shadow: 0 0 10px rgba(245, 192, 103, 0.45);
    animation: alertPulse 2s infinite ease-in-out;
}

@keyframes alertPulse {
    0% { transform: scale(1); box-shadow: 0 0 4px rgba(245, 192, 103, 0.4); }
    50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(245, 192, 103, 0.7); }
    100% { transform: scale(1); box-shadow: 0 0 4px rgba(245, 192, 103, 0.4); }
}

.row-por-validar {
    background-color: rgba(255, 243, 205, 0.25) !important;
    border-left: 4px solid #F5C067 !important;
}

.badge-cobrado {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(62, 123, 84, 0.3);
}

.badge-anulado {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(155, 59, 59, 0.3);
}

.badge-rol {
    background: var(--light);
    color: var(--primary-dark);
    border: 1px solid var(--secondary);
}

/* Indicador de Tasa BCV Oficial */
.bcv-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #EAF3ED;
    color: #1E6638;
    border: 1.5px solid #A2D4B3;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
}

.bcv-sync-btn {
    background: transparent;
    border: none;
    color: #1E6638;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    transition: transform 0.4s ease;
}

.bcv-sync-btn:hover {
    transform: rotate(180deg);
}

/* Selector de Moneda de Pago (Dólares / Bolívares / Mixto) */
.currency-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.currency-tab-btn {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--secondary);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.currency-tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(119, 107, 93, 0.25);
}

/* Modales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-md);
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--secondary);
    box-shadow: var(--shadow-lg);
    padding: 28px;
    transform: translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(176, 166, 149, 0.3);
    padding-bottom: 12px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

.modal-close:hover {
    color: var(--dark);
}

/* Barra Móvil Inferior (Solo Móvil) */
.mobile-bottom-nav {
    display: none;
}

/* Toast Notificaciones */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--dark);
    color: var(--white);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   ADAPTACIONES RESPONSIVAS (MÓVIL / SMARTPHONES)
   ========================================================================== */
@media (max-width: 900px) {
    .sidebar {
        display: none; /* Ocultar sidebar en móviles */
    }

    .topbar {
        height: 56px;
        min-height: 56px;
        padding: 0 14px;
        overflow: hidden;
    }

    .mobile-logo-header {
        display: block !important;
        height: 28px;
    }

    .topbar-title {
        display: none !important; /* Ocultar título redundante en móvil para evitar solapamiento */
    }

    .topbar-date {
        display: none !important; /* Ocultar fecha en teléfono */
    }

    .topbar-user-badge {
        display: none !important; /* Ocultar badge de usuario en barra para ganar espacio */
    }

    .topbar-actions {
        gap: 8px;
    }

    .bcv-pill {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
        white-space: nowrap;
    }

    .main-content {
        padding: 14px;
        padding-bottom: 85px; /* Espacio para barra táctil inferior */
        max-width: 100vw;
        overflow-x: hidden;
    }

    .admin-layout-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .staff-desktop-table {
        display: none;
    }

    .staff-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .kpi-card {
        padding: 14px;
    }

    .kpi-value {
        font-size: 1.45rem;
    }

    .service-select-grid {
        grid-template-columns: 1fr;
    }

    .modal-overlay {
        padding: 12px;
    }

    .modal-content {
        padding: 20px 16px;
        max-height: 85vh;
        border-radius: 12px;
    }

    /* Barra Inferior Táctil para Teléfono */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 68px;
        background: var(--white);
        border-top: 1px solid rgba(176, 166, 149, 0.4);
        box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
        z-index: 500;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #777;
        text-decoration: none;
        font-size: 0.74rem;
        font-weight: 700;
        flex: 1;
        height: 100%;
        gap: 4px;
        transition: var(--transition);
    }

    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
        color: #777;
    }

    .mobile-nav-item.active {
        color: var(--primary-dark);
        font-weight: 800;
        background: rgba(119, 107, 93, 0.12);
        border-radius: 10px;
        position: relative;
    }

    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 3px;
        background: var(--primary);
        border-radius: 0 0 4px 4px;
    }

    .mobile-nav-item.active svg {
        color: var(--primary-dark);
        transform: scale(1.12);
        stroke-width: 2.3;
    }

    .mobile-nav-item.active span {
        color: var(--primary-dark);
        font-weight: 800;
    }
}

@media (max-width: 600px) {
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pago-row-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .pago-row-grid label {
        grid-column: 1 / -1;
    }

    .card {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .card-header .btn {
        width: 100%;
    }
}

/* ==========================================================================
   ESTILOS PWA (Progressive Web App) - Botón y Banner de Instalación
   ========================================================================== */
.btn-pwa-install {
    display: none;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f3ba42 0%, #e09e25 100%);
    color: #3b2b19;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(243, 186, 66, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-pwa-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 186, 66, 0.5);
}

.btn-pwa-install svg {
    stroke-width: 2.3;
}

/* Banner flotante de instalación en móviles */
.pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 66px;
    left: 12px;
    right: 12px;
    max-width: 440px;
    margin: 0 auto;
    background: #ffffff;
    border: 1.5px solid var(--secondary);
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 600;
    animation: slideUpPwa 0.35s ease-out;
}

@keyframes slideUpPwa {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pwa-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: #111111;
    padding: 3px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.pwa-banner-text span {
    font-size: 0.72rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-pwa-action {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-pwa-action:hover {
    background: var(--primary-dark);
}

.btn-pwa-dismiss {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.btn-pwa-dismiss:hover {
    color: #333;
}

/* ==========================================================================
   ESTILOS DE IMPRESIÓN Y EXPORTACIÓN A PDF (Recibo / Liquidación)
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12pt;
    }

    .sidebar, .topbar, .mobile-bottom-nav, .no-print, .btn, .topbar-actions {
        display: none !important;
    }

    .main-wrapper, .main-content {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .print-voucher {
        width: 100% !important;
        max-width: 800px !important;
        margin: 0 auto !important;
        padding: 20px !important;
    }
}
