:root {
    /* Primary Color Palette */
    --color-primary-dark: #1E3A8A;
    --color-primary: #3B82F6;
    --color-primary-light: #DBEAFE;
    --color-indigo-50: #f5f3ff;
    --color-indigo-100: #e0e7ff;
    --color-indigo-200: #c7d2fe;
    --color-indigo-400: #818cf8;
    --color-indigo-500: #6366f1;
    --color-indigo-600: #4f46e5;
    --color-indigo-700: #4338ca;
    --color-indigo-900: #1e1b4b;

    /* Neutral Grays */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    --color-black: #000000;

    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #06B6D4;

    /* Typography */
    --font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Font Sizes */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;

    /* Spacing */
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-4: 16px;
    --spacing-6: 24px;
    --spacing-8: 32px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-family-sans);
    scroll-behavior: smooth;
    height: 100%;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background-color: var(--color-gray-50);
    color: var(--color-gray-800);
    overflow-x: auto !important;
    /* Force allow horizontal scroll */
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    font-weight: var(--font-weight-bold);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    gap: var(--spacing-2);
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-secondary {
    background-color: var(--color-white);
    border-color: var(--color-gray-300);
    color: var(--color-gray-700);
}

.btn-ghost {
    background-color: transparent;
    color: var(--color-gray-600);
}

/* Card */
.card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--color-gray-100);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
}

.card-body {
    padding: var(--spacing-4);
    flex-grow: 1;
}

/* Hero Section */
.hero-section {
    background: var(--color-white);
    color: var(--color-gray-900);
    padding: 28px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid var(--color-gray-200);
    width: 100%;
    box-sizing: border-box;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 25px;
}

.hero-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.hero-logo img {
    height: 90px;
    width: auto;
    object-fit: contain;
    border-radius: 12px;
}

.hero-text h1 {
    font-size: 2.2rem;
    margin: 0 0 4px 0;
    color: var(--color-primary-dark);
    font-weight: 800;
    line-height: 1.1;
}

.hero-text p {
    font-size: 1rem;
    color: var(--color-gray-500);
    font-weight: 600;
    margin: 0;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .hero-logo img {
        height: 52px;
        width: 52px;
    }

    .hero-text h1 {
        font-size: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Optimization Styles - Final Fix */
@media screen and (max-width: 768px) {

    /* 1. Force Page Scroll & Reset Body width */
    body,
    html {
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        /* Ensure body isn't display:none from initial load */
    }

    /* 2. Reset Grid to Block Layout for Scrolling */
    .training-grid {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: 12px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        /* Allow content to scroll */
    }

    /* 3. Reset Sidebar/Menu if present (assuming top nav) */
    /* Ensure no fixed height containers trap content */
    #track-assignments-container,
    #active-sessions-container {
        height: auto !important;
        overflow: visible !important;
        margin-bottom: 80px !important;
        /* Space for bottom content */
    }

    /* 4. Card & Table Resets */
    .premium-card,
    .table-container,
    .day-group {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Active Sessions Table -> Valid Card View */
    .table thead {
        display: none !important;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .table tr {
        background: white;
        margin-bottom: 16px;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .table td {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px !important;
        border-bottom: 1px solid #f1f5f9;
        text-align: left;
    }

    .table td:last-child {
        border-bottom: none;
        flex-direction: row;
        justify-content: flex-end;
        background: #f8fafc;
        border-radius: 0 0 12px 12px;
    }

    .table td::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 800;
        color: #94a3b8;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    /* Fix long emails */
    .table td[data-label="Candidate"]>div,
    .candidate-email {
        word-break: break-all !important;
        white-space: normal !important;
        font-size: 14px !important;
    }

    /* Automation Cards */
    .premium-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 16px !important;
        gap: 12px !important;
    }

    .premium-card>div {
        width: 100% !important;
        flex: none !important;
    }

    /* Buttons full width */
    .premium-card button,
    .premium-card a {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 4px;
    }

    /* Modal Overlay Fix */
    #assignment-detail-modal {
        align-items: flex-end !important;
        /* Bottom sheet style or centered */
    }

    #assignment-detail-modal>div {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 !important;
        max-height: 85vh !important;
        padding: 24px !important;
    }

    /* Fix Modal Content Stacking */
    .modal-session-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        position: relative;
    }

    .modal-session-item>div:first-child {
        /* Day Badge */
        align-self: flex-start;
        margin-bottom: 4px;
    }

    .modal-session-item>div:nth-child(2) {
        /* Content Text */
        width: 100%;
    }

    .modal-session-item a.btn {
        /* Link Button */
        width: 100%;
        justify-content: center;
        background: #f0f7ff !important;
        margin-top: 8px;
    }
}

body {
    display: block;
    /* JS will toggle this, but let's ensure it's not sticking to none */
    overflow-x: auto;
    width: 100%;
}

.training-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    /* Enable scroll on the main grid */
}

.remove-link:hover {
    background: #fef2f2;
    color: #dc2626 !important;
    transform: scale(1.15);
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1);
}

@media (min-width: 1024px) {
    .training-grid {
        grid-template-columns: 320px minmax(0, 1fr);
    }
}

.session-form {
    position: relative;
    align-self: flex-start;
}

@media (min-width: 1100px) {
    .session-form {
        position: sticky;
        top: 24px;
    }
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-gray-700);
}

/* --- Custom Premium Dropdowns --- */
.custom-dropdown {
    position: relative;
    user-select: none;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 18px;
    border-radius: 14px;
    border: 2px solid var(--color-gray-200);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-trigger:hover {
    border-color: var(--color-indigo-400);
    background: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.dropdown-trigger .trigger-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--color-gray-800);
}

.dropdown-trigger .trigger-icon {
    color: var(--color-indigo-600);
    font-size: 20px;
}

.dropdown-trigger .chevron {
    margin-left: auto;
    color: var(--color-gray-400);
    transition: transform 0.2s;
}

.custom-dropdown.active .chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--color-gray-200);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.custom-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-group-label {
    padding: 12px 16px 6px;
    font-size: 11px;
    font-weight: 900;
    color: var(--color-indigo-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--color-indigo-50);
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: var(--color-indigo-50);
    color: var(--color-indigo-700);
    padding-left: 20px;
}

.dropdown-item.selected {
    background: var(--color-indigo-600);
    color: white;
    display: flex !important;
}

.dropdown-item.selected:hover {
    background: var(--color-indigo-700);
}

/* --- Status Badges --- */
.badge {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-upcoming {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-live {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    animation: pulse-live 2s infinite;
}

.badge-past {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

@keyframes pulse-live {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- History Section --- */
.history-section {
    margin-top: 40px;
    border-top: 2px dashed var(--color-gray-200);
}

.history-header {
    padding: 32px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--color-gray-500);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Mobile Tweaks & Zoom Fits --- */
@media (max-width: 768px) {
    .hero-section {
        padding: 24px 16px;
    }

    .hero-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .hero-logo img {
        height: 44px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .card-header {
        padding: 16px !important;
    }

    .card-body {
        padding: 16px !important;
    }

    .header-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px !important;
        width: 100%;
    }

    /* Make search box Span full width on mobile */
    .search-box {
        grid-column: span 2;
        width: 100% !important;
    }

    .custom-dropdown,
    .custom-dropdown .dropdown-trigger {
        width: 100%;
        min-width: unset !important;
        padding: 12px 14px;
        /* Larger touch target */
    }

    .dropdown-trigger .trigger-text {
        font-size: 13px;
    }

    .dropdown-menu {
        width: 100%;
        min-width: 100%;
        position: fixed;
        /* Better for mobile scrolling */
        top: auto;
        bottom: 0;
        left: 0;
        border-radius: 24px 24px 0 0;
        max-height: 70vh;
    }

    .training-grid {
        padding: 12px;
        gap: 16px;
    }

    .session-form {
        order: 2;
        margin-top: 12px;
    }

    .table-card {
        order: 1;
    }

    /* Stack template form inputs */
    #template-form>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Responsive tab buttons */
    .tab-nav {
        padding: 0 12px;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* Modal adjustments */
    #template-modal>div {
        padding: 16px !important;
        max-width: 95vw !important;
        width: 95vw !important;
        border-radius: 20px;
    }
}

/* Utility classes for dynamic elements */
.mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 641px) {
    .mobile-stack {
        flex-direction: row;
        align-items: center;
    }
}

/* Fix for Horizontal Scrolling on tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--color-gray-200);
}

.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: 10px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1000px;
    /* Ensure enough room for columns to align properlly */
}

/* --- Tab Navigation --- */
.tab-nav {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--color-gray-100);
}

.tab-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 800;
    color: var(--color-gray-500);
    cursor: pointer;
    border: none;
    background: transparent;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    color: var(--color-indigo-600);
    border-bottom-color: var(--color-indigo-600);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- Template Grid --- */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    padding: 24px;
}

.day-bucket {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 20px;
    border: 2px dashed #cbd5e1;
    margin-bottom: 16px;
}

.day-bucket h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 800;
    color: #475569;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-item {
    background: white;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.link-item input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.link-item .remove-link {
    color: #ef4444;
    cursor: pointer;
    font-size: 20px;
}

/* --- Premium UI Enhancements --- */
:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --premium-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --premium-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.1), 0 10px 10px -5px rgba(99, 102, 241, 0.04);
}

.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--premium-shadow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 40px -10px rgba(99, 102, 241, 0.15);
}

.premium-header {
    background: var(--premium-gradient);
    padding: 24px;
    border-radius: 24px 24px 0 0;
    color: white;
}

.premium-input {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s ease;
}

.premium-input:focus {
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.premium-btn {
    background: var(--premium-gradient);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.premium-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 20px -5px rgba(99, 102, 241, 0.4);
}

.premium-btn:active {
    transform: scale(0.98);
}

.assignment-preview-card {
    background: white;
    border-radius: 20px;
    border: 2px solid #eef2ff;
    padding: 24px;
    margin-bottom: 20px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.label {
    display: block;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 800;
    color: var(--color-primary-dark);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-pill {
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pill.upcoming {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.status-pill.active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-pill.completed {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Premium Notifications & Modals */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 8px solid #6366f1;
    min-width: 340px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: toast-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.toast-success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.toast-error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.toast-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.toast-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.toast-icon {
    font-size: 26px;
    flex-shrink: 0;
    display: flex;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-message {
    font-weight: 800;
    color: #1e293b;
    font-size: 14px;
    line-height: 1.4;
}

/* Premium Confirm Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.confirm-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.confirm-container {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.confirm-overlay.open .confirm-container {
    transform: scale(1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.confirm-text {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
}

.btn-cancel {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #86efac !important;
    font-weight: 700;
}

.btn-cancel:hover {
    background: #dcfce7;
    border-color: #22c55e !important;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
    border: 2px solid #dc2626 !important;
    font-weight: 700;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c !important;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-session-item:hover {
    transform: translateX(4px);
    border-color: #bfdbfe !important;
    background: #f8fafc !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.05);
}

/* Scrollbar Styling for Body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}