:root {
    /* Color Palette - Energía Escolar (light theme, naranja + turquesa + amarillo) */
    --bg-main: #FFFBF5;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #FFF3E0;

    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;

    --accent-blue: #F97316;
    --accent-blue-glow: rgba(249, 115, 22, 0.35);
    --accent-green: #06B6D4;
    --accent-green-glow: rgba(6, 182, 212, 0.3);
    --accent-yellow: #FACC15;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;

    --border-color: rgba(15, 23, 42, 0.08);

    --font-family: 'Inter', system-ui, sans-serif;

    --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
    --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.08), 0 2px 4px -1px rgba(15,23,42,0.05);
    --shadow-lg: 0 10px 25px -5px rgba(15,23,42,0.12), 0 8px 10px -6px rgba(15,23,42,0.08);
    --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: radial-gradient(circle at top right, rgba(249, 115, 22, 0.06), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.06), transparent 40%);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    z-index: 10;
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.logo i {
    color: var(--accent-blue);
    font-size: 28px;
    filter: drop-shadow(0 0 8px var(--accent-blue-glow));
}

.menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.menu-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
    transition: var(--transition);
}

.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(15, 23, 42, 0.04);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0) 100%);
    color: var(--text-primary);
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--accent-blue);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

.menu-item.active i {
    color: var(--accent-blue);
    transform: scale(1.1);
}

.sidebar-footer {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    scroll-behavior: smooth;
}

.main-content::-webkit-scrollbar {
    width: 6px;
}
.main-content::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: var(--bg-surface-hover);
    border-radius: var(--radius-full);
}

/* Views Handling */
.view-section {
    display: none;
}
.view-section.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.header-title h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #C2410C 0%, #F97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 18px;
    color: var(--text-secondary);
}

.search-bar input {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    padding: 12px 20px 12px 48px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    width: 300px;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
    width: 340px;
    background-color: rgba(255, 255, 255, 0.9);
}

.icon-btn {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.icon-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.notification {
    position: relative;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--accent-red);
    color: white;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--bg-main);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.profile {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: var(--transition);
}

.profile:hover {
    background-color: rgba(15, 23, 42, 0.03);
    border-color: var(--border-color);
}

.profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-info .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-info .role {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Cards General */
.card {
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* KPI Cards */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 24px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.kpi-card:nth-child(1) { animation-delay: 0.1s; }
.kpi-card:nth-child(2) { animation-delay: 0.2s; }
.kpi-card:nth-child(3) { animation-delay: 0.3s; }
.kpi-card:nth-child(4) { animation-delay: 0.4s; }

.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    position: relative;
}

.kpi-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    filter: blur(15px);
    z-index: -1;
    opacity: 0.6;
}

.kpi-icon.blue { background-color: rgba(249, 115, 22, 0.15); color: var(--accent-blue); }
.kpi-icon.blue::after { background-color: var(--accent-blue); }

.kpi-icon.green { background-color: rgba(6, 182, 212, 0.15); color: var(--accent-green); }
.kpi-icon.green::after { background-color: var(--accent-green); }

.kpi-icon.yellow { background-color: rgba(250, 204, 21, 0.18); color: var(--accent-yellow); }
.kpi-icon.yellow::after { background-color: var(--accent-yellow); }

.kpi-icon.red { background-color: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.kpi-icon.red::after { background-color: var(--accent-red); }

.kpi-info {
    flex: 1;
}

.kpi-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.kpi-info .value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.trend {
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background-color: rgba(15, 23, 42, 0.04);
}

.trend.up { color: var(--accent-green); background-color: rgba(6, 182, 212, 0.1); }
.trend.down { color: var(--accent-green); background-color: rgba(6, 182, 212, 0.1); }
.trend.neutral { color: var(--text-muted); }
.trend.alert { color: var(--accent-red); background-color: rgba(239, 68, 68, 0.1); }

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 2.2fr;
    gap: 24px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out backwards;
    animation-delay: 0.5s;
}

.charts-section-solo {
    grid-template-columns: 1fr;
}

.charts-section-solo .chart-container {
    max-width: 640px;
    margin: 0 auto;
    width: 100%;
}

.charts-section-with-panel {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
}

.resumen-panel {
    padding: 22px;
}

.resumen-panel .card-header {
    margin-bottom: 14px;
}

.resumen-panel-subheader {
    margin-top: 14px;
}

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

.resumen-panel-item {
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.5);
}

.resumen-panel-item-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.resumen-panel-item-main strong {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.resumen-panel-item-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.resumen-panel-empty {
    list-style: none;
    font-size: 13px;
    color: var(--text-muted);
    padding: 10px 2px;
}

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

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.tabs {
    display: flex;
    background-color: rgba(15, 23, 42, 0.05);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.canvas-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

/* Bottom Section */
.bottom-section {
    animation: fadeInUp 0.6s ease-out backwards;
    animation-delay: 0.6s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #C2410C 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--accent-blue-glow);
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-blue-glow);
    filter: brightness(1.1);
}

/* Info Grid (Caracterizacion) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.info-item span {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Talleres Pedagógicos - Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.video-card {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

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

.video-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background-color: #0f172a;
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-thumb-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-thumb-play {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background-color: rgba(15, 23, 42, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
}

.video-thumb-link:hover .video-thumb-play {
    background-color: var(--accent-blue);
    transform: scale(1.08);
}

.video-card-body {
    padding: 16px 18px;
}

.video-card-body h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.video-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.video-card-meta span {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--accent-blue);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.video-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.video-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    margin-bottom: 12px;
}

.video-card-link:hover {
    text-decoration: underline;
}

.video-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

.video-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.video-empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
    display: block;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

th {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

td strong {
    color: var(--text-primary);
    font-weight: 600;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: rgba(15, 23, 42, 0.03);
    transform: scale(1.005);
}

tbody tr:last-child td {
    border-bottom: none;
}

.progress-bar {
    width: 120px;
    height: 6px;
    background-color: rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 4px;
    display: inline-block;
    vertical-align: middle;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), #FDBA74);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--accent-blue-glow);
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 12px;
    font-weight: 500;
}

.status {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-block;
}

.status.on-time {
    background-color: rgba(6, 182, 212, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.status.delayed {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status.maintenance {
    background-color: rgba(250, 204, 21, 0.18);
    color: #A16207;
    border: 1px solid rgba(250, 204, 21, 0.4);
}

.status.critical {
    background-color: #DC2626;
    color: #FFFFFF;
    border: 1px solid #B91C1C;
}

/* Convenciones / Guía de Interpretación de la Matriz de Riesgos */
.legend-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.legend-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.legend-section-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 18px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

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

.legend-card {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.legend-card h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.legend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-item .status {
    flex-shrink: 0;
    white-space: nowrap;
}

.legend-item-text strong {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.legend-item-text span {
    display: block;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 32px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(15,23,42,0.15);
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="date"], select, textarea {
    width: 100%;
    background-color: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 14px;
    transition: var(--transition);
}

input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="date"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.18);
}

textarea {
    resize: vertical;
    line-height: 1.6;
    min-height: 60px;
}

option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn-secondary:hover {
    background-color: rgba(15, 23, 42, 0.04);
}

.action-cell {
    text-align: center;
    width: 80px;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.btn-icon-danger {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-danger:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.btn-icon-primary {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-primary:hover {
    background-color: rgba(249, 115, 22, 0.15);
    color: var(--accent-blue);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

/* Auth Layout */
.auth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 40%),
                radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.12), transparent 40%),
                var(--bg-main);
    z-index: 1000;
}

.auth-wrapper.active {
    display: flex;
    animation: fadeIn 0.5s ease-out;
}

.auth-card {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(15,23,42,0.12);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: 8px;
    font-size: 28px;
    padding: 0;
}

.auth-header #auth-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-form {
    display: none;
    animation: fadeInUp 0.4s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.text-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.text-link:hover {
    color: #FB923C;
    text-decoration: underline;
}

.w-100 {
    width: 100%;
    justify-content: center;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }
    
    .dashboard-container.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    .kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-bar input {
        width: 200px;
    }
    
    .kpi-cards {
        grid-template-columns: 1fr;
    }
}
