@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --asesco-orange: #f05423;
    --asesco-orange-hover: #dc481b;
    --asesco-orange-light: rgba(240, 84, 35, 0.12);
    --asesco-orange-glow: rgba(240, 84, 35, 0.25);
    
    --asesco-magenta: #dc266a;
    --asesco-magenta-dark: #be123c;
    
    --asesco-gradient: linear-gradient(125deg, #f05423 0%, #ea580c 25%, #e11d48 65%, #c01358 100%);
    --asesco-gradient-btn: linear-gradient(135deg, #e8452e 0%, #db2777 100%);
    --asesco-gradient-btn-hover: linear-gradient(135deg, #d83b25 0%, #be185d 100%);
    
    --sidebar-bg: #111722;
    --sidebar-card: #182030;
    --sidebar-active-bg: #222538;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.05);
    --sidebar-text: #8c9bb0;
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.07);
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #f05423;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-page-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--asesco-gradient);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-page-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    top: -150px;
    left: -150px;
    pointer-events: none;
}

.login-page-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: -100px;
    right: -100px;
    pointer-events: none;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 15px rgba(0, 0, 0, 0.05);
    padding: 42px 38px;
    position: relative;
    z-index: 10;
    transition: transform 0.2s ease;
}

.login-brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.15s ease;
}

.input-icon-right {
    position: absolute;
    right: 14px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.input-icon-right:hover {
    color: var(--asesco-orange);
    background-color: rgba(240, 84, 35, 0.08);
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 10px 16px 10px 44px;
    font-size: 0.925rem;
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control.has-right-icon {
    padding-right: 46px;
}

.form-control:focus {
    border-color: var(--asesco-orange);
    box-shadow: 0 0 0 4px var(--asesco-orange-glow);
}

.form-control:focus + .input-icon-left,
.input-icon-wrapper:focus-within .input-icon-left {
    color: var(--asesco-orange);
}

.form-control.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.invalid-feedback {
    color: #dc2626;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.remember-me-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.remember-me-label input[type="checkbox"] {
    accent-color: var(--asesco-orange);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-primary-gradient {
    width: 100%;
    height: 48px;
    background: var(--asesco-gradient-btn);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(232, 69, 46, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary-gradient:hover {
    background: var(--asesco-gradient-btn-hover);
    box-shadow: 0 6px 16px rgba(219, 39, 119, 0.45);
    transform: translateY(-1px);
}

.btn-primary-gradient:active {
    transform: translateY(0);
}

.login-footer-copy {
    text-align: center;
    margin-top: 26px;
    font-size: 0.775rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ==========================================================================
   APP SHELL / LAYOUT WITH SIDEBAR
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.app-sidebar {
    width: 260px;
    min-width: 260px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    border-right: 1px solid var(--sidebar-border);
    transition: width 0.3s ease, transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: transparent;
    padding: 0;
    border: none;
    flex-shrink: 0;
}

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

.sidebar-brand-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.sidebar-brand-subtitle {
    color: var(--sidebar-text);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.925rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    position: relative;
}

.nav-item:hover {
    background-color: var(--sidebar-hover-bg);
    color: #ffffff;
}

.nav-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    font-weight: 700;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 4px;
    background: var(--asesco-orange);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-chevron {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.sidebar-footer {
    padding: 16px 18px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: transparent;
    border: none;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.user-email {
    color: var(--sidebar-text);
    font-size: 0.725rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-logout:hover {
    color: #f87171;
    background-color: rgba(239, 68, 68, 0.12);
}

/* Main Content Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.top-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    height: 68px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-admin {
    background: linear-gradient(135deg, rgba(240, 84, 35, 0.12) 0%, rgba(220, 38, 106, 0.12) 100%);
    color: var(--asesco-orange);
    border: 1px solid rgba(240, 84, 35, 0.25);
}

.role-badge.role-user {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.main-content {
    flex: 1;
    padding: 32px;
}

/* ==========================================================================
   CARDS & KPI WIDGETS
   ========================================================================== */
.welcome-hero-card {
    background: var(--asesco-gradient);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: #ffffff;
    box-shadow: var(--shadow-lg);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.welcome-hero-card::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.welcome-hero-content h2 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.welcome-hero-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    max-width: 600px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-info .stat-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-info .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.stat-icon-orange {
    background: linear-gradient(135deg, #f05423, #ea580c);
}

.stat-icon-magenta {
    background: linear-gradient(135deg, #e11d48, #be123c);
}

.stat-icon-blue {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}

.stat-icon-emerald {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ==========================================================================
   COMPACT EXECUTIVE DASHBOARD (NO SCROLL, HIGH IMPACT)
   ========================================================================== */
.text-gradient {
    background: var(--asesco-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dash-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.dash-welcome-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.dash-welcome-sub {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-link-pill {
    background: #ffffff;
    border: 1.5px dashed rgba(240, 84, 35, 0.4);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.dash-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--asesco-orange-light);
    color: var(--asesco-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-link-info {
    display: flex;
    flex-direction: column;
}

.dash-link-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.dash-link-url {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--asesco-orange);
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.dash-kpi-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-left {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    margin: 4px 0 2px;
}

.kpi-sub {
    font-size: 0.74rem;
    color: var(--text-light);
}

.kpi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    width: fit-content;
}

.kpi-badge-up {
    background: #ecfdf5;
    color: #059669;
}

.kpi-badge-neutral {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.kpi-formats-breakdown {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 8px;
}

.format-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}

.format-img {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #ffedd5;
}

.format-pdf {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.kpi-progress-track {
    width: 100%;
    height: 6px;
    background: #fef2f2;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
}

.kpi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f05423, #ea580c);
    border-radius: 10px;
}

.dash-main-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 18px;
    align-items: stretch;
}

.dash-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dash-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-container-box {
    position: relative;
    width: 100%;
    height: 220px;
}

.chart-mini-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

.chart-mini-item {
    text-align: center;
}

.chart-mini-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
}

.chart-mini-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 2px;
}

.dash-feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    max-height: 275px;
    padding-right: 4px;
}

.dash-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    transition: all 0.15s ease;
}

.dash-feed-item:hover {
    background: #ffffff;
    border-color: rgba(240, 84, 35, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.dash-feed-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-feed-thumb {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.dash-feed-pdf {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #fee2e2;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.dash-feed-cedula {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.dash-feed-meta {
    font-size: 0.725rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

@media (max-width: 1100px) {
    .dash-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-main-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   TABLES & CRUD
   ========================================================================== */
.card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

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

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

.table-custom th {
    background-color: #f8fafc;
    padding: 14px 20px;
    font-size: 0.775rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-color);
}

.table-custom td {
    padding: 16px 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-custom tr:last-child td {
    border-bottom: none;
}

.table-custom tr:hover td {
    background-color: #f8fafc;
}

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

.user-table-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: transparent;
    border: none;
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-action:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.btn-action.btn-edit:hover {
    color: var(--asesco-orange);
    border-color: var(--asesco-orange);
    background-color: var(--asesco-orange-light);
}

.btn-action.btn-delete:hover {
    color: #ef4444;
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--asesco-gradient-btn);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(232, 69, 46, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--asesco-gradient-btn-hover);
    box-shadow: 0 6px 14px rgba(219, 39, 119, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #ffffff;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
    border-color: #cbd5e1;
}

/* Alerts & Notifications */
.alert-toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    animation: fadeInSlide 0.3s ease;
}

.alert-toast.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-toast.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Upload Preview Component */
.avatar-upload-container {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: var(--radius-md);
    border: 1.5px dashed var(--border-color);
    transition: border-color 0.2s ease;
}

.avatar-upload-container:hover {
    border-color: var(--asesco-orange);
}

.avatar-preview-box {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Search bar */
.search-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input-group {
    position: relative;
    width: 260px;
}

.search-input-group input {
    padding-left: 38px;
    height: 40px;
    font-size: 0.875rem;
}

.search-input-group .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.filter-select {
    height: 40px;
    padding: 0 14px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--asesco-orange);
}

/* Responsive */
@media (max-width: 900px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        transition: left 0.3s ease;
    }
    .app-sidebar.show {
        left: 0;
    }
    .top-navbar {
        padding: 0 16px;
    }
    .main-content {
        padding: 20px 16px;
    }
}

/* ==========================================================================
   MODAL SYSTEM & PREVIEW VIEWER
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

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

.modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-overlay.active .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-dialog-lg {
    max-width: 860px;
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    gap: 14px;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1.5px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Visor de comprobante */
.preview-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 18px;
}

.preview-info-item {
    display: flex;
    flex-direction: column;
}

.preview-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.preview-info-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.preview-media-wrapper {
    background: #0b1120;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    max-height: 60vh;
    border: 1px solid var(--border-color);
    position: relative;
}

.preview-media-img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.preview-media-iframe {
    width: 100%;
    height: 60vh;
    border: none;
    background: #ffffff;
}

/* SweetAlert2 ASESCO Styling */
div:where(.swal2-container) {
    z-index: 100000 !important;
}

div:where(.swal2-popup).asesco-swal-popup {
    border-radius: var(--radius-xl) !important;
    padding: 24px 28px !important;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
    border: 1.5px solid var(--border-color) !important;
}

.asesco-swal-title {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
}

.asesco-swal-confirm {
    background: var(--asesco-gradient-btn) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 22px !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 12px rgba(220, 38, 106, 0.3) !important;
    transition: transform 0.15s ease !important;
}

.asesco-swal-confirm:hover {
    transform: translateY(-1px) !important;
}

.asesco-swal-cancel {
    background: #f1f5f9 !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    border-radius: var(--radius-md) !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    border: 1px solid var(--border-color) !important;
}

.asesco-swal-cancel:hover {
    background: #e2e8f0 !important;
    color: var(--text-primary) !important;
}
