@import url('https://fonts.googleapis.com/css2?family=Sora:wght@100;200;300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #f5a800;
    --primary-dark: #c98a00;
    --primary-light: #ffc233;
    --secondary-color: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #f5a800;
    --info: #17a2b8;
    --white: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
   font-family: 'Sora', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-menu a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.navbar-menu .btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.navbar-menu .btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5rem 2rem;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Button Styles */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #e9ecef;
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--secondary-color);
}

.auth-box {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 250px;
    height: auto;
}

.auth-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-control.error {
    border-color: var(--danger);
}

.form-text {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-header img {
    max-width: 180px;
    height: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.sidebar-menu a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.sidebar-menu svg {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--primary-color);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-info .stat-value {
    font-size: 1.75rem;
    color: var(--text-dark);
    font-weight: 700;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-icon.blue { background-color: var(--primary-color); }
.stat-icon.green { background-color: var(--success); }
.stat-icon.red { background-color: var(--danger); }
.stat-icon.orange { background-color: var(--warning); }

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.card-body {
    padding: 1.5rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--secondary-color);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background-color: var(--secondary-color);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 20px;
    color: var(--white);
}

.badge-success { background-color: var(--success); }
.badge-danger { background-color: var(--danger); }
.badge-warning { background-color: var(--warning); color: var(--text-dark); }
.badge-info { background-color: var(--info); }
.badge-primary { background-color: var(--primary-color); }

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 1.5rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 0;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu li {
        width: 100%;
    }
    
    .navbar-menu a {
        display: block;
        width: 100%;
        padding: 1rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
   /* .mobile-sidebar-toggle {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: var(--primary-color);
        color: var(--white);
        border: none;
        box-shadow: 0 4px 12px rgba(0, 61, 122, 0.4);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        z-index: 1998;
        transition: all 0.3s ease;
    }
    
    .mobile-sidebar-toggle:hover {
        background-color: var(--primary-dark);
        transform: scale(1.1);
    } */
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .auth-box {
        padding: 2rem;
    }
}

/* ── New preloader (id-based) ── */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #001a3d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 28px;
    transition: opacity .5s ease, visibility .5s ease;
}
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#preloader .pre-logo-wrap {
    animation: preLogoPop .6s cubic-bezier(.34,1.56,.64,1) forwards;
    opacity: 0;
}
@keyframes preLogoPop {
    from { opacity: 0; transform: scale(.7); }
    to   { opacity: 1; transform: scale(1); }
}
#preloader .pre-logo-wrap img {
    width: 160px;
    height: auto;
    filter: brightness(0) invert(1);
}
#preloader .pre-bar-track {
    width: 180px;
    height: 3px;
    background: rgba(255,255,255,.12);
    border-radius: 99px;
    overflow: hidden;
}
#preloader .pre-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1a5fa8, #4a9eff);
    border-radius: 99px;
    animation: preBarFill 1.4s cubic-bezier(.4,0,.2,1) .3s forwards;
}
@keyframes preBarFill { to { width: 100%; } }