/* ═══════════════════════════════════════════════════════
   Student Portal Blazor — CSS Variables & Base Styles
   Extracted from student-portal.html for Blazor components
   ═══════════════════════════════════════════════════════ */

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: #f0f2f5; color: #1a1a2e; }

/* ── Variables ───────────────────────────────────────── */
:root {
    --ku-navy: #003366;
    --ku-navy-light: #004080;
    --ku-gold: #C4A03C;
    --ku-blue-bg: #e8f0fe;
    --bg-primary: #f0f2f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6c757d;
    --border: #dee2e6;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ── App Layout ──────────────────────────────────────── */
#app { display: flex; flex-direction: column; height: 100vh; }

/* ── Header ──────────────────────────────────────────── */
.header {
    background: var(--ku-navy);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 100;
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-brand .logo { width: 32px; height: 32px; background: var(--ku-gold); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--ku-navy); }
.header-brand h1 { font-size: 16px; font-weight: 600; }
.header-user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.header-user .user-name { opacity: 0.9; }
.btn-logout { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: background 0.2s; }
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* ── Main Content ────────────────────────────────────── */
.main-content { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar (Desktop) ───────────────────────────────── */
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 16px 0;
    flex-shrink: 0;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-item:hover { background: var(--ku-blue-bg); color: var(--ku-navy); }
.sidebar-item.active { background: var(--ku-blue-bg); color: var(--ku-navy); font-weight: 600; border-left-color: var(--ku-navy); }
.sidebar-item .icon { font-size: 18px; width: 24px; text-align: center; }

/* ── Tab Content ─────────────────────────────────────── */
.tab-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.tab-page { display: none; flex: 1; overflow: hidden; flex-direction: column; }
.tab-page.active { display: flex; }

/* ── Bottom Tabs (Mobile) ────────────────────────────── */
.bottom-tabs {
    display: none;
    background: #fff;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 100;
}
.bottom-tabs-inner { display: flex; justify-content: space-around; padding: 6px 0 env(safe-area-inset-bottom, 6px); }
.bottom-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 11px;
    transition: color 0.2s;
    border: none;
    background: none;
}
.bottom-tab .icon { font-size: 20px; }
.bottom-tab.active { color: var(--ku-navy); font-weight: 600; }

/* ── Login Page ──────────────────────────────────────── */
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--ku-navy) 0%, #004d99 100%);
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-card .logo-section { text-align: center; margin-bottom: 28px; }
.login-card .logo-section .logo-big { width: 56px; height: 56px; background: var(--ku-navy); color: var(--ku-gold); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; margin-bottom: 12px; }
.login-card h2 { font-size: 20px; color: var(--ku-navy); margin-bottom: 4px; }
.login-card .subtitle { color: var(--text-secondary); font-size: 13px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--ku-navy); box-shadow: 0 0 0 3px rgba(0,51,102,0.1); }
.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--ku-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-login:hover { background: var(--ku-navy-light); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error { color: var(--danger); font-size: 13px; text-align: center; margin-top: 12px; display: none; }

/* ── Chat ────────────────────────────────────────────── */
.chat-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-msg { max-width: min(90%, 720px); padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-wrap: break-word; overflow-wrap: break-word; min-width: 0; align-self: flex-start; position: relative; }
.chat-msg.user { background: var(--ku-navy); color: #fff; border-left: 4px solid #003366; }
.chat-msg.assistant { background: #f4f7fb; color: var(--text-primary); border-left: 4px solid var(--ku-gold, #c5960c); }
.chat-msg .msg-sender { font-size: 11px; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.chat-msg.user .msg-sender { color: rgba(255,255,255,0.75); }
.chat-msg.assistant .msg-sender { color: var(--ku-gold, #c5960c); }
.chat-msg .timestamp { font-size: 10px; opacity: 0.6; margin-top: 4px; }
.chat-msg .attachment-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.2); border-radius: 4px; padding: 2px 8px; font-size: 11px; margin-top: 4px; }
.chat-msg.assistant .attachment-badge { background: rgba(0,0,0,0.06); }
.chat-welcome { text-align: center; padding: 40px 20px; color: var(--text-secondary); }
.chat-welcome .welcome-icon { font-size: 48px; margin-bottom: 12px; }
.chat-welcome h3 { color: var(--ku-navy); margin-bottom: 8px; }
.chat-restored-notice { text-align: center; padding: 8px; font-size: 11px; color: var(--text-secondary); background: #f0fdf4; border-radius: 8px; margin: 8px 16px; }

/* ── Chat Input ──────────────────────────────────────── */
.chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: #fff;
}
.chat-attachments { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chat-attachments:empty { display: none; }
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--ku-blue-bg);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--ku-navy);
}
.attachment-chip .remove-attachment { cursor: pointer; font-weight: 700; margin-left: 2px; opacity: 0.7; }
.attachment-chip .remove-attachment:hover { opacity: 1; }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.btn-attach {
    width: 40px; height: 40px; background: none; border: 1px solid var(--border);
    border-radius: 50%; cursor: pointer; font-size: 18px; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--text-secondary); transition: all 0.2s;
}
.btn-attach:hover { border-color: var(--ku-navy); color: var(--ku-navy); }
.chat-input-row textarea {
    flex: 1; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 20px; font-size: 14px; font-family: inherit;
    resize: none; max-height: 100px; outline: none; line-height: 1.4;
}
.chat-input-row textarea:focus { border-color: var(--ku-navy); }
.btn-send {
    width: 40px; height: 40px; background: var(--ku-navy); color: #fff;
    border: none; border-radius: 50%; cursor: pointer; display: flex;
    align-items: center; justify-content: center; font-size: 16px;
    flex-shrink: 0; transition: background 0.2s;
}
.btn-send:hover { background: var(--ku-navy-light); }
.btn-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Voice Recording ────────────────────────────────── */
.btn-voice {
    width: 40px; height: 40px; background: none; border: 1px solid var(--border);
    border-radius: 50%; cursor: pointer; font-size: 18px; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--text-secondary); transition: all 0.2s;
}
.btn-voice:hover { border-color: #d32f2f; color: #d32f2f; background: #fff5f5; }
.btn-voice.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.voice-recording-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: #fff5f5; border: 1px solid #e57373;
    border-radius: 20px; animation: pulse-border 1.5s infinite;
}
@keyframes pulse-border {
    0%, 100% { border-color: #e57373; }
    50% { border-color: #ef9a9a; }
}
.recording-indicator { font-size: 14px; animation: pulse-dot 1s infinite; }
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.recording-text { flex: 1; font-size: 14px; color: #d32f2f; font-weight: 500; }
.btn-cancel-voice {
    background: none; border: 1px solid #e57373; color: #d32f2f;
    border-radius: 50%; width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: all 0.2s;
}
.btn-cancel-voice:hover { background: #ffebee; }
.btn-stop-voice {
    background: #d32f2f; color: #fff; border: none;
    border-radius: 16px; padding: 6px 14px; cursor: pointer;
    font-size: 13px; font-weight: 600; transition: background 0.2s;
}
.btn-stop-voice:hover { background: #b71c1c; }
.voice-error-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 14px; background: #fff3cd; border: 1px solid #ffc107;
    border-radius: 12px; margin-bottom: 6px; font-size: 13px; color: #856404;
}
.voice-error-bar button {
    background: none; border: none; color: #856404; cursor: pointer;
    font-size: 16px; margin-left: auto; padding: 0 4px;
}

/* ── Message Footer & TTS ───────────────────────────── */
.msg-footer { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.btn-speak {
    background: none; border: none; cursor: pointer; font-size: 16px;
    opacity: 0.5; padding: 2px 4px; border-radius: 4px; transition: all 0.2s;
}
.btn-speak:hover { opacity: 1; background: rgba(0,0,0,0.05); }
.btn-speak.speaking { opacity: 1; animation: pulse-dot 1s infinite; }
.voice-badge { font-size: 14px; opacity: 0.6; }

/* ── Service Suggestion Card ─────────────────────────── */
.service-suggestion {
    background: linear-gradient(135deg, #e8f5e9, #fff3e0);
    border: 2px solid var(--success);
    border-radius: var(--radius);
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 2px 12px rgba(40, 167, 69, 0.15);
    animation: slideUp 0.3s ease-out;
    align-self: flex-start;
    max-width: min(90%, 620px);
    overflow-wrap: break-word;
}
.service-suggestion h4 { color: var(--success); margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.service-suggestion .service-name { font-size: 17px; font-weight: 600; color: var(--ku-navy); margin-bottom: 8px; }
.service-suggestion .service-details { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.5; }
.service-suggestion .btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.btn-create-request {
    padding: 8px 16px; background: var(--ku-navy); color: #fff;
    border: none; border-radius: 6px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.btn-create-request:hover { background: var(--ku-navy-light); }
.btn-continue-chat {
    padding: 8px 16px; background: transparent; color: var(--text-secondary);
    border: 1px solid var(--border); border-radius: 6px; font-size: 13px; cursor: pointer;
}

/* ── Chat Header Bar ─────────────────────────────────── */
.chat-header-bar {
    display: none; align-items: center; justify-content: space-between;
    padding: 8px 16px; background: #f8f9fa; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.chat-header-bar.visible { display: flex; }
.chat-header-bar .chat-session-label { font-size: 12px; color: var(--text-secondary); }
.btn-new-chat {
    padding: 5px 12px; background: #fff; color: var(--ku-navy);
    border: 1px solid var(--ku-navy); border-radius: 6px; font-size: 12px;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-new-chat:hover { background: var(--ku-navy); color: #fff; }

/* ── Chat Profile Strip ──────────────────────────────── */
.chat-profile-strip {
    display: none; align-items: center; gap: 8px; padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa, #eef2f7);
    border-bottom: 1px solid var(--border); flex-shrink: 0; transition: padding 0.2s;
}
.chat-profile-strip.visible { display: flex; }
.chat-profile-strip .strip-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--ku-navy); color: var(--ku-gold);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.chat-profile-strip .strip-info { flex: 1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.chat-profile-strip .strip-name { font-weight: 600; font-size: 13px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-profile-strip .strip-id { font-size: 11px; color: var(--text-secondary); white-space: nowrap; }
.chat-profile-strip .strip-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.strip-badge.gpa-green { background: #d1fae5; color: #065f46; }
.strip-badge.gpa-orange { background: #fef3c7; color: #92400e; }
.strip-badge.gpa-red { background: #fee2e2; color: #991b1b; }
.strip-badge.standing { background: #dbeafe; color: var(--ku-navy); }
.strip-badge.semester { background: #ede9fe; color: #5b21b6; }
.strip-badge.flag-warn { background: #fef3c7; color: #92400e; }
.strip-badge.flag-hold { background: #fee2e2; color: #991b1b; }
.chat-profile-strip .strip-courses { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.chat-profile-strip .course-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #dbeafe; color: var(--ku-navy); font-size: 10px; font-weight: 600; white-space: nowrap; cursor: default; }
.chat-profile-strip .strip-actions { display: flex; gap: 2px; flex-shrink: 0; }
.chat-profile-strip .btn-strip { background: none; border: none; cursor: pointer; font-size: 15px; color: var(--text-secondary); padding: 4px 6px; border-radius: 4px; transition: all 0.2s; line-height: 1; }
.chat-profile-strip .btn-strip:hover { background: rgba(0,0,0,0.06); color: var(--ku-navy); }
.chat-profile-strip.collapsed .strip-info,
.chat-profile-strip.collapsed .strip-courses { display: none; }
.chat-profile-strip.collapsed { gap: 6px; padding: 5px 16px; }

/* ── Profile Sidebar ─────────────────────────────────── */
.profile-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 250; }
.profile-sidebar-overlay.active { display: block; }
.profile-sidebar { position: fixed; top: 0; right: -380px; width: 380px; height: 100vh; background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,0.15); z-index: 260; transition: right 0.3s ease; overflow-y: auto; }
.profile-sidebar.open { right: 0; }
.profile-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--ku-navy); color: #fff; position: sticky; top: 0; z-index: 1; }
.profile-sidebar-header h3 { font-size: 15px; font-weight: 600; margin: 0; }
.btn-close-sidebar { background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 2px 8px; border-radius: 4px; line-height: 1; }
.btn-close-sidebar:hover { background: rgba(255,255,255,0.25); }
.profile-sidebar-body { padding: 20px; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.5px; margin-bottom: 8px; }
.sidebar-course-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.sidebar-course-row:last-child { border-bottom: none; }
.sidebar-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-detail-item .sd-label { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); letter-spacing: 0.3px; }
.sidebar-detail-item .sd-value { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-top: 1px; }
.sidebar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.sidebar-stat { text-align: center; padding: 12px 8px; border-radius: 10px; background: #f8f9fa; }
.sidebar-stat .ss-val { font-size: 22px; font-weight: 700; }
.sidebar-stat .ss-lbl { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; margin-top: 2px; }
.sidebar-progress-bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.sidebar-progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }

/* ── Chat Request Hint ───────────────────────────────── */
.chat-request-hint { display: none; text-align: center; padding: 4px 0 2px; }
.chat-request-hint a { font-size: 11px; color: var(--text-secondary); text-decoration: none; }
.chat-request-hint a:hover { color: var(--ku-navy); }
.chat-request-hint a span { text-decoration: underline; }

/* ── Service Action Button ───────────────────────────── */
.btn-request-service { margin-top: 10px; padding: 7px 16px; background: var(--ku-navy); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background 0.2s; }
.btn-request-service:hover { background: var(--ku-navy-light); }

/* ── Case Count Badge ────────────────────────────────── */
.case-count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; margin-left: 6px; }

/* ── Chat Action Bar ─────────────────────────────────── */
.chat-action-bar { display: none; padding: 8px 16px; background: #e8f5e9; border-top: 1px solid #c8e6c9; text-align: center; flex-shrink: 0; }
.chat-action-bar.visible { display: block; }
.btn-create-ticket { padding: 8px 20px; background: var(--success); color: #fff; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; font-weight: 600; }
.btn-create-ticket:hover { background: #218838; }
.chat-action-bar .hint { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* ── Case Review Overlay ─────────────────────────────── */
.review-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; justify-content: center; align-items: center; padding: 20px; }
.review-overlay.active { display: flex; }
.review-panel { background: #fff; border-radius: var(--radius); width: 100%; max-width: 580px; max-height: 85vh; overflow-y: auto; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.review-panel h3 { font-size: 18px; color: var(--ku-navy); margin-bottom: 4px; }
.review-panel .review-subtitle { color: var(--text-secondary); font-size: 13px; margin-bottom: 20px; }
.review-panel .review-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.review-panel .btn-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-secondary); padding: 4px; }
.review-field { margin-bottom: 16px; }
.review-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.review-field input, .review-field textarea, .review-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; }
.review-field textarea { resize: vertical; min-height: 80px; }
.review-field input:focus, .review-field textarea:focus { border-color: var(--ku-navy); box-shadow: 0 0 0 3px rgba(0,51,102,0.1); }
.review-info { background: var(--ku-blue-bg); border-radius: 8px; padding: 12px; font-size: 13px; color: var(--ku-navy); margin-bottom: 16px; }
.review-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.review-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.btn-submit-case { padding: 10px 24px; background: var(--ku-navy); color: #fff; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-submit-case:hover { background: var(--ku-navy-light); }
.btn-submit-case:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-cancel-review { padding: 10px 20px; background: transparent; color: var(--text-secondary); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; cursor: pointer; }

/* ── Cases Page ──────────────────────────────────────── */
.cases-container { flex: 1; overflow-y: auto; padding: 20px; }
.cases-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.cases-header h2 { font-size: 20px; color: var(--ku-navy); }
.cases-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; outline: none; }
.case-list { display: flex; flex-direction: column; gap: 10px; }
.case-card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow 0.2s; border-left: 4px solid var(--border); }
.case-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.case-card .case-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.case-card .case-number { font-weight: 600; color: var(--ku-navy); font-size: 14px; }
.case-card .case-subject { font-size: 14px; color: var(--text-primary); margin-bottom: 6px; }
.case-card .case-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; color: #fff; }
.channel-badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; background: var(--ku-blue-bg); color: var(--ku-navy); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-secondary); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ── Case Detail Overlay ─────────────────────────────── */
.case-detail-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; justify-content: center; align-items: center; padding: 20px; }
.case-detail-overlay.active { display: flex; }
.case-detail-panel { background: #fff; border-radius: var(--radius); width: 100%; max-width: 640px; max-height: 80vh; overflow-y: auto; padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.case-detail-panel .detail-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 20px; }
.case-detail-panel h3 { font-size: 18px; color: var(--ku-navy); }
.btn-close-detail { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-secondary); padding: 4px; }
.detail-row { display: flex; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.detail-field { flex: 1; min-width: 140px; }
.detail-field .field-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.detail-field .field-value { font-size: 14px; color: var(--text-primary); }
.follow-up-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.follow-up-section h4 { margin-bottom: 10px; font-size: 14px; }
.follow-up-input { display: flex; gap: 8px; }
.follow-up-input textarea { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: inherit; resize: none; height: 60px; }
.btn-follow-up { padding: 8px 16px; background: var(--ku-navy); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.case-description { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; }

/* ── Activity Timeline ───────────────────────────────── */
.activity-timeline { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.activity-timeline h4 { margin-bottom: 12px; font-size: 14px; color: var(--text-primary); }
.activity-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 13px; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: var(--bg-secondary); }
.activity-content { flex: 1; }
.activity-action { font-weight: 600; color: var(--text-primary); }
.activity-detail { color: var(--text-secondary); font-size: 12px; margin-top: 2px; }
.activity-time { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }

/* ── Case Reference Banner ───────────────────────────── */
.case-reference-banner { background: linear-gradient(135deg, #e8f5e9, #f1f8e9); border: 1px solid #a5d6a7; border-radius: 10px; padding: 14px 18px; margin: 10px 0; display: flex; align-items: center; gap: 12px; }
.case-reference-banner .ref-icon { font-size: 24px; }
.case-reference-banner .ref-text { flex: 1; }
.case-reference-banner .ref-number { font-weight: 700; color: var(--ku-navy); font-size: 16px; cursor: pointer; text-decoration: underline; }
.case-reference-banner .ref-number:hover { color: var(--ku-gold); }
.case-reference-banner .ref-label { font-size: 12px; color: #558b2f; }

/* ── Session State Badge ─────────────────────────────── */
.session-state-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; margin-left: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.session-state-badge.state-conversing { background: #e3f2fd; color: #1565c0; }
.session-state-badge.state-gathering { background: #fff3e0; color: #e65100; }
.session-state-badge.state-ready { background: #e8f5e9; color: #2e7d32; }
.session-state-badge.state-qualifying { background: #f3e5f5; color: #7b1fa2; }
.session-state-badge.state-casecreated { background: #e8f5e9; color: #1b5e20; }
.session-state-badge.state-sessionclosed { background: #eceff1; color: #546e7a; }

/* ── Eligibility Issues Panel ────────────────────────── */
.eligibility-issues-panel { background: #fff8e1; border: 1px solid #ffcc02; border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
.eligibility-header { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.eligibility-icon.blocking { color: #d32f2f; font-size: 18px; }
.eligibility-icon.advisory { color: #f57c00; font-size: 18px; }
.eligibility-issue { padding: 8px 12px; margin: 4px 0; border-radius: 6px; font-size: 13px; }
.eligibility-issue.blocking { background: #ffebee; border-left: 3px solid #d32f2f; }
.eligibility-issue.advisory { background: #fff3e0; border-left: 3px solid #f57c00; }
.eligibility-issue .issue-message { color: #333; }
.eligibility-issue .issue-action { color: #666; font-size: 12px; margin-top: 4px; font-style: italic; }

/* ── Profile Page ────────────────────────────────────── */
.profile-container { flex: 1; overflow-y: auto; padding: 20px; }
.profile-card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 500px; }
.profile-card h2 { font-size: 20px; color: var(--ku-navy); margin-bottom: 20px; }
.profile-field { margin-bottom: 16px; }
.profile-field .label { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.profile-field .value { font-size: 15px; color: var(--text-primary); }

/* ── Alert Banners ───────────────────────────────────── */
.alert-banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 500; animation: slideUp 0.3s ease-out; }
.alert-banner.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-banner.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-banner.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-banner .alert-icon { font-size: 18px; flex-shrink: 0; }
.alert-banner .alert-text { flex: 1; }
.alert-banner .alert-dismiss { background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.5; padding: 2px 6px; }
.alert-banner .alert-dismiss:hover { opacity: 1; }

/* ── Profile Stats Grid ──────────────────────────────── */
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-align: center; border-top: 3px solid var(--ku-navy); }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--ku-navy); margin-bottom: 2px; }
.stat-card .stat-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card.gpa-green { border-top-color: var(--success); }
.stat-card.gpa-green .stat-value { color: var(--success); }
.stat-card.gpa-orange { border-top-color: var(--warning); }
.stat-card.gpa-orange .stat-value { color: #d97706; }
.stat-card.gpa-red { border-top-color: var(--danger); }
.stat-card.gpa-red .stat-value { color: var(--danger); }

/* ── Credits Progress Bar ────────────────────────────── */
.credits-bar-container { margin-bottom: 20px; background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.credits-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.credits-bar-header .credits-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.credits-bar-header .credits-numbers { font-size: 12px; color: var(--text-secondary); }
.credits-bar { height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; }
.credits-bar-fill { height: 100%; border-radius: 5px; transition: width 0.6s ease-out; background: var(--ku-navy); }

/* ── Profile Sections ────────────────────────────────── */
.profile-sections { display: flex; flex-direction: column; gap: 12px; }
.profile-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.profile-section-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; user-select: none; transition: background 0.2s; }
.profile-section-header:hover { background: #f9fafb; }
.profile-section-header .section-icon { font-size: 18px; }
.profile-section-header .section-title { flex: 1; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.profile-section-header .section-toggle { font-size: 12px; color: var(--text-secondary); transition: transform 0.2s; }
.profile-section.open .section-toggle { transform: rotate(180deg); }
.profile-section-body { display: none; padding: 0 16px 16px; }
.profile-section.open .profile-section-body { display: block; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.profile-grid-item .pg-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px; }
.profile-grid-item .pg-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

/* ── Flag Badges ─────────────────────────────────────── */
.profile-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.flag-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.flag-badge.flag-intl { background: #dbeafe; color: #1e40af; }
.flag-badge.flag-sponsored { background: #d1fae5; color: #065f46; }
.flag-badge.flag-fulltime { background: #ede9fe; color: #5b21b6; }
.flag-badge.flag-probation { background: #fef3c7; color: #92400e; }
.flag-badge.flag-hold { background: #fee2e2; color: #991b1b; }

/* ── Advisor Card ────────────────────────────────────── */
.advisor-card { background: linear-gradient(135deg, #eff6ff, #f0fdf4); border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.advisor-card h4 { font-size: 13px; color: var(--ku-navy); margin-bottom: 8px; }
.advisor-card .advisor-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.advisor-card .advisor-email { font-size: 13px; color: var(--ku-navy); text-decoration: none; }
.advisor-card .advisor-email:hover { text-decoration: underline; }
.btn-email-advisor { margin-top: 8px; padding: 6px 14px; background: var(--ku-navy); color: #fff; border: none; border-radius: 6px; font-size: 12px; cursor: pointer; font-weight: 600; }
.btn-email-advisor:hover { background: var(--ku-navy-light); }

/* ── Loading & Utilities ─────────────────────────────── */
.loading-spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.6s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing-indicator { display: flex; align-items: center; gap: 8px; padding: 10px 14px; align-self: flex-start; background: var(--bg-card); border-radius: var(--radius); margin: 4px 0; box-shadow: var(--shadow); }
.typing-indicator .typing-label { font-size: 12px; color: var(--text-secondary); }
.typing-indicator .dots { display: flex; gap: 4px; }
.typing-indicator .dots span { width: 8px; height: 8px; background: var(--ku-navy); border-radius: 50%; animation: bounce 1.4s ease-in-out infinite; }
.typing-indicator .dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: #333; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px; z-index: 500; opacity: 0; transition: opacity 0.3s; }
.toast.show { opacity: 1; }

/* ── Workflow Progress ───────────────────────────────── */
.workflow-progress { background: #fff; border-top: 2px solid var(--ku-navy); padding: 12px 16px; flex-shrink: 0; animation: slideUp 0.3s ease-out; }
.workflow-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.workflow-title { font-weight: 700; font-size: 13px; color: var(--ku-navy); display: flex; align-items: center; gap: 6px; }
.workflow-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-secondary); padding: 2px 6px; border-radius: 4px; line-height: 1; transition: all 0.2s; }
.workflow-close:hover { background: #f0f0f0; color: var(--text-primary); }
.workflow-steps { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.workflow-step { display: flex; flex-direction: column; align-items: center; min-width: 64px; position: relative; }
.workflow-step-circle { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; border: 2px solid #cbd5e0; background: #fff; color: #cbd5e0; transition: all 0.3s ease; position: relative; z-index: 1; }
.workflow-step.completed .workflow-step-circle { background: #38a169; border-color: #38a169; color: #fff; }
.workflow-step.current .workflow-step-circle { border-color: var(--ku-navy); color: var(--ku-navy); background: #fff; animation: workflowPulse 2s ease-in-out infinite; }
.workflow-step.future .workflow-step-circle { border-color: #cbd5e0; color: #cbd5e0; background: #fff; }
@keyframes workflowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0, 51, 102, 0.3); } 50% { box-shadow: 0 0 0 6px rgba(0, 51, 102, 0); } }
.workflow-step-label { font-size: 10px; color: var(--text-secondary); margin-top: 4px; text-align: center; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.workflow-step.completed .workflow-step-label { color: #38a169; font-weight: 600; }
.workflow-step.current .workflow-step-label { color: var(--ku-navy); font-weight: 600; }
.workflow-connector { flex: 1; height: 2px; min-width: 20px; background: #cbd5e0; margin-top: 18px; align-self: flex-start; transition: background 0.3s ease; }
.workflow-connector.completed { background: #38a169; }
.workflow-mobile-compact { display: none; align-items: center; gap: 8px; font-size: 13px; }
.workflow-mobile-compact .wmc-step-text { flex: 1; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workflow-mobile-compact .wmc-fraction { color: var(--text-secondary); font-size: 12px; font-weight: 600; white-space: nowrap; }
.workflow-mobile-compact .wmc-bar { flex: 1; height: 4px; background: #e5e7eb; border-radius: 2px; overflow: hidden; min-width: 60px; }
.workflow-mobile-compact .wmc-bar-fill { height: 100%; background: var(--ku-navy); border-radius: 2px; transition: width 0.4s ease; }

/* ── Mobile Responsive ───────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .bottom-tabs { display: block; }
    .header-brand h1 { font-size: 14px; }
    .header-user .user-name { display: none; }
    .chat-msg { max-width: 88%; }
    .cases-header { flex-direction: column; align-items: flex-start; }
    .case-detail-panel { max-height: 90vh; margin: 10px; }
    .review-panel { max-height: 92vh; margin: 8px; padding: 20px; }
    .profile-card { max-width: 100%; }
    .profile-sidebar { width: 100%; right: -100%; }
    .chat-profile-strip .strip-name { max-width: 100px; }
    .chat-profile-strip .strip-courses { display: none; }
    .workflow-steps { display: none !important; }
    .workflow-mobile-compact { display: flex !important; }
}
