:root{--bg:#0c1222;--bg-elevated:#141d33;--bg-card:#1a2642;--border:#2a3a5c;--text:#e8edf7;--text-muted:#94a3b8;--primary:skyblue;--primary-hover:#6ec8f0;--accent:#38bdf8;--sky-deep:#0284c7;--sky-light:#e0f2fe;--sky-muted:#bae6fd;--error:#f87171;--success:#4ade80;--radius:12px;--font:"DM Sans", "Segoe UI", system-ui, sans-serif;--primary-dim:#87ceeb33;--shadow-lg:0 24px 48px #00000059}*,:before,:after{box-sizing:border-box}body{font-family:var(--font);background:var(--bg);color:var(--text);min-height:100vh;margin:0;line-height:1.5}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}#root{min-height:100vh}html.app-shell-route,html.auth-route,body.app-shell-route,body.auth-route{overscroll-behavior:none;height:100dvh;overflow:hidden}html.app-shell-route,body.app-shell-route{width:100%;max-width:100vw}html.app-shell-route #root,html.auth-route #root{height:100svh;min-height:0;max-height:100svh;overflow:hidden}html.app-shell-route #root>.app-shell-chat{height:100svh;min-height:0}.theme-toggle-btn{color:#0f172a;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#fff;border:1px solid #e2e8f0;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;padding:0;font-family:inherit;transition:background .15s,border-color .15s,color .15s,transform .1s;display:inline-flex;box-shadow:0 2px 10px #0f172a14}.theme-toggle-btn:hover{background:#f8fafc;border-color:#cbd5e1}.theme-toggle-btn:active{transform:scale(.97)}.auth-theme-toggle{top:max(.65rem, env(safe-area-inset-top,0));right:max(.75rem, env(safe-area-inset-right,0));z-index:20;position:absolute}@media (width>=901px){.auth-theme-toggle{top:1rem;right:1.25rem}}[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#000;--bg-elevated:#000;--bg-card:#0a0a0a;--border:#1a1a1a;--text:#f5f5f5;--text-muted:#a3a3a3;--shell-bg:#000;--shell-surface:#0a0a0a;--shell-elevated:#111;--shell-border:#1f1f1f;--shell-text:#f5f5f5;--shell-text-muted:#a3a3a3}[data-theme=dark] body,[data-theme=dark] #root{color:#f5f5f5;background:#000}[data-theme=dark] .theme-toggle-btn{color:#f5f5f5;background:#0a0a0a;border-color:#2a2a2a;box-shadow:0 2px 12px #00000080}[data-theme=dark] .theme-toggle-btn:hover{background:#141414;border-color:#3a3a3a}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-header{background:var(--bg-elevated);border-bottom:1px solid var(--border);z-index:10;align-items:center;gap:1.5rem;padding:.75rem 1.5rem;display:flex;position:sticky;top:0}.brand{color:var(--text);align-items:center;gap:.5rem;font-size:1.1rem;font-weight:700;text-decoration:none;display:flex}.brand-mark{background:linear-gradient(135deg, var(--primary), var(--accent));border-radius:8px;justify-content:center;align-items:center;width:32px;height:32px;font-size:.9rem;display:flex}.cofactor-logo-frame{--logo-size:40px;width:var(--logo-size);height:var(--logo-size);background:#fff;border:1px solid #e2e8f0;border-radius:22%;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;overflow:hidden;box-shadow:0 2px 8px #0f172a14}.cofactor-logo-frame--sm{--logo-size:32px;border-radius:9px}.cofactor-logo-frame--md{--logo-size:40px;border-radius:11px}.cofactor-logo-frame--lg{--logo-size:52px;border-radius:14px}.cofactor-logo-frame--xl{--logo-size:64px;border-radius:16px}.cofactor-logo-frame--auth{--logo-size:72px;border-radius:18px}.cofactor-logo{object-fit:cover;width:100%;height:100%;display:block}.auth-brand .cofactor-logo-frame{border-color:#94a3b859;box-shadow:0 4px 16px #0003}.app-nav{flex:1;gap:.25rem;display:flex}.nav-link{color:var(--text-muted);border-radius:8px;padding:.5rem 1rem;font-size:.9rem;text-decoration:none}.nav-link:hover,.nav-link.active{color:var(--text);background:var(--bg-card);text-decoration:none}.nav-link.active{color:var(--primary-hover)}.header-actions{align-items:center;gap:.75rem;display:flex}.user-pill{color:var(--text-muted);font-size:.85rem}.app-main{flex:1;width:100%;max-width:1400px;margin:0 auto;padding:1.5rem}.btn{cursor:pointer;border:none;border-radius:8px;padding:.55rem 1.1rem;font-family:inherit;font-size:.9rem;font-weight:600;transition:background .15s,opacity .15s}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--primary);color:#0c4a6e;font-weight:600}.btn-primary:hover:not(:disabled){background:var(--primary-hover)}.btn-danger{color:#fff;background:#ef4444}.btn-danger:hover:not(:disabled){background:#dc2626}.btn-ghost{color:var(--text-muted);border:1px solid var(--border);background:0 0}.btn-ghost:hover:not(:disabled){color:var(--text);border-color:var(--text-muted)}.btn-full{width:100%}.btn-lg{padding:.75rem 1.25rem;font-size:1rem}.btn-loading{justify-content:center;align-items:center;gap:.5rem;display:inline-flex}.spinner{border:2px solid #ffffff59;border-top-color:#fff;border-radius:50%;width:1rem;height:1rem;animation:.7s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.auth-shell{grid-template-columns:1fr 1fr;height:100dvh;min-height:0;max-height:100dvh;display:grid;overflow:hidden}.auth-brand{background:linear-gradient(160deg,#0b1220 0%,#0c4a6e 42%,#0c1222 100%);border-right:1px solid #2a3a5c99;align-items:center;min-height:0;padding:2rem 2.5rem;display:flex;position:relative;overflow:hidden}.auth-brand-grid{pointer-events:none;background-image:linear-gradient(#94a3b80a 1px,#0000 1px),linear-gradient(90deg,#94a3b80a 1px,#0000 1px);background-size:32px 32px;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000 0%,#0000 85%);mask-image:linear-gradient(#000 0%,#0000 85%)}.auth-brand-inner{z-index:1;max-width:420px;position:relative}.auth-brand-glow{pointer-events:none;background:radial-gradient(circle,#87ceeb38 0%,#0000 68%);border-radius:50%;width:420px;height:420px;position:absolute;top:20%;right:-120px}.auth-logo{color:var(--text);align-items:center;margin-bottom:1.5rem;text-decoration:none;display:inline-flex}.auth-logo:hover{opacity:.95;text-decoration:none}.auth-logo-mark{color:#7dd3fc;background:linear-gradient(145deg,#87ceeb59,#7dd3fc40);border:1px solid #38bdf873;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:48px;height:48px;display:flex}.auth-logo-mark svg{width:26px;height:26px}.auth-logo-text{letter-spacing:-.02em;flex-direction:column;gap:.1rem;font-size:1.35rem;font-weight:700;line-height:1.2;display:flex}.auth-logo-sub{letter-spacing:.12em;text-transform:uppercase;color:#94a3b8e6;font-size:.7rem;font-weight:500}.auth-brand-eyebrow{letter-spacing:.14em;text-transform:uppercase;color:#7dd3fc;margin:0 0 .65rem;font-size:.7rem;font-weight:600}.auth-brand-headline{letter-spacing:-.03em;color:#f1f5f9;margin:0 0 1rem;font-size:1.65rem;font-weight:700;line-height:1.3}.auth-brand-tagline{color:#94a3b8f2;margin:0 0 1.25rem;font-size:.9rem;line-height:1.5}.auth-capabilities-label{letter-spacing:.1em;text-transform:uppercase;color:#94a3b8bf;margin:0 0 .85rem;font-size:.7rem;font-weight:600}.auth-capability-list{flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none;display:flex}.auth-capability-card{background:#0f172a73;border:1px solid #2a3a5c8c;border-radius:10px;align-items:flex-start;gap:.75rem;padding:.65rem .85rem;transition:border-color .2s,background .2s;display:flex}.auth-capability-card:hover{background:#0f172aa6;border-color:#38bdf859}.auth-capability-icon{color:#38bdf8;background:#87ceeb1f;border:1px solid #38bdf840;border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;display:flex}.auth-capability-icon svg{width:20px;height:20px}.auth-capability-body{flex-direction:column;gap:.2rem;min-width:0;display:flex}.auth-capability-title{color:#f1f5f9;letter-spacing:.01em;font-size:.9rem;font-weight:600}.auth-capability-desc{color:#94a3b8e6;font-size:.8125rem;line-height:1.45}.auth-highlight-list{flex-direction:column;gap:.55rem;margin:0;padding:0;list-style:none;display:flex}.auth-highlight-item{color:#e2e8f0eb;align-items:center;gap:.65rem;font-size:.875rem;line-height:1.4;display:flex}.auth-highlight-dot{background:#38bdf8;border-radius:50%;flex-shrink:0;width:6px;height:6px}.auth-brand-footnote{color:#64748bf2;border-top:1px solid #2a3a5c80;margin:1rem 0 0;padding-top:.85rem;font-size:.8rem;line-height:1.5}.auth-panel-inner{flex-direction:column;justify-content:center;width:100%;max-width:420px;min-height:0;max-height:100%;display:flex}.auth-panel-inner-wide{max-width:520px}.auth-card-logo{justify-content:center;margin:0 auto 1.25rem;line-height:0;text-decoration:none;display:none}.auth-card-logo:hover{opacity:.92;text-decoration:none}.auth-card-logo .cofactor-logo-frame--auth{border-color:#dbeafe;box-shadow:0 2px 8px #0f172a0f,0 8px 24px #0e74901f}.auth-panel{--auth-surface:#f8fafc;--auth-card:#fff;--auth-text:#0f172a;--auth-muted:#64748b;--auth-border:#e2e8f0;--auth-input-bg:#fff;--auth-focus:#87ceeb1f;background:var(--auth-surface);justify-content:center;align-items:center;min-height:0;padding:1rem 1.25rem;display:flex;position:relative;overflow:hidden}.auth-card{background:var(--auth-card);border:1px solid var(--auth-border);border-radius:16px;flex-direction:column;width:100%;max-width:420px;min-height:0;max-height:calc(100dvh - 2rem);padding:1.5rem 1.5rem 1.25rem;display:flex;overflow:hidden;box-shadow:0 1px 2px #0f172a0a,0 8px 24px #0f172a0f}.auth-card-wide{max-width:520px;padding:1.25rem 1.35rem 1rem}.auth-card-body{flex:auto;min-height:0;overflow:hidden}.auth-shell-login .auth-card-body{overflow:visible}.auth-card-header{flex-shrink:0;margin-bottom:1rem}.auth-shell-signup .auth-card-header{margin-bottom:.65rem}.auth-card-header h1{letter-spacing:-.03em;color:var(--auth-text);margin:0 0 .25rem;font-size:1.5rem;font-weight:700}.auth-sub{color:var(--auth-muted);margin:0;font-size:.9375rem;line-height:1.55}.auth-email{color:var(--auth-text);font-weight:500}.auth-muted{color:var(--auth-muted);margin:0}.auth-dev-hint{color:var(--auth-muted);border:1px solid var(--auth-border);background:#f1f5f9;border-radius:10px;margin:0;padding:.65rem .75rem;font-size:.8125rem;line-height:1.45}.auth-dev-hint code{background:#e2e8f0;border-radius:4px;padding:.1rem .35rem;font-size:.75rem}.auth-footer{border-top:1px solid var(--auth-border);text-align:center;color:var(--auth-muted);flex-shrink:0;margin-top:.85rem;padding-top:.85rem;font-size:.875rem}.auth-footer a{color:var(--primary);font-weight:600;text-decoration:none}.auth-footer a:hover{color:var(--primary-hover);text-decoration:underline}.auth-form{flex-direction:column;gap:1.125rem;display:flex}.auth-form-signup{gap:.65rem}.auth-form-compact{flex-direction:column;gap:.65rem;display:flex}.auth-form-compact .auth-form-grid{grid-template-columns:1fr 1fr;gap:.5rem .65rem;display:grid}.auth-form-compact .auth-form-grid>.auth-alert,.auth-form-compact .span-2{grid-column:span 2}.auth-form-section{border:none;margin:0;padding:0}.auth-form-section-title{display:none}.auth-form-section-fields{display:contents}.auth-signup-fields{min-height:0}.auth-shell-signup .auth-form{flex-direction:column;flex:1;min-height:0;display:flex}.auth-shell-signup .auth-card-body{flex-direction:column;flex:auto;min-height:0;display:flex}.auth-signup-submit{flex-shrink:0;margin-top:.25rem}@media (width>=901px){.auth-form-section--pair .auth-form-section-fields{grid-template-columns:1fr 1fr;gap:.5rem .65rem;display:grid}.auth-form-section .field-full{grid-column:1/-1}.auth-shell-signup .auth-form-section:not(.auth-form-section--pair) .auth-form-section-fields{grid-template-columns:1fr 1fr;gap:.5rem .65rem;display:grid}.auth-shell-signup .auth-form-section:not(.auth-form-section--pair) .field:first-child{grid-column:1/-1}}.auth-shell-signup .auth-card .field{gap:.25rem}.auth-shell-signup .auth-card .field label{font-size:.75rem}.auth-shell-signup .auth-card .field input,.auth-shell-signup .auth-card .field select{border-radius:8px;padding:.45rem .6rem;font-size:.875rem}.auth-shell-signup .auth-card .field select{min-height:2.25rem}.auth-shell-signup .auth-card-header h1{font-size:1.25rem}.auth-shell-signup .auth-sub{font-size:.8125rem;line-height:1.35}.auth-shell-signup .btn-lg{padding:.55rem 1rem;font-size:.9rem}.auth-shell-signup .auth-footer{margin-top:.5rem;padding-top:.65rem;font-size:.8125rem}.auth-card .field label{color:#334155}.auth-card .field input,.auth-card .field select,.auth-card .auth-form input,.auth-card .auth-form select{border-color:var(--auth-border);background:var(--auth-input-bg);color:var(--auth-text)}.auth-card .field input:focus,.auth-card .field select:focus,.auth-card .auth-form input:focus,.auth-card .auth-form select:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--auth-focus)}.auth-card .field input::placeholder{color:#94a3b8}.auth-card .field-password-toggle{color:var(--auth-muted)}.auth-card .field-password-toggle:hover,.auth-card .form-section legend{color:var(--primary)}.field{flex-direction:column;gap:.4rem;display:flex}.field label{color:var(--text-muted);letter-spacing:.01em;font-size:.8125rem;font-weight:500}.field input,.field select,.auth-form input,.auth-form select{border:1px solid var(--border);background:var(--bg-elevated);width:100%;color:var(--text);box-sizing:border-box;border-radius:10px;padding:.7rem .85rem;font-family:inherit;font-size:1rem;transition:border-color .15s,box-shadow .15s}.field select,.auth-form select{cursor:pointer;min-height:2.85rem}.field input:focus,.field select:focus,.auth-form input:focus,.auth-form select:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-dim);outline:none}.field input::placeholder{color:#64748b}.field-password{display:flex;position:relative}.field-password input{padding-right:4rem}.field-password-toggle{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:.35rem .5rem;font-family:inherit;font-size:.8rem;font-weight:600;position:absolute;top:50%;right:.5rem;transform:translateY(-50%)}.field-password-toggle:hover{color:var(--primary-hover)}.field-full{grid-column:1/-1}.form-section{border:none;margin:0;padding:0 0 1rem}.form-section legend{text-transform:uppercase;letter-spacing:.08em;color:var(--primary-hover);margin-bottom:1rem;padding:0;font-size:.75rem;font-weight:600}.form-row{gap:1rem;display:grid}.form-row-2{grid-template-columns:1fr 1fr}.auth-alert{border-radius:10px;padding:.75rem 1rem;font-size:.875rem;line-height:1.45}.auth-card .auth-alert-error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca}.auth-card .auth-alert-success{color:#15803d;background:#f0fdf4;border:1px solid #bbf7d0}.auth-alert-error{color:#fca5a5;background:#f871711f;border:1px solid #f8717159}.auth-alert-success{color:var(--success);background:#4ade801a;border:1px solid #4ade804d}.otp-input{text-align:center;letter-spacing:.5em;font-weight:600;padding-left:.5em!important;font-size:1.75rem!important}.form-error{color:var(--error);margin:0;font-size:.85rem}.form-success{color:var(--success);font-size:.85rem}@media (height<=800px){.auth-brand-tagline,.auth-brand-footnote{display:none}.auth-brand-headline{margin-bottom:.65rem;font-size:1.35rem}.auth-logo{margin-bottom:1rem}.auth-highlight-item{font-size:.8125rem}}@media (width<=900px){.auth-shell{grid-template-columns:1fr;height:100dvh;max-height:100dvh}.auth-brand{display:none}.auth-panel{--auth-surface:#eef2f7;padding:max(.5rem, env(safe-area-inset-top,0)) 1rem max(1rem, env(safe-area-inset-bottom,0));justify-content:flex-start;align-items:stretch;overflow:hidden}.auth-panel-inner,.auth-panel-inner-wide{justify-content:center;width:100%;max-width:none;min-height:0;max-height:100%;padding-top:0;overflow:hidden}.auth-shell-signup .auth-panel-inner,.auth-shell-signup .auth-panel-inner-wide{justify-content:flex-start;padding-top:0}.auth-shell-login .auth-card{max-height:calc(100dvh - 4rem - env(safe-area-inset-top,0) - env(safe-area-inset-bottom,0));overscroll-behavior:contain;-webkit-overflow-scrolling:touch;overflow-y:auto}.auth-card-logo{margin-bottom:1.35rem;display:flex}.auth-card-logo .cofactor-logo-frame--auth{--logo-size:88px;border-radius:20px}.auth-card,.auth-card-wide{border-color:#e8eef4;border-radius:20px;flex:0 auto;width:100%;max-width:none;min-height:0;max-height:none;padding:1.75rem 1.35rem 1.35rem;box-shadow:0 1px 3px #0f172a0f,0 12px 32px #0f172a14}.auth-shell-signup .auth-card,.auth-shell-signup .auth-card-wide{flex:1;min-height:0}.auth-card-header{text-align:center;margin-bottom:1.35rem}.auth-card-header h1{letter-spacing:-.03em;font-size:1.5rem;font-weight:700;line-height:1.25}.auth-sub{max-width:20rem;margin-top:.4rem;margin-left:auto;margin-right:auto;font-size:.9375rem;line-height:1.5}.auth-shell-login .auth-card-body{flex:0 auto;overflow:visible}.auth-shell-signup .auth-card{flex-direction:column;min-height:0;display:flex}.auth-shell-signup .auth-card-body{flex-direction:column;flex:auto;min-height:0;display:flex;overflow:hidden}.auth-shell-signup .auth-form{flex:1;gap:.75rem;min-height:0}.auth-signup-fields{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;flex:auto;min-height:0;margin-right:-.15rem;padding-right:.15rem;overflow-y:auto}.auth-form-section-title{display:block}.auth-signup-submit{z-index:2;background:linear-gradient(#fff0 0%,#fff 28%);margin-top:.35rem;padding-top:.5rem;position:sticky;bottom:0}.auth-shell-signup .auth-card-header{margin-bottom:1rem}.auth-shell-signup .auth-card-header h1{font-size:1.375rem}.auth-form{gap:1.25rem}.auth-form-signup{gap:0}.auth-form-compact .auth-form-grid{grid-template-columns:1fr;gap:0}.auth-form-compact .auth-form-grid>.auth-alert,.auth-form-compact .span-2{grid-column:span 1;margin-bottom:.75rem}.auth-form-section{border-bottom:1px solid var(--auth-border);margin-bottom:1rem;padding:0 0 1rem}.auth-form-section:last-of-type{border-bottom:none;margin-bottom:.5rem;padding-bottom:.25rem}.auth-form-section-title{letter-spacing:.08em;text-transform:uppercase;color:#64748b;margin:0 0 .75rem;font-size:.6875rem;font-weight:700}.auth-form-section-fields{flex-direction:column;gap:1rem;display:flex}.auth-shell-signup .auth-card .field,.auth-card .field{gap:.4rem}.auth-shell-signup .auth-card .field label,.auth-card .field label{color:#334155;font-size:.8125rem;font-weight:600}.auth-panel input,.auth-panel select,.auth-panel textarea,.auth-card .field input,.auth-card .field select{border-color:#dce3ec;border-radius:12px;min-height:48px;padding:.75rem 1rem;font-size:16px}.auth-card .field select{padding-right:2rem}.auth-panel .btn,.auth-panel .btn-lg{border-radius:12px;min-height:50px;padding:.85rem 1.25rem;font-size:1rem;font-weight:600}.auth-card .btn-primary{color:#0c4a6e;background:linear-gradient(#9bd4f0 0%,#87ceeb 45%,#7ec8e8 100%);box-shadow:0 2px 8px #0e749026}.auth-card .btn-primary:active:not(:disabled){transform:scale(.99)}.auth-card .btn-ghost{border:1px solid var(--auth-border);color:#475569;background:#fff;min-height:46px}.auth-footer{margin-top:1rem;padding-top:1rem;font-size:.875rem}.auth-footer a{color:#0284c7}.auth-shell-signup .auth-form>.btn-primary{flex-shrink:0;margin-top:.5rem}.otp-input{border-radius:12px!important;min-height:52px!important;font-size:1.5rem!important}.auth-card .field-password-toggle{color:#64748b;min-width:44px;min-height:44px;padding:0 .65rem;right:.25rem}}@media (width<=520px){.form-row-2{grid-template-columns:1fr}}.dashboard .hero h1{margin:0 0 .5rem;font-size:1.75rem}.dashboard .hero p{color:var(--text-muted);margin:0 0 2rem}.product-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1.25rem;display:grid}.product-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);color:inherit;flex-direction:column;gap:.5rem;padding:1.5rem;text-decoration:none;transition:border-color .15s,transform .15s;display:flex}.product-card:hover{border-color:var(--primary);text-decoration:none;transform:translateY(-2px)}.product-tag{text-transform:uppercase;letter-spacing:.05em;color:var(--primary-hover);font-size:.75rem}.product-card h2{margin:0;font-size:1.25rem}.product-card p{color:var(--text-muted);flex:1;margin:0;font-size:.9rem}.product-cta{color:var(--accent);font-size:.9rem;font-weight:600}.app-shell-chat{background:#fff;flex-direction:column;height:100svh;max-height:100svh;display:flex;overflow:hidden}.app-shell-chat>.app-frame{flex:auto;height:auto;min-height:0;max-height:100%}.app-frame{--shell-border:#e2e8f0;--shell-header-h:72px;--shell-footer-h:72px;--shell-gutter:1rem;--shell-control-h:48px;grid-template-columns:var(--sidebar-width,288px) 1fr;box-sizing:border-box;background:#fff;grid-template-rows:100dvh;height:100dvh;min-height:0;display:grid;position:relative}.app-frame *,.app-frame :before,.app-frame :after{box-sizing:border-box}.app-frame.is-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.app-frame.is-resizing .app-frame-main{pointer-events:none}.app-sidebar-backdrop,.app-menu-btn,.app-sidebar-close{display:none}.app-frame-sidebar-head{border-bottom:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-shrink:0;align-items:center;display:flex}.app-frame-sidebar{border-right:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-direction:column;min-width:0;height:100%;min-height:0;display:flex;position:relative}.app-sidebar-resizer{z-index:5;cursor:col-resize;touch-action:none;background:0 0;width:6px;height:100%;margin-right:-3px;transition:background .15s;position:absolute;top:0;right:0}.app-sidebar-resizer:after{content:"";background:0 0;border-radius:2px;width:2px;height:100%;transition:background .15s;position:absolute;top:0;right:2px}.app-sidebar-resizer:hover:after,.app-frame.is-resizing .app-sidebar-resizer:after{background:#87ceeb}.app-frame-brand{color:#0f172a;background:0 0;flex:1;justify-content:flex-start;align-items:center;gap:.65rem;min-width:0;padding:.5rem .85rem;text-decoration:none;display:flex}.app-frame-brand--sidebar{align-self:center;height:100%;min-height:0}.app-frame-brand--topbar{flex:1;min-height:0;padding:0;display:none}.app-frame-brand .cofactor-logo-frame--md{--logo-size:36px;border-radius:10px}.app-frame-brand:hover{color:#0f172a;text-decoration:none}.app-frame-brand-text{flex-direction:column;flex:1;gap:.12rem;min-width:0;display:flex}.app-frame-brand-title{letter-spacing:-.02em;color:#0f172a;white-space:nowrap;text-overflow:ellipsis;font-size:.9375rem;font-weight:700;line-height:1.25;overflow:hidden}.app-frame-brand-tagline{color:#64748b;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:.6875rem;font-weight:500;line-height:1.35;display:-webkit-box;overflow:hidden}.app-frame-brand-sub{letter-spacing:.1em;text-transform:uppercase;color:#64748b;font-size:.65rem;font-weight:600}.app-frame-sidebar-body{background:#f8fafc;flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.app-frame-sidebar-footer{z-index:2;padding:0 var(--shell-gutter,1rem);padding-bottom:max(0px, env(safe-area-inset-bottom,0));border-top:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-shrink:0;align-items:center;display:flex;position:relative}.user-menu-dropdown--sidebar{flex:1;width:100%;min-width:0}.user-menu-dropdown--sidebar .user-menu-trigger{width:100%;max-width:none;min-height:var(--shell-control-h,48px);height:var(--shell-control-h,48px);border:1px solid var(--shell-border,#e2e8f0);box-shadow:none;background:#f8fafc;border-radius:14px;padding:0 .55rem 0 .4rem}.user-menu-dropdown--sidebar .user-menu-trigger-text{flex-direction:row;flex:1;align-items:center;gap:.4rem;min-width:0;display:flex;overflow:hidden}.user-menu-dropdown--sidebar .user-menu-name,.user-menu-dropdown--sidebar .user-menu-meta{flex-shrink:1;min-width:0;max-width:none}.user-menu-dropdown--sidebar .user-menu-meta{flex-shrink:999}.user-menu-dropdown--sidebar .user-menu-meta:before{content:"·";color:#94a3b8;flex-shrink:0;margin-right:.4rem}.user-menu-dropdown--sidebar .user-menu-panel{z-index:60;width:auto;min-width:0;inset:auto 0 calc(100% + .4rem)}.app-frame-main{background:#fff;flex-direction:column;min-width:0;height:100%;min-height:0;display:flex;position:relative;overflow:hidden}.app-menu-btn--floating,.app-shell-header-spacer{display:none}@media (width>=769px){.app-frame-sidebar-head{height:var(--shell-header-h);min-height:var(--shell-header-h);max-height:var(--shell-header-h);padding:0 var(--shell-gutter)}.app-frame-sidebar-footer{height:var(--shell-footer-h);min-height:var(--shell-footer-h);max-height:var(--shell-footer-h);padding:0 var(--shell-gutter)}.app-shell-header-spacer{height:var(--shell-header-h);min-height:var(--shell-header-h);border-bottom:1px solid var(--shell-border);background:#fff;flex-shrink:0;display:block}.app-frame-content:has(.chat-toolbar) .app-shell-header-spacer{display:none}.chat-toolbar{height:var(--shell-header-h);min-height:var(--shell-header-h);max-height:var(--shell-header-h);padding:0 var(--shell-gutter);border-bottom:1px solid var(--shell-border);background:#fff;padding-top:0}.app-frame-footer{height:var(--shell-footer-h);min-height:var(--shell-footer-h);max-height:var(--shell-footer-h);padding:0 var(--shell-gutter);align-items:center;display:flex}.app-frame-footer .chat-composer{width:100%;height:var(--shell-control-h);min-height:var(--shell-control-h);max-height:var(--shell-control-h);border-top:none;padding:0;position:relative;overflow:visible}.chat-composer{height:var(--shell-footer-h);min-height:var(--shell-footer-h);max-height:var(--shell-footer-h);padding:0 var(--shell-gutter);border-top:1px solid var(--shell-border);position:relative;overflow:visible}.chat-composer-error{left:var(--shell-gutter);right:var(--shell-gutter);z-index:5;background:#fff;border:1px solid #fecaca;border-radius:8px;margin:0;padding:.35rem .5rem;position:absolute;bottom:calc(100% + 4px)}.chat-composer-bar{height:var(--shell-control-h);min-height:var(--shell-control-h);max-height:var(--shell-control-h);width:100%;padding:0 .35rem 0 .45rem}.chat-composer-input{height:100%}.chat-composer-icon,.chat-composer-send{height:calc(var(--shell-control-h) - 8px);min-height:calc(var(--shell-control-h) - 8px)}}.app-topbar-title{flex:1;min-width:0}.app-topbar-title h1{color:#0f172a;letter-spacing:-.02em;white-space:nowrap;text-overflow:ellipsis;margin:0;font-size:1.05rem;font-weight:700;overflow:hidden}.app-topbar-title p,.app-topbar-subtitle{color:#64748b;white-space:nowrap;text-overflow:ellipsis;margin:.1rem 0 0;font-size:.75rem;overflow:hidden}.app-topbar-actions{flex-shrink:0;align-items:center;display:flex}.user-menu-dropdown{position:relative}.user-menu-trigger{cursor:pointer;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;align-items:center;gap:.55rem;max-width:220px;padding:.3rem .55rem .3rem .35rem;font-family:inherit;transition:background .15s,border-color .15s,box-shadow .15s;display:flex}.user-menu-trigger:hover,.user-menu-trigger.open{background:#fff;border-color:#cbd5e1;box-shadow:0 2px 8px #0f172a0f}.user-avatar{background:linear-gradient(145deg, var(--primary), var(--sky-deep));color:#fff;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:34px;height:34px;font-size:.75rem;font-weight:700;display:flex}.user-avatar-lg{width:40px;height:40px;font-size:.85rem}.user-menu-trigger-text{text-align:left;flex-direction:column;align-items:flex-start;gap:.05rem;min-width:0;display:flex}.user-menu-name{color:#0f172a;text-overflow:ellipsis;white-space:nowrap;max-width:110px;font-size:.8125rem;font-weight:600;line-height:1.2;overflow:hidden}.user-menu-meta{color:#64748b;text-overflow:ellipsis;white-space:nowrap;max-width:110px;font-size:.6875rem;line-height:1.2;overflow:hidden}.user-menu-chevron{color:#94a3b8;flex-shrink:0;transition:transform .15s}.user-menu-trigger.open .user-menu-chevron{transform:rotate(180deg)}.user-menu-panel{z-index:50;background:#fff;border:1px solid #e2e8f0;border-radius:12px;min-width:240px;padding:.5rem;position:absolute;top:calc(100% + .4rem);right:0;box-shadow:0 12px 32px #0f172a1f}.user-menu-panel-head{align-items:center;gap:.65rem;padding:.5rem .55rem;display:flex}.user-menu-panel-info{flex-direction:column;gap:.1rem;min-width:0;display:flex}.user-menu-panel-name{color:#0f172a;font-size:.875rem;font-weight:600}.user-menu-panel-email{color:#64748b;text-overflow:ellipsis;white-space:nowrap;max-width:160px;font-size:.75rem;overflow:hidden}.user-menu-panel-divider{background:#f1f5f9;height:1px;margin:.25rem 0}.user-menu-item{color:#334155;cursor:pointer;background:0 0;border:none;border-radius:8px;align-items:center;gap:.6rem;width:100%;padding:.55rem .65rem;font-family:inherit;font-size:.875rem;font-weight:500;text-decoration:none;transition:background .12s,color .12s;display:flex}.user-menu-item:hover{color:#0f172a;background:#f8fafc;text-decoration:none}.user-menu-item-danger:hover{color:#dc2626;background:#fef2f2}.user-menu-item svg{color:#64748b;flex-shrink:0}.user-menu-item-danger:hover svg{color:#dc2626}.profile-nav{flex-direction:column;gap:.25rem;padding:.75rem .65rem;display:flex}.profile-nav-link{color:#475569;border-radius:10px;align-items:center;gap:.6rem;padding:.6rem .75rem;font-size:.875rem;font-weight:500;text-decoration:none;transition:background .15s,color .15s;display:flex}.profile-nav-link:hover{color:#0f172a;background:#ffffffb3;text-decoration:none}.profile-nav-link.active{color:var(--primary);background:#fff;font-weight:600;box-shadow:0 1px 3px #0f172a0f}.profile-page{background:#f8fafc;flex:1;padding:1.25rem;overflow-y:auto}.profile-card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;max-width:720px;margin:0 auto;padding:1.5rem 1.75rem;box-shadow:0 2px 12px #0f172a0a}.profile-card-head{justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1.25rem;display:flex}.profile-card-head h2{color:#0f172a;margin:0 0 .25rem;font-size:1.25rem}.profile-card-head p{color:#64748b;margin:0;font-size:.875rem}.profile-muted{color:#94a3b8;margin:0 0 1rem;font-size:.8125rem}.profile-info-grid{grid-template-columns:1fr 1fr;gap:.85rem 1.25rem;display:grid}.profile-info-row{flex-direction:column;gap:.2rem;display:flex}.profile-info-label{text-transform:uppercase;letter-spacing:.06em;color:#94a3b8;font-size:.6875rem;font-weight:600}.profile-info-value{color:#0f172a;font-size:.9375rem;font-weight:500}.profile-form-grid{grid-template-columns:1fr 1fr;gap:1rem;display:grid}.profile-form .field-full{grid-column:span 2}.profile-form .field input,.profile-form .field select{color:#0f172a;background:#fff;border-color:#e2e8f0}.profile-form-actions{border-top:1px solid #f1f5f9;justify-content:flex-end;gap:.5rem;margin-top:1.25rem;padding-top:1rem;display:flex}.app-shell-chat .auth-alert-error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca;margin-bottom:1rem}.app-shell-chat .auth-alert-success{color:#15803d;background:#f0fdf4;border:1px solid #bbf7d0;margin-bottom:1rem}.btn-sm{padding:.4rem .75rem;font-size:.8125rem}.app-frame-content{background:#fff;flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.app-frame-footer{z-index:20;border-top:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-shrink:0}.app-frame-footer .chat-composer{background:0 0;border-top:none}.chat-view{flex-direction:column;flex:auto;width:100%;min-height:0;display:flex;overflow:hidden}.chat-view>.chat-messages{flex:auto;min-height:0}.chat-toolbar{padding:.75rem 1rem;padding-top:max(.75rem, env(safe-area-inset-top,0));border-bottom:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-shrink:0;align-items:center;display:flex}.chat-mobile-header{flex-shrink:0;display:none}.chat-toolbar-desktop{justify-content:space-between;align-items:center;gap:.75rem;width:100%;display:flex}.chat-toolbar-desktop-actions{flex-shrink:0;align-items:center;gap:.5rem;display:flex}.chat-toolbar-brand-name{letter-spacing:-.02em;color:#0f172a;white-space:nowrap;font-size:1.05rem;font-weight:700}.chat-toolbar-menu-btn,.chat-toolbar-new-icon-btn{color:#0f172a;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#fff;border:1px solid #e2e8f0;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;padding:0;font-family:inherit;transition:background .15s,border-color .15s;display:inline-flex;box-shadow:0 2px 10px #0f172a14}.chat-toolbar-menu-btn:active,.chat-toolbar-new-icon-btn:active{background:#f1f5f9}.chat-toolbar-new-icon-btn{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 2px 10px #38bdf859}.chat-toolbar-new-icon-btn:active{background:var(--primary-hover)}.chat-mobile-header-actions{justify-content:flex-end;align-items:center;gap:.5rem;display:flex}.chat-mobile-header-actions .chat-toolbar-new-icon-btn{width:44px;height:44px}.chat-toolbar--desktop-only{display:flex}.chat-toolbar-btn{white-space:nowrap;border-radius:10px;flex-shrink:0;align-items:center;gap:.4rem;padding:.5rem .85rem;font-size:.875rem;font-weight:600;display:inline-flex}.chat-toolbar-btn:disabled{opacity:.45;cursor:not-allowed}.chat-share-btn{color:#0f172a;background:#f8fafc;border:1px solid #e2e8f0}.chat-share-btn:hover:not(:disabled){background:#fff;border-color:#cbd5e1}.chat-share-notice{color:#15803d;text-align:center;flex-shrink:0;margin:0;padding:0 1rem .4rem;font-size:.8125rem;font-weight:500}.chat-new-btn-top{white-space:nowrap;border-radius:10px;align-items:center;gap:.45rem;padding:.5rem .9rem;font-size:.875rem;display:inline-flex}.chat-new-btn-top svg{flex-shrink:0}.chat-sidebar{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.chat-sidebar-actions{background:#fff;border-bottom:1px solid #e2e8f0;flex-shrink:0;padding:.75rem .85rem .65rem}.chat-new-btn{color:#0f172a;cursor:pointer;background:#fff;border:1px solid #cbd5e1;border-radius:10px;justify-content:center;align-items:center;gap:.5rem;width:100%;padding:.6rem .85rem;font-family:inherit;font-size:.875rem;font-weight:600;transition:background .15s,border-color .15s,box-shadow .15s;display:flex}.chat-new-btn:hover{background:#f8fafc;border-color:#94a3b8;box-shadow:0 1px 3px #0f172a0f}.chat-new-btn svg{color:var(--primary);flex-shrink:0}.chat-sidebar-section{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.chat-sidebar-section-head{flex-shrink:0;justify-content:space-between;align-items:center;gap:.5rem;padding:.65rem .85rem .5rem;display:flex}.chat-sidebar-section-head h2{text-transform:uppercase;letter-spacing:.08em;color:#94a3b8;margin:0;font-size:.6875rem;font-weight:700}.chat-history-count{color:#64748b;background:#e2e8f0;border-radius:999px;padding:.1rem .45rem;font-size:.6875rem;font-weight:600;line-height:1.4}.chat-history-list{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent;flex:1;min-height:0;margin:0;padding:0 .5rem .85rem;list-style:none;overflow-y:auto}.chat-history-list::-webkit-scrollbar{width:5px}.chat-history-list::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.chat-history-status{color:#94a3b8;align-items:center;gap:.5rem;padding:1rem .5rem;font-size:.8125rem;display:flex}.chat-history-spinner{border:2px solid #e2e8f0;border-top-color:var(--primary);border-radius:50%;flex-shrink:0;width:14px;height:14px;animation:.7s linear infinite spin}.chat-history-empty{flex-direction:row;justify-content:flex-start;align-items:center;gap:.5rem;min-width:0;padding:1rem .65rem;display:flex}.chat-history-empty-icon{color:#94a3b8;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.chat-history-empty-text{color:#94a3b8;white-space:nowrap;text-overflow:ellipsis;min-width:0;margin:0;font-size:.8125rem;font-weight:500;line-height:1.35;overflow:hidden}.chat-history-list>li{border:1px solid #0000;border-radius:10px;align-items:stretch;gap:0;margin-bottom:.2rem;transition:border-color .15s,background .15s;display:flex}.chat-history-list>li:hover{background:#ffffffa6}.chat-history-list>li.active{border-color:#e2e8f0;border-left:3px solid var(--primary);background:#fff;padding-left:0;box-shadow:0 1px 4px #0f172a0f}.chat-history-btn{text-align:left;cursor:pointer;background:0 0;border:none;border-radius:8px;flex-direction:column;flex:1;align-items:flex-start;gap:.2rem;min-width:0;padding:.6rem .55rem .6rem .65rem;font-family:inherit;display:flex}.chat-history-list>li.active .chat-history-btn{padding-left:.5rem}.chat-history-badge{letter-spacing:.04em;text-transform:uppercase;border-radius:4px;padding:.1rem .35rem;font-size:.6rem;font-weight:700;line-height:1.3}.chat-history-badge-Study{color:var(--primary);background:#87ceeb1f}.chat-history-badge-Evidence{color:var(--sky-deep);background:#38bdf81f}.chat-history-title{-webkit-line-clamp:2;color:#0f172a;word-break:break-word;-webkit-box-orient:vertical;width:100%;font-size:.8125rem;font-weight:600;line-height:1.35;display:-webkit-box;overflow:hidden}.chat-history-preview{-webkit-line-clamp:2;color:#64748b;word-break:break-word;-webkit-box-orient:vertical;width:100%;font-size:.75rem;line-height:1.4;display:-webkit-box;overflow:hidden}.chat-history-actions{flex-shrink:0;align-self:center;margin-right:.2rem;position:relative}.chat-history-options-btn{color:#94a3b8;cursor:pointer;opacity:0;background:0 0;border:none;border-radius:8px;justify-content:center;align-items:center;width:32px;height:32px;transition:opacity .15s,color .15s,background .15s;display:flex}.chat-history-list>li:hover .chat-history-options-btn,.chat-history-list>li.active .chat-history-options-btn,.chat-history-options-btn.open{opacity:1}.chat-history-options-btn:hover,.chat-history-options-btn.open{color:#0f172a;background:#f1f5f9}.chat-history-menu{z-index:30;background:#fff;border:1px solid #e2e8f0;border-radius:10px;min-width:148px;padding:.35rem;position:absolute;top:calc(100% + 4px);right:0;box-shadow:0 10px 28px #0f172a1f}.chat-history-menu-item{color:#334155;text-align:left;cursor:pointer;background:0 0;border:none;border-radius:7px;align-items:center;gap:.5rem;width:100%;padding:.5rem .6rem;font-family:inherit;font-size:.8125rem;font-weight:500;transition:background .12s,color .12s;display:flex}.chat-history-menu-item:hover:not(:disabled){background:#f8fafc}.chat-history-menu-item:disabled{opacity:.6;cursor:not-allowed}.chat-history-menu-item-danger{color:#dc2626}.chat-history-menu-item-danger:hover:not(:disabled){color:#b91c1c;background:#fef2f2}.mode-switch{flex-wrap:wrap;gap:.35rem;display:flex}.mode-pill{color:#64748b;cursor:pointer;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:.38rem .8rem;font-family:inherit;font-size:.8125rem;font-weight:600;transition:background .15s,border-color .15s,color .15s}.mode-pill:hover{color:#0f172a;border-color:#cbd5e1}.mode-pill.active{background:var(--primary);border-color:var(--primary);color:#fff}.exam-body{padding:1rem 1.25rem;overflow-y:auto}.exam-toolbar{margin-bottom:1rem}.evidence-toggle{color:#64748b;flex-shrink:0;align-items:center;gap:.4rem;padding:.5rem 1.25rem 0;font-size:.8125rem;display:flex}.chat-composer{padding:.75rem 1rem;padding-bottom:max(.75rem, env(safe-area-inset-bottom,0));border-top:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-direction:column;flex-shrink:0;justify-content:center;display:flex}.chat-composer-error{color:#dc2626;white-space:nowrap;text-overflow:ellipsis;margin:0 0 .45rem;padding:.35rem .5rem;font-size:.8125rem;line-height:1.35;overflow:hidden}.chat-composer-bar{min-height:var(--shell-control-h,48px);border:1px solid var(--shell-border,#e2e8f0);width:100%;box-shadow:none;background:#f8fafc;border-radius:14px;align-items:center;gap:.25rem;padding:.3rem .35rem .3rem .45rem;display:flex}.chat-composer-bar:focus-within{border-color:var(--primary);background:#fff;box-shadow:0 0 0 3px #87ceeb24}.chat-composer-icon{color:#64748b;cursor:pointer;background:0 0;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;width:40px;height:40px;padding:0;font-family:inherit;transition:background .15s,color .15s;display:inline-flex}.chat-composer-icon:hover:not(:disabled){color:#0f172a;background:#e2e8f0}.chat-composer-icon:disabled{opacity:.45;cursor:not-allowed}.chat-composer-input{color:#0f172a;background:0 0;border:none;flex:1;min-width:0;height:40px;padding:0 .5rem;font-family:inherit;font-size:.9375rem;line-height:1.4}.chat-composer-input:focus{outline:none}.chat-composer-input::placeholder{color:#94a3b8}.chat-composer-input:disabled{opacity:.6;cursor:not-allowed}.chat-composer-send{background:var(--primary);color:#0c4a6e;cursor:pointer;white-space:nowrap;border:none;border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;height:40px;padding:0 1rem;font-family:inherit;font-size:.875rem;font-weight:700;transition:background .15s,opacity .15s;display:inline-flex}.chat-composer-send:hover:not(:disabled){background:var(--primary-hover)}.chat-composer-send:disabled{opacity:.45;cursor:not-allowed}.chat-welcome{text-align:center;max-width:420px;margin:auto;padding:2rem 1.5rem}.chat-welcome p{color:#64748b;margin:0;font-size:.9375rem;line-height:1.55}.btn-icon{flex-shrink:0;justify-content:center;align-items:center;padding:.5rem .65rem;display:inline-flex}.app-shell-chat .chat-error{color:#dc2626;padding:0 1.25rem .5rem;font-size:.875rem}.app-shell-chat .viva-question-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;margin-bottom:1rem;padding:1rem 1.15rem}.app-shell-chat .viva-question-card h2{color:#0f172a}.app-shell-chat .viva-answer-form label{color:#475569}.app-shell-chat .viva-answer-form textarea{color:#0f172a;background:#fff;border:1px solid #e2e8f0;border-radius:10px}.app-shell-chat .product-tag{color:var(--primary);background:#87ceeb1a}.chat-page{flex-direction:column;height:calc(100vh - 120px);min-height:480px;display:flex}.chat-header{justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem;display:flex}.chat-header h1{margin:0;font-size:1.35rem}.chat-header p{color:var(--text-muted);margin:.25rem 0 0;font-size:.9rem}.chat-panel{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.chat-messages{overscroll-behavior:contain;background:#fff;flex-direction:column;flex:auto;gap:.85rem;min-height:0;padding:1.25rem;display:flex;overflow-y:auto}.chat-empty{color:var(--text-muted);text-align:center;max-width:400px;margin:auto}.chat-bubble{border-radius:14px;max-width:min(85%,640px);padding:.85rem 1.1rem;font-size:.9375rem;line-height:1.55}.chat-bubble.user{background:var(--primary);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}.chat-bubble.user p{margin:0}.chat-bubble.assistant{color:#0f172a;background:#f8fafc;border:1px solid #e2e8f0;border-bottom-left-radius:4px;align-self:flex-start}.msg-source{letter-spacing:.04em;text-transform:uppercase;border-radius:4px;margin-bottom:.4rem;padding:.15rem .45rem;font-size:.65rem;font-weight:600;display:inline-block}.msg-source-teacher{color:var(--primary);background:#87ceeb1f}.msg-source-vera{color:var(--sky-deep);background:#38bdf81f}.msg-source-viva{color:#4f46e5;background:#6366f11f}.score-badge.inline-score{margin-top:.65rem;margin-bottom:0}.chat-bubble.loading{color:var(--text-muted,#64748b);background:var(--bg-elevated,#f1f5f9);border:1px solid var(--border);font-style:normal}.thinking-indicator{color:var(--text-muted);align-items:center;gap:.15rem;font-size:.9rem;font-weight:500;display:inline-flex}.thinking-dots:after{content:"…";animation:1s ease-in-out infinite thinking-pulse;display:inline-block}@keyframes thinking-pulse{0%,to{opacity:.25}50%{opacity:1}}[data-theme=dark] .chat-bubble.loading{background:#ffffff0f}.chat-input-row{border-top:1px solid var(--border);background:var(--bg-elevated);gap:.5rem;padding:.75rem;display:flex}.chat-input-row input{border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:8px;flex:1;padding:.65rem .85rem;font-size:1rem}.chat-error{padding:0 .75rem .5rem}.image-strip{flex-wrap:wrap;gap:.5rem;margin-top:.5rem;display:flex}.image-ref{opacity:.85;font-size:.8rem}.markdown-body{font-size:.92rem;line-height:1.6}.markdown-body h1,.markdown-body h2,.markdown-body h3{margin:.75rem 0 .35rem;font-size:1rem}.markdown-body p{margin:.35rem 0}.markdown-body ul,.markdown-body ol{margin:.35rem 0;padding-left:1.25rem}.markdown-body table{border-collapse:collapse;width:100%;margin:.5rem 0;font-size:.85rem}.markdown-body th,.markdown-body td{border:1px solid var(--border);padding:.35rem .5rem}.markdown-body a{color:var(--accent);text-underline-offset:2px;text-decoration:underline}.citation-panel{border-top:1px solid var(--border);margin-top:1rem;padding-top:.85rem}.citation-panel-title{text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);margin:0 0 .5rem;font-size:.75rem;font-weight:600}.citation-list{margin:0;padding:0;list-style:none}.citation-item{gap:.5rem;margin-bottom:.75rem;font-size:.875rem;line-height:1.45;display:flex}.citation-num{color:var(--accent);flex-shrink:0;min-width:1.25rem;font-weight:700}.citation-body{flex:1;min-width:0}.citation-link{color:var(--accent);text-underline-offset:2px;word-break:break-word;font-weight:600;text-decoration:underline}.citation-link-plain{color:var(--text);text-decoration:none}.citation-type{text-transform:uppercase;color:var(--text-muted);vertical-align:middle;margin-left:.35rem;font-size:.65rem;font-weight:600;display:inline-block}.citation-snippet{color:var(--text-muted);border-left:2px solid var(--border);margin:.35rem 0 0;padding-left:.5rem;font-size:.8rem}[data-theme=dark] .citation-link,[data-theme=dark] .citation-num{color:#6eb6ff}.research-panel{flex-direction:column;gap:.85rem;margin-bottom:.5rem;display:flex}.research-approach{border:1px solid var(--border);background:linear-gradient(135deg,#2563eb14,#2563eb05);border-radius:10px;padding:.65rem .85rem}.research-approach-title{text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin:0 0 .4rem;font-size:.72rem;font-weight:700}.research-approach-steps{color:var(--text);margin:0;padding:0 0 0 1.1rem;font-size:.8rem;line-height:1.5}.research-answer-section{background:var(--bg-card);border:1px solid var(--border);border-radius:12px;overflow:hidden;box-shadow:0 1px 3px #0000000f}.research-answer-header{background:var(--bg-elevated,#2563eb0f);border-bottom:1px solid var(--border);align-items:flex-start;gap:.65rem;padding:.85rem 1rem;display:flex}.research-answer-icon{font-size:1.25rem;line-height:1}.research-answer-title{margin:0;font-size:1rem;font-weight:700}.research-answer-sub{color:var(--text-muted);margin:.2rem 0 0;font-size:.75rem}.research-answer-body{padding:.85rem 1rem 1rem}.research-answer-body .markdown-body{font-size:.92rem}.research-answer-body .markdown-body a{color:var(--accent);font-weight:600}.research-evidence-panel{border:1px solid var(--border);background:var(--bg-elevated,#00000005);border-radius:10px;overflow:hidden}.research-evidence-panel-summary{cursor:pointer;flex-wrap:wrap;align-items:baseline;gap:.35rem .75rem;padding:.65rem .85rem;font-size:.88rem;font-weight:600;list-style:none;display:flex}.research-evidence-panel-summary::-webkit-details-marker{display:none}.research-evidence-panel-hint{color:var(--text-muted);font-size:.75rem;font-weight:400}.research-question-ref{color:var(--text-muted);margin:0;padding:0 .85rem .65rem;font-size:.78rem}.research-question-ref em{color:var(--text);font-style:normal;font-weight:500}.research-evidence-step{border-top:1px solid var(--border)}.research-evidence-summary{cursor:pointer;align-items:center;gap:.5rem;padding:.55rem .85rem;font-size:.85rem;list-style:none;display:flex}.research-evidence-summary::-webkit-details-marker{display:none}.research-evidence-summary-text{flex-direction:column;flex:1;gap:.1rem;min-width:0;display:flex}.research-evidence-summary-text strong{font-size:.88rem}.research-evidence-icon{font-size:1rem}.research-step-num{color:#fff;background:var(--accent);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:1.35rem;height:1.35rem;font-size:.75rem;font-weight:700;display:inline-flex}.research-step-from{color:var(--text-muted);font-size:.72rem;font-weight:400}.research-evidence-body{padding:0 .85rem .85rem}.research-status{text-transform:uppercase;border-radius:4px;flex-shrink:0;padding:.18rem .4rem;font-size:.62rem;font-weight:700}.research-status-ok{color:#16a34a;background:#22c55e26}.research-status-empty{color:#ca8a04;background:#eab30826}.research-status-unavailable{color:var(--text-muted);background:#94a3b833}.research-message{color:var(--text-muted);margin:0 0 .5rem;font-size:.82rem}.research-callout{background:var(--bg-card);border-left:3px solid var(--accent);border-radius:0 8px 8px 0;margin-bottom:.65rem;padding:.6rem .75rem}.research-callout-label{text-transform:uppercase;letter-spacing:.04em;color:var(--accent);margin-bottom:.25rem;font-size:.68rem;font-weight:700;display:block}.research-callout p{margin:0;font-size:.85rem;line-height:1.5}.research-source-list{flex-direction:column;gap:.55rem;display:flex}.research-source-card{background:var(--bg-card);border:1px solid var(--border);border-radius:8px;padding:.65rem .75rem}.research-source-card-head{align-items:flex-start;gap:.5rem;display:flex}.research-source-num{color:var(--accent);flex-shrink:0;min-width:1.1rem;font-size:.8rem;font-weight:800}.research-source-card-titles{flex:1;min-width:0}.research-source-title{color:var(--accent);word-break:break-word;font-size:.88rem;font-weight:600;line-height:1.35;text-decoration:none;display:block}.research-source-title:hover{text-decoration:underline}.research-source-meta{color:var(--text-muted);margin-top:.15rem;font-size:.7rem;display:block}.research-domain{color:var(--text-muted)}.research-open-link{width:1.75rem;height:1.75rem;color:var(--accent);background:#2563eb1a;border-radius:6px;flex-shrink:0;justify-content:center;align-items:center;font-size:.9rem;font-weight:700;text-decoration:none;display:inline-flex}.research-open-link:hover{background:#2563eb2e}.research-excerpt{border-top:1px solid var(--border);margin-top:.5rem;padding-top:.5rem}.research-excerpt p{color:var(--text);margin:0;font-size:.82rem;line-height:1.55}.research-expand-btn{color:var(--accent);cursor:pointer;background:0 0;border:none;margin-top:.35rem;padding:0;font-size:.78rem;font-weight:600}.research-expand-btn:hover{text-decoration:underline}.research-journal-line{color:var(--text-muted);margin:.35rem 0 0;font-size:.78rem}[data-theme=dark] .research-approach{background:linear-gradient(135deg,#6eb6ff1f,#0003)}[data-theme=dark] .research-source-title,[data-theme=dark] .research-answer-body .markdown-body a{color:#6eb6ff}[data-theme=dark] .research-open-link{color:#6eb6ff;background:#6eb6ff26}.viva-page .viva-panel{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);flex:1;padding:1.5rem;overflow-y:auto}.viva-question-card h2{margin:.5rem 0 0;font-size:1.15rem}.viva-answer-form{margin-top:1.5rem}.viva-answer-form label{color:var(--text-muted);flex-direction:column;gap:.5rem;font-size:.85rem;display:flex}.viva-answer-form textarea{border:1px solid var(--border);background:var(--bg-elevated);color:var(--text);resize:vertical;border-radius:8px;padding:.75rem;font-family:inherit}.viva-answer-form .btn{margin-top:.75rem}.viva-result{margin-top:1.5rem}.score-badge{background:var(--primary);color:#fff;border-radius:999px;margin-bottom:1rem;padding:.35rem .85rem;font-size:.9rem;display:inline-block}.image-note{color:var(--text-muted);font-size:.85rem}.vera-layout{grid-template-columns:240px 1fr;gap:1rem;height:calc(100vh - 120px);min-height:480px;display:grid}.evidence-sidebar,.vera-sidebar{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);flex-direction:column;display:flex;overflow:hidden}.sidebar-head{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:.75rem 1rem;display:flex}.sidebar-head h2{margin:0;font-size:.95rem}.thread-list{flex:1;margin:0;padding:.5rem;list-style:none;overflow-y:auto}.thread-list li{border-radius:8px;align-items:center;gap:.25rem;margin-bottom:.25rem;display:flex}.thread-list li.active{background:var(--bg-elevated)}.thread-list li button:first-child{text-align:left;color:var(--text);cursor:pointer;white-space:nowrap;text-overflow:ellipsis;background:0 0;border:none;flex:1;padding:.5rem .65rem;font-size:.85rem;overflow:hidden}.thread-delete{color:var(--text-muted);cursor:pointer;background:0 0;border:none;padding:.25rem .5rem;font-size:1.1rem}.thread-delete:hover{color:var(--error)}.vera-main{min-width:0}.toggle-context{color:var(--text-muted);cursor:pointer;align-items:center;gap:.5rem;font-size:.85rem;display:flex}@media (width<=768px){.app-header{flex-wrap:wrap}.app-frame{grid-template-rows:1fr;grid-template-columns:1fr}.app-sidebar-resizer{display:none}.app-menu-btn--floating,.app-sidebar-close{color:#0f172a;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#fff;border:1px solid #e2e8f0;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:44px;height:44px;padding:0;display:inline-flex;box-shadow:0 2px 10px #0f172a1a}.app-frame--integrated-mobile-header .app-menu-btn--floating{display:none}.app-menu-btn--floating{top:max(.75rem, env(safe-area-inset-top,0));z-index:25;position:fixed;left:.75rem}.app-frame.sidebar-open .app-menu-btn--floating{opacity:0;visibility:hidden;pointer-events:none}.app-frame--integrated-mobile-header .app-frame-main{grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"header""content""footer";height:100%;min-height:0;max-height:100svh;display:grid;overflow:hidden}.app-frame--integrated-mobile-header .chat-mobile-header{grid-area:header}.app-frame--integrated-mobile-header .app-frame-content{flex-direction:column;grid-area:content;min-height:0;display:flex;overflow:hidden}.app-frame--integrated-mobile-header .app-frame-footer{padding-bottom:max(.35rem, env(safe-area-inset-bottom,0));background:#fff;flex-shrink:0;grid-area:footer;box-shadow:0 -2px 16px #0f172a14}.chat-mobile-header{z-index:30;padding:max(.45rem, env(safe-area-inset-top,0)) .65rem .45rem;box-sizing:border-box;border-bottom:1px solid var(--shell-border,#e2e8f0);background:#fff;flex-shrink:0;grid-template-columns:44px 1fr auto;align-items:center;gap:.35rem;min-height:52px;display:grid}.chat-mobile-header-brand{pointer-events:none;grid-column:2;justify-content:center;align-items:center;gap:.45rem;min-width:0;display:flex}.chat-toolbar-menu-btn{z-index:2;grid-column:1;position:relative}.chat-mobile-header-actions{z-index:2;grid-column:3;position:relative}.chat-mobile-header-brand .cofactor-logo-frame--md{--logo-size:36px;border-radius:10px;flex-shrink:0}.chat-mobile-header-actions{justify-content:flex-end;align-items:center;gap:.35rem;display:flex}.app-frame--integrated-mobile-header .chat-toolbar--desktop-only{pointer-events:none;overflow:hidden;border:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;display:none!important}.chat-toolbar-btn{min-height:40px;padding:.4rem .65rem;font-size:.8125rem}.chat-new-btn-top{min-height:40px;padding:.45rem .75rem;font-size:.8125rem}.app-menu-btn--floating:active,.app-sidebar-close:active{background:#f1f5f9}.app-sidebar-backdrop{z-index:40;opacity:0;pointer-events:none;cursor:pointer;background:#0f172a73;border:none;margin:0;padding:0;transition:opacity .22s;display:block;position:fixed;inset:0}.app-frame.sidebar-open .app-sidebar-backdrop{opacity:1;pointer-events:auto}.app-frame-sidebar{z-index:50;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-bottom:none;border-right:1px solid #e2e8f0;width:min(320px,100vw - 2.5rem);height:100dvh;max-height:100dvh;transition:transform .25s;position:fixed;top:0;bottom:0;left:0;transform:translate(-100%);box-shadow:4px 0 32px #0f172a29}.app-frame-sidebar.is-open{transform:translate(0)}.app-frame-sidebar-head{padding:max(.65rem, env(safe-area-inset-top,0)) .65rem .65rem .75rem;flex-shrink:0;align-items:center;gap:.5rem;min-height:56px}.app-frame-brand--sidebar{flex:1;min-width:0;min-height:0;padding:0}.app-frame-sidebar .app-frame-brand-tagline{display:none}.app-frame-sidebar .app-frame-brand-title{white-space:nowrap;text-overflow:ellipsis;font-size:.875rem;overflow:hidden}.app-frame-sidebar .cofactor-logo-frame--md{--logo-size:32px}.app-sidebar-close{box-shadow:none;flex-shrink:0;margin:0}.app-frame-sidebar-body{flex:1;min-height:0;overflow:hidden}.app-frame-sidebar-footer{padding:.65rem .75rem max(.75rem, env(safe-area-inset-bottom,0));flex-shrink:0}.chat-sidebar{height:100%}.chat-sidebar-section{flex:1;min-height:0}.chat-sidebar-section-head{padding:.6rem .75rem .45rem}.chat-history-list>li{margin-bottom:.35rem}.chat-history-menu{min-width:140px;right:.25rem}.app-frame-main{width:100%;min-width:0;height:100%;min-height:0;max-height:100dvh;overflow:hidden}.app-shell-chat{height:100svh;max-height:100svh;overflow:hidden}.app-frame-content>.chat-share-notice{flex-shrink:0}.chat-history-list{max-height:none;padding:0 .5rem .5rem}.chat-history-options-btn{opacity:1;width:40px;height:40px}.chat-history-btn,.chat-new-btn{min-height:44px}.chat-view{flex:1;min-height:0}.chat-messages{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y;gap:.65rem;padding:.65rem .65rem .75rem;scroll-padding-bottom:.75rem}.chat-bubble{border-radius:14px;max-width:100%;padding:.75rem .85rem;font-size:.9375rem;line-height:1.5}.chat-bubble.user{align-self:flex-end;max-width:90%;padding:.65rem .85rem}.chat-bubble.assistant{width:100%;max-width:100%;box-shadow:none;background:#f8fafc;border:1px solid #e8eef4;border-radius:14px;align-self:stretch}.chat-bubble.assistant .markdown-body{overflow-wrap:anywhere;word-break:break-word;font-size:.9375rem;line-height:1.55}.chat-bubble.assistant .markdown-body h1,.chat-bubble.assistant .markdown-body h2,.chat-bubble.assistant .markdown-body h3{margin-top:.85rem;margin-bottom:.35rem;font-size:.95rem}.chat-bubble.assistant .markdown-body h1:first-child,.chat-bubble.assistant .markdown-body h2:first-child,.chat-bubble.assistant .markdown-body h3:first-child{margin-top:0}.chat-bubble.assistant .markdown-body p{margin:.4rem 0}.chat-bubble.assistant .markdown-body ul,.chat-bubble.assistant .markdown-body ol{margin:.4rem 0;padding-left:1.1rem}.chat-bubble.assistant .markdown-body a{overflow-wrap:anywhere;word-break:break-word}.chat-bubble.assistant .markdown-body table{-webkit-overflow-scrolling:touch;max-width:100%;display:block;overflow-x:auto}.msg-source{margin-bottom:.35rem;font-size:.625rem}.app-frame-footer .chat-composer{padding:.45rem .65rem .5rem}.app-frame-footer .chat-composer-bar{border-radius:12px;min-height:44px;max-height:44px;padding:0 .25rem 0 .35rem}.chat-composer{padding:.5rem .65rem}.chat-composer-input{height:40px;min-height:40px;font-size:16px}.chat-composer-icon{width:36px;min-width:36px;height:36px;min-height:36px}.chat-composer-send{border-radius:10px;min-width:auto;height:36px;min-height:36px;padding:0 .85rem;font-size:.8125rem}.chat-welcome{padding:1.25rem 1rem}.profile-page{padding:.75rem;padding-bottom:max(.75rem, env(safe-area-inset-bottom,0))}.profile-card{border-radius:14px;padding:1.15rem}.profile-card-head{flex-direction:column;align-items:stretch}.profile-card-head .btn{width:100%;min-height:44px}.profile-form-actions{flex-direction:column-reverse}.profile-form-actions .btn{width:100%;min-height:44px}.profile-info-grid,.profile-form-grid{grid-template-columns:1fr}.profile-form .field-full{grid-column:span 1}.auth-form-grid{grid-template-columns:1fr}.span-2{grid-column:span 1}.mode-switch{order:3;width:100%;padding-top:.35rem}}@media (width<=480px){.chat-composer-send{padding:0 .75rem;font-size:.8125rem}.auth-panel{padding-left:max(.75rem, env(safe-area-inset-left,0));padding-right:max(.75rem, env(safe-area-inset-right,0));padding-bottom:max(.75rem, env(safe-area-inset-bottom,0))}.auth-card,.auth-card-wide{border-radius:16px;padding:1.2rem 1.1rem 1rem}.auth-card-header h1{font-size:1.375rem}.auth-card-logo .cofactor-logo-frame--auth{--logo-size:80px;border-radius:18px}.auth-card,.auth-card-wide{padding:1.5rem 1.15rem 1.25rem}}[data-theme=dark] .auth-panel{--auth-surface:#000;--auth-card:#0a0a0a;--auth-text:#f5f5f5;--auth-muted:#a3a3a3;--auth-border:#1f1f1f;--auth-input-bg:#000;--auth-focus:#7dd3fc33}[data-theme=dark] html.auth-route,[data-theme=dark] body.auth-route{background:#000}[data-theme=dark] .auth-card{box-shadow:0 12px 40px #000000a6}[data-theme=dark] .auth-card .field label{color:#d4d4d4}[data-theme=dark] .auth-card .btn-ghost{color:#d4d4d4;background:#000;border-color:#2a2a2a}[data-theme=dark] .auth-dev-hint{color:#a3a3a3;background:#0a0a0a;border-color:#1f1f1f}[data-theme=dark] .auth-dev-hint code{color:#e5e5e5;background:#1a1a1a}[data-theme=dark] .auth-signup-submit{background:linear-gradient(#0000 0%,#0a0a0a 28%)}[data-theme=dark] .auth-card-logo .cofactor-logo-frame--auth{border-color:#2a2a2a;box-shadow:0 4px 24px #0009}[data-theme=dark] .app-shell-chat,[data-theme=dark] .app-frame,[data-theme=dark] .app-frame-main,[data-theme=dark] .app-frame-sidebar,[data-theme=dark] .app-frame-sidebar-head,[data-theme=dark] .app-frame-sidebar-body,[data-theme=dark] .app-frame-sidebar-footer,[data-theme=dark] .app-frame-content,[data-theme=dark] .app-frame-footer,[data-theme=dark] .chat-mobile-header,[data-theme=dark] .chat-toolbar,[data-theme=dark] .app-shell-header-spacer,[data-theme=dark] .chat-messages,[data-theme=dark] .chat-composer{color:#f5f5f5;background:#000}[data-theme=dark] .app-frame--integrated-mobile-header .app-frame-footer{box-shadow:0 -4px 24px #00000073}[data-theme=dark] .app-frame{--shell-border:#1f1f1f}[data-theme=dark] .app-frame-sidebar,[data-theme=dark] .app-frame-sidebar-head,[data-theme=dark] .app-frame-sidebar-footer,[data-theme=dark] .chat-toolbar,[data-theme=dark] .chat-mobile-header,[data-theme=dark] .chat-composer,[data-theme=dark] .chat-sidebar-actions{border-color:#1f1f1f}[data-theme=dark] .app-frame-brand,[data-theme=dark] .app-frame-brand:hover,[data-theme=dark] .chat-toolbar-brand-name,[data-theme=dark] .app-frame-brand-title,[data-theme=dark] .app-topbar-title h1{color:#f5f5f5}[data-theme=dark] .app-frame-brand-tagline,[data-theme=dark] .app-frame-brand-sub,[data-theme=dark] .app-topbar-title p,[data-theme=dark] .app-topbar-subtitle{color:#a3a3a3}[data-theme=dark] .chat-sidebar-actions,[data-theme=dark] .chat-new-btn,[data-theme=dark] .chat-toolbar-menu-btn,[data-theme=dark] .chat-share-btn,[data-theme=dark] .app-menu-btn--floating,[data-theme=dark] .app-sidebar-close,[data-theme=dark] .user-menu-trigger,[data-theme=dark] .user-menu-dropdown--sidebar .user-menu-trigger{color:#f5f5f5;background:#0a0a0a;border-color:#2a2a2a;box-shadow:0 2px 10px #0006}[data-theme=dark] .chat-new-btn:hover,[data-theme=dark] .chat-share-btn:hover:not(:disabled),[data-theme=dark] .chat-toolbar-menu-btn:active,[data-theme=dark] .user-menu-trigger:hover,[data-theme=dark] .user-menu-trigger.open{background:#141414;border-color:#3a3a3a}[data-theme=dark] .chat-history-list>li:hover{background:#0a0a0a}[data-theme=dark] .chat-history-list>li.active{background:#111;border-color:#2a2a2a;box-shadow:0 1px 6px #00000073}[data-theme=dark] .chat-history-title{color:#f5f5f5}[data-theme=dark] .chat-history-preview,[data-theme=dark] .chat-history-status,[data-theme=dark] .chat-history-empty-text,[data-theme=dark] .chat-sidebar-section-head h2,[data-theme=dark] .chat-history-count,[data-theme=dark] .chat-welcome p,[data-theme=dark] .evidence-toggle{color:#a3a3a3}[data-theme=dark] .chat-history-count{color:#d4d4d4;background:#1a1a1a}[data-theme=dark] .chat-history-list::-webkit-scrollbar-thumb{background:#333}[data-theme=dark] .chat-history-options-btn:hover,[data-theme=dark] .chat-history-options-btn.open{color:#f5f5f5;background:#1a1a1a}[data-theme=dark] .chat-history-menu,[data-theme=dark] .user-menu-panel{background:#0a0a0a;border-color:#2a2a2a;box-shadow:0 12px 36px #000000a6}[data-theme=dark] .chat-history-menu-item,[data-theme=dark] .user-menu-item,[data-theme=dark] .user-menu-panel-name{color:#e5e5e5}[data-theme=dark] .chat-history-menu-item:hover:not(:disabled),[data-theme=dark] .user-menu-item:hover{background:#141414}[data-theme=dark] .user-menu-name,[data-theme=dark] .user-menu-panel-email{color:#a3a3a3}[data-theme=dark] .user-menu-panel-divider{background:#1f1f1f}[data-theme=dark] .chat-composer-bar{background:#0a0a0a;border-color:#2a2a2a}[data-theme=dark] .chat-composer-bar:focus-within{border-color:var(--primary);background:#111;box-shadow:0 0 0 3px #87ceeb26}[data-theme=dark] .chat-composer-input{color:#f5f5f5}[data-theme=dark] .chat-composer-input::placeholder{color:#737373}[data-theme=dark] .chat-composer-icon:hover:not(:disabled){color:#f5f5f5;background:#1a1a1a}[data-theme=dark] .chat-composer-error,[data-theme=dark] .chat-composer .chat-composer-error{color:#f87171}@media (width>=769px){[data-theme=dark] .chat-composer-error{background:#0a0a0a;border-color:#3f1f1f}}[data-theme=dark] .chat-bubble.assistant{color:#f5f5f5;background:#0a0a0a;border-color:#1f1f1f}@media (width<=768px){[data-theme=dark] .chat-bubble.assistant{background:#0a0a0a;border-color:#222}}[data-theme=dark] .chat-empty{color:#a3a3a3}[data-theme=dark] .mode-pill{color:#a3a3a3;background:#0a0a0a;border-color:#2a2a2a}[data-theme=dark] .mode-pill:hover{color:#f5f5f5;border-color:#3a3a3a}[data-theme=dark] .profile-page,[data-theme=dark] .profile-card,[data-theme=dark] .profile-nav-link{color:#f5f5f5;background:#000;border-color:#1f1f1f}[data-theme=dark] .profile-nav-link:hover{background:#0a0a0a}[data-theme=dark] .profile-nav-link.active{background:#111;border-color:#2a2a2a}[data-theme=dark] .profile-card-head h2,[data-theme=dark] .profile-info-value,[data-theme=dark] .profile-form .field input,[data-theme=dark] .profile-form .field select{color:#f5f5f5;background:#0a0a0a;border-color:#2a2a2a}[data-theme=dark] .profile-card-head p,[data-theme=dark] .profile-muted,[data-theme=dark] .profile-info-label{color:#a3a3a3}[data-theme=dark] .profile-form-actions{border-top-color:#1f1f1f}[data-theme=dark] .app-shell-chat .viva-question-card,[data-theme=dark] .app-shell-chat .viva-answer-form textarea{color:#f5f5f5;background:#0a0a0a;border-color:#2a2a2a}[data-theme=dark] .app-shell-chat .viva-question-card h2,[data-theme=dark] .app-shell-chat .viva-answer-form label{color:#e5e5e5}[data-theme=dark] .confirm-overlay{background:#000000bf}[data-theme=dark] .confirm-dialog{background:#0a0a0a;border-color:#2a2a2a}[data-theme=dark] .app-frame.sidebar-open .app-sidebar-backdrop{background:#000000b8}[data-theme=dark] .app-frame-sidebar.is-open{box-shadow:4px 0 40px #000c}[data-theme=dark] .user-avatar{color:#f5f5f5;background:linear-gradient(145deg,#1a1a1a,#0a0a0a);border-color:#2a2a2a}[data-theme=dark] .chat-bubble.loading{color:#a3a3a3;background:#111;border-color:#2a2a2a}[data-theme=dark] .markdown-body,[data-theme=dark] .markdown-body p,[data-theme=dark] .markdown-body li{color:#f5f5f5}[data-theme=dark] .markdown-body code,[data-theme=dark] .markdown-body pre{color:#e5e5e5;background:#1a1a1a;border-color:#2a2a2a}[data-theme=dark] .btn-ghost{color:#f5f5f5;background:#0a0a0a;border-color:#2a2a2a}[data-theme=dark] .btn-ghost:hover:not(:disabled){background:#141414}.confirm-overlay{z-index:100;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#0f172a73;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.confirm-dialog{background:var(--bg-card);border:1px solid var(--border);width:min(100%,400px);box-shadow:var(--shadow-lg);border-radius:16px;padding:1.35rem 1.35rem 1.15rem}.confirm-dialog-title{color:var(--text);letter-spacing:-.02em;margin:0 0 .5rem;font-size:1.15rem;font-weight:700}.confirm-dialog-message{color:var(--text-muted);margin:0 0 1.25rem;font-size:.9rem;line-height:1.5}.confirm-dialog-error{color:#fca5a5;background:#f871711f;border:1px solid #f8717159;border-radius:8px;margin:-.5rem 0 1rem;padding:.5rem .65rem;font-size:.8125rem;line-height:1.4}.confirm-dialog-actions{justify-content:flex-end;gap:.5rem;display:flex}.confirm-dialog-actions .btn{min-width:5.5rem}@media (width<=480px){.confirm-dialog-actions{flex-direction:column-reverse}.confirm-dialog-actions .btn{width:100%;min-height:44px}}
