/* ==========================================================================
   SINSUSTO - DESIGN SYSTEM & BRANDING STYLESHEET
   Paleta extraída del Logo SinSusto:
   - Azul Marino Base: #0B192E / #0D2040
   - Azul SAT / Eléctrico: #0066C0 / #0284C7
   - Verde Susto / Cumplimiento: #16A34A / #22C55E
   ========================================================================== */

:root {
    /* Paleta Principal del Logo SinSusto */
    --color-sinsusto-navy: #0B192E;
    --color-sinsusto-navy-dark: #07101E;
    --color-sinsusto-navy-light: #132747;
    
    --color-sinsusto-blue: #0066C0;
    --color-sinsusto-blue-hover: #00529C;
    --color-sinsusto-blue-light: #38BDF8;
    --color-sinsusto-blue-bg: rgba(0, 102, 192, 0.12);
    
    --color-sinsusto-green: #22C55E;
    --color-sinsusto-green-hover: #16A34A;
    --color-sinsusto-green-dark: #15803D;
    --color-sinsusto-green-bg: rgba(34, 197, 94, 0.12);

    /* Backgrounds & Glassmorphism */
    --bg-main: #060A12;
    --bg-card: rgba(13, 32, 64, 0.55);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 102, 192, 0.4);
    --border-green-hover: rgba(34, 197, 94, 0.4);

    /* Tipografía y Jerarquía de Texto */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    /* Variables de Estado */
    --color-primary: var(--color-sinsusto-blue);
    --color-primary-hover: var(--color-sinsusto-blue-hover);
    
    --color-success: var(--color-sinsusto-green);
    --color-success-bg: var(--color-sinsusto-green-bg);
    
    --color-expense: var(--color-sinsusto-blue-light);
    --color-expense-bg: var(--color-sinsusto-blue-bg);
    
    --color-warning: #F59E0B;
    --color-warning-bg: rgba(245, 158, 11, 0.12);
    
    --color-danger: #EF4444;
    --color-danger-bg: rgba(239, 68, 68, 0.12);
    
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --glass-blur: blur(14px);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Claro / Tema Blanco */
[data-theme="light"] {
    --bg-main: #F1F5F9;
    --bg-card: #FFFFFF;
    --border-color: rgba(15, 23, 42, 0.1);
    --border-hover: rgba(0, 102, 192, 0.4);
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    --color-expense: #0284C7;
    --color-expense-bg: rgba(2, 132, 199, 0.1);
    
    --glass-blur: none;
}

[data-theme="light"] body {
    background-color: #F8FAFC;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(0, 102, 192, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(34, 197, 94, 0.05) 0%, transparent 45%);
}

[data-theme="light"] .card {
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .card-title {
    color: #0F172A;
}

[data-theme="light"] .logo-area h1 {
    background: linear-gradient(135deg, #0F2C59 0%, #0066C0 50%, #15803D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .input-text {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #0F172A;
}

[data-theme="light"] .file-upload-zone {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

[data-theme="light"] th {
    background: #F1F5F9;
    color: #475569;
}

[data-theme="light"] tr:hover td {
    background: #F8FAFC;
}

[data-theme="light"] .metric-card {
    background: #FFFFFF;
    border-color: #E2E8F0;
}

[data-theme="light"] .metric-value {
    color: #0F172A;
}

[data-theme="light"] .dashboard-placeholder {
    background: #FFFFFF;
    border-color: #CBD5E1;
}

[data-theme="light"] .diot-info h3 {
    color: #0F172A;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(0, 102, 192, 0.14) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(34, 197, 94, 0.12) 0%, transparent 45%);
    background-attachment: fixed;
    line-height: 1.5;
}

/* Contenedor Principal */
.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Encabezado con Logo Marca SinSusto */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.logo-brand-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo-brand-img {
    height: 75px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 102, 192, 0.25));
    background: rgba(255, 255, 255, 0.95);
    padding: 0.35rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-area h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #FFFFFF 0%, #BAE6FD 50%, #22C55E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-area span.tagline {
    color: var(--color-sinsusto-green);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
}

.logo-area span.sub-tagline {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-demo {
    background: rgba(0, 102, 192, 0.15);
    color: #BAE6FD;
    border: 1px solid rgba(0, 102, 192, 0.35);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-demo:hover {
    background: var(--color-sinsusto-blue);
    color: #FFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 192, 0.35);
}

/* Layout Grid */
.layout-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    align-items: start;
}

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

/* Tarjetas Glassmorphism */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #F8FAFC;
}

/* Formularios y Inputs */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-text {
    width: 100%;
    background: rgba(7, 16, 30, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.input-text:focus {
    outline: none;
    border-color: var(--color-sinsusto-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 192, 0.25);
}

/* Drag and Drop Zone */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background: rgba(7, 16, 30, 0.5);
    position: relative;
    overflow: hidden;
}

.file-upload-zone:hover {
    border-color: var(--color-sinsusto-blue);
    background: rgba(0, 102, 192, 0.08);
}

.file-upload-zone.dragover {
    border-color: var(--color-sinsusto-green);
    background: rgba(34, 197, 94, 0.08);
}

.file-upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.file-upload-zone p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-upload-zone .file-name {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #BAE6FD;
    font-weight: 600;
    word-break: break-all;
}

/* Botones Generales */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--color-sinsusto-blue) 0%, var(--color-sinsusto-blue-hover) 100%);
    color: #FFF;
    border: none;
    padding: 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 102, 192, 0.4);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Status Banner */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status-badge.valid {
    background: var(--color-sinsusto-green-bg);
    color: var(--color-sinsusto-green);
}

.status-badge.invalid {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

/* Dashboard de Resultados */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    text-align: center;
    color: var(--text-secondary);
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(13, 32, 64, 0.25);
}

.dashboard-placeholder svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    stroke: var(--text-muted);
}

/* Malla de Tarjetas Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.metric-card {
    background: rgba(13, 32, 64, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: #FFF;
}

/* Modificadores Métricas */
.metric-income { border-left: 4px solid var(--color-sinsusto-green); }
.metric-expense { border-left: 4px solid var(--color-sinsusto-blue); }
.metric-tax { border-left: 4px solid var(--color-warning); }
.metric-balance { border-left: 4px solid var(--color-sinsusto-blue-light); }

/* Contenedor Balance */
.balance-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 102, 192, 0.08);
    border: 1px solid rgba(0, 102, 192, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.balance-info h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.balance-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.balance-large-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: #FFF;
}

.balance-large-value.positive { color: var(--color-sinsusto-green); }
.balance-large-value.negative { color: var(--color-danger); }

/* Tabla de CFDI */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

th, td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background: rgba(7, 16, 30, 0.8);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-income { background: var(--color-sinsusto-green-bg); color: var(--color-sinsusto-green); }
.badge-expense { background: var(--color-sinsusto-blue-bg); color: var(--color-sinsusto-blue-light); }
.badge-nondeductible { background: var(--color-danger-bg); color: var(--color-danger); }

/* Alertas de error / logs */
.alert-error {
    background: var(--color-danger-bg);
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    display: none;
}

/* DIOT Export Panel */
.diot-panel {
    background: radial-gradient(circle at top right, rgba(0, 102, 192, 0.2), rgba(34, 197, 94, 0.08));
    border: 1px solid rgba(0, 102, 192, 0.3);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.diot-info h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: #FFF;
}

.diot-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-diot {
    background: linear-gradient(135deg, var(--color-sinsusto-green) 0%, var(--color-sinsusto-green-dark) 100%);
    color: #FFF;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-diot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.45);
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}

.loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Transiciones de Resultados */
.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* ==========================================================================
   SIDEBAR LAYOUT & MODULE NAVIGATION
   ========================================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background-color: var(--bg-main);
}

.sidebar-nav {
    width: 280px;
    background: rgba(11, 25, 46, 0.95);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

[data-theme="light"] .sidebar-nav {
    background: #FFFFFF;
    border-right-color: #E2E8F0;
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-brand-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.sidebar-brand-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.sidebar-brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-menu-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .nav-item:hover {
    background: #F1F5F9;
}

.nav-item.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--color-sinsusto-blue) 0%, var(--color-sinsusto-blue-hover) 100%);
    box-shadow: 0 4px 15px rgba(0, 102, 192, 0.35);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .nav-item.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, #0066C0 0%, #004C91 100%);
}

.nav-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: currentColor;
    font-weight: 700;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* MAIN CONTENT WITH SIDEBAR OFFSET */
.main-wrapper {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100vw - 280px);
}

.top-navbar {
    height: 70px;
    background: rgba(11, 25, 46, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

[data-theme="light"] .top-navbar {
    background: #FFFFFF;
    border-bottom-color: #E2E8F0;
}

.module-title-head h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.module-title-head p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.module-section {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease forwards;
}

.module-section.active {
    display: block;
}

/* MODAL VER XML */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 850px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.2);
    color: #38BDF8;
}

[data-theme="light"] .modal-body {
    background: #0F172A;
    color: #38BDF8;
}

@media (max-width: 992px) {
    .sidebar-nav {
        width: 80px;
        padding: 1rem 0.5rem;
    }
    .sidebar-brand-title, .sidebar-brand-sub, .nav-label, .nav-badge, .nav-menu-title {
        display: none;
    }
    .main-wrapper {
        margin-left: 80px;
        width: calc(100vw - 80px);
    }
}

/* ==========================================================================
   TARJETAS DE SOLICITUD MASIVA SAT (ALTO CONTRASTE MODOS)
   ========================================================================== */

.sat-request-card {
    background: rgba(13, 27, 46, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: var(--transition-smooth);
}

[data-theme="light"] .sat-request-card {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.sat-request-card .req-id {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--color-sinsusto-blue-light);
    font-weight: 700;
}

[data-theme="light"] .sat-request-card .req-id {
    color: #0369A1;
}

.sat-request-card .req-details {
    font-size: 0.8rem;
    color: var(--text-primary);
}

[data-theme="light"] .sat-request-card .req-details {
    color: #0F172A;
}

.sat-request-card .req-status-msg {
    font-size: 0.75rem;
    color: #10B981;
    font-weight: 600;
}

[data-theme="light"] .sat-request-card .req-status-msg {
    color: #047857;
}

/* ==========================================================================
   BOTONES DE ACCIÓN TABLA CONSULTA BD (ALTO CONTRASTE MODOS)
   ========================================================================== */

.btn-view-xml {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(0, 102, 192, 0.2);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
}

[data-theme="light"] .btn-view-xml {
    background: #0284C7;
    color: #FFFFFF;
    border: 1px solid #0369A1;
}

[data-theme="light"] .btn-view-xml:hover {
    background: #0369A1;
}

.btn-view-pdf {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 6px;
    background: rgba(220, 38, 38, 0.2);
    color: #F87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-left: 0.35rem;
}

[data-theme="light"] .btn-view-pdf {
    background: #DC2626;
    color: #FFFFFF;
    border: 1px solid #B91C1C;
}

[data-theme="light"] .btn-view-pdf:hover {
    background: #B91C1C;
}

/* ==========================================================================
   ESTILOS LOGIN SCREEN TIPO TARJETA DIVIDIDA (RESPETANDO COLORES INSTITUCIONALES)
   ========================================================================== */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #0B192E;
    font-family: var(--font-body);
    padding: 0;
    overflow: hidden;
}

[data-theme="dark"] #login-screen {
    background: #060A12;
}

/* Tarjeta Contenedora Principal a Pantalla Completa */
.login-card-box {
    width: 100vw;
    height: 100vh;
    max-width: none;
    min-height: 100vh;
    display: flex;
    border-radius: 0;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: none;
    transition: var(--transition-smooth);
}

[data-theme="dark"] .login-card-box {
    background: #0F172A;
    box-shadow: none;
    border: none;
}

/* Panel Derecho: Formulario Login */
.login-form-panel {
    flex: 1;
    min-width: 320px;
    padding: 3rem clamp(1.5rem, 4vw, 4.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #FFFFFF;
    position: relative;
    z-index: 2;
    overflow-y: auto;
}

.login-form-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

[data-theme="dark"] .login-form-panel {
    background: #0F172A;
    color: #F8FAFC;
}

/* Brand Header del Formulario */
.login-brand-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.2rem;
}

.login-brand-img {
    height: 76px;
    width: auto;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    filter: drop-shadow(0 4px 10px rgba(11, 25, 46, 0.12));
    transition: transform 0.25s ease;
}

.login-brand-img:hover {
    transform: scale(1.03);
}

.login-brand-text {
    display: flex;
    flex-direction: column;
}

.login-brand-title {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--color-sinsusto-navy);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

[data-theme="dark"] .login-brand-title {
    color: #FFFFFF;
}

.login-brand-sub {
    font-size: 0.85rem;
    color: var(--color-sinsusto-blue);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.login-form-header {
    margin-bottom: 1.8rem;
    text-align: left;
}

.login-form-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 2.5vw, 2.3rem);
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

[data-theme="dark"] .login-form-title {
    color: #F8FAFC;
}

.login-form-subtitle {
    font-size: 0.88rem;
    color: #64748B;
    line-height: 1.5;
}

.btn-login-submit {
    width: 100%;
    padding: 0.95rem;
    background: linear-gradient(135deg, #0B192E 0%, #0066C0 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 102, 192, 0.3);
    letter-spacing: 0.04em;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #07101E 0%, #00529C 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 102, 192, 0.45);
}

.login-form-footer-note {
    font-size: 0.76rem;
    color: #94A3B8;
    text-align: center;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* Panel Izquierdo: Hero Institucional Estilo SalesSkip */
.login-hero-panel {
    flex: 1.2;
    background: linear-gradient(135deg, #091526 0%, #0B192E 40%, #00529C 85%, #0066C0 100%);
    padding: 4rem clamp(2.5rem, 5vw, 5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
}

.login-hero-top-badge {
    z-index: 2;
    display: flex;
    align-items: center;
}

.login-hero-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.98);
    padding: 0.45rem 0.85rem;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.3s ease;
}

.login-hero-logo:hover {
    transform: scale(1.05);
}

.login-hero-bg-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.15) 0%, transparent 45%);
    pointer-events: none;
}

.login-hero-bg-lines::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 60px,
        rgba(255, 255, 255, 0.02) 60px,
        rgba(255, 255, 255, 0.02) 120px
    );
    transform: rotate(-15deg);
    pointer-events: none;
}

.login-hero-badge-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #FFFFFF;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.login-hero-center-content {
    z-index: 2;
    margin: 2rem 0;
}

.login-hero-main-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.8vw, 3.6rem);
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.login-hero-main-title span {
    background: linear-gradient(135deg, #38BDF8 0%, #22C55E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-hero-main-desc {
    font-size: clamp(0.92rem, 1.2vw, 1.08rem);
    color: rgba(241, 245, 249, 0.85);
    line-height: 1.65;
    max-width: 480px;
    font-weight: 400;
}

.login-hero-features {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.75rem 1.1rem;
    border-radius: 12px;
    backdrop-filter: blur(12px);
    font-size: 0.92rem;
    color: #F8FAFC;
    font-weight: 500;
    transition: all 0.25s ease;
}

.hero-feature-item:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateX(4px);
}

.hero-feature-icon {
    font-size: 1.25rem;
}

.login-hero-bottom-footer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    z-index: 2;
    letter-spacing: 0.01em;
}

/* Responsividad para Pantallas Medianas, Laptops y Móviles */
@media (max-width: 1024px) {
    .login-hero-panel {
        padding: 3rem 2rem;
    }
}

@media (max-width: 860px) {
    #login-screen {
        overflow-y: auto;
    }
    .login-card-box {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .login-hero-panel {
        display: none;
    }
    .login-form-panel {
        padding: 2.5rem 1.5rem;
        min-height: 100vh;
    }
}

/* Custom System Dialog & Confirm Modal */
.custom-dialog-card {
    transform: scale(0.92);
    animation: popCustomModal 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes popCustomModal {
    to {
        transform: scale(1);
    }
}




