/**
 * Main Styles - TutorKita System
 */

/* ========== CSS Variables ========== */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;

    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;

    --bg-primary: #f7fafc;
    --bg-secondary: #ffffff;
    --bg-dark: #1a202c;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-xl: 20px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-warning: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --gradient-danger: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    --gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-dark: linear-gradient(135deg, #2d3436 0%, #000000 100%);
}

/* ========== Dashboard Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

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

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

@keyframes float {

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

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

@keyframes pulse {

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

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

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

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

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

@keyframes bubbleMove {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100px) translateX(20px);
        opacity: 0;
    }
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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



/* ========== Reset & Base ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== Wow Factor Utility Classes ========== */
.premium-gradient {
    background: var(--gradient-primary);
}

.premium-gradient-success {
    background: var(--gradient-success);
}

.premium-gradient-warning {
    background: var(--gradient-warning);
}

.premium-gradient-danger {
    background: var(--gradient-danger);
}

.premium-gradient-info {
    background: var(--gradient-info);
}

.floating-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: bubbleMove 10s infinite ease-in-out;
}

.reveal-up {
    animation: revealUp 0.8s forwards ease-out;
    opacity: 0;
}

.lift-on-hover {
    transition: all var(--transition-normal);
}

.lift-on-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* ========== Layout ========== */
html, body {
    height: 100%;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        position: relative;
        overflow-x: hidden;
        height: auto;
        min-height: 100vh;
    }
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    position: fixed;
    height: 100vh;
    min-height: 100vh;
    overflow-y: auto;
    transition: transform var(--transition-normal);
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

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

.sidebar-logo {
    font-size: 2rem;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.sidebar-subtitle {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 0 10px;
    flex: 1;
}

/* Ensure logout button is clickable */
.sidebar-nav button {
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    width: 100%;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-md);
    margin-bottom: 5px;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.3rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: #ffffff;
    color: #dc3545;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #dc3545;
    animation: pulse-badge 2s ease-in-out infinite;
}

/* Sidebar navigation badges - high contrast for gradient background */
.sidebar-nav .badge-warning {
    background: #ffffff !important;
    color: #dc3545 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    min-width: 22px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    border: 2px solid #dc3545 !important;
}

.sidebar-nav .badge {
    margin-left: auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* Nav Badge Styles for Sidebar */
.nav-badge {
    margin-left: auto;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse-badge 2s ease-in-out infinite;
}

/* Urgent badge - Red (for pending actions like enrollments, settings) */
.nav-badge.badge-urgent {
    color: #dc3545;
    border: 2px solid #dc3545;
}

/* Reminder badge - Yellow/Orange (for announcements) */
.nav-badge.badge-reminder {
    color: #fd7e14;
    border: 2px solid #fd7e14;
}

/* Info badge - Blue (for forum messages) */
.nav-badge.badge-info {
    color: #17a2b8;
    border: 2px solid #17a2b8;
}

@keyframes pulse-badge {

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

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

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
    height: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ========== Cards ========== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 25px;
    transition: all var(--transition-normal);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.card-body {
    color: var(--text-secondary);
}

/* ========== Stats Cards ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-color);
}

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

.stat-card.success::before {
    background: var(--success-color);
}

.stat-card.warning::before {
    background: var(--warning-color);
}

.stat-card.danger::before {
    background: var(--danger-color);
}

.stat-card.info::before {
    background: var(--info-color);
}

.stat-icon {
    font-size: 3rem;
    margin-right: 20px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ========== Forms ========== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    background: var(--bg-secondary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.form-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.form-error {
    font-size: 0.85rem;
    color: var(--danger-color);
    margin-top: 5px;
}

/* ========== Centered Form Layout ========== */
/* Container for centered forms */
.form-centered {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Form groups in card body - centered */
.card-body .form-group,
.modal-body .form-group {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Form container in card/modal - center align */
.card-body form,
.modal-body form {
    max-width: 700px;
    margin: 0 auto;
}

/* Emoji picker centered */
.card-body .emoji-picker,
.modal-body .emoji-picker {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

/* Profile form specific centering */
#profileForm,
#settingsForm,
#updateProfileForm,
#teacherProfileForm,
#studentProfileForm,
#passwordForm,
#addTeacherForm,
#addStudentForm,
#moduleForm,
#scheduleForm,
#classForm,
#forumForm,
#announcementForm,
#assignmentForm,
#oprSettingsForm,
#maintenanceForm,
#footerSettingsForm,
#addSubjectForm,
#editEnrollmentForm,
#setupPasswordForm,
#studentForm,
#approveForm,
#rejectForm,
#forumReplyForm,
#editMaintenanceForm {
    max-width: 700px;
    margin: 0 auto;
}

/* Form buttons - centered at bottom */
.card-body form>.btn,
.card-body form>button[type="submit"],
.modal-body form>.btn,
.modal-body form>button[type="submit"] {
    display: block;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Multiple buttons row - centered */
.card-body .form-buttons,
.modal-body .form-buttons,
.card-body .button-group,
.modal-body .button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 20px auto 0;
}

/* Profile header/avatar section - centered */
.card-body>div:first-child[style*="display: flex"][style*="align-items: center"] {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}

/* Input groups centered */
.card-body .input-group,
.modal-body .input-group {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Password wrapper - centered */
.password-wrapper {
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.password-wrapper .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    user-select: none;
}

/* ========== Checkboxes & Radios ========== */
.form-check {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-check:hover {
    background: rgba(102, 126, 234, 0.1);
}

.form-check-input {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    flex: 1;
}

.form-check.other-subject {
    background: rgba(102, 126, 234, 0.05);
    border: 2px dashed var(--border-color);
}

.form-check.other-subject.checked {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary-color);
}

/* ========== Tables ========== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    white-space: nowrap;
}

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

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

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

/* ========== Badges ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #d39e00;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

/* ========== Alerts ========== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

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

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #155724;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.3);
    color: #0c5460;
}

.alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ========== Modal Overlay (Premium & Floating - Free Position) ========== */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    /* Force Viewport Width */
    height: 100vh !important;
    /* Force Viewport Height */
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999999 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.modal-overlay.active {
    display: flex !important;
    animation: modalFadeIn 0.3s ease-out forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== Modal Box (Centered & Responsive) ========== */
.modal {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 650px;
    /* Tablet & Desktop limit */
    max-height: 92vh;
    overflow-y: auto;
    position: relative !important;
    margin: auto !important;
    /* Pure centering fallback */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.85);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

/* Mobile & Tablet Friendly Adjustments */
@media (max-width: 768px) {
    .modal {
        width: 95% !important;
        max-width: 500px !important;
        border-radius: 20px;
        max-height: 90vh;
        margin: auto !important;
    }

    .modal-overlay {
        align-items: center !important;
        padding: 10px !important;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

/* ========== Notifications ========== */
.notification-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 380px;
    max-height: calc(100vh - 40px);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-toast {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 15px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

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

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

.notification-toast.success {
    border-left-color: var(--success-color);
}

.notification-toast.warning {
    border-left-color: var(--warning-color);
}

.notification-toast.error {
    border-left-color: var(--danger-color);
}

.notification-toast.info {
    border-left-color: var(--info-color);
}

.notification-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ========== Tabs ========== .tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== Profile ========== */
.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}

.profile-avatar {
    font-size: 4rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
}

.profile-info h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.profile-info p {
    color: var(--text-secondary);
    margin: 0;
}

.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.emoji-option {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.emoji-option:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.emoji-option.selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

/* ========== Settings ========== */
.settings-group {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
}

.settings-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 500;
}

.settings-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.font-select {
    min-width: 150px;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.empty-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* ========== Loading ========== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

/* ========== MOBILE MENU TOGGLE BUTTON ========== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    padding: 12px;
    gap: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.45);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        padding: 20px 0;
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        animation: none;
        z-index: 3000 !important;
        height: 100vh !important;
        min-height: 100vh !important;
        position: fixed;
        top: 0;
        left: 0;
        right: auto;
        bottom: 0;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
        box-sizing: border-box;
    }
    
    .sidebar-nav {
        padding-bottom: 40px;
    }
    
    /* Smaller search and filter buttons on mobile */
    .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
        gap: 6px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Smaller input fields for search and filters */
    .form-control,
    .form-select {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    /* Adjust search input groups */
    .input-group {
        gap: 8px;
    }
    
    .input-group .btn {
        padding: 10px;
    }
    
    .sidebar-nav {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    .sidebar > div:last-child {
        width: 100% !important;
        position: static !important;
        margin-top: auto !important;
        padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    }
    
    .sidebar.open {
        transform: translateX(0);
        animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
        box-sizing: border-box;
        overflow-y: auto !important;
    }

    .sidebar.open .sidebar-header {
        animation: fadeInDown 0.5s ease 0.1s both;
    }

    .sidebar.open .nav-item {
        animation: slideInRight 0.4s ease both;
    }

    .sidebar.open .nav-item:nth-child(1) {
        animation-delay: 0.15s;
    }

    .sidebar.open .nav-item:nth-child(2) {
        animation-delay: 0.18s;
    }

    .sidebar.open .nav-item:nth-child(3) {
        animation-delay: 0.21s;
    }

    .sidebar.open .nav-item:nth-child(4) {
        animation-delay: 0.24s;
    }

    .sidebar.open .nav-item:nth-child(5) {
        animation-delay: 0.27s;
    }

    .sidebar.open .nav-item:nth-child(6) {
        animation-delay: 0.3s;
    }

    .sidebar.open .nav-item:nth-child(7) {
        animation-delay: 0.33s;
    }

    .sidebar.open .nav-item:nth-child(8) {
        animation-delay: 0.36s;
    }

    .sidebar.open .nav-item:nth-child(9) {
        animation-delay: 0.39s;
    }

    .sidebar.open .nav-item:nth-child(10) {
        animation-delay: 0.42s;
    }

    .sidebar.open .nav-item:nth-child(11) {
        animation-delay: 0.45s;
    }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(-30px);
        }

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

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

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

    .sidebar-overlay.show,
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
        transition: all 0.3s ease;
        min-height: 100vh;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* Stagger animation for stats cards on mobile load */
    .stats-grid .stat-card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .stats-grid .stat-card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .stats-grid .stat-card:nth-child(3) {
        animation-delay: 0.3s;
    }

    .stats-grid .stat-card:nth-child(4) {
        animation-delay: 0.4s;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        animation: fadeInUp 0.6s ease-out;
    }

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

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

    /* Mobile Header with smooth transition */
    .page-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
        background: var(--bg-secondary);
        margin: -20px -20px 20px -20px;
        border-radius: 0 0 25px 25px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        position: relative;
        overflow: hidden;
    }

    .page-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    }

    .page-title {
        font-size: 1.5rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .page-subtitle {
        font-size: 0.9rem;
        color: var(--text-secondary);
    }

    .page-header>div:first-child {
        width: 100%;
    }

    .page-header>div:last-child {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border-color);
        padding-top: 15px;
        margin-top: 5px;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .realtime-clock {
        font-size: 1.4rem !important;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: pulse-glow 2s ease-in-out infinite;
    }

    @keyframes pulse-glow {

        0%,
        100% {
            filter: drop-shadow(0 0 5px rgba(102, 126, 234, 0.5));
        }

        50% {
            filter: drop-shadow(0 0 15px rgba(102, 126, 234, 0.8));
        }
    }

    .realtime-date {
        font-size: 0.85rem !important;
        color: var(--text-muted);
    }

    /* Modal improvements for mobile */
    /* Modal improvements for mobile handled in main media query */

    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(50px) scale(0.95);
        }

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

    .modal-header {
        padding: 18px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .modal-title {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .modal-body {
        padding: 20px;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--bg-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }

    .modal-close:hover {
        background: rgba(220, 53, 69, 0.1);
        color: var(--danger-color);
        transform: rotate(90deg);
    }

    /* Notification panel mobile */
    .notification-panel {
        left: 15px;
        right: 15px;
        width: auto;
    }

    /* Profile section mobile */
    .profile-section {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border-radius: 20px;
        margin-bottom: 20px;
        animation: fadeInUp 0.5s ease-out;
    }

    .profile-avatar {
        font-size: 4rem;
        width: 90px;
        height: 90px;
        animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    @keyframes bounceIn {
        0% {
            transform: scale(0);
        }

        50% {
            transform: scale(1.1);
        }

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

    .profile-info h3 {
        font-size: 1.3rem;
        margin-top: 12px;
    }

    .profile-info p {
        font-size: 0.9rem;
    }

    /* Form rows on mobile */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 0;
    }

    .form-row>div {
        margin-bottom: 15px;
    }

    /* Dashboard info cards mobile */
    .dashboard-info-cards {
        grid-template-columns: 1fr !important;
    }

    .dashboard-info-cards .card {
        animation: slideInUp 0.5s ease-out both;
    }

    .dashboard-info-cards .card:nth-child(1) {
        animation-delay: 0.1s;
    }

    .dashboard-info-cards .card:nth-child(2) {
        animation-delay: 0.2s;
    }

    .dashboard-info-cards .card:nth-child(3) {
        animation-delay: 0.3s;
    }

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

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

    /* Notification dropdown mobile */
    .notification-dropdown {
        width: calc(100vw - 40px);
        right: -20px;
        max-height: 60vh;
        border-radius: 20px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    }

    /* Stats cards mobile adjustments with hover effects */
    .stat-card {
        padding: 18px;
        border-radius: 16px;
        animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

    @keyframes scaleIn {
        from {
            opacity: 0;
            transform: scale(0.9);
        }

        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .stat-card:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 35px rgba(102, 126, 234, 0.2);
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-icon {
        font-size: 2.2rem;
        width: 50px;
        height: 50px;
    }

    /* Card improvements on mobile */
    .card {
        padding: 18px;
        border-radius: 16px;
        box-shadow: var(--shadow-sm);
        animation: fadeInUp 0.5s ease-out;
    }

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

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 12px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    /* Adjust header layout for mobile */
    .main-content .page-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .notification-bell-container {
        margin-left: auto;
    }

    /* Mobile notification dropdown */
    .notification-dropdown {
        width: calc(100vw - 30px);
        right: -10px;
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        margin-left: 0;
        overflow-y: auto;
        min-height: 100vh;
    }
    
    /* Even smaller search and filter buttons on very small mobile devices */
    .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        gap: 4px;
    }
    
    .btn-sm {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    /* Even smaller input fields for search and filters */
    .form-control,
    .form-select {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Adjust search input groups */
    .input-group {
        gap: 6px;
    }
    
    .input-group .btn {
        padding: 8px;
    }

    .page-header {
        margin: -12px -12px 15px -12px;
        padding: 15px;
        border-radius: 0 0 20px 20px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }

    /* Cards with enhanced animations */
    .card {
        padding: 15px;
        border-radius: 14px;
        box-shadow: var(--shadow-sm);
        animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

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

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

    .card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    /* Stats cards mobile adjustments */
    .stat-card {
        padding: 15px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        gap: 12px;
        animation: popIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
    }

    @keyframes popIn {
        0% {
            opacity: 0;
            transform: scale(0.8);
        }

        50% {
            transform: scale(1.02);
        }

        100% {
            opacity: 1;
            transform: scale(1);
        }
    }

    .stat-card:hover {
        transform: translateY(-3px) scale(1.01);
    }

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

    .stat-icon {
        font-size: 2rem;
        width: 45px;
        height: 45px;
    }

    /* Form controls optimized for small screens */
    .form-control {
        padding: 12px 15px;
        font-size: 0.95rem;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .form-control:focus {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
        transform: translateY(-1px);
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        border-radius: 10px;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .btn:active {
        transform: scale(0.97);
    }

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

    /* Make badges smaller on mobile with animation */
    .badge {
        padding: 4px 10px;
        font-size: 0.7rem;
        border-radius: 12px;
        animation: badgePop 0.3s ease-out;
    }

    @keyframes badgePop {
        0% {
            transform: scale(0);
        }

        50% {
            transform: scale(1.1);
        }

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

    /* Info card adjustments */
    .info-card-badge {
        flex-wrap: wrap;
        gap: 8px;
    }

    .info-card-badge .badge {
        width: 100%;
        justify-content: center;
    }

    /* Table responsive with smooth animations */
    .table-container {
        margin: 0 -15px;
        border-radius: 0;
        box-shadow: none;
    }

    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .table th {
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .table tbody tr {
        animation: fadeInRow 0.3s ease-out both;
    }

    .table tbody tr:nth-child(1) {
        animation-delay: 0.05s;
    }

    .table tbody tr:nth-child(2) {
        animation-delay: 0.08s;
    }

    .table tbody tr:nth-child(3) {
        animation-delay: 0.11s;
    }

    .table tbody tr:nth-child(4) {
        animation-delay: 0.14s;
    }

    .table tbody tr:nth-child(5) {
        animation-delay: 0.17s;
    }

    @keyframes fadeInRow {
        from {
            opacity: 0;
            transform: translateX(-10px);
        }

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

    /* Quick actions on mobile */
    .quick-actions-grid {
        flex-direction: column;
        gap: 10px;
    }

    .quick-actions-grid .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        animation: buttonSlideIn 0.4s ease-out both;
    }

    .quick-actions-grid .btn:nth-child(1) {
        animation-delay: 0.1s;
    }

    .quick-actions-grid .btn:nth-child(2) {
        animation-delay: 0.15s;
    }

    .quick-actions-grid .btn:nth-child(3) {
        animation-delay: 0.2s;
    }

    .quick-actions-grid .btn:nth-child(4) {
        animation-delay: 0.25s;
    }

    .quick-actions-grid .btn:nth-child(5) {
        animation-delay: 0.3s;
    }

    @keyframes buttonSlideIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

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

    /* Sidebar navigation items on mobile */
    .nav-item {
        padding: 14px 18px;
        font-size: 0.95rem;
        margin: 0 10px 5px 10px;
        border-radius: 12px;
    }

    .nav-icon {
        font-size: 1.2rem;
        width: 24px;
        margin-right: 12px;
    }

    /* Hide scrollbar but keep functionality */
    .sidebar {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }

    /* Mobile-friendly modal adjustments */
    /* Mobile-friendly modal adjustments handled in main media query */

    .modal-body {
        padding: 15px;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    /* Toast notifications on mobile */
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
    }

    .toast-notification {
        padding: 14px 16px;
    }

    /* Emoji picker on mobile */
    .emoji-picker {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 12px;
    }

    .emoji-option {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }

    /* Form groups spacing */
    .form-group {
        margin-bottom: 15px;
    }

    .form-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    /* Select dropdown improvements */
    .form-select {
        padding-right: 40px;
        background-position: right 12px center;
    }

    /* Subject checklist mobile */
    .subject-checklist {
        grid-template-columns: 1fr;
        max-height: 200px;
        gap: 6px;
    }

    /* Form checkboxes mobile */
    .form-check {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Hide non-essential elements on very small screens */
    .sidebar-logo img {
        width: 80px !important;
        height: 80px !important;
    }

    .sidebar-title {
        font-size: 1.2rem;
    }

    .sidebar-subtitle {
        font-size: 0.75rem;
    }
}

/* ========== Utility Classes ========== */
.text-center {
    text-align: center;
}

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

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

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

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

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

.mt-4 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 25px;
}

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

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

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

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 25px;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.hidden {
    visibility: hidden;
}

.visible {
    visibility: visible;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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

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

.subject-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
}

.form-check.checked {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.custom-subject-wrapper {
    grid-column: 1 / -1;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 2px dashed #ddd;
    display: none;
    margin-top: 8px;
}

.custom-subject-wrapper.show {
    display: block;
}

.custom-subject-wrapper input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
}

.custom-subject-wrapper input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* --- STYLE INPUT LAIN-LAIN (TEMA PORTAL) --- */
.custom-subject-wrapper {
    display: none;
    margin-top: 12px;
    padding: 15px;
    background: #fdfdfd;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

.custom-subject-wrapper.show {
    display: block;
    border-color: var(--primary-color);
    background: #f8faff;
}

.custom-subject-wrapper label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.custom-subject-wrapper input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.custom-subject-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ========== MODERN NOTIFICATION SYSTEM ========== */

/* Notification Bell Container */
.notification-bell-container {
    position: relative;
}

/* Modern Bell Button */
.notification-bell-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.notification-bell-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.notification-bell-btn:active {
    transform: scale(0.95);
}

.notification-bell-icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.notification-bell-btn:hover .notification-bell-icon {
    transform: rotate(-15deg) scale(1.1);
}

/* Bell Shake Animation for New Notifications */
@keyframes bell-shake {

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

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: rotate(-10deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: rotate(10deg);
    }
}

.notification-bell-btn.has-unread .notification-bell-icon {
    animation: bell-shake 0.8s ease-in-out infinite;
    transform-origin: top center;
}

/* Bell Pulse Ring Effect */
.notification-bell-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    pointer-events: none;
}

.notification-bell-btn.has-unread .notification-bell-pulse {
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Modern Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
    z-index: 10;
    animation: badge-bounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: transform 0.2s ease;
}

.notification-badge:hover {
    transform: scale(1.1);
}

@keyframes badge-bounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

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

.notification-badge.pulse {
    animation: badge-bounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55),
        badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
    }

    50% {
        box-shadow: 0 3px 15px rgba(220, 53, 69, 0.7);
    }
}

/* Glassmorphism Notification Dropdown */
.notification-dropdown {
    display: none;
    /* Add this */
    position: absolute;
    right: 0;
    top: 60px;
    width: 400px;
    max-height: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notification-dropdown-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.notification-dropdown-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.notification-dropdown-actions {
    display: flex;
    gap: 8px;
}

.notification-action-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.notification-action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.notification-action-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.notification-action-btn.secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.notification-action-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.notification-action-btn.danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.notification-action-btn.danger:hover {
    background: rgba(220, 53, 69, 0.2);
}

.notification-dropdown-body {
    max-height: 380px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.notification-dropdown-body::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown-body::-webkit-scrollbar-track {
    background: transparent;
}

.notification-dropdown-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* Notification Items */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item:hover::before {
    background: var(--primary-color);
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08) 0%, transparent 100%);
}

.notification-item.unread::before {
    background: var(--primary-color);
}

.notification-item.unread::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }

    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(0.8);
    }
}

.notification-item.empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    cursor: default;
}

.notification-item.empty:hover {
    background: transparent;
}

.notification-item.empty::before,
.notification-item.empty::after {
    display: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.notification-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
}

.notification-icon-wrapper.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.notification-icon-wrapper.error {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.05) 100%);
}

.notification-icon-wrapper.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%);
}

.notification-icon-wrapper.info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.notification-icon-wrapper.default {
    background: linear-gradient(135deg, rgba(113, 128, 150, 0.15) 0%, rgba(113, 128, 150, 0.05) 100%);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 5px;
}

.notification-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

.notification-item:hover .notification-delete-btn {
    opacity: 1;
}

.notification-delete-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* Notification Empty State */
.notification-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.notification-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.notification-empty-message {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.toast-notification {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    transform: translateX(120%) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.toast-notification.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.toast-notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast-notification.success::before {
    background: linear-gradient(180deg, #28a745 0%, #20c997 100%);
}

.toast-notification.error::before {
    background: linear-gradient(180deg, #dc3545 0%, #e83e8c 100%);
}

.toast-notification.warning::before {
    background: linear-gradient(180deg, #ffc107 0%, #fd7e14 100%);
}

.toast-notification.info::before {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-notification.success .toast-icon {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(32, 201, 151, 0.15) 100%);
}

.toast-notification.error .toast-icon {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(232, 62, 140, 0.15) 100%);
}

.toast-notification.warning .toast-icon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(253, 126, 20, 0.15) 100%);
}

.toast-notification.info .toast-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.3;
    animation: toast-progress linear forwards;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Notification Sound Toggle */
.notification-sound-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.notification-sound-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
}

.notification-sound-toggle.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
}

/* Notification Settings in Dropdown */
.notification-settings {
    padding: 12px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

.notification-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.notification-setting-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.notification-toggle-switch {
    width: 40px;
    height: 22px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.notification-toggle-switch.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.notification-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-toggle-switch.active::after {
    transform: translateX(18px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .notification-dropdown {
        width: calc(100vw - 40px);
        right: -80px;
        max-height: 60vh;
    }

    .toast-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .notification-bell-btn {
        width: 42px;
        height: 42px;
    }

    .notification-bell-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        right: -120px;
        top: 50px;
    }

    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}

/* ========== BELL ANIMATION FOR NEW NOTIFICATIONS ========== */
@keyframes bellShake {

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

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: rotate(-15deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: rotate(15deg);
    }
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 3px 20px rgba(220, 53, 69, 0.7);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ========== Dashboard Responsive Refinement ========== */
@media (max-width: 768px) {
    .welcome-banner {
        padding: 25px 20px !important;
        margin-bottom: 20px !important;
    }

    .welcome-banner h2 {
        font-size: 1.5rem !important;
    }

    .welcome-banner p {
        font-size: 0.95rem !important;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 15px !important;
    }

    .stat-card {
        padding: 20px !important;
    }

    .stat-card div:nth-child(2) div:first-child {
        font-size: 2.2rem !important;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .quick-actions-grid .btn {
        padding: 15px !important;
    }

    .quick-actions-grid .btn span:first-child {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr !important;
    }

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

/* Subject Checklist Grid */
.subject-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.form-check:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    margin-top: 0;
}

/* --- End of Styles --- */