/* =================================================================
/* =================================================================
   LIMATAMBO — Sistema de Facturación
   Design System v1.0 · Formal & Sobrio
   ================================================================= */

/* ===== Variables de marca ===== */
:root {
    --color-primary: #0A0B2E; /*#0A0B2E;*/
    --color-primary-lt: #1F27B2; /*#12144a;*/
    --color-accent: #c8000e;
    --color-accent-dk: #a8000c;
    --color-accent-bg: rgba(200, 0, 14, 0.08);
    --color-info: #1d4ed8;
    --color-info-bg: #eff6ff;
    --color-bg: #f0f2f5;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-text-md: #374151;
    --color-muted: #6b7280;
    --color-muted-lt: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-dk: #d1d5db;
    --color-success: #15803d;
    --color-success-bg: #dcfce7;
    --color-warning: #b45309;
    --color-warning-bg: #fef3c7;
    --color-danger: #b91c1c;
    --color-danger-bg: #fee2e2;
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-card: 12px;
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-sm: 0 2px 6px rgba(8,45,82,0.06);
    --shadow-md: 0 4px 16px rgba(8,45,82,0.10);
}

/* ===== Reset base ===== */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.6;
    background: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
    margin-top: 0;
}

/* ===== Scrollbar discreta ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5cdd9; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9daab8; }

/* =================================================================
   ESTRUCTURA PRINCIPAL
   ================================================================= */
.dashboard-wrapper {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

/* =================================================================
   SIDEBAR
   ================================================================= */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--color-primary);
    background-image: none;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.25s ease;
    /* scrollbar que coincide con el fondo oscuro */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) var(--color-primary);
}
.sidebar::-webkit-scrollbar       { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: var(--color-primary); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* --- Cabecera del sidebar --- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo-icon {
    width: 38px; height: 38px;
   /* background: var(--color-accent);*/
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.logo-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* mantiene proporción */
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 0.92rem; font-weight: 700; color: #fff; }
.logo-sub  { font-size: 0.68rem; color: var(--color-accent); font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }

/* --- Navegación --- */
.sidebar-nav {
    flex: 1;
    padding: 0.85rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section-label {
    font-size: 0.63rem;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0.9rem 0.5rem 0.25rem;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
}

.nav-item.active {
    background: var(--color-accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(200,0,14,0.3);
}

.nav-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    display: inline-block;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
}

.nav-label { overflow: hidden; }

/* --- Footer del sidebar --- */
.sidebar-footer {
    padding: 0.75rem 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name  { font-size: 0.8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { font-size: 0.68rem; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 5px;
    font-size: 1.05rem;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
    font-family: 'Material Symbols Outlined';
    line-height: 1;
    display: flex;
    align-items: center;
}

.btn-logout:hover { color: var(--color-accent); background: rgba(200,0,14,0.12); }

/* --- Close button (mobile) --- */
.btn-sidebar-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    padding: 3px 5px;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: 'Material Symbols Outlined';
    line-height: 1;
    transition: color 0.15s;
}
.btn-sidebar-close:hover { color: #fff; }

/* =================================================================
   ÁREA PRINCIPAL
   ================================================================= */
.main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =================================================================
   TOPBAR
   ================================================================= */
.topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-xs);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
    font-family: 'Material Symbols Outlined';
    line-height: 1;
    display: flex; align-items: center;
}
.sidebar-toggle:hover { background: #f0f3f7; color: var(--color-primary); }

.topbar-breadcrumb {
    font-size: 0.82rem;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-greeting {
    font-size: 0.84rem;
    color: var(--color-muted);
    white-space: nowrap;
}
.topbar-greeting strong { color: var(--color-primary); font-weight: 600; }

.btn-topbar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: 1.5px solid var(--color-border-dk);
    color: var(--color-text-md);
    border-radius: var(--radius-sm);
    padding: 0.28rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.btn-topbar:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.btn-topbar .material-symbols-outlined { font-size: 1rem; }

/* =================================================================
   CONTENIDO DE PÁGINAS
   ================================================================= */
.page-content {
    flex: 1;
    padding: 1.5rem 1.75rem;
}

/* --- Cabecera de página --- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.3;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-top: 0.15rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* =================================================================
   CARDS
   ================================================================= */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.card-body { padding: 1.25rem 1.5rem; }

.card-header {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-title .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--color-accent);
}

/* --- KPI Cards --- */
.card-kpi {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    padding: 1.1rem 1.35rem;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-accent);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card-kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.4rem;
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.kpi-sub {
    font-size: 0.74rem;
    color: var(--color-muted);
    margin-top: 0.3rem;
}

.kpi-icon {
    font-size: 2rem;
    color: var(--color-accent);
    opacity: 0.75;
    font-family: 'Material Symbols Outlined';
    line-height: 1;
}

/* =================================================================
   TABLAS ERP
   ================================================================= */
.table-erp {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--color-text-md);
}

.table-erp thead th {
    background: var(--color-primary);
    color: rgba(255,255,255,0.9);
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    text-align: left;
    border: none;
    white-space: nowrap;
}

.table-erp thead th:first-child { border-radius: 0; }
.table-erp thead th:last-child  { border-radius: 0; }

.table-erp tbody td {
    padding: 0.55rem 0.9rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.table-erp tbody tr:last-child td { border-bottom: none; }
.table-erp tbody tr:hover td { background: #f5f7fb; }
.table-erp tbody tr.selected td { background: #eff6ff; }

/* Col alineación */
.col-num  { text-align: right; font-variant-numeric: tabular-nums; }
.col-mono { font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 0.72rem; }
.col-acción { text-align: center; width: 90px; }

/* =================================================================
   BADGES DE ESTADO (comprobantes, tickets, liquidaciones)
   ================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge-emitido   { background: var(--color-success-bg); color: var(--color-success); }
.badge-pagado    { background: var(--color-info-bg);    color: var(--color-info);    }
.badge-anulado   { background: var(--color-danger-bg);  color: var(--color-danger);  }
.badge-pendiente { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-borrador  { background: #f3f4f6; color: var(--color-muted); }
.badge-enviado   { background: #ede9fe; color: #5b21b6; }
.badge-rechazado { background: #fef3c7; color: #92400e; }
.badge-especialidad { background: var(--color-info-bg); color: var(--color-info); }
.badge-servicio {
    background: var(--color-info-bg);
    color: var(--color-info);
}

/* --- Tabs por estado --- */
.tabs-estado {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.1rem;
    padding-bottom: 0.6rem;
}

.tab-estado {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 0.32rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-md);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.tab-estado:hover { border-color: var(--color-primary); }
.tab-estado.activo {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.tab-estado-badge {
    background: rgba(0,0,0,0.08);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
    font-size: 0.72rem;
}
.tab-estado.activo .tab-estado-badge { background: rgba(255,255,255,0.22); }

/* =================================================================
   BOTONES
   ================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
    text-decoration: none;
    white-space: nowrap;
}

.btn .material-symbols-outlined { font-size: 1rem; }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-lt); border-color: var(--color-primary-lt); }

.btn-danger {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent-dk);
}
.btn-danger:hover { background: var(--color-accent-dk); }

.btn-success {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}
.btn-success:hover { background: #12692f; border-color: #12692f; }

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-border-dk);
}
.btn-outline:hover { background: #f5f7fb; border-color: var(--color-primary); }

.btn-outline-danger {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.btn-outline-danger:hover { background: var(--color-accent-bg); }

.btn-sm { padding: 0.25rem 0.65rem; font-size: 0.78rem; }
.btn-lg { padding: 0.55rem 1.2rem; font-size: 0.92rem; }

/* =================================================================
   FORMULARIOS
   ================================================================= */
.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-md);
    margin-bottom: 0.35rem;
}

.form-label.required::after {
    content: " *";
    color: var(--color-accent);
}

.form-control {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid var(--color-border-dk);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10,11,46,0.08);
}

.form-control:disabled { background: #f3f4f6; color: var(--color-muted); cursor: not-allowed; }

.form-control.is-invalid { border-color: var(--color-accent); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(200,0,14,0.10); }

.form-hint { font-size: 0.75rem; color: var(--color-muted); margin-top: 0.2rem; }
.form-error { font-size: 0.75rem; color: var(--color-accent); margin-top: 0.2rem; }

/* =================================================================
   VALIDACIÓN BLAZOR
   ================================================================= */
.valid.modified:not([type=checkbox]) { outline: 1.5px solid #26b050; }
.invalid { outline: 1.5px solid var(--color-accent); }
.validation-message { color: var(--color-accent); font-size: 0.78rem; margin-top: 0.2rem; }

/* Ajuste focus para componentes nativos */
.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(10,11,46,0.10);
}

/* =================================================================
   BÚSQUEDA / TOOLBAR DE FILTROS
   ================================================================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border-dk);
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.65rem;
    min-width: 220px;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 0.85rem;
    color: var(--color-text);
    width: 100%;
    background: transparent;
}

.search-box .material-symbols-outlined { color: var(--color-muted); font-size: 1rem; }
.search-box:focus-within { border-color: var(--color-primary); }

/* =================================================================
   SIDEBAR BACKDROP (mobile)
   ================================================================= */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99;
    backdrop-filter: blur(2px);
}

/* =================================================================
   DIVIDER
   ================================================================= */
.divider {
    height: 1px;
    background: var(--color-border);
    margin: 1rem 0;
}

/* =================================================================
   GRID RESPONSIVE PARA KPIs
   ================================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* =================================================================
   LOGIN
   ================================================================= */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: url('/Imagen/fondocl.jpeg') center/cover no-repeat;
    padding: 1.5rem;
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 46, 0.52);
}

.login-card {
    position: relative;
    z-index: 1;
    background: var(--color-surface);
    border-radius: 16px;
    padding: 2.5rem 2.25rem;
    padding-top: 3rem;
    width: 100%;
    max-width: 390px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    margin-top: 44px;
}

.login-avatar {
    position: absolute;
    top: -44px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    border: 4px solid var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .login-avatar img {
        width: 58%;
        object-fit: contain;
    }

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.login-logo-icon {
    width: 80px; height: 80px;
    /*background: var(--color-accent);*/
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; font-weight: 800;
    color: #fff;
}
    .login-logo-icon img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain; /* mantiene proporción */
    }
    .login-logo-text {
        display: flex;
        flex-direction: column;
        line-height: 1.8;
    }

.login-logo-main {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--color-primary);
}

.lp-divider {
    width: 248px;
    height: 1px;
    background: linear-gradient(90deg, #e30613, #ff4d5a);
    border-radius: 99px;
    margin: 0 auto 1.1rem;
}
.login-logo-sub {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-align: center;
}

    .login-title {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--color-primary);
        margin-bottom: 0.25rem;
        text-align: center;
    }

    .login-subtitle {
        font-size: 0.82rem;
        color: var(--color-muted);
        text-align: center;
        margin-bottom: 1.75rem;
    }

    .login-group {
        margin-bottom: 1rem;
    }

    .login-label {
        display: block;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--color-text-md);
        margin-bottom: 0.35rem;
    }

    .login-input {
        width: 100%;
        padding: 0.5rem 0.8rem;
        border: 1.5px solid var(--color-border-dk);
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        color: var(--color-text);
        background: var(--color-surface);
        transition: border-color 0.15s, box-shadow 0.15s;
    }

        .login-input:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(10,11,46,0.09);
        }

    .login-input-wrap {
        position: relative;
    }

        .login-input-wrap .login-input {
            padding-right: 2.5rem;
        }

    .login-eye {
        position: absolute;
        right: 0.65rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: var(--color-muted);
        cursor: pointer;
        padding: 0;
        font-size: 1rem;
        font-family: 'Material Symbols Outlined';
        line-height: 1;
        display: flex;
        align-items: center;
    }

    .login-btn {
        width: 100%;
        padding: 0.6rem;
        background: var(--color-primary);
        color: #fff;
        border: none;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.3px;
        transition: background 0.15s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }

        .login-btn:hover:not(:disabled) {
            background: var(--color-primary-lt);
        }

        .login-btn:disabled {
            opacity: 0.65;
            cursor: not-allowed;
        }

    .login-error {
        background: var(--color-danger-bg);
        color: var(--color-danger);
        border: 1px solid rgba(185,28,28,0.2);
        border-radius: var(--radius-sm);
        padding: 0.55rem 0.8rem;
        font-size: 0.82rem;
        font-weight: 500;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .login-success {
        background: var(--color-success-bg);
        color: var(--color-success);
        border: 1px solid rgba(21,128,61,0.2);
        border-radius: var(--radius-sm);
        padding: 0.55rem 0.8rem;
        font-size: 0.82rem;
        font-weight: 500;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    /* =================================================================
   RESPONSIVO: DESKTOP — sidebar colapsado por defecto
   ================================================================= */
    @media (min-width: 769px) {
        .dashboard-wrapper:not(.sidebar-open) .sidebar {
            width: 60px;
            min-width: 60px;
        }

        .dashboard-wrapper:not(.sidebar-open) .nav-label,
        .dashboard-wrapper:not(.sidebar-open) .nav-section-label,
        .dashboard-wrapper:not(.sidebar-open) .user-details,
        .dashboard-wrapper:not(.sidebar-open) .logo-text,
        .dashboard-wrapper:not(.sidebar-open) .btn-logout {
            display: none;
        }

        .dashboard-wrapper:not(.sidebar-open) .nav-item {
            justify-content: center;
            padding: 0.55rem;
        }

        .dashboard-wrapper:not(.sidebar-open) .sidebar-nav {
            padding: 0.85rem 0.4rem;
        }

        .dashboard-wrapper:not(.sidebar-open) .sidebar-logo {
            justify-content: center;
        }

        .dashboard-wrapper:not(.sidebar-open) .sidebar-header {
            justify-content: center;
        }

        .dashboard-wrapper:not(.sidebar-open) .sidebar-footer {
            justify-content: center;
            padding: 0.75rem 0.4rem;
        }

        .dashboard-wrapper:not(.sidebar-open) .user-info {
            justify-content: center;
        }

        .dashboard-wrapper:not(.sidebar-open) .nav-icon {
            width: auto;
        }
    }
    /* =================================================================
   RESPONSIVO: MOBILE
   ================================================================= */
    @media (max-width: 768px) {
        .sidebar {
            position: fixed !important;
            top: 0;
            left: 0;
            bottom: 0;
            height: 100vh !important;
            width: var(--sidebar-width) !important;
            min-width: var(--sidebar-width) !important;
            transform: translateX(-100%);
        }

        .dashboard-wrapper.sidebar-open .sidebar {
            transform: translateX(0);
        }

        .dashboard-wrapper.sidebar-open .sidebar-backdrop {
            display: block;
        }

        .page-content {
            padding: 1rem;
        }

        .topbar {
            padding: 0 1rem;
        }

        .topbar-greeting {
            display: none;
        }

        .kpi-value {
            font-size: 1.6rem;
        }
    }

    @media (max-width: 480px) {
        .page-content {
            padding: 0.75rem;
        }

        .kpi-grid {
            grid-template-columns: 1fr 1fr;
        }
    }
    /* =================================================================
   PRINT — tickets e informes
   ================================================================= */
    @media print {
        .sidebar, .topbar, .no-print, .page-actions {
            display: none !important;
        }

        .main-area {
            margin-left: 0 !important;
        }

        .page-content {
            padding: 0;
        }

        .card {
            box-shadow: none;
            border: 1px solid #ddd;
        }

        body {
            background: #fff;
            font-size: 12px;
        }
    }
    /* =================================================================
   ERRORES BLAZOR
   ================================================================= */
    .blazor-error-boundary {
        background: #b32121;
        padding: 1rem 1rem 1rem 3.7rem;
        color: white;
        border-radius: 8px;
    }

        .blazor-error-boundary::after {
            content: "Ha ocurrido un error inesperado.";
        }

    #blazor-error-ui {
        background: #fff0f0;
        bottom: 0;
        left: 0;
        box-shadow: 0 -1px 4px rgba(0,0,0,0.12);
        display: none;
        padding: 0.6rem 1.25rem 0.7rem 1.25rem;
        position: fixed;
        width: 100%;
        z-index: 1000;
        color: #b91c1c;
        font-size: 0.85rem;
        border-top: 2px solid var(--color-accent);
    }

        #blazor-error-ui .dismiss {
            cursor: pointer;
            position: absolute;
            right: 0.75rem;
            top: 0.5rem;
            font-size: 1.1rem;
        }
