@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Modern Lavender Theme */
    --bg-main: #f8fafc;           /* Off-white */
    --bg-card: #ffffff;
    --bg-dark: #f1f5f9;           /* Light gray for backgrounds */
    --bg-sidebar: #1a1625;        /* Deep Purple Dark */
    --primary: #7c3aed;           /* Purple 600 */
    --primary-light: #a78bfa;
    --primary-glow: rgba(124, 58, 237, 0.2);
    --secondary: #6366f1;         /* Indigo */
    --accent: #d946ef;            /* Fuchsia */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #0f172a;         /* Slate 900 */
    --text-muted: #64748b;        /* Slate 500 */
    --border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.required-mark {
    color: var(--danger);
    margin-left: 2px;
}

html {
    font-size: 13.5px;
}

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

body {
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.logo-section {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.logo-text {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.5px;
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    flex: 1;
    padding: 0.75rem;
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link:hover, .nav-link.active {
    background: rgba(2, 132, 199, 0.08);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    font-weight: 600;
    color: #ffffff;
}

/* Sidebar Dropdown */
.nav-dropdown .nav-submenu {
    display: none;
    list-style: none;
    padding-left: 2rem;
    margin-top: 0.25rem;
}

.nav-dropdown.active .nav-submenu {
    display: block;
}

.nav-dropdown.active .dropdown-toggle i:last-child {
    transform: rotate(180deg);
}

.dropdown-toggle {
    cursor: pointer;
}

.nav-submenu .nav-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    max-width: 100%;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.page-title p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

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

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-1px);
}

/* Data Grids */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.data-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.data-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.data-card-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.data-card-item i {
    width: 16px;
    color: var(--text-muted);
}

.data-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background-color: var(--bg-main);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    color: var(--text-main);
    background: var(--glass-bg);
    text-decoration: none;
}

.btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(26, 22, 37, 0.8);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.25rem;
    flex: 1;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Notifications */
.notifications-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

.notification.success { border-left: 4px solid var(--success); }
.notification.error { border-left: 4px solid var(--danger); }
.notification.info { border-left: 4px solid var(--accent); }
.notification.warning { border-left: 4px solid var(--warning); }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    z-index: 200;
}

/* Responsive Queries */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .menu-toggle {
        display: flex;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        z-index: 90;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .page-title h1 {
        font-size: 1.5rem;
    }

    .user-profile {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh;
    }

    .modal-overlay {
        padding: 0;
    }

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

    /* General responsive grid utility for future screens */
    .grid-2, .grid-3, div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard specific grid */
    div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .logo-section {
        padding: 1.5rem 1rem;
    }
}

