:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --sidebar-bg: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body {
    margin: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* PREMIUM LOADING TRANSITION */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR PREMIUM v23 */
.sidebar {
    width: 280px;
    background: #0f172a;
    /* Deep Space Blue */
    min-height: 100vh;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 0 12px;
}

.sidebar-logo-icon {
    background: linear-gradient(135deg, #6366f1, #10b981);
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-text .main {
    font-weight: 900;
    color: white;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.sidebar-brand-text .sub {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(148, 163, 184, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 24px 12px 12px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.nav-item {
    padding: 12px 16px;
    border-radius: 14px;
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
}

.nav-icon {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
}

.sidebar-user-card {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    text-align: center;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.3s;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* HEADER PREMIUM */
.header {
    height: 80px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    padding: 2.5rem;
    position: relative;
    max-width: 100%;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 20px;
}

/* MOBILE RESPONSIVE */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    font-size: 1.5rem;
    font-weight: 900;
}

@media (max-width: 1200px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        height: 100vh;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 80px rgba(0, 0, 0, 0.5);
    }

    .mobile-toggle {
        display: flex;
    }

    .main-content {
        padding: 100px 20px 40px 20px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* FORMS & INPUTS - IMPROVED PC & MOBILE */
.section-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-weight: 600;
    transition: 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.3);
}

.btn-white {
    background: white;
    color: var(--text-main);
    border: 1.5px solid var(--border);
}

.btn-white:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* TABLES PC FIX */
.card-premium {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

/* TABLE PREMIUM OVERRIDES */
table.dataTable {
    border: none !important;
    width: 100% !important;
}

table.dataTable thead th {
    background: #f8fafc !important;
    color: #64748b !important;
    font-weight: 700 !important;
    padding: 18px 20px !important;
    border-bottom: 2px solid #f1f5f9 !important;
}

table.dataTable tbody tr {
    transition: all 0.3s ease !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

table.dataTable tbody tr:hover {
    background-color: #f1f5f9 !important;
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 10;
    position: relative;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: white !important;
    margin: 0 4px !important;
    padding: 8px 16px !important;
    font-weight: 700 !important;
    transition: 0.3s !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_info {
    font-weight: 700 !important;
    color: #64748b !important;
    margin-top: 20px !important;
}

/* FILTER BAR PREMIUM */
.filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: white;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* SCROLLBAR CUSTOM */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* GRID FIXES */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

table.dataTable {
    border-spacing: 0 12px !important;
    border-collapse: separate !important;
}

table.dataTable thead th {
    padding: 15px 20px !important;
    font-weight: 800 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    border: none !important;
}

table.dataTable tbody tr {
    background: #f8fafc !important;
    transition: 0.2s;
    border-radius: 15px;
    overflow: hidden;
}

table.dataTable tbody tr:hover {
    transform: scale(1.002);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

table.dataTable tbody td {
    padding: 20px !important;
    border: none !important;
    vertical-align: middle !important;
}

table.dataTable tbody td:first-child {
    border-radius: 15px 0 0 15px;
}

table.dataTable tbody td:last-child {
    border-radius: 0 15px 15px 0;
}

/* PREMIUM MODAL (GOOGLE STYLE) */
.modal-overlay-premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content-premium {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    opacity: 0;
    transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay-premium.active {
    display: flex;
}

.modal-overlay-premium.active .modal-content-premium {
    transform: translateY(0);
    opacity: 1;
}

.modal-header-premium {
    text-align: center;
    margin-bottom: 20px;
}

.modal-title-premium {
    font-size: 1.4rem;
    font-weight: 900;
    color: #0f172a;
}

.modal-body-premium {
    color: #64748b;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 500;
}

.modal-footer-premium {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-premium-action {
    border-radius: 14px;
    padding: 12px 24px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-premium-danger {
    background: #ef4444;
    color: white;
}

.btn-premium-danger:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-premium-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-premium-secondary:hover {
    background: #e2e8f0;
}

.btn-delete-mini {
    width: 38px;
    height: 38px;
    background: #fff1f2;
    color: #ef4444;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid #fecdd3;
    transition: 0.2s;
    cursor: pointer;
}

.btn-delete-mini:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; } .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; } .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
