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

:root {
    /* Base Colors - Dark Mode */
    --bg-base: #0a0915;
    --bg-surface: rgba(20, 18, 43, 0.45);
    --bg-surface-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #d946ef;
    --secondary-glow: rgba(217, 70, 239, 0.4);
    --teal: #14b8a6;
    --teal-glow: rgba(20, 184, 166, 0.4);
    --danger: #f43f5e;
    --warning: #f59e0b;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --radial-glow-1: rgba(99, 102, 241, 0.15);
    --radial-glow-2: rgba(217, 70, 239, 0.12);
    
    --sidebar-bg: transparent;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-focus-border: var(--primary);
    
    --table-header-bg: rgba(0, 0, 0, 0.3);
    
    --chat-bubble-user-bg: rgba(99, 102, 241, 0.15);
    --chat-bubble-user-border: rgba(99, 102, 241, 0.25);
    --chat-bubble-mentor-bg: rgba(255, 255, 255, 0.03);
    
    --widget-bg: rgba(255, 255, 255, 0.02);
    --widget-border: rgba(255, 255, 255, 0.05);

    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    /* Base Colors - Light Mode */
    --bg-base: #f0f2f5;
    --bg-surface: rgba(255, 255, 255, 0.45);
    --bg-surface-hover: rgba(0, 0, 0, 0.04);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(79, 70, 229, 0.15);
    
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --secondary: #9333ea;
    --secondary-glow: rgba(147, 51, 234, 0.2);
    --teal: #0f766e;
    --teal-glow: rgba(15, 118, 110, 0.2);
    --danger: #e11d48;
    --warning: #d97706;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #8ba2c0;
    
    --radial-glow-1: rgba(79, 70, 229, 0.08);
    --radial-glow-2: rgba(147, 51, 234, 0.06);
    
    --sidebar-bg: rgba(255, 255, 255, 0.6);
    --sidebar-border: rgba(0, 0, 0, 0.08);
    --input-bg: rgba(255, 255, 255, 0.7);
    --input-focus-border: var(--primary);
    
    --table-header-bg: rgba(0, 0, 0, 0.04);
    
    --chat-bubble-user-bg: rgba(79, 70, 229, 0.12);
    --chat-bubble-user-border: rgba(79, 70, 229, 0.2);
    --chat-bubble-mentor-bg: rgba(255, 255, 255, 0.6);
    
    --widget-bg: rgba(0, 0, 0, 0.02);
    --widget-border: rgba(0, 0, 0, 0.04);
}

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

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 10% 20%, var(--radial-glow-1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, var(--radial-glow-2) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-inter);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(120, 130, 150, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 130, 150, 0.3);
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
}
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

[data-theme="light"] .glass-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 40px 0 rgba(79, 70, 229, 0.08);
}

/* App Layout */
#sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    border-right: 1px solid var(--sidebar-border);
    background: var(--sidebar-bg);
    z-index: 100;
    transition: var(--transition-smooth);
}

#main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Sidebar Branding */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    margin-bottom: 40px;
}

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

.brand-icon svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.brand-text {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar Navigation */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    stroke-width: 2;
    fill: none;
    transition: var(--transition-smooth);
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, rgba(217, 70, 239, 0.05) 100%);
    border-left: 4px solid var(--primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    box-shadow: inset 5px 0 15px -5px var(--primary-glow);
}

[data-theme="light"] .nav-item.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.08) 0%, rgba(147, 51, 234, 0.03) 100%);
}

.nav-item.active svg {
    stroke: var(--primary);
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

/* Mentor Quick Profile Widget */
.sidebar-mentor-widget {
    margin-top: auto;
    padding: 16px;
    border-radius: 14px;
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.mentor-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
}

.mentor-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--secondary-glow);
    animation: pulseGlow 2.5s infinite;
}

.mentor-avatar {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.mentor-info h4 {
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
}

.mentor-info p {
    font-size: 11px;
    color: var(--teal);
    display: flex;
    align-items: center;
    gap: 4px;
}

.mentor-info p::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--teal-glow);
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.4;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title h1 {
    font-family: var(--font-outfit);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to bottom, var(--text-primary) 60%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-family: var(--font-inter);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(120, 130, 150, 0.15);
}

.btn-teal {
    background: linear-gradient(135deg, var(--teal), #0d9488);
    color: #fff;
    box-shadow: 0 4px 15px var(--teal-glow);
}
.btn-teal:hover {
    box-shadow: 0 6px 20px var(--teal-glow);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 8px;
}

/* Tabs Panel Content */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}
.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* AI Mentor Briefing Section */
.mentor-briefing-card {
    position: relative;
    background: linear-gradient(135deg, var(--radial-glow-1) 0%, rgba(217, 70, 239, 0.05) 100%);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.08);
}

.briefing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.briefing-tag {
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid var(--teal);
    color: var(--teal);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.briefing-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.briefing-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 20px var(--secondary-glow);
    flex-shrink: 0;
}

.briefing-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-family: var(--font-inter);
}

/* Summary Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.calls {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.stat-icon.visits {
    background: rgba(20, 184, 166, 0.15);
    color: var(--teal);
    border: 1px solid rgba(20, 184, 166, 0.2);
}
.stat-icon.stale {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.stat-info h3 {
    font-family: var(--font-outfit);
    font-size: 28px;
    font-weight: 700;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 2px;
}

/* Action Lists on Dashboard */
.action-sections-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-card-title {
    font-family: var(--font-outfit);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-card-title span.badge {
    background: rgba(120, 130, 150, 0.1);
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 10px;
    font-weight: 500;
}

/* AI Action Item Cards */
.action-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item-card {
    background: rgba(120, 130, 150, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
}
.action-item-card:hover {
    background: rgba(120, 130, 150, 0.06);
    border-color: rgba(120, 130, 150, 0.15);
}

.action-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.action-student-name {
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.action-student-course {
    font-size: 11px;
    color: var(--teal);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.action-advice {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 6px;
    padding-left: 8px;
    border-left: 2px solid var(--primary);
}

.action-item-right {
    display: flex;
    gap: 8px;
}

/* Right Side Mentor Room Quick Widget */
.dashboard-side {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mentor-room-quick {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.general-tip-box {
    background: linear-gradient(135deg, var(--teal-glow) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.tip-icon {
    color: var(--teal);
    flex-shrink: 0;
}

.tip-text {
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
}

/* Student Management Tab & Directory */
.filters-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(120, 130, 150, 0.03);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: var(--text-secondary);
    fill: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}
.search-input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 10px var(--primary-glow);
}

.select-filter {
    padding: 12px 20px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.select-filter:focus {
    border-color: var(--input-focus-border);
}

/* Beautiful Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background: var(--table-header-bg);
    padding: 16px 20px;
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 16px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.custom-table tr {
    transition: var(--transition-smooth);
}

.custom-table tr:hover {
    background: rgba(120, 130, 150, 0.03);
}

/* Badges */
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-status.new { background: rgba(99, 102, 241, 0.15); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-status.call_done { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-status.visit_scheduled { background: rgba(20, 184, 166, 0.15); color: var(--teal); border: 1px solid rgba(20, 184, 166, 0.3); }
.badge-status.visited { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
[data-theme="light"] .badge-status.visited { color: #7c3aed; }
.badge-status.choice_filling { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
[data-theme="light"] .badge-status.choice_filling { color: #6d28d9; }
.badge-status.seat_allotted { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
[data-theme="light"] .badge-status.seat_allotted { color: #db2777; }
.badge-status.admitted { background: rgba(34, 197, 94, 0.15); color: #16a34a; border: 1px solid rgba(34, 197, 94, 0.3); }
[data-theme="dark"] .badge-status.admitted { color: #4ade80; }
.badge-status.cold { background: rgba(148, 163, 184, 0.15); color: var(--text-secondary); border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-status.closed { background: rgba(244, 63, 94, 0.15); color: var(--danger); border: 1px solid rgba(244, 63, 94, 0.3); }

/* Modals styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-window {
    width: 600px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 18px;
    padding: 30px;
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

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

.modal-header h2 {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.modal-close:hover {
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}
.form-control:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 10px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Timeline & Student Details Window */
.detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 30px;
    align-items: start;
}

.student-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--widget-bg);
    border: 1px solid var(--widget-border);
    padding: 10px;
    border-radius: 8px;
}

.info-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.info-val {
    font-size: 14px;
    color: var(--text-primary);
}

/* Interactive Timeline styling */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timeline-container {
    position: relative;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
}

.timeline-icon {
    position: absolute;
    left: -30px;
    top: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.timeline-icon.call { border-color: var(--primary); background: rgba(99, 102, 241, 0.2); }
.timeline-icon.whatsapp { border-color: var(--teal); background: rgba(20, 184, 166, 0.2); }
.timeline-icon.visit { border-color: var(--secondary); background: rgba(217, 70, 239, 0.2); }
.timeline-icon.email { border-color: #3b82f6; background: rgba(59, 130, 246, 0.2); }
.timeline-icon.note { border-color: #64748b; background: rgba(100, 116, 139, 0.2); }

.timeline-icon svg {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.timeline-content {
    background: var(--chat-bubble-mentor-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: var(--transition-smooth);
}
.timeline-content:hover {
    background: var(--bg-surface-hover);
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.timeline-type {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.timeline-text {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-primary);
}

.timeline-followup-badge {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* AI Mentor Room Tab */
.mentor-room {
    display: grid;
    grid-template-columns: 1fr;
    height: calc(100vh - 180px);
}

.chat-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 300px);
    border-bottom: 1px solid var(--border-color);
}

.message-bubble {
    display: flex;
    gap: 16px;
    max-width: 80%;
}

.message-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble.mentor {
    align-self: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message-bubble.user .message-avatar {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.message-bubble.mentor .message-avatar {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.message-text {
    background: var(--chat-bubble-mentor-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.message-bubble.user .message-text {
    background: var(--chat-bubble-user-bg);
    border-color: var(--chat-bubble-user-border);
    border-top-right-radius: 4px;
}

.message-bubble.mentor .message-text {
    border-top-left-radius: 4px;
}

/* Markdown formatting inside chat bubbles */
.message-text p {
    margin-bottom: 10px;
}
.message-text p:last-child {
    margin-bottom: 0;
}
.message-text ul, .message-text ol {
    margin-left: 20px;
    margin-bottom: 10px;
}
.message-text li {
    margin-bottom: 4px;
}
.message-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 20px 0;
    align-items: center;
}

.chat-input {
    flex-grow: 1;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}
.chat-input:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Settings Form layout styling */
.settings-section-title {
    font-family: var(--font-outfit);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Loading Spinner & Shimmer effects */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.pulse-glow-heavy {
    animation: glowHeavy 2s infinite alternate;
}

@keyframes glowHeavy {
    from {
        box-shadow: 0 0 15px rgba(217, 70, 239, 0.2);
    }
    to {
        box-shadow: 0 0 35px rgba(217, 70, 239, 0.6), 0 0 10px rgba(99, 102, 241, 0.4);
    }
}

/* Shimmer Loading placeholders */
.shimmer {
    background: linear-gradient(90deg, rgba(120, 130, 150, 0.01) 25%, rgba(120, 130, 150, 0.05) 50%, rgba(120, 130, 150, 0.01) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

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

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out forwards;
}

.toast.success { border-left: 4px solid var(--teal); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}



/* Step-by-Step Wizard Styling */
.wizard-step {
    transition: all 0.3s ease;
}
.wizard-step.active .wizard-step-circle {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    transform: scale(1.1);
}
.wizard-step-circle {
    transition: all 0.3s ease;
}

/* Full screen override for Student Details Modal */
#modal-detail.modal-overlay {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 10% 20%, var(--radial-glow-1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, var(--radial-glow-2) 0%, transparent 45%);
    background-attachment: fixed;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

#modal-detail .modal-window {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 40px !important;
    border-radius: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    transform: translateY(0) !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#modal-detail .modal-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

#modal-detail .detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr !important;
    gap: 35px !important;
    align-items: start !important;
    flex-grow: 1;
}

#modal-detail .student-info-sidebar {
    height: fit-content;
    position: sticky;
    top: 0;
}

#modal-detail .glass-card {
    background: var(--bg-surface) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
}

/* Make timeline scrollable panel taller in full screen detail page */
#modal-detail div.glass-card[style*="max-height: 400px"] {
    max-height: 60vh !important;
}

/* AI Note Manager Styles */
.note-manager-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .note-manager-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Counselor Task Manager Styles */
.completed-task-card {
    opacity: 0.55 !important;
    border-color: rgba(255, 255, 255, 0.02) !important;
    background: rgba(0, 0, 0, 0.08) !important;
}

#briefing-checklist-container .action-item-card {
    border-left: 3px solid transparent;
}

#briefing-checklist-container .action-item-card:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.008); box-shadow: 0 0 15px rgba(244, 63, 94, 0.15); }
    100% { transform: scale(1); }
}
