:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --danger-color: #f43f5e;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar h2 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 35px;
    background: linear-gradient(135deg, #a5b4fc 0%, var(--success-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 6px;
}

.sidebar nav ul li a {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-weight: 400;
    font-size: 0.95rem;
}

.sidebar nav ul li a i {
    width: 20px;
    text-align: center;
}

.sidebar nav ul li a:hover, .sidebar nav ul li a.active {
    background-color: rgba(79, 70, 229, 0.15);
    color: #e0e7ff;
    font-weight: 500;
}

.sidebar nav ul li a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Sidebar Submenu */
.sidebar nav ul li .submenu {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-left: 1.5px dashed rgba(255,255,255,0.15);
    margin-left: 25px;
}

.sidebar nav ul li .submenu li {
    margin-bottom: 2px;
}

.sidebar nav ul li .submenu li a {
    padding: 8px 16px;
    font-size: 0.88rem;
    color: #64748b;
    background: none !important;
    box-shadow: none !important;
}

.sidebar nav ul li .submenu li a:hover, .sidebar nav ul li .submenu li a.active {
    color: #f1f5f9;
}

/* Login Page Specific */
.login-body {
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.05) 90.2%), #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    margin: 0;
}

.login-card {
    background: rgba(30, 41, 59, 0.7);
    padding: 45px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    color: white;
}

.login-card h2 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    background: linear-gradient(to right, #ffffff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-card p {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 35px;
    font-size: 0.95rem;
}

.login-card input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.login-card input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

.login-card label {
    color: #cbd5e1;
    font-weight: 500;
}

/* Main Content Adjustments */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    padding: 40px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.user-info {
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
}

.card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Grid for Dashboard */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-left-width: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-color);
}

.stat-card small {
    margin-top: 4px;
    color: var(--text-muted);
}

/* Table Design */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

table th, table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table tr {
    transition: background-color 0.15s ease;
}

table tbody tr:hover {
    background-color: #f8fafc;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    color: #475569;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: white;
    transition: all 0.2s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary { 
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); 
    color: white;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

.btn-danger { 
    background: linear-gradient(135deg, var(--danger-color) 0%, #e11d48 100%); 
    color: white;
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.2);
}
.btn-danger:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(244, 63, 94, 0.3);
}

.btn-success { 
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%); 
    color: white;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 6px;
}

.pagination a {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    background-color: white;
}

.pagination a:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination a.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

/* Modal Popup */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 18px;
}

.modal-header h3 {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--danger-color);
}

/* Action Buttons & Toolbar */
.page-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-add {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    filter: brightness(1.1);
}

.btn-export {
    background: white;
    color: var(--success-color);
    border: 2px solid var(--success-color);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.92rem;
}

.btn-export:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* Sidebar Toggle Button */
.mobile-toggle {
    display: none;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-right: 15px;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

.header-left {
    display: flex;
    align-items: center;
}

/* Responsive Grid and Panels */
@media (max-width: 1024px) {
    .sidebar {
        left: -100%;
        width: var(--sidebar-width);
    }
    .sidebar.active {
        left: 0;
        box-shadow: var(--shadow-lg);
    }
    .mobile-toggle {
        display: block;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 24px;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.5);
        z-index: 99;
        backdrop-filter: blur(2px);
    }
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.1rem;
    }
    .btn {
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }
}

.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
@media (max-width: 768px) {
    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .header h1 {
        font-size: 1.4rem;
    }
    .user-info {
        display: none;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .card {
        padding: 20px;
    }
    table th, table td {
        padding: 12px 14px;
        font-size: 0.88rem;
    }
    .btn {
        width: 100%;
    }
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-add, .btn-export {
        width: 100%;
        justify-content: center;
    }
}

