:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --accent-color: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.5);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-icon {
    font-size: 2.5rem;
    color: var(--primary-hover);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.module-card:hover .module-icon {
    transform: scale(1.1);
}

.module-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.module-desc {
    font-size: 0.875rem;
    color: #94a3b8;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

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

.module-card {
    animation: fadeIn 0.5s ease backwards;
}

.dashboard-grid .module-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-grid .module-card:nth-child(2) { animation-delay: 0.15s; }
.dashboard-grid .module-card:nth-child(3) { animation-delay: 0.2s; }
.dashboard-grid .module-card:nth-child(4) { animation-delay: 0.25s; }
.dashboard-grid .module-card:nth-child(5) { animation-delay: 0.3s; }
.dashboard-grid .module-card:nth-child(6) { animation-delay: 0.35s; }
.dashboard-grid .module-card:nth-child(7) { animation-delay: 0.4s; }
.dashboard-grid .module-card:nth-child(8) { animation-delay: 0.45s; }
.dashboard-grid .module-card:nth-child(9) { animation-delay: 0.5s; }
.dashboard-grid .module-card:nth-child(10) { animation-delay: 0.55s; }

/* Custom Scrollbar for Modals & Scrollable Elements */
.modal-content::-webkit-scrollbar,
.modal-overlay::-webkit-scrollbar,
.searchable-dropdown-list::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.modal-content::-webkit-scrollbar-track,
.modal-overlay::-webkit-scrollbar-track,
.searchable-dropdown-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb,
.modal-overlay::-webkit-scrollbar-thumb,
.searchable-dropdown-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.modal-overlay::-webkit-scrollbar-thumb:hover,
.searchable-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.modal-content,
.modal-overlay,
.searchable-dropdown-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 rgba(0, 0, 0, 0.03);
}

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: background 0.3s ease;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* Page Entry Fade-In Transition (Excludes sidebar for zero flickering) */
.main-wrapper, .content, .card, .card-box {
    animation: pageFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) ease-out;
}
.sidebar {
    animation: none !important;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Top Progress Loading Bar */
#top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
    z-index: 99999;
    width: 0%;
    transition: width 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
}

/* Global Loading Spinner Overlay - Covers ONLY Content/Main-Wrapper (Not Sidebar) */
#global-loading-overlay {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
@media (max-width: 768px) {
    #global-loading-overlay {
        left: 0;
    }
}
#global-loading-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.app-spinner {
    width: 42px;
    height: 42px;
    border: 3.5px solid rgba(59, 130, 246, 0.15);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: appSpin 0.75s infinite linear;
}
@keyframes appSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-txt {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.3px;
}
