/* ============================================
   Mondria-Notaires — Orange / White / Blue
   Dark theme with luminous glow effects
   ============================================ */

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

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

:root {
    /* ── Core palette ── */
    --orange: #f97316;
    --orange-light: #fb923c;
    --orange-dark: #ea580c;
    --orange-glow: rgba(249, 115, 22, 0.25);
    --orange-subtle: rgba(249, 115, 22, 0.08);

    --blue: #3b82f6;
    --blue-light: #60a5fa;
    --blue-dark: #2563eb;
    --blue-glow: rgba(59, 130, 246, 0.20);
    --blue-subtle: rgba(59, 130, 246, 0.08);

    /* ── Backgrounds ── */
    --bg-primary: #0c0e14;
    --bg-secondary: #111420;
    --bg-tertiary: #161a28;
    --bg-hover: #1c2133;
    --bg-input: #131724;
    --bg-glass: rgba(22, 26, 40, 0.7);

    /* ── Text ── */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #5a6478;

    /* ── Bubbles ── */
    --user-bubble: linear-gradient(135deg, rgba(249, 115, 22, 0.18) 0%, rgba(234, 88, 12, 0.12) 100%);
    --user-bubble-border: rgba(249, 115, 22, 0.25);
    --user-bubble-text: #fddcb5;

    /* ── Borders ── */
    --border: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.10);

    /* ── Misc ── */
    --radius: 12px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;

    /* ── Glow shadows ── */
    --glow-orange: 0 0 20px rgba(249, 115, 22, 0.15), 0 0 60px rgba(249, 115, 22, 0.05);
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.05);
    --glow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 40px rgba(249, 115, 22, 0.04);
}

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================================
   BOOTSTRAP DARK OVERRIDES
   =================================================== */

.table-dark {
    --bs-table-bg: var(--bg-tertiary);
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: var(--bg-hover);
    --bs-table-color: var(--text-secondary);
}

.table-dark thead th {
    background: var(--bg-secondary);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--orange-light);
    border-bottom: 1px solid rgba(249, 115, 22, 0.15);
    padding: 10px 12px;
}

.rounded-table {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.card.bg-dark {
    background: var(--bg-tertiary) !important;
    border-color: var(--border) !important;
    transition: all 0.2s ease;
}

.card.bg-dark:hover {
    border-color: rgba(249, 115, 22, 0.2) !important;
    box-shadow: var(--glow-card);
}

.form-control.bg-dark {
    background: var(--bg-input) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

.form-control.bg-dark:focus {
    background: var(--bg-input) !important;
    border-color: var(--orange) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 2px var(--orange-glow);
}

.cursor-pointer {
    cursor: pointer;
}

.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Override Bootstrap primary with orange */
.btn-primary {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.2s ease !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%) !important;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4) !important;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.4 !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-outline-primary {
    color: var(--orange) !important;
    border-color: var(--orange) !important;
}

.btn-outline-primary:hover {
    background: var(--orange-subtle) !important;
    color: var(--orange-light) !important;
    border-color: var(--orange-light) !important;
}

.btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: var(--border-light) !important;
}

.btn-outline-secondary:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.btn-outline-warning {
    color: var(--orange-light) !important;
    border-color: rgba(249, 115, 22, 0.4) !important;
}

.btn-outline-warning:hover {
    background: var(--orange-subtle) !important;
    color: var(--orange) !important;
    border-color: var(--orange) !important;
}

.btn-warning {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%) !important;
    color: white !important;
}

.text-primary { color: var(--blue-light) !important; }
.text-warning { color: var(--orange-light) !important; }

/* Badge overrides */
.badge.bg-primary { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%) !important; }
.badge.bg-success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important; }
.badge.bg-info { background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue) 100%) !important; }
.badge.bg-warning { background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%) !important; color: white !important; }
.badge.bg-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important; }

/* ===================================================
   LAYOUT
   =================================================== */

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===================================================
   SIDEBAR
   =================================================== */

.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
}

/* Subtle gradient accent line on the sidebar right edge */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, var(--orange) 0%, transparent 30%, transparent 70%, var(--blue) 100%);
    opacity: 0.4;
}

.sidebar-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Glow under header */
.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
    opacity: 0.3;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 12px rgba(249, 115, 22, 0.35);
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.brand-sub {
    font-size: 11px;
    color: var(--orange-light);
    font-weight: 500;
    opacity: 0.8;
}

.new-chat-btn {
    border-style: dashed !important;
    border-color: rgba(249, 115, 22, 0.3) !important;
    color: var(--orange-light) !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm) !important;
}

.new-chat-btn:hover {
    background: var(--orange-subtle) !important;
    color: var(--orange) !important;
    border-color: var(--orange) !important;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.1);
}

/* Sidebar Sessions */
.sidebar-sessions {
    padding: 4px 8px;
    min-height: 0;
}

.sidebar-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 10px 10px 4px;
}

.session-item {
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s ease;
    margin-bottom: 1px;
    border: 1px solid transparent;
}

.session-item i {
    font-size: 12px;
    opacity: 0.4;
    flex-shrink: 0;
}

.session-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border);
}

.session-item:hover i {
    opacity: 0.7;
}

.session-item.active {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.10) 0%, rgba(249, 115, 22, 0.04) 100%);
    color: var(--text-primary);
    font-weight: 500;
    border-color: rgba(249, 115, 22, 0.2);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.06);
}

.session-item.active i {
    opacity: 0.8;
    color: var(--orange-light);
}

/* Sidebar Nav */
.sidebar-nav-section {
    padding: 4px 8px 8px;
    border-top: 1px solid var(--border);
}

.nav-item {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 1px;
}

.nav-item i {
    font-size: 14px;
    opacity: 0.5;
    width: 18px;
    text-align: center;
}

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

.nav-item:hover i {
    opacity: 0.8;
    color: var(--blue-light);
}

.nav-item-highlight {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.12) 0%, rgba(249, 115, 22, 0.06) 100%);
    border: 1px solid rgba(249, 115, 22, 0.25);
    color: var(--orange-light);
    font-weight: 600;
}

.nav-item-highlight:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.20) 0%, rgba(249, 115, 22, 0.10) 100%);
    border-color: rgba(249, 115, 22, 0.4);
    color: var(--orange);
}

.nav-item-highlight i {
    opacity: 0.9;
    color: var(--orange-light);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
}

.user-avatar-sm {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.user-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.footer-text {
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ===================================================
   MAIN CONTENT
   =================================================== */

.main-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
}

/* Subtle radial glow in the center of main content */
.main-content::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ===================================================
   PAGE TITLES
   =================================================== */

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.4px;
}

.page-title i {
    color: var(--orange);
    opacity: 0.8;
}

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.section-title i {
    color: var(--blue-light);
    opacity: 0.7;
}

/* ===================================================
   STAT CARDS (Dashboard)
   =================================================== */

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* Glowing top border accent */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stat-card:hover {
    border-color: rgba(249, 115, 22, 0.2);
    transform: translateY(-3px);
    box-shadow: var(--glow-card);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 19px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-label {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================================
   CHAT PAGE
   =================================================== */

.chat-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

.chat-header {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    min-height: 52px;
    position: relative;
}

/* Orange glow line under chat header */
.chat-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 5%;
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.3), transparent);
}

.header-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--orange-subtle), rgba(249, 115, 22, 0.15));
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orange-light);
    font-size: 15px;
    flex-shrink: 0;
}

/* ===================================================
   MESSAGES AREA
   =================================================== */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ===================================================
   WELCOME / EMPTY STATE
   =================================================== */

.welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px 40px;
    flex: 1;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -1px;
    box-shadow: var(--glow-orange);
}

.welcome-hint {
    color: var(--text-muted) !important;
    letter-spacing: 1px;
}

.empty-state-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* ===================================================
   SUGGESTIONS
   =================================================== */

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 680px;
    width: 100%;
    margin-top: 4px;
}

.suggestion-card {
    padding: 13px 16px;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.45;
}

.suggestion-card:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(249, 115, 22, 0.03) 100%);
    border-color: rgba(249, 115, 22, 0.25);
    color: var(--text-primary);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.06);
    transform: translateY(-1px);
}

/* ===================================================
   CHAT BUBBLES
   =================================================== */

.chat-bubble {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.bubble-user {
    padding-top: 6px;
    padding-bottom: 6px;
}

.bubble-assistant {
    padding-top: 6px;
    padding-bottom: 16px;
}

.bubble-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.bubble-avatar {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

.user-avatar {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.1));
    color: var(--orange-light);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.assistant-avatar {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: white;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 0;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.bubble-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.bubble-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.bubble-content {
    line-height: 1.7;
    font-size: 14px;
}

.bubble-user .bubble-content {
    background: var(--user-bubble);
    color: var(--user-bubble-text);
    padding: 11px 16px;
    border-radius: var(--radius);
    border-top-right-radius: 4px;
    display: inline-block;
    float: right;
    border: 1px solid var(--user-bubble-border);
}

.bubble-user .bubble-content p {
    margin: 0;
}

.bubble-user .bubble-header {
    justify-content: flex-end;
}

.bubble-assistant .bubble-content {
    color: var(--text-primary);
    padding: 2px 0;
}

/* ===================================================
   MARKDOWN IN ASSISTANT BUBBLES
   =================================================== */

.bubble-assistant .bubble-content h1,
.bubble-assistant .bubble-content h2,
.bubble-assistant .bubble-content h3 {
    margin-top: 18px;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.2px;
}

.bubble-assistant .bubble-content h1 { font-size: 17px; }
.bubble-assistant .bubble-content h2 { font-size: 15px; }
.bubble-assistant .bubble-content h3 { font-size: 14px; }

.bubble-assistant .bubble-content h1:first-child,
.bubble-assistant .bubble-content h2:first-child,
.bubble-assistant .bubble-content h3:first-child {
    margin-top: 0;
}

.bubble-assistant .bubble-content p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.bubble-assistant .bubble-content ul,
.bubble-assistant .bubble-content ol {
    margin: 6px 0 10px;
    padding-left: 20px;
    color: var(--text-secondary);
}

.bubble-assistant .bubble-content li {
    margin-bottom: 3px;
}

.bubble-assistant .bubble-content li::marker {
    color: var(--orange-light);
}

.bubble-assistant .bubble-content code {
    background: rgba(249, 115, 22, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--orange-light);
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.bubble-assistant .bubble-content pre {
    background: var(--bg-secondary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 8px 0 10px;
    border: 1px solid var(--border);
}

.bubble-assistant .bubble-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.bubble-assistant .bubble-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 10px;
    font-size: 13px;
}

.bubble-assistant .bubble-content th,
.bubble-assistant .bubble-content td {
    padding: 8px 12px;
    border: 1px solid var(--border);
    text-align: left;
    color: var(--text-secondary);
}

.bubble-assistant .bubble-content th {
    background: var(--bg-tertiary);
    font-weight: 700;
    color: var(--orange-light);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.bubble-assistant .bubble-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.bubble-assistant .bubble-content blockquote {
    border-left: 3px solid var(--orange);
    padding-left: 14px;
    margin: 8px 0;
    color: var(--text-muted);
}

.bubble-assistant .bubble-content a {
    color: var(--blue-light);
    text-decoration: none;
}

.bubble-assistant .bubble-content a:hover {
    text-decoration: underline;
    color: var(--blue);
}

.bubble-assistant .bubble-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 14px 0;
}

/* ===================================================
   FEEDBACK BUTTONS
   =================================================== */

.bubble-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.chat-bubble:hover .bubble-actions {
    opacity: 1;
}

.bubble-actions .feedback-active {
    opacity: 1 !important;
}

.btn-feedback {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

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

.btn-feedback.feedback-active {
    color: var(--orange);
    background: var(--orange-subtle);
    border-color: rgba(249, 115, 22, 0.3);
}

/* ===================================================
   TYPING INDICATOR
   =================================================== */

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 24px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--orange);
    border-radius: 50%;
    animation: typing-pulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

.typing-text {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 6px;
    font-weight: 500;
}

@keyframes typing-pulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
    40% { opacity: 1; transform: scale(1); }
}

/* ===================================================
   CHAT INPUT
   =================================================== */

.chat-input-area {
    padding: 14px 20px 18px;
    background: var(--bg-primary);
    max-width: 768px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.input-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 4px 4px 14px;
    transition: all 0.2s ease;
}

.input-container:focus-within {
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.08), 0 0 20px rgba(249, 115, 22, 0.05);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px 0;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 14px;
    resize: none;
    min-height: 36px;
    max-height: 120px;
    line-height: 1.5;
    outline: none;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-send {
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.25);
}

.btn-send:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange) 100%);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
    transform: translateY(-1px);
}

.btn-send:disabled {
    opacity: 0.15;
    cursor: not-allowed;
    box-shadow: none;
}

.input-hint {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
    text-align: center;
}

/* ===================================================
   SCROLLBAR
   =================================================== */

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.35);
}

/* ===================================================
   RESPONSIVE
   =================================================== */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .chat-bubble {
        padding: 0 16px;
    }

    .chat-input-area {
        padding: 12px 16px 16px;
    }

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

    .welcome-section {
        padding: 40px 20px 30px;
    }

    .mode-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================
   MODE SELECTION SCREEN
   =================================================== */

.mode-selection-screen {
    animation: fadeInUp 0.3s ease;
}

.mode-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 580px;
    width: 100%;
}

.mode-select-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Glow line at top of mode card */
.mode-select-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    width: 50%;
    height: 2px;
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mode-select-card:first-child::before {
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

.mode-select-card:last-child::before {
    background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.mode-select-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.mode-select-card:first-child:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), var(--glow-blue);
}

.mode-select-card:last-child:hover {
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), var(--glow-orange);
}

.mode-select-card:hover::before {
    opacity: 1;
}

.mode-select-card strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.mode-select-card .mode-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
}

/* ===================================================
   SESSION NAMING FORM
   =================================================== */

.session-naming-form {
    max-width: 420px;
    width: 100%;
}

.session-naming-form .form-control-lg {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text-primary);
    font-size: 15px;
    padding: 12px 16px;
    border-radius: var(--radius);
}

.session-naming-form .form-control-lg:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
    background: var(--bg-input);
    color: var(--text-primary);
}

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

/* ===================================================
   SIDEBAR CLOSED SESSION
   =================================================== */

.session-item.session-closed {
    opacity: 0.5;
}

.session-item.session-closed:hover {
    opacity: 0.75;
}

.session-rating {
    font-size: 10px;
    color: var(--orange);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.session-rating i {
    opacity: 1 !important;
    color: var(--orange) !important;
}

/* ===================================================
   FILE UPLOAD BUTTON
   =================================================== */

.btn-attach {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-attach:hover {
    background: var(--orange-subtle);
    color: var(--orange-light);
}

.btn-attach i {
    font-size: 16px;
}

.file-status-msg {
    color: var(--orange-light);
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
}

/* ===================================================
   CLOSED SESSION BANNER
   =================================================== */

.closed-session-banner {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===================================================
   EVALUATION MODAL
   =================================================== */

.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.eval-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 16px;
    padding: 30px 30px 26px;
    min-width: 400px;
    max-width: 480px;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), var(--glow-orange);
    animation: fadeInModal 0.2s ease;
}

/* ===================================================
   STAR RATING
   =================================================== */

.star-rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-star {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 26px;
    line-height: 1;
    transition: all 0.15s ease;
}

.btn-star:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.4));
}

.btn-star i {
    transition: color 0.1s ease;
}

/* ===================================================
   DASHBOARD PAGE
   =================================================== */

.dashboard-page {
    overflow-y: auto;
    height: 100%;
}

.dash-section {
    margin-bottom: 24px;
}

/* ===================================================
   SESSIONS PAGE
   =================================================== */

.sessions-page {
    overflow-y: auto;
}

/* ===================================================
   ABOUT PAGE
   =================================================== */

.about-page .card {
    transition: all 0.2s ease;
}

.about-page .card:hover {
    border-color: rgba(249, 115, 22, 0.2) !important;
    box-shadow: var(--glow-card);
}

/* ===================================================
   ANIMATIONS
   =================================================== */

@keyframes fadeInModal {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

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