/* =====================================================
   ATRISH PUBLIC SCHOOL - ERP SYSTEM
   Premium Design System
   ===================================================== */

:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1554;
    --accent: #f57c00;
    --accent-light: #ff9800;
    --accent-dark: #e65100;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f9a825;
    --info: #0277bd;
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #0d1554 0%, #1a237e 50%, #283593 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-light: #8a8aaa;
    --border: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
    background: linear-gradient(135deg, #0d1554 0%, #1a237e 40%, #283593 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    display: flex;
    width: 900px;
    max-width: 100%;
    min-height: 540px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #1565c0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-branding {
    text-align: center;
    z-index: 2;
    position: relative;
}

.login-logo {
    width: 220px;
    height: 220px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.login-branding h1 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.tagline {
    color: var(--accent-light);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tagline-hindi {
    color: var(--accent-light);
    font-size: 1rem;
    margin-top: 4px;
}

.login-decoration {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.c1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite;
}

.c2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    right: -60px;
    animation: float 6s ease-in-out infinite reverse;
}

.c3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-wrapper {
    width: 100%;
    max-width: 340px;
}

.login-form-wrapper h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form label i {
    margin-right: 6px;
    color: var(--primary-light);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: #fafafa;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
}

.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 8px;
}

.login-footer-text {
    text-align: center;
    margin-top: 24px;
    color: var(--text-light);
    font-size: 0.75rem;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-error {
    background: #fce4ec;
    color: var(--danger);
    border: 1px solid #ef9a9a;
}

.alert-success {
    background: #e8f5e9;
    color: var(--success);
    border: 1px solid #a5d6a7;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: -60px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.sidebar-header h2 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.sidebar-subtitle {
    color: var(--accent-light);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar-menu::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

.menu-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 16px 8px;
    font-weight: 600;
}

/* ── Collapsible Menu Groups ── */
.menu-group {
    list-style: none;
    margin-bottom: 2px;
}

.menu-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.menu-group-header:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.menu-group-header span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-group-header span i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent-light);
}

.menu-chevron {
    font-size: 0.72rem;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.menu-group.open > .menu-group-header .menu-chevron {
    transform: rotate(180deg);
}

.menu-group.open > .menu-group-header {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.menu-group-items {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 12px;
}

.menu-group.open > .menu-group-items {
    max-height: 600px;
}

.menu-group-items li a {
    font-size: 0.83rem;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 1px;
    border-left: 2px solid transparent;
}

.menu-group-items li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--accent-light);
    transform: translateX(3px);
}

.menu-group-items li a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border-left-color: transparent;
    box-shadow: 0 3px 10px rgba(245,124,0,0.3);
}

.menu-group-items li a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}


.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(4px);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.user-info>i {
    font-size: 2rem;
    opacity: 0.8;
}

.user-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
}

.user-role {
    display: block;
    font-size: 0.68rem;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-btn {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ef5350;
}

/* Desktop Collapsed Sidebar */
@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar {
        width: 76px;
    }
    body.sidebar-collapsed .main-content {
        margin-left: 76px;
    }
    body.sidebar-collapsed .sidebar-header {
        padding: 16px 10px;
    }
    body.sidebar-collapsed .sidebar-logo {
        width: 38px;
        height: 38px;
        margin-bottom: 0;
        margin-top: 10px;
    }
    body.sidebar-collapsed .sidebar-header h2,
    body.sidebar-collapsed .sidebar-header .sidebar-subtitle {
        display: none !important;
    }
    body.sidebar-collapsed .sidebar-menu a span,
    body.sidebar-collapsed .menu-group-header span span,
    body.sidebar-collapsed .menu-label {
        display: none !important;
    }
    body.sidebar-collapsed .menu-chevron {
        display: none !important;
    }
    body.sidebar-collapsed .menu-group-items {
        display: none !important;
    }
    body.sidebar-collapsed .sidebar-footer .user-info div {
        display: none !important;
    }
    body.sidebar-collapsed .sidebar-footer {
        justify-content: center;
        padding: 12px;
    }
}

/* Mobile Sidebar Backdrop */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-body);
}

.session-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.session-badge i {
    margin-right: 6px;
}

.content-area {
    padding: 24px;
}

/* =====================================================
   CARDS & WIDGETS
   ===================================================== */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card.blue::before {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.stat-card.orange::before {
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.stat-card.green::before {
    background: linear-gradient(90deg, var(--success), #43a047);
}

.stat-card.red::before {
    background: linear-gradient(90deg, var(--danger), #e53935);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.stat-icon.orange {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--success), #43a047);
}

.stat-icon.red {
    background: linear-gradient(135deg, var(--danger), #e53935);
}

.stat-info h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #fafbfc, #f5f6f8);
}

.card-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--accent);
}

.card-body {
    padding: 24px;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #43a047);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e53935);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    background: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* =====================================================
   TABLES
   ===================================================== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

table thead th {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: #f8f9ff;
}

table tbody tr:nth-child(even) {
    background: #fafbfc;
}

table tbody tr:nth-child(even):hover {
    background: #f0f1ff;
}

.mark-input {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid var(--border);
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.mark-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.mark-input.error {
    border-color: var(--danger);
    background: #fff5f5;
}

.grade-select {
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.grade-select:focus {
    outline: none;
    border-color: var(--primary-light);
}

.total-cell {
    font-weight: 700;
    color: var(--primary);
    background: #f0f1ff !important;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--bg-card);
    z-index: 2;
}

.modal-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-body);
    color: var(--danger);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
    max-height: 60vh;
}

.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background: var(--bg-card);
    z-index: 2;
}

/* Make form inside modal also flex column */
.modal > form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
}

.modal > form > .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    max-height: 60vh;
}

/* =====================================================
   BADGE & TAGS
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: #e8eaf6;
    color: var(--primary);
}

.badge-success {
    background: #e8f5e9;
    color: var(--success);
}

.badge-warning {
    background: #fff8e1;
    color: #f57f17;
}

.badge-danger {
    background: #fce4ec;
    color: var(--danger);
}

/* =====================================================
   TOAST NOTIFICATION
   ===================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success {
    background: var(--success);
    color: #fff;
}

.toast-error {
    background: var(--danger);
    color: #fff;
}

.toast-info {
    background: var(--info);
    color: #fff;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.88rem;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .login-container {
        flex-direction: column;
    }

    .login-left {
        padding: 30px;
        min-height: auto;
    }

    .login-logo {
        width: 80px;
        height: 80px;
    }

    .login-branding h1 {
        font-size: 1.1rem;
    }

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.flex-wrap {
    flex-wrap: wrap;
}