/* ═══════════════════════════════════════════════════════════════
   QUESTO HUB — MEDICAL BOT LUXURY DESIGN SYSTEM
   Deep Obsidian, Sleek Razor Borders, Radiant Gold & Teal
   ═══════════════════════════════════════════════════════════════ */

/* ── Universal Reset ── */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent !important;
}

:root {
    --qh-bg: #0b0e14;
    --qh-bg-alt: #0e1320;
    --qh-surface-solid: #111624;
    --qh-surface-card: #141a29;
    --qh-surface-hover: #182032;
    --qh-border: rgba(255, 255, 255, 0.08);
    --qh-border-hover: rgba(255, 255, 255, 0.18);
    --qh-border-gold: rgba(249, 223, 123, 0.35);
    --qh-border-teal: rgba(20, 184, 166, 0.35);
    
    /* Typography Colors */
    --qh-text: #e2e8f0;
    --qh-text-bright: #ffffff;
    --qh-text-muted: #94a3b8;
    --qh-text-dim: #64748b;
    
    /* Accent Palettes */
    --qh-gold: #f9df7b;
    --qh-gold-hover: #fce89b;
    --qh-gold-soft: rgba(249, 223, 123, 0.1);
    --qh-teal: #0d9488;
    --qh-teal-bright: #14b8a6;
    --qh-teal-soft: rgba(20, 184, 166, 0.1);
    --qh-purple: #8b5cf6;
    --qh-purple-bright: #a855f7;
    --qh-rose: #f43f5e;
    --qh-rose-soft: rgba(244, 63, 94, 0.1);
    --qh-amber: #f59e0b;
    --qh-amber-soft: rgba(245, 158, 11, 0.1);
    --qh-emerald: #10b981;
    --qh-emerald-soft: rgba(16, 185, 129, 0.1);

    /* Radii & Effects */
    --qh-radius-lg: 20px;
    --qh-radius-md: 14px;
    --qh-radius-sm: 8px;
    --qh-radius-pill: 9999px;
    --qh-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Helper Text Classes */
.text-gold { color: var(--qh-gold) !important; }
.text-teal { color: var(--qh-teal-bright) !important; }
.text-purple { color: var(--qh-purple-bright) !important; }
.text-rose { color: var(--qh-rose) !important; }
.text-amber { color: var(--qh-amber) !important; }
.text-emerald { color: var(--qh-emerald) !important; }

.accent-grad {
    background: linear-gradient(135deg, #f9df7b 0%, #fef3c7 45%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════
   MAIN WRAPPER & AMBIENT MESH
   ═══════════════════════════════════════ */
.mb-wrapper,
.mb-page {
    max-width: 1220px;
    margin: 88px auto 70px;
    padding: 0 20px;
    min-height: 80vh;
    color: var(--qh-text);
    position: relative;
    box-sizing: border-box;
}

.mb-mesh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.mb-mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.14;
    pointer-events: none;
}

.mb-blob-gold {
    width: 450px;
    height: 450px;
    background: var(--qh-gold);
    top: -100px;
    right: -50px;
}

.mb-blob-teal {
    width: 400px;
    height: 400px;
    background: var(--qh-teal-bright);
    top: 35%;
    left: -100px;
}

.mb-blob-purple {
    width: 350px;
    height: 350px;
    background: var(--qh-purple);
    bottom: -50px;
    right: 15%;
}

/* ═══════════════════════════════════════
   HERO SHOWCASE SECTION
   ═══════════════════════════════════════ */
.mb-hero-showcase {
    background: var(--qh-surface-solid);
    border-radius: var(--qh-radius-lg);
    padding: 46px 36px 36px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--qh-border);
    border-top: 1px solid var(--qh-border-gold);
    text-align: center;
}

.mb-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--qh-radius-pill);
    background: var(--qh-gold-soft);
    border: 1px solid var(--qh-border-gold);
    color: var(--qh-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.mb-hero-showcase h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.18;
    letter-spacing: -0.03em;
    color: var(--qh-text-bright);
    margin-bottom: 16px;
}

.mb-hero-lead {
    font-size: 1.05rem;
    color: var(--qh-text-muted);
    line-height: 1.65;
    max-width: 720px;
    margin: 0 auto 28px;
}

.mb-feature-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.mb-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--qh-text);
}

/* ═══════════════════════════════════════
   SETTING TOGGLE (CLINIC / PHARMACY)
   ═══════════════════════════════════════ */
.mb-setting-selector-box {
    background: var(--qh-surface-solid);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
}

.mb-setting-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--qh-text-bright);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mb-setting-switch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.mb-setting-card {
    background: var(--qh-surface-card);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    transition: var(--qh-transition);
    position: relative;
    color: var(--qh-text);
}

.mb-setting-card:hover {
    background: var(--qh-surface-hover);
    border-color: var(--qh-border-hover);
}

.mb-setting-card.active {
    border-color: var(--qh-gold);
    background: rgba(249, 223, 123, 0.04);
}

.mb-setting-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.mb-setting-text {
    flex: 1;
}

.mb-setting-text strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin-bottom: 4px;
}

.mb-setting-text p {
    font-size: 0.78rem;
    color: var(--qh-text-dim);
    margin: 0;
    line-height: 1.4;
}

.mb-setting-check {
    font-size: 1.1rem;
    color: var(--qh-text-dim);
    opacity: 0.3;
    transition: var(--qh-transition);
}

.mb-setting-card.active .mb-setting-check {
    color: var(--qh-gold);
    opacity: 1;
}

/* ═══════════════════════════════════════
   ROLE SELECTION CARDS GRID
   ═══════════════════════════════════════ */
.mb-role-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.mb-role-card {
    background: var(--qh-surface-solid);
    border: 1px solid var(--qh-border);
    border-top: 1px solid var(--qh-border-gold);
    border-radius: var(--qh-radius-lg);
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: var(--qh-transition);
    overflow: hidden;
}

.mb-role-card:hover {
    transform: translateY(-4px);
    border-color: var(--qh-border-hover);
    background: var(--qh-surface-card);
}

.mb-role-card.selected {
    border-color: var(--qh-gold);
    background: var(--qh-surface-card);
}

.mb-role-card.role-patient {
    border-top: 1px solid var(--qh-border-teal);
}
.mb-role-card.role-patient.selected {
    border-color: var(--qh-teal-bright);
}

.mb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.mb-role-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    transition: var(--qh-transition);
}

.mb-role-icon.icon-gold {
    background: var(--qh-gold-soft);
    border: 1px solid var(--qh-border-gold);
    color: var(--qh-gold);
}

.mb-role-icon.icon-teal {
    background: var(--qh-teal-soft);
    border: 1px solid var(--qh-border-teal);
    color: var(--qh-teal-bright);
}

.mb-card-tag {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: var(--qh-radius-pill);
}

.tag-gold {
    background: var(--qh-gold-soft);
    border: 1px solid var(--qh-border-gold);
    color: var(--qh-gold);
}

.tag-teal {
    background: var(--qh-teal-soft);
    border: 1px solid var(--qh-border-teal);
    color: var(--qh-teal-bright);
}

.mb-role-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin-bottom: 10px;
}

.mb-role-desc {
    font-size: 0.92rem;
    color: var(--qh-text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex: 1;
}

.mb-role-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-md);
}

.mb-hl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--qh-text);
}

.mb-hl-item i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Action Buttons */
.mb-btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--qh-gold);
    color: #0b0e14;
    font-weight: 800;
    font-size: 0.96rem;
    border-radius: var(--qh-radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--qh-transition);
}

.mb-btn-primary:hover {
    background: var(--qh-gold-hover);
    transform: translateY(-2px);
}

.mb-btn-secondary {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--qh-border);
    color: var(--qh-text-bright);
    font-weight: 800;
    font-size: 0.96rem;
    border-radius: var(--qh-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--qh-transition);
}

.mb-btn-secondary:hover {
    border-color: var(--qh-teal-bright);
    color: var(--qh-teal-bright);
    transform: translateY(-2px);
}

.mb-btn-arrow {
    transition: transform 0.2s ease;
}
.mb-btn-primary:hover .mb-btn-arrow,
.mb-btn-secondary:hover .mb-btn-arrow {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════
   ANALYTICS & STATS STRIP
   ═══════════════════════════════════════ */
.mb-analytics-strip {
    background: var(--qh-surface-solid);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-lg);
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 30px;
}

.mb-analytics-stat {
    text-align: center;
}

.mb-stat-num {
    display: block;
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--qh-text-bright);
    line-height: 1.1;
    margin-bottom: 4px;
}

.mb-stat-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--qh-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.mb-analytics-divider {
    width: 1px;
    height: 36px;
    background: var(--qh-border);
}

/* Educational Notice */
.mb-disclaimer-box {
    background: rgba(249, 223, 123, 0.03);
    border: 1px dashed var(--qh-border-gold);
    border-radius: var(--qh-radius-md);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: var(--qh-text-muted);
    line-height: 1.5;
}

.mb-disclaimer-icon {
    font-size: 1.3rem;
    color: var(--qh-gold);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   CHAT ROOM SIMULATION
   ═══════════════════════════════════════ */
.mb-chat-container {
    max-width: 960px;
    margin: 0 auto;
    background: var(--qh-surface-solid);
    border: 1px solid var(--qh-border);
    border-top: 1px solid var(--qh-border-gold);
    border-radius: var(--qh-radius-lg);
    display: flex;
    flex-direction: column;
    height: 80vh;
    min-height: 560px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.mb-chat-header {
    padding: 16px 22px;
    background: #141a29;
    border-bottom: 1px solid var(--qh-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.mb-character-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.mb-character-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--qh-gold-soft);
    border: 1px solid var(--qh-border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--qh-gold);
    flex-shrink: 0;
}

.mb-character-meta h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mb-character-meta span {
    font-size: 0.74rem;
    color: var(--qh-text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mb-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--qh-emerald);
    display: inline-block;
    animation: mb-pulse 2s infinite;
}

@keyframes mb-pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.mb-chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mb-btn-sm {
    padding: 8px 14px;
    border-radius: var(--qh-radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--qh-transition);
    border: none;
    text-decoration: none;
}

.mb-btn-end {
    background: var(--qh-rose-soft);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fb7185;
}

.mb-btn-end:hover {
    background: var(--qh-rose);
    color: #ffffff;
}

.mb-btn-switch {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--qh-border);
    color: var(--qh-text-muted);
}

.mb-btn-switch:hover {
    border-color: var(--qh-gold);
    color: var(--qh-gold);
}

/* Chat Messages Stream */
.mb-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.mb-msg {
    display: flex;
    gap: 12px;
    max-width: 82%;
    opacity: 1;
    transform: none;
}

.mb-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.mb-msg-ai {
    align-self: flex-start;
}

.mb-msg-bubble {
    padding: 13px 18px;
    border-radius: 16px;
    font-size: 0.94rem;
    line-height: 1.6;
    position: relative;
    word-break: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transform: translateZ(0);
}

.mb-msg-ai .mb-msg-bubble {
    background: #141a29;
    border: 1px solid var(--qh-border);
    color: var(--qh-text);
    border-bottom-left-radius: 4px;
}

.mb-msg-user .mb-msg-bubble {
    background: var(--qh-gold);
    color: #0b0e14;
    font-weight: 600;
    border-bottom-right-radius: 4px;
}

.mb-typing-indicator {
    display: none;
    align-self: flex-start;
    padding: 10px 16px;
    background: #141a29;
    border: 1px solid var(--qh-border);
    border-radius: 16px;
    gap: 5px;
    align-items: center;
}

.mb-toast-concluding {
    align-self: center;
    background: rgba(249, 223, 123, 0.1);
    border: 1px solid var(--qh-border-gold);
    color: var(--qh-gold);
    padding: 10px 20px;
    border-radius: var(--qh-radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px auto;
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM AI UNAVAILABLE / ERROR BANNER (ZERO SHADOWS & FULLY RESPONSIVE)
   ═══════════════════════════════════════════════════════════════════ */
.mb-error-toast {
    align-self: center;
    width: 100%;
    max-width: 580px;
    margin: 14px auto;
    box-shadow: none !important;
}

.mb-error-toast-card {
    background: linear-gradient(135deg, #221a2c 0%, #141624 100%);
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-top: 3px solid #f43f5e;
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: none !important;
    transform: translateZ(0);
}

.mb-error-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mb-error-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(244, 63, 94, 0.16);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fb7185;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mb-error-status-badge .mb-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f43f5e;
    display: inline-block;
    animation: mb-pulse-err 1.5s infinite ease-in-out;
}

.mb-error-toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-error-toast-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.mb-error-toast-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.mb-error-toast-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(244, 63, 94, 0.14);
    border: 1px solid rgba(244, 63, 94, 0.28);
    color: #fb7185;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.mb-error-toast-text {
    flex: 1;
    min-width: 0;
}

.mb-error-toast-title {
    font-size: 0.94rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.mb-error-toast-desc {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.45;
    word-break: break-word;
}

.mb-error-toast-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mb-btn-retry-ai {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.22) 0%, rgba(244, 63, 94, 0.38) 100%);
    border: 1px solid rgba(244, 63, 94, 0.45);
    color: #fff;
    font-size: 0.80rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.mb-btn-retry-ai:hover {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.35) 0%, rgba(244, 63, 94, 0.55) 100%);
    border-color: rgba(244, 63, 94, 0.6);
    transform: translateY(-1px);
}

@keyframes mb-pulse-err {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

@keyframes mb-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.mb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--qh-gold);
    animation: mb-blink 1.4s infinite both;
}

.mb-dot:nth-child(2) { animation-delay: 0.2s; }
.mb-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes mb-blink {
    0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.1); }
}

@keyframes mb-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat Input Bar (Auto-Expanding Upwards) */
.mb-chat-input-bar {
    padding: 14px 18px;
    background: var(--qh-surface-card);
    border-top: 1px solid var(--qh-border);
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.mb-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
}

.mb-input-wrap textarea,
.mb-input-wrap input {
    width: 100%;
    min-height: 46px;
    max-height: 160px;
    height: 46px;
    padding: 12px 18px;
    border-radius: var(--qh-radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--qh-border);
    color: var(--qh-text-bright);
    font-size: 0.94rem;
    line-height: 1.45;
    outline: none;
    resize: none;
    overflow-y: auto;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.mb-input-wrap textarea::-webkit-scrollbar {
    width: 4px;
}
.mb-input-wrap textarea::-webkit-scrollbar-thumb {
    background: var(--qh-border);
    border-radius: 4px;
}

.mb-input-wrap textarea::placeholder,
.mb-input-wrap input::placeholder {
    color: var(--qh-text-dim);
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: inherit;
    opacity: 0.75;
}

.mb-input-wrap textarea:focus,
.mb-input-wrap input:focus {
    border-color: var(--qh-gold);
    background: rgba(255, 255, 255, 0.06);
}

.mb-btn-send {
    height: 46px;
    padding: 0 22px;
    border-radius: var(--qh-radius-md);
    background: var(--qh-gold);
    color: #0b0e14;
    font-weight: 800;
    font-size: 0.96rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.mb-btn-send:hover {
    background: var(--qh-gold-hover);
    opacity: 0.95;
}

/* ═══════════════════════════════════════
   REPORT & SCORECARD SECTION
   ═══════════════════════════════════════ */
.mb-report-card {
    max-width: 900px;
    margin: 0 auto 40px;
    background: var(--qh-surface-solid);
    border: 1px solid var(--qh-border);
    border-top: 1px solid var(--qh-border-gold);
    border-radius: var(--qh-radius-lg);
    padding: 40px 32px;
    box-sizing: border-box;
}

.mb-report-header {
    text-align: center;
    margin-bottom: 36px;
}

.mb-score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: conic-gradient(var(--qh-gold) calc(var(--score-pct) * 1%), rgba(255, 255, 255, 0.08) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mb-score-circle::after {
    content: '';
    position: absolute;
    width: 114px;
    height: 114px;
    border-radius: 50%;
    background: var(--qh-surface-solid);
}

.mb-score-inner {
    position: relative;
    z-index: 2;
    text-align: center;
}

.mb-score-num {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--qh-gold);
    line-height: 1;
}

.mb-score-total {
    font-size: 0.75rem;
    color: var(--qh-text-dim);
}

/* 5 Dimension Progress Bars */
.mb-rubric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 34px;
}

.mb-rubric-item {
    background: var(--qh-surface-card);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-md);
    padding: 14px 18px;
}

.mb-rubric-top {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--qh-text);
}

.mb-rubric-bar {
    height: 6px;
    border-radius: var(--qh-radius-pill);
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.mb-rubric-fill {
    height: 100%;
    border-radius: var(--qh-radius-pill);
    background: var(--qh-gold);
}

/* Feedback Lists */
.mb-feedback-section {
    margin-bottom: 28px;
}

.mb-feedback-title {
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.mb-well-done-title { color: var(--qh-emerald); }
.mb-missed-title { color: var(--qh-amber); }
.mb-critical-title { color: var(--qh-rose); }

.mb-feedback-box {
    background: var(--qh-surface-card);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-md);
    padding: 16px 20px;
}

.mb-feedback-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mb-feedback-list li {
    font-size: 0.88rem;
    color: var(--qh-text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.mb-feedback-list li i {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Shareable Meme Card */
.mb-meme-card {
    background: linear-gradient(135deg, #111624 0%, #171f33 100%);
    border: 1px solid var(--qh-border-gold);
    border-radius: var(--qh-radius-lg);
    padding: 24px;
    text-align: center;
    margin: 32px 0;
    position: relative;
}

.mb-meme-quote {
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 600;
    color: #fef3c7;
    margin: 16px 0;
}

/* Recommendations Grid */
.mb-recs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.mb-rec-card {
    background: var(--qh-surface-card);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-md);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    color: var(--qh-text);
    transition: var(--qh-transition);
}

.mb-rec-card:hover {
    border-color: var(--qh-gold);
    transform: translateY(-2px);
    background: var(--qh-surface-hover);
}

.mb-rec-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mb-rec-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 140px;
}

.mb-rec-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: var(--qh-radius-pill);
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.35);
    color: #2dd4bf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    line-height: 1.2;
}

.mb-rec-desc {
    font-size: 0.84rem;
    color: var(--qh-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Report Header Typography */
.mb-report-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 900;
    color: var(--qh-text-bright);
    margin: 12px 0 8px;
    letter-spacing: -0.02em;
}

.mb-report-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.88rem;
    color: var(--qh-text-muted);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.mb-meta-dot {
    color: var(--qh-text-dim);
}

.mb-score-verdict {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.02rem;
    padding: 6px 18px;
    border-radius: var(--qh-radius-pill);
    margin-top: 4px;
}
.verdict-outstanding {
    background: var(--qh-emerald-soft);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--qh-emerald);
}
.verdict-good {
    background: var(--qh-gold-soft);
    border: 1px solid var(--qh-border-gold);
    color: var(--qh-gold);
}
.verdict-warning {
    background: var(--qh-rose-soft);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fb7185;
}

.mb-rubric-points {
    color: var(--qh-gold);
    font-weight: 800;
}

.box-critical {
    border-color: rgba(244, 63, 94, 0.35) !important;
    background: rgba(244, 63, 94, 0.05) !important;
}

.mb-meme-stats {
    font-size: 0.84rem;
    color: var(--qh-text-dim);
}

.mb-btn-copy {
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--qh-border);
    color: var(--qh-text);
    border-radius: var(--qh-radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s ease;
}
.mb-btn-copy:hover {
    opacity: 0.9;
    border-color: var(--qh-border);
    color: var(--qh-text);
    background: rgba(255, 255, 255, 0.08);
}

/* Bottom Report Actions */
.mb-report-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--qh-border);
}

.mb-btn-report-primary {
    padding: 13px 26px;
    background: var(--qh-gold);
    color: #0b0e14;
    font-weight: 800;
    font-size: 0.94rem;
    border-radius: var(--qh-radius-md);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.mb-btn-report-primary:hover {
    opacity: 0.92;
    background: var(--qh-gold);
    color: #0b0e14;
    transform: none !important;
    box-shadow: none !important;
}

.mb-btn-report-secondary {
    padding: 13px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--qh-border);
    color: var(--qh-text-bright);
    font-weight: 700;
    font-size: 0.94rem;
    border-radius: var(--qh-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.mb-btn-report-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--qh-border);
    color: var(--qh-text-bright);
    transform: none !important;
    box-shadow: none !important;
}

.mb-btn-report-ghost {
    padding: 13px 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--qh-border);
    color: var(--qh-text);
    font-weight: 700;
    font-size: 0.94rem;
    border-radius: var(--qh-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.mb-btn-report-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--qh-border);
    color: var(--qh-text);
    transform: none !important;
    box-shadow: none !important;
}

/* ═══════════════════════════════════════
   LANGUAGE SELECTION MODAL POPUP
   ═══════════════════════════════════════ */
.mb-modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mb-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.mb-modal-box {
    background: var(--qh-surface-solid);
    border: 1px solid var(--qh-border);
    border-top: 1px solid var(--qh-border-gold);
    border-radius: var(--qh-radius-lg);
    padding: 36px 32px 30px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
    transform: scale(0.94);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    text-align: center;
}

.mb-modal-backdrop.open .mb-modal-box {
    transform: scale(1);
}

.mb-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--qh-text-dim);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--qh-transition);
}

.mb-modal-close:hover {
    color: var(--qh-text-bright);
}

.mb-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin-bottom: 6px;
}

.mb-modal-subtitle {
    font-size: 0.85rem;
    color: var(--qh-text-muted);
    margin-bottom: 22px;
}

.mb-lang-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.mb-lang-card {
    background: var(--qh-surface-card);
    border: 1px solid var(--qh-border);
    border-radius: var(--qh-radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: var(--qh-transition);
}

.mb-lang-card:hover {
    background: var(--qh-surface-hover);
    border-color: var(--qh-border-hover);
}

.mb-lang-card.active {
    border-color: var(--qh-gold);
    background: rgba(249, 223, 123, 0.05);
}

.mb-lang-flag {
    font-size: 1.6rem;
    line-height: 1;
}

.mb-lang-text {
    flex: 1;
}

.mb-lang-text strong {
    display: block;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin-bottom: 2px;
}

.mb-lang-text span {
    display: block;
    font-size: 0.74rem;
    color: var(--qh-text-dim);
}

.mb-lang-check {
    font-size: 1.15rem;
    opacity: 0.2;
    transition: var(--qh-transition);
}

.mb-lang-card.active .mb-lang-check {
    opacity: 1;
}

.mb-modal-actions {
    margin-top: 10px;
}

.mb-btn-modal-start {
    width: 100%;
    padding: 14px 20px;
    background: var(--qh-gold);
    color: #0b0e14;
    font-weight: 800;
    font-size: 0.98rem;
    border-radius: var(--qh-radius-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity 0.2s ease;
}

.mb-btn-modal-start:hover {
    opacity: 0.92;
}

/* ═══════════════════════════════════════
   COMPREHENSIVE RESPONSIVE DESIGN
   ═══════════════════════════════════════ */

/* ── 1. Tablet & Medium Screens (max-width: 992px) ── */
@media (max-width: 992px) {
    .mb-wrapper,
    .mb-page {
        margin: 86px auto 50px;
        padding: 0 20px;
    }

    .mb-hero-showcase {
        padding: 40px 28px 32px;
    }

    .mb-hero-showcase h1 {
        font-size: 2.2rem;
    }

    .mb-role-grid {
        gap: 20px;
    }

    .mb-role-card {
        padding: 28px 22px;
    }
}

/* ── 2. Tablets & Small Laptops (max-width: 768px) ── */
@media (max-width: 768px) {
    .mb-wrapper,
    .mb-page {
        margin: 84px auto 40px;
        padding: 0 16px;
    }

    .mb-hero-showcase {
        padding: 32px 20px 26px;
        border-radius: var(--qh-radius-lg);
    }

    .mb-hero-showcase h1 {
        font-size: 1.95rem;
        line-height: 1.25;
    }

    .mb-hero-lead {
        font-size: 0.92rem;
        margin-bottom: 20px;
    }

    .mb-feature-pills {
        gap: 8px;
    }

    .mb-pill {
        font-size: 0.76rem;
        padding: 6px 12px;
    }

    /* Setting Selector */
    .mb-setting-selector-box {
        padding: 20px 18px;
        margin-bottom: 22px;
    }

    .mb-setting-switch-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mb-setting-card {
        padding: 14px 16px;
    }

    /* Role Selection Grid */
    .mb-role-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 28px;
    }

    .mb-role-card {
        padding: 28px 20px;
    }

    /* Analytics Strip */
    .mb-analytics-strip {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 22px 18px;
    }

    .mb-analytics-divider {
        display: none;
    }

    .mb-stat-num {
        font-size: 1.6rem;
    }

    /* Chat Room */
    .mb-chat-container {
        height: 84vh;
        border-radius: var(--qh-radius-md);
    }

    .mb-chat-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .mb-chat-patient-meta {
        flex: 1;
        min-width: 200px;
    }

    .mb-chat-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }

    .mb-btn-action {
        padding: 7px 14px;
        font-size: 0.78rem;
    }

    .mb-msg {
        max-width: 90%;
    }

    .mb-btn-send span {
        display: none;
    }

    .mb-btn-send {
        width: 46px;
        height: 46px;
        min-width: 46px;
        padding: 0;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
    }

    /* Report Page */
    .mb-score-hero {
        padding: 32px 20px;
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .mb-rubric-grid,
    .mb-recs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mb-report-actions {
        flex-direction: column;
        width: 100%;
    }

    .mb-btn-report-primary,
    .mb-btn-report-secondary,
    .mb-btn-report-ghost {
        width: 100%;
        justify-content: center;
    }
}

/* ── 3. Mobile Phones (max-width: 480px) ── */
@media (max-width: 480px) {
    .mb-wrapper,
    .mb-page {
        margin: 78px auto 35px;
        padding: 0 12px;
    }

    .mb-hero-showcase {
        padding: 26px 16px 20px;
    }

    .mb-hero-showcase h1 {
        font-size: 1.65rem;
    }

    .mb-mini-badge {
        font-size: 0.72rem;
        padding: 4px 12px;
    }

    .mb-hero-lead {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .mb-setting-selector-box {
        padding: 16px 14px;
    }

    .mb-setting-title {
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .mb-setting-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }

    .mb-setting-text strong {
        font-size: 0.88rem;
    }

    .mb-setting-text p {
        font-size: 0.74rem;
    }

    .mb-role-card {
        padding: 22px 16px;
    }

    .mb-role-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .mb-role-title {
        font-size: 1.25rem;
    }

    .mb-role-desc {
        font-size: 0.85rem;
    }

    .mb-hl-item {
        font-size: 0.82rem;
    }

    .mb-btn-primary,
    .mb-btn-secondary {
        padding: 13px 18px;
        font-size: 0.92rem;
    }

    /* Modal Popup on Mobile */
    .mb-modal-box {
        padding: 24px 18px 20px;
        border-radius: var(--qh-radius-md);
    }

    .mb-modal-title {
        font-size: 1.18rem;
    }

    .mb-modal-subtitle {
        font-size: 0.78rem;
        margin-bottom: 16px;
    }

    .mb-lang-card {
        padding: 12px 14px;
        gap: 12px;
    }

    .mb-lang-flag {
        font-size: 1.35rem;
    }

    .mb-lang-text strong {
        font-size: 0.88rem;
    }

    .mb-lang-text span {
        font-size: 0.7rem;
    }

    .mb-btn-modal-start {
        padding: 12px 16px;
        font-size: 0.92rem;
    }

    /* Chat Room on Mobile */
    .mb-chat-container {
        height: calc(100dvh - 100px);
    }

    .mb-chat-header {
        padding: 10px 12px;
    }

    .mb-patient-avatar-box {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .mb-patient-name {
        font-size: 0.95rem;
    }

    .mb-chat-messages {
        padding: 14px 10px;
        gap: 12px;
    }

    .mb-msg {
        max-width: 94%;
    }

    .mb-msg-text {
        font-size: 0.88rem;
        padding: 11px 14px;
    }

    .mb-chat-input-bar {
        padding: 8px 10px;
        gap: 8px;
    }

    .mb-input-wrap textarea,
    .mb-input-wrap input {
        font-size: 0.88rem;
        padding: 12px 14px;
        min-height: 46px;
        height: 46px;
        line-height: 1.35;
        border-radius: 12px;
    }

    .mb-input-wrap textarea::placeholder,
    .mb-input-wrap input::placeholder {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .mb-btn-send {
        width: 46px;
        height: 46px;
        min-width: 46px;
        padding: 0;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.05rem;
    }

    .mb-btn-send span {
        display: none;
    }

    .mb-chat-disclaimer-sub {
        font-size: 0.68rem;
    }

    /* Scorecard & Report on Mobile */
    .mb-score-hero {
        padding: 24px 16px;
    }

    .mb-score-ring {
        width: 140px;
        height: 140px;
    }

    .mb-score-num {
        font-size: 2.2rem;
    }

    .mb-rubric-card {
        padding: 18px 14px;
    }

    .mb-meme-card {
        padding: 20px 14px;
    }

    .mb-analytics-strip {
        grid-template-columns: 1fr 1fr;
        padding: 16px 12px;
        gap: 12px;
    }

    .mb-stat-num {
        font-size: 1.35rem;
    }

    .mb-stat-label {
        font-size: 0.72rem;
    }

    .mb-disclaimer-box {
        padding: 16px 14px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ── 4. Extra Small Screens (max-width: 360px) ── */
@media (max-width: 360px) {
    .mb-hero-showcase h1 {
        font-size: 1.45rem;
    }

    .mb-analytics-strip {
        grid-template-columns: 1fr;
    }

    .mb-btn-primary,
    .mb-btn-secondary {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SKILLS DASHBOARD
   ═══════════════════════════════════════════════════════════════════ */

.mb-skills-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.mb-skills-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mb-skills-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--qh-gold), var(--qh-teal-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.mb-skills-header p {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

.mb-skills-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

@media (max-width: 960px) {
    .mb-skills-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .mb-skills-summary-grid {
        grid-template-columns: 1fr;
    }
}

.mb-skills-summary-card {
    background: var(--qh-surface-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 18px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.mb-skills-summary-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.mb-skill-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.mb-skill-card {
    background: var(--qh-surface-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.2rem;
    transition: border-color 0.3s;
}

.mb-skill-card:hover {
    border-color: rgba(249, 223, 123, 0.15);
}

.mb-skill-name {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mb-skill-score {
    font-weight: 700;
    font-size: 0.95rem;
}

.mb-skill-score.score-high { color: var(--qh-emerald); }
.mb-skill-score.score-mid { color: var(--qh-gold); }
.mb-skill-score.score-low { color: var(--qh-rose); }

.mb-skill-progress {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.mb-skill-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.mb-skill-fill.fill-high { background: var(--qh-emerald); }
.mb-skill-fill.fill-mid { background: var(--qh-gold); }
.mb-skill-fill.fill-low { background: var(--qh-rose); }

.mb-skill-trend {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
}

.mb-skill-trend .trend-up { color: var(--qh-emerald); }
.mb-skill-trend .trend-down { color: var(--qh-rose); }
.mb-skill-trend .trend-stable { color: var(--qh-gold); }

.mb-difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.mb-difficulty-beginner { background: rgba(20,184,166,0.15); color: var(--qh-teal-bright); border: 1px solid rgba(20,184,166,0.2); }
.mb-difficulty-intermediate { background: rgba(249,223,123,0.15); color: var(--qh-gold); border: 1px solid rgba(249,223,123,0.2); }
.mb-difficulty-advanced { background: rgba(168,85,247,0.15); color: var(--qh-purple); border: 1px solid rgba(168,85,247,0.2); }
.mb-difficulty-expert { background: rgba(251,113,133,0.15); color: var(--qh-rose); border: 1px solid rgba(251,113,133,0.2); }

.mb-weak-alert {
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}

.mb-weak-alert-title {
    color: var(--qh-amber);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.mb-weak-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mb-weak-pill {
    background: rgba(251,191,36,0.12);
    color: var(--qh-amber);
    padding: 0.25rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.mb-sessions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
}

.mb-sessions-table th {
    text-align: left;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mb-sessions-table td {
    padding: 0.8rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.mb-sessions-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* ═══════════════════════════════════════════════════════════════════
   CASE REPLAY
   ═══════════════════════════════════════════════════════════════════ */

.mb-replay-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.mb-replay-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mb-replay-transcript {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mb-replay-msg {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mb-replay-msg.msg-user {
    align-items: flex-end;
}

.mb-replay-msg.msg-ai {
    align-items: flex-start;
}

.mb-replay-bubble {
    max-width: 75%;
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
}

.msg-user .mb-replay-bubble {
    background: linear-gradient(135deg, rgba(249,223,123,0.12), rgba(20,184,166,0.08));
    border: 1px solid rgba(249,223,123,0.15);
    color: rgba(255,255,255,0.9);
    border-bottom-right-radius: 4px;
}

.msg-ai .mb-replay-bubble {
    background: var(--qh-surface-card);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    border-bottom-left-radius: 4px;
}

.mb-replay-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0 0.3rem;
}

.mb-replay-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
}

.mb-relevance-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mb-relevance-highly_relevant { background: rgba(16,185,129,0.15); color: var(--qh-emerald); }
.mb-relevance-relevant { background: rgba(20,184,166,0.15); color: var(--qh-teal-bright); }
.mb-relevance-neutral { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }
.mb-relevance-low_value { background: rgba(251,191,36,0.1); color: var(--qh-amber); }
.mb-relevance-irrelevant { background: rgba(251,113,133,0.1); color: var(--qh-rose); }

.mb-objective-pill {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    background: rgba(168,85,247,0.12);
    color: var(--qh-purple);
}

.mb-objectives-panel {
    background: var(--qh-surface-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mb-objectives-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1rem;
}

.mb-objective-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.mb-obj-icon { font-size: 0.9rem; flex-shrink: 0; margin-top: 0.1rem; }
.mb-obj-completed .mb-obj-icon { color: var(--qh-emerald); }
.mb-obj-missed .mb-obj-icon { color: var(--qh-rose); }

.mb-obj-type {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    margin-left: 0.3rem;
}

.mb-obj-type-critical { background: rgba(251,113,133,0.12); color: var(--qh-rose); }
.mb-obj-type-required { background: rgba(249,223,123,0.12); color: var(--qh-gold); }
.mb-obj-type-important { background: rgba(20,184,166,0.12); color: var(--qh-teal-bright); }
.mb-obj-type-optional { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.4); }

/* ═══════════════════════════════════════════════════════════════════
   REPORT ENHANCEMENTS — Case Ending, WYSHA, Debrief
   ═══════════════════════════════════════════════════════════════════ */

.mb-case-ending {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.mb-ending-excellent { background: rgba(16,185,129,0.12); color: var(--qh-emerald); border: 1px solid rgba(16,185,129,0.2); }
.mb-ending-good { background: rgba(249,223,123,0.12); color: var(--qh-gold); border: 1px solid rgba(249,223,123,0.2); }
.mb-ending-incomplete { background: rgba(251,191,36,0.12); color: var(--qh-amber); border: 1px solid rgba(251,191,36,0.2); }
.mb-ending-unsafe { background: rgba(251,113,133,0.12); color: var(--qh-rose); border: 1px solid rgba(251,113,133,0.2); }
.mb-ending-premature_closure { background: rgba(251,113,133,0.12); color: var(--qh-rose); border: 1px solid rgba(251,113,133,0.2); }
.mb-ending-unnecessary_referral { background: rgba(251,191,36,0.12); color: var(--qh-amber); border: 1px solid rgba(251,191,36,0.2); }

.mb-wysha-section {
    margin-bottom: 1.5rem;
}

.mb-wysha-card {
    background: rgba(20,184,166,0.04);
    border: 1px solid rgba(20,184,166,0.1);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
}

.mb-wysha-question {
    font-weight: 600;
    color: var(--qh-teal-bright);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.mb-wysha-importance {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.mb-wysha-example {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    font-style: italic;
    padding-left: 0.8rem;
    border-left: 2px solid rgba(20,184,166,0.2);
}

.mb-ideal-flow {
    counter-reset: flow-step;
    margin-bottom: 1.5rem;
}

.mb-flow-step {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.6rem 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}

.mb-flow-step::before {
    counter-increment: flow-step;
    content: counter(flow-step);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(249,223,123,0.12);
    color: var(--qh-gold);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM ERROR ANALYSIS STYLES
   ═══════════════════════════════════════════════════════════════════ */

.mb-error-analysis-container {
    margin-top: 12px;
}

.mb-error-analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.mb-err-card {
    border-radius: 14px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mb-err-card:hover {
    transform: translateY(-2px);
}

.mb-err-card.err-card-critical {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.08) 0%, rgba(17, 24, 39, 0.6) 100%);
    border: 1px solid rgba(244, 63, 94, 0.25);
    box-shadow: 0 4px 20px rgba(244, 63, 94, 0.05);
}
.mb-err-card.err-card-critical:hover {
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.12);
}

.mb-err-card.err-card-major {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, rgba(17, 24, 39, 0.6) 100%);
    border: 1px solid rgba(249, 115, 22, 0.25);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.05);
}
.mb-err-card.err-card-major:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.12);
}

.mb-err-card.err-card-minor {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(17, 24, 39, 0.6) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.05);
}
.mb-err-card.err-card-minor:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.12);
}

.mb-err-card.err-card-missed {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(17, 24, 39, 0.6) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.05);
}
.mb-err-card.err-card-missed:hover {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.12);
}

.mb-err-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mb-err-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.mb-err-icon-badge.icon-critical {
    background: rgba(244, 63, 94, 0.15);
    color: var(--qh-rose);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.mb-err-icon-badge.icon-major {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.mb-err-icon-badge.icon-minor {
    background: rgba(245, 158, 11, 0.15);
    color: var(--qh-gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.mb-err-icon-badge.icon-missed {
    background: rgba(168, 85, 247, 0.15);
    color: var(--qh-purple);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.mb-err-title-wrap h4 {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.err-card-critical .mb-err-title-wrap h4 { color: var(--qh-rose); }
.err-card-major .mb-err-title-wrap h4 { color: #f97316; }
.err-card-minor .mb-err-title-wrap h4 { color: var(--qh-gold); }
.err-card-missed .mb-err-title-wrap h4 { color: var(--qh-purple); }

.mb-err-title-wrap p {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 2px 0 0 0;
}

.mb-err-count-pill {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.count-critical { background: rgba(244, 63, 94, 0.15); color: var(--qh-rose); border: 1px solid rgba(244, 63, 94, 0.3); }
.count-major { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.count-minor { background: rgba(245, 158, 11, 0.15); color: var(--qh-gold); border: 1px solid rgba(245, 158, 11, 0.3); }
.count-missed { background: rgba(168, 85, 247, 0.15); color: var(--qh-purple); border: 1px solid rgba(168, 85, 247, 0.3); }

.mb-err-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mb-err-item-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.86rem;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s, border-color 0.2s;
}

.mb-err-item-row:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.08);
}

.mb-err-item-row i {
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.err-row-critical i { color: var(--qh-rose); }
.err-row-major i { color: #f97316; }
.err-row-minor i { color: var(--qh-gold); }
.err-row-missed i { color: var(--qh-purple); }

.mb-zero-errors-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(17, 24, 39, 0.6) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.05);
}

.mb-zero-errors-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--qh-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.mb-zero-errors-text h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--qh-emerald);
    margin: 0 0 4px 0;
}

.mb-zero-errors-text p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* Debrief Chat */
.mb-debrief-section {
    background: var(--qh-surface-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.mb-debrief-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mb-debrief-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1rem;
}

.mb-debrief-messages {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.mb-debrief-msg {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.6;
}

.mb-debrief-msg-user {
    background: rgba(249,223,123,0.08);
    border: 1px solid rgba(249,223,123,0.1);
    color: rgba(255,255,255,0.85);
    align-self: flex-end;
    max-width: 85%;
}

.mb-debrief-msg-ai {
    background: rgba(20,184,166,0.06);
    border: 1px solid rgba(20,184,166,0.1);
    color: rgba(255,255,255,0.8);
    max-width: 85%;
}

.mb-debrief-input {
    display: flex;
    gap: 0.5rem;
}

.mb-debrief-input textarea {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #fff;
    font-size: 0.85rem;
    resize: none;
    min-height: 42px;
    max-height: 100px;
    font-family: inherit;
}

.mb-debrief-input textarea:focus {
    outline: none;
    border-color: rgba(20,184,166,0.3);
}

.mb-debrief-send {
    background: linear-gradient(135deg, var(--qh-teal-bright), #0d9488);
    border: none;
    border-radius: 10px;
    padding: 0 1rem;
    color: #0b0e14;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.mb-debrief-send:hover { opacity: 0.85; }
.mb-debrief-send:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Skills & Replay
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .mb-skill-grid {
        grid-template-columns: 1fr;
    }

    .mb-replay-bubble {
        max-width: 90%;
    }

    .mb-skills-page,
    .mb-replay-page {
        padding: 1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   EVALUATION LOADING OVERLAY (Dark Luxury OSCE Evaluation Animation)
   ═══════════════════════════════════════════════════════════════════ */

.mb-eval-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 14, 20, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

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

.mb-eval-box {
    background: linear-gradient(135deg, rgba(20, 24, 36, 0.96) 0%, rgba(15, 23, 42, 0.96) 100%);
    border: 1px solid rgba(249, 223, 123, 0.25);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(249, 223, 123, 0.1);
    position: relative;
    overflow: hidden;
    animation: mb-eval-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes mb-eval-pop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.mb-eval-spinner-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mb-eval-ring-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(249, 223, 123, 0.12);
    border-top-color: var(--qh-gold);
    border-right-color: var(--qh-teal-bright);
    animation: mb-spin 1.4s linear infinite;
}

.mb-eval-ring-inner {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px dashed rgba(20, 184, 166, 0.4);
    border-top-color: var(--qh-purple);
    animation: mb-spin-reverse 2s linear infinite;
}

@keyframes mb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes mb-spin-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.mb-eval-center-icon {
    font-size: 2rem;
    color: var(--qh-gold);
    animation: mb-pulse 1.6s ease-in-out infinite;
}

@keyframes mb-pulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px rgba(249, 223, 123, 0.5)); }
}

.mb-eval-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--qh-text-bright);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.mb-eval-step {
    font-size: 0.88rem;
    color: var(--qh-teal-bright);
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mb-eval-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.mb-eval-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--qh-gold), var(--qh-teal-bright), var(--qh-purple));
    border-radius: 99px;
    width: 30%;
    animation: mb-eval-progress 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes mb-eval-progress {
    0% { width: 10%; margin-left: 0%; }
    50% { width: 65%; margin-left: 20%; }
    100% { width: 90%; margin-left: 10%; }
}

.mb-eval-hint {
    margin-top: 14px;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   HOME DASHBOARD — PERFORMANCE SUMMARY & RECENT SIMULATIONS
   ═══════════════════════════════════════════════════════════════════ */

.mb-home-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1040px;
    margin: 0 auto 28px;
    box-sizing: border-box;
}

.mb-home-stat-card {
    background: linear-gradient(135deg, rgba(20, 24, 36, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.mb-home-stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 223, 123, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.mb-home-stat-card.card-link:hover {
    border-color: rgba(20, 184, 166, 0.4);
}

.mb-home-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.mb-home-stat-icon.icon-gold {
    background: rgba(249, 223, 123, 0.12);
    color: var(--qh-gold);
    border: 1px solid rgba(249, 223, 123, 0.25);
}

.mb-home-stat-icon.icon-teal {
    background: rgba(20, 184, 166, 0.12);
    color: var(--qh-teal-bright);
    border: 1px solid rgba(20, 184, 166, 0.25);
}

.mb-home-stat-icon.icon-purple {
    background: rgba(168, 85, 247, 0.12);
    color: var(--qh-purple);
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.mb-home-stat-icon.icon-emerald {
    background: rgba(16, 185, 129, 0.12);
    color: var(--qh-emerald);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.mb-home-stat-content {
    flex: 1;
    min-width: 0;
}

.mb-home-stat-num {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    line-height: 1.1;
    margin-bottom: 3px;
    letter-spacing: -0.02em;
}

.mb-home-stat-num small {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 1px;
}

.mb-home-stat-label {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
}

/* Recent Simulations Card */
.mb-recent-card {
    max-width: 1040px;
    margin: 0 auto 32px;
    background: linear-gradient(135deg, rgba(20, 24, 36, 0.94) 0%, rgba(15, 23, 42, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px 28px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.mb-recent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--qh-gold), var(--qh-teal-bright), var(--qh-purple));
}

.mb-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 12px;
}

.mb-recent-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mb-recent-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(249, 223, 123, 0.1);
    border: 1px solid rgba(249, 223, 123, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.mb-recent-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--qh-text-bright);
    margin: 0;
    letter-spacing: -0.01em;
}

.mb-recent-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 2px 0 0 0;
}

.mb-recent-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--qh-teal-bright);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
    transition: all 0.2s ease;
}

.mb-recent-view-all:hover {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(20, 184, 166, 0.4);
    transform: translateX(2px);
}

.mb-recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mb-sim-item {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.mb-sim-item:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.mb-sim-item.is-active {
    border-left: 3px solid var(--qh-emerald);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.mb-sim-info {
    flex: 1;
    min-width: 0;
}

.mb-sim-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.mb-sim-type-icon {
    font-size: 0.95rem;
    flex-shrink: 0;
}

.mb-sim-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--qh-text-bright);
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.mb-sim-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
}

.mb-sim-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.mb-badge-in-progress {
    color: var(--qh-emerald) !important;
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.72rem !important;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.mb-sim-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mb-sim-score-badge {
    padding: 5px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: baseline;
    letter-spacing: -0.01em;
}

.mb-sim-score-badge .score-val {
    font-size: 0.95rem;
}

.mb-sim-score-badge .score-max {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 1px;
}

.mb-sim-score-badge.score-high {
    background: rgba(16, 185, 129, 0.15);
    color: var(--qh-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mb-sim-score-badge.score-mid {
    background: rgba(249, 223, 123, 0.15);
    color: var(--qh-gold);
    border: 1px solid rgba(249, 223, 123, 0.3);
}

.mb-sim-score-badge.score-low {
    background: rgba(244, 63, 94, 0.15);
    color: var(--qh-rose);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.mb-sim-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mb-sim-btn.btn-replay {
    color: var(--qh-teal-bright);
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.25);
}

.mb-sim-btn.btn-replay:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.4);
    transform: translateY(-1px);
}

.mb-sim-btn.btn-scorecard {
    color: var(--qh-gold);
    background: rgba(249, 223, 123, 0.1);
    border: 1px solid rgba(249, 223, 123, 0.25);
}

.mb-sim-btn.btn-scorecard:hover {
    background: rgba(249, 223, 123, 0.2);
    border-color: rgba(249, 223, 123, 0.4);
    transform: translateY(-1px);
}

.mb-sim-btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0b0e14;
    background: linear-gradient(135deg, var(--qh-emerald) 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mb-sim-btn-resume:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

/* Responsive adjustments for Recent Simulations */
@media (max-width: 991px) {
    .mb-home-summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .mb-recent-card {
        padding: 18px 16px;
        border-radius: 16px;
    }
    .mb-sim-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }
    .mb-sim-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    .mb-sim-btn-resume {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    /* Error Toast Responsive */
    .mb-error-toast {
        max-width: 100%;
        margin: 10px 0;
        padding: 0 4px;
    }
    .mb-error-toast-card {
        padding: 14px 16px;
        border-radius: 12px;
        gap: 10px;
    }
    .mb-error-toast-icon-wrap {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 8px;
    }
    .mb-error-toast-title {
        font-size: 0.88rem;
    }
    .mb-error-toast-desc {
        font-size: 0.78rem;
    }
    .mb-error-toast-actions {
        justify-content: stretch;
    }
    .mb-btn-retry-ai {
        width: 100%;
        justify-content: center;
        padding: 8px 14px;
    }
}

@media (max-width: 480px) {
    .mb-home-summary-grid {
        grid-template-columns: 1fr;
    }
    .mb-home-stat-card {
        padding: 14px 16px;
    }
    .mb-home-stat-num {
        font-size: 1.35rem;
    }
    .mb-recent-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .mb-recent-view-all {
        width: 100%;
        justify-content: center;
    }
    .mb-sim-actions {
        display: grid;
        grid-template-columns: auto 1fr 1fr;
        gap: 6px;
    }
    .mb-sim-btn {
        justify-content: center;
        padding: 7px 10px;
        font-size: 0.74rem;
    }

    /* Error Toast Small Mobile */
    .mb-error-toast-card {
        padding: 12px 14px;
        gap: 8px;
    }
    .mb-error-toast-body {
        gap: 10px;
    }
    .mb-error-toast-icon-wrap {
        width: 32px;
        height: 32px;
        font-size: 0.90rem;
    }
    .mb-error-toast-title {
        font-size: 0.84rem;
    }
    .mb-error-toast-desc {
        font-size: 0.74rem;
    }
}
