:root{--bg:#fff;--panel:#f7f7f8;--line:#e7e7ea;--text:#171719;--muted:#73737a;--accent:#111827;--soft:#f1f1f3;--free:#2563eb;--instant:#7c3aed;--pro:#16a34a;--best:#ca8a04}
*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--text);background:var(--bg)}
a{color:inherit;text-decoration:none}button,select,input,textarea{font:inherit}
.brand{font-weight:800;font-size:20px;letter-spacing:0}.brand span{color:#6b7280}
.topbar{height:64px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.topbar nav{display:flex;gap:18px;align-items:center}.pill,.primary{background:var(--accent);color:white;border-radius:10px;padding:10px 17px;border:0;font-weight:700}
.guest-shell,.app-shell{height:100vh}.chat-main{height:100%;display:flex;flex-direction:column;position:relative;overflow:hidden}.guest-shell .chat-main{height:calc(100vh - 64px)}
.welcome{margin:auto;text-align:center;padding:30px}.welcome h1{font-size:32px;letter-spacing:0;margin:18px 0 8px}.welcome p{color:var(--muted);margin:0}
.logo-orb{width:54px;height:54px;border-radius:16px;background:#111827;color:#fff;display:grid;place-items:center;font-size:25px;font-weight:800;margin:auto}
.messages{width:min(860px,100%);margin:0 auto;padding:28px 20px 190px;overflow-y:auto;display:flex;flex-direction:column;gap:24px}
.message{display:flex;gap:12px;line-height:1.7}.message.user{justify-content:flex-end}.bubble{max-width:82%;white-space:pre-wrap;overflow-wrap:anywhere}.user .bubble{background:var(--soft);padding:11px 15px;border-radius:16px}.assistant .bubble{max-width:100%}
.composer-wrap{position:absolute;bottom:0;left:0;right:0;padding:16px 20px 14px;background:linear-gradient(transparent,#fff 25%);text-align:center}
.attachment-strip{width:min(860px,100%);margin:0 auto 8px;display:flex;gap:8px;flex-wrap:wrap}.attachment-chip{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 10px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.composer{width:min(860px,100%);margin:auto;border:1px solid var(--line);border-radius:18px;display:flex;align-items:flex-end;gap:8px;padding:9px;background:white;box-shadow:0 8px 30px rgba(0,0,0,.06)}
.composer textarea{flex:1;border:0;outline:0;resize:none;max-height:180px;min-height:38px;padding:8px 0}
.composer button[type=submit]{width:38px;height:38px;border:0;border-radius:10px;background:#111827;color:#fff;font-size:22px;flex:0 0 auto}.composer button:disabled{opacity:.4}
.attach-btn{width:38px;height:38px;border:1px solid var(--line);border-radius:10px;display:grid;place-items:center;background:#fff;cursor:pointer;font-size:22px;line-height:1;flex:0 0 auto}.attach-btn input{display:none}
.composer-wrap small{display:flex;gap:6px;align-items:center;justify-content:center;color:var(--muted);margin-top:8px}
.model-pill{display:inline-flex;align-items:center;border-radius:8px;padding:3px 8px;color:#fff;font-size:11px;font-weight:800;line-height:1.4}.model-free{background:var(--free)}.model-instant{background:var(--instant)}.model-pro{background:var(--pro)}.model-best{background:var(--best);color:#111}
.app-shell{display:grid;grid-template-columns:300px 1fr;position:relative}.app-shell.sidebar-collapsed{grid-template-columns:0 1fr}
.sidebar{background:var(--panel);border-right:1px solid var(--line);padding:14px;display:flex;flex-direction:column;min-width:0;overflow:hidden;transition:.18s}
.sidebar-collapsed .sidebar{padding:0;border-right:0}.side-head{height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px}.brand-row{display:flex;align-items:center;gap:8px;min-width:0}
.icon-btn{border:0;background:transparent;font-size:20px;cursor:pointer}
.reopen-sidebar{display:none;position:absolute;top:14px;left:14px;z-index:8;width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 8px 30px rgba(0,0,0,.08);cursor:pointer}.sidebar-collapsed .reopen-sidebar{display:block}
.new-chat{margin:10px 0;border:1px solid var(--line);background:white;border-radius:10px;padding:11px;text-align:left;font-weight:700;cursor:pointer}.history-title{font-size:12px;color:var(--muted);padding:12px 8px 7px}
.conversation-list,.project-list{overflow-y:auto;display:flex;flex-direction:column;gap:3px}.project-list{max-height:190px}
.conversation-item,.project-item{padding:10px;border-radius:8px;cursor:pointer;font-size:14px;text-align:left}.conversation-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-item strong,.project-item small{display:block;overflow:hidden;text-overflow:ellipsis}.project-item small{color:var(--muted);font-size:12px;margin-top:3px;white-space:nowrap}.conversation-item:hover,.conversation-item.active,.project-item:hover,.project-item.active{background:#eaeaed}
.profile{margin-top:auto;border-top:1px solid var(--line);padding:13px 4px 2px;display:grid;grid-template-columns:36px 1fr auto;gap:9px;align-items:center}.avatar{width:36px;height:36px;border-radius:10px;background:#111827;color:white;display:grid;place-items:center;font-weight:800}.profile strong,.profile small{display:block}.profile small{color:var(--muted);font-size:11px}
.logout-btn{width:34px;height:34px;border:0;border-radius:9px;background:#fff;color:#111827;display:grid;place-items:center;cursor:pointer}.logout-btn:hover{background:#fee2e2;color:#991b1b}.logout-btn svg{width:20px;height:20px}
.mobile-head{display:none}.plan-badge{font-size:11px;background:var(--soft);padding:5px 8px;border-radius:8px}
.project-dialog{border:1px solid var(--line);border-radius:10px;padding:0;width:min(440px,calc(100vw - 32px));box-shadow:0 24px 80px rgba(0,0,0,.18)}.project-dialog::backdrop{background:rgba(0,0,0,.28)}.project-dialog form{padding:22px;display:flex;flex-direction:column;gap:14px}.project-dialog h2{margin:0 0 4px;font-size:22px}.project-dialog label{font-size:14px;font-weight:700}.project-dialog input,.project-dialog textarea{display:block;width:100%;margin-top:7px;border:1px solid var(--line);border-radius:8px;padding:11px;resize:vertical}.dialog-actions{display:flex;justify-content:flex-end;gap:10px}.dialog-actions button{border:1px solid var(--line);border-radius:8px;padding:9px 13px;background:#fff}.dialog-actions .primary{background:var(--accent);color:#fff}
.auth-page{min-height:100%;background:linear-gradient(180deg,#f8f8fa 0%,#fff 100%);display:flex;flex-direction:column;align-items:center;padding:48px 20px 32px}
.auth-brand{margin-bottom:28px}
.auth-card{width:min(440px,100%);background:white;border:1px solid var(--line);border-radius:16px;padding:28px;box-shadow:0 18px 50px rgba(0,0,0,.06)}
.auth-card-wide{width:min(520px,100%)}
.auth-head h1{margin:0 0 8px;font-size:28px;line-height:1.15}
.auth-head p{color:var(--muted);margin:0;line-height:1.5}
.auth-form{display:flex;flex-direction:column;gap:15px;margin-top:24px}
.auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.auth-card label{font-size:14px;font-weight:700;color:#27272a}
.auth-card input{display:block;width:100%;margin-top:7px;padding:12px 13px;border:1px solid var(--line);border-radius:10px;background:#fff;outline:0;transition:border-color .15s,box-shadow .15s}
.auth-card input:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}
.auth-submit{width:100%;margin-top:4px;cursor:pointer}
.auth-foot{text-align:center;margin-top:20px;color:var(--muted)}
.auth-foot a{font-weight:700;color:var(--text)}
.alert{display:flex;flex-direction:column;gap:4px;margin-top:18px;padding:11px 12px;background:#fff1f1;border:1px solid #ffd5d5;border-radius:10px;color:#9b1c1c;font-size:14px;line-height:1.45}
.assistant .bubble{font-size:15.5px;color:#202123}.assistant .bubble p{margin:0 0 14px}.assistant .bubble p:last-child{margin-bottom:0}.assistant .bubble h1,.assistant .bubble h2,.assistant .bubble h3{margin:18px 0 9px;line-height:1.25;letter-spacing:0}.assistant .bubble h1{font-size:25px}.assistant .bubble h2{font-size:21px}.assistant .bubble h3{font-size:18px}.assistant .bubble ul,.assistant .bubble ol{margin:0 0 14px;padding-left:24px}.assistant .bubble li{margin:4px 0}.assistant .bubble code{background:#f1f1f3;border:1px solid #e6e6e8;border-radius:5px;padding:1px 5px;font-family:Consolas,Menlo,monospace;font-size:.92em}.md-table-wrap{overflow-x:auto;margin:14px 0;border:1px solid var(--line);border-radius:8px}.md-table-wrap table{width:100%;border-collapse:collapse;background:#fff}.md-table-wrap th,.md-table-wrap td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.md-table-wrap th{background:#f8f8fa;font-weight:800}.md-table-wrap tr:last-child td{border-bottom:0}.code-card{margin:14px 0;border:1px solid #27272a;border-radius:8px;background:#0f1117;color:#f8fafc;overflow:hidden;white-space:normal}.code-head{height:42px;padding:0 10px 0 14px;background:#1f232b;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#d4d4d8;font-size:12px}.code-head div{display:flex;gap:7px}.copy-code,.open-canvas{border:1px solid rgba(255,255,255,.16);background:#2b303b;color:#fff;border-radius:7px;padding:5px 9px;cursor:pointer;font-size:12px}.copy-code:hover,.open-canvas:hover{background:#374151}.code-card pre{margin:0;padding:16px;overflow:auto;white-space:pre}.code-card code{background:transparent!important;border:0!important;color:inherit;padding:0!important;font-family:Consolas,Menlo,monospace;font-size:13.5px;line-height:1.6}.code-canvas{width:min(1080px,calc(100vw - 28px));height:min(760px,calc(100vh - 28px));padding:0;border:1px solid var(--line);border-radius:12px;box-shadow:0 28px 90px rgba(0,0,0,.24);background:#0f1117;color:#f8fafc}.code-canvas::backdrop{background:rgba(17,24,39,.45)}.canvas-head{height:58px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;background:#fff;color:#111827;border-bottom:1px solid var(--line)}.canvas-head div{display:flex;flex-direction:column;gap:2px;min-width:0}.canvas-head small{color:var(--muted)}.canvas-head button{border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px 12px;cursor:pointer}.code-canvas pre{height:calc(100% - 58px);margin:0;padding:20px;overflow:auto}.code-canvas code{font-family:Consolas,Menlo,monospace;font-size:14px;line-height:1.65;white-space:pre}.toast-root{position:fixed;right:18px;bottom:18px;z-index:80;display:flex;flex-direction:column;gap:10px;align-items:flex-end;pointer-events:none}.toast{width:min(360px,calc(100vw - 28px));background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px 14px;box-shadow:0 18px 50px rgba(0,0,0,.16);line-height:1.45;pointer-events:auto}.toast.success{border-color:#bbf7d0;background:#f0fdf4;color:#14532d}.toast.danger{border-color:#fecaca;background:#fff1f2;color:#991b1b}.toast.confirm{border-color:#dbe3ef;background:#fff}.toast-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.toast-actions button{border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px 12px;cursor:pointer}.toast-actions button[data-ok]{background:#111827;color:#fff;border-color:#111827}.countdown{display:block;margin-top:5px;color:#dc2626;font-weight:900}
.typing::after{content:'|';animation:blink 1s infinite}@keyframes blink{50%{opacity:0}}
@media(max-width:760px){.app-shell{display:block}.app-shell.sidebar-collapsed{display:block}.sidebar{position:fixed;z-index:10;left:-310px;top:0;bottom:0;width:300px;transition:.2s}.sidebar.open{left:0;box-shadow:20px 0 60px rgba(0,0,0,.16)}.sidebar-collapsed .sidebar{padding:14px;border-right:1px solid var(--line)}.reopen-sidebar{display:none!important}.mobile-head{display:flex;height:56px;border-bottom:1px solid var(--line);align-items:center;justify-content:space-between;padding:0 14px}.app-shell .chat-main{height:100vh}.welcome h1{font-size:26px}.messages{padding-top:20px}.topbar{padding:0 16px}.topbar nav{gap:12px}.topbar nav a:first-child{display:none}.composer{gap:6px}.composer-wrap{padding-left:12px;padding-right:12px}.bubble{max-width:92%}.code-canvas{width:100vw;height:100vh;border-radius:0}.toast-root{left:14px;right:14px;bottom:14px;align-items:stretch}.toast{width:100%}.auth-page{padding:34px 14px 24px}.auth-card{padding:22px;border-radius:14px}.auth-head h1{font-size:25px}.auth-grid{grid-template-columns:1fr}}
:root{--bg:#fdfdfc;--panel:#f7f7f6;--line:#ececf0;--line-soft:#f3f3f5;--text:#1f1f22;--muted:#77777f;--accent:#202124;--soft:#f5f5f6;--shadow:0 12px 34px rgba(15,23,42,.055);--shadow-strong:0 24px 70px rgba(15,23,42,.13)}
html,body{background:var(--bg);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,textarea,select{transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease,color .18s ease,transform .18s ease}
.topbar,.mobile-head{background:rgba(253,253,252,.9);border-bottom-color:var(--line-soft);backdrop-filter:blur(12px)}
.brand{font-weight:780;color:#232326}.pill,.primary{background:var(--accent);border-radius:12px;box-shadow:0 8px 20px rgba(32,33,36,.09)}.pill:hover,.primary:hover,.composer button[type=submit]:hover{background:#2f3137}
.logo-orb,.avatar{background:#202124;border-radius:18px;box-shadow:0 12px 28px rgba(32,33,36,.12)}.welcome h1{font-weight:740;color:#242428}.welcome p{color:#818189}
.messages{gap:22px}.message{line-height:1.68}.user .bubble{background:#f5f5f6;border:1px solid #f0f0f2;border-radius:18px;color:#252529}
.assistant .bubble{color:#2a2b2f}.assistant .bubble code{background:#f6f6f7;border-color:#eeeeef}
.composer-wrap{background:linear-gradient(180deg,rgba(253,253,252,0),rgba(253,253,252,.96) 32%,var(--bg) 100%)}
.composer{border-color:#e9e9ed;border-radius:22px;background:rgba(255,255,255,.94);box-shadow:var(--shadow);backdrop-filter:blur(10px)}.composer:focus-within{border-color:#dedee4;box-shadow:0 14px 38px rgba(15,23,42,.085)}
.composer button[type=submit]{background:var(--accent);border-radius:13px}.attach-btn,.attachment-chip{border-color:#ededf0;background:#fff;border-radius:12px}.attach-btn:hover,.attachment-chip:hover{background:#f8f8f9;border-color:#e3e3e8}
.model-pill{border-radius:999px;font-weight:760}
.sidebar{background:rgba(247,247,246,.94);border-right-color:var(--line-soft);box-shadow:inset -1px 0 0 rgba(255,255,255,.7);backdrop-filter:blur(12px);transition:padding .22s ease,border-color .22s ease,box-shadow .22s ease}
.reopen-sidebar,.new-chat,.logout-btn{border-color:#eeeeef;background:rgba(255,255,255,.88);box-shadow:0 8px 24px rgba(15,23,42,.045);border-radius:13px}.new-chat:hover,.logout-btn:hover,.icon-btn:hover{background:#f1f1f3}
.conversation-item,.project-item{border-radius:12px;color:#323238}.conversation-item:hover,.conversation-item.active,.project-item:hover,.project-item.active{background:#eeeeef}.history-title{color:#85858d}
.profile{border-top-color:var(--line-soft)}.logout-btn:hover{background:#fff2f2;color:#a33a3a}
.project-dialog,.auth-card,.code-canvas,.toast{border-color:#ececf0;border-radius:18px;box-shadow:var(--shadow-strong)}.project-dialog::backdrop,.code-canvas::backdrop{background:rgba(31,31,36,.32);backdrop-filter:blur(2px)}
.project-dialog input,.project-dialog textarea,.auth-card input{border-color:#e9e9ed;border-radius:12px;background:#fff}.project-dialog input:focus,.project-dialog textarea:focus,.auth-card input:focus{border-color:#d8d8df;box-shadow:0 0 0 4px rgba(32,33,36,.055);outline:0}
.dialog-actions button,.canvas-head button,.toast-actions button{border-color:#e9e9ed;border-radius:11px}.auth-page{background:linear-gradient(180deg,#fbfbfb 0%,#fdfdfc 52%,#fff 100%)}.auth-card{background:rgba(255,255,255,.94)}
.md-table-wrap{border-color:#eeeeef;border-radius:12px}.md-table-wrap th{background:#f7f7f8}.md-table-wrap th,.md-table-wrap td{border-bottom-color:#eeeeef}.code-card{border-color:#252833;border-radius:12px;box-shadow:0 14px 38px rgba(15,23,42,.11)}.code-head{background:#20242d}.copy-code,.open-canvas{border-color:rgba(255,255,255,.14);border-radius:9px}
.toast{background:rgba(255,255,255,.96);backdrop-filter:blur(12px)}.toast.confirm{border-color:#e7eaf0}.toast.danger{border-color:#ffd7d7;background:#fff6f6}.toast.success{border-color:#c9f3d7;background:#f6fff8}
.usage-limit-toast{border-color:#fecaca;background:#fff7f7;color:#991b1b}.usage-limit-toast>div{display:grid;gap:3px}.usage-limit-toast span{color:#b45353;font-size:12px}.usage-limit-toast .countdown{margin-top:3px;font-variant-numeric:tabular-nums}
@media(max-width:760px){.sidebar.open{box-shadow:18px 0 52px rgba(15,23,42,.13)}.auth-card{border-radius:18px}.code-canvas{border-radius:0}}

.auth-divider{display:flex;align-items:center;gap:12px;margin:20px 0;color:var(--muted);font-size:13px}.auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:var(--line)}
.auth-email-button{width:100%;min-height:46px;border:1px solid #e5e5e9;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:700;box-shadow:0 7px 18px rgba(15,23,42,.035)}.auth-email-button:hover{background:#f8f8f9;border-color:#dcdce2}
.auth-mail-icon{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#f1f4ff;color:#2563eb;font-size:14px;font-weight:800}
.alert-success{background:#f4fdf7;border-color:#c9f0d5;color:#166534}
.auth-foot-compact{margin-top:10px}.auth-hint{color:var(--muted);margin-top:-9px;line-height:1.5}
.auth-card .otp-input{text-align:center;font-size:28px;font-weight:750;letter-spacing:8px;padding-left:21px;font-variant-numeric:tabular-nums}
.resend-form{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;margin-top:20px;color:var(--muted);font-size:14px}.resend-form button{border:0;background:transparent;color:var(--text);font-weight:750;padding:3px;cursor:pointer}.resend-form button:hover{text-decoration:underline}

/* Lightweight authenticated workspace */
.app-shell{grid-template-columns:280px minmax(0,1fr);background:#fff}.app-shell.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
.app-shell .sidebar{padding:12px;background:#f8f8f7;border-right-color:#f0f0f1;box-shadow:none;backdrop-filter:none}.app-shell.sidebar-collapsed .sidebar{padding:0}
.app-shell .side-head{height:42px;padding:0 4px}.sidebar-toggle{width:34px;height:34px;border-radius:9px;color:#6f7077}.sidebar-toggle:hover{background:#efeff0}
.app-shell .new-chat{min-height:40px;margin:8px 0 2px;padding:9px 10px;border-color:#ededee;border-radius:10px;display:flex;align-items:center;gap:8px;box-shadow:none;color:#303035}.app-shell .new-chat span{font-size:18px;line-height:1}.app-shell .primary-action{background:#242529;color:#fff;border-color:#242529}.app-shell .primary-action:hover{background:#34353a;color:#fff}
.app-shell .history-title{padding:14px 8px 6px;font-size:11px;text-transform:uppercase;color:#929299}.app-shell .project-list{max-height:204px;flex:0 0 auto}.app-shell .project-item,.app-shell .conversation-item{min-height:37px;padding:8px 9px;border-radius:9px}.app-shell .project-item{display:block}.app-shell .project-item strong{font-size:13.5px;font-weight:680}.app-shell .project-item small{font-size:11.5px;color:#898990}.app-shell .conversation-item{font-size:13.5px}.app-shell .conversation-list{min-height:0;flex:1}.app-shell .conversation-item:hover,.app-shell .conversation-item.active,.app-shell .project-item:hover,.app-shell .project-item.active{background:#ececed}
.sidebar-empty{padding:8px 9px;color:#9999a0;font-size:12px}.all-projects-link{display:flex;align-items:center;justify-content:space-between;padding:7px 9px;color:#66666d;font-size:12px}.all-projects-link:hover{color:#202124}.all-projects-link span{min-width:22px;padding:2px 6px;border-radius:999px;background:#ececed;text-align:center;font-size:10px}
.app-shell .profile{padding:11px 4px 1px;border-top-color:#eeeeef;grid-template-columns:34px minmax(0,1fr) 34px}.app-shell .avatar{width:34px;height:34px;border-radius:10px;box-shadow:none;font-size:13px}.profile-copy{min-width:0}.profile-copy strong,.profile-copy small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-shell .profile-copy strong{font-size:13px}.app-shell .profile-copy small{font-size:10.5px}.app-shell .logout-btn{box-shadow:none;background:transparent}.app-shell .logout-btn:disabled{opacity:.45;cursor:wait}
.app-shell .chat-main{background:#fff}.app-shell .composer{border-color:#e8e8eb;border-radius:18px;box-shadow:0 7px 24px rgba(15,23,42,.055);backdrop-filter:none}.app-shell .composer-wrap{padding-bottom:10px}.app-shell .composer-wrap small{font-size:10.5px}.app-shell .messages{width:min(820px,100%);gap:20px}.app-shell .message{line-height:1.62}.app-shell .assistant .bubble{font-size:15px}.app-shell .user .bubble{border:0;background:#f3f3f4;border-radius:16px}
.mobile-project-link{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#f1f1f2;font-size:19px}.app-shell .reopen-sidebar{box-shadow:0 5px 18px rgba(15,23,42,.06)}

/* Project pages */
.project-page{min-height:100%;background:#fdfdfc;padding:0 24px 56px}.project-page-head{height:72px;max-width:1040px;margin:auto;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f0f1}.quiet-link{font-size:13px;color:#6d6d74}.quiet-link:hover{color:#202124}.compact-primary{padding:9px 13px;font-size:13px;border-radius:10px;box-shadow:none}
.project-form-shell{width:min(680px,100%);margin:64px auto 0}.project-form-intro>span,.project-index-head>span{font-size:11px;text-transform:uppercase;color:#8d8d94}.project-form-intro h1,.project-index-head h1{margin:9px 0 10px;font-size:31px;line-height:1.2}.project-form-intro p,.project-index-head p{margin:0;color:#74747b;line-height:1.6}.project-create-form{margin-top:30px;padding:24px;border:1px solid #ececef;border-radius:14px;background:#fff;display:flex;flex-direction:column;gap:18px;box-shadow:0 12px 34px rgba(15,23,42,.045)}.project-create-form label{font-size:13px;font-weight:700;color:#333338}.project-create-form input,.project-create-form textarea{display:block;width:100%;margin-top:8px;padding:12px 13px;border:1px solid #e6e6ea;border-radius:10px;outline:0;resize:vertical}.project-create-form input:focus,.project-create-form textarea:focus{border-color:#ceced4;box-shadow:0 0 0 3px rgba(32,33,36,.05)}.project-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.project-form-actions>a{padding:9px 12px;color:#707077;font-size:13px}.project-form-actions .primary{box-shadow:none;cursor:pointer}
.project-index-page{padding-bottom:72px}.project-index-head{max-width:880px;margin:54px auto 28px}.project-alert{max-width:880px;margin:0 auto 18px}.project-grid{max-width:880px;margin:auto;display:grid;gap:8px}.project-card{display:grid;grid-template-columns:40px minmax(0,1fr) 24px;align-items:center;gap:14px;padding:15px 16px;border:1px solid #eeeeef;border-radius:12px;background:#fff}.project-card:hover{border-color:#dddddf;background:#fdfdfd}.project-card-icon{width:40px;height:40px;border-radius:10px;background:#f0f0f1;display:grid;place-items:center;font-size:13px;font-weight:800}.project-card strong{display:block;font-size:14px}.project-card p{margin:4px 0;color:#74747b;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.project-card small{color:#9a9aa0;font-size:10.5px}.project-card>span{color:#898990}.project-empty-state{max-width:880px;margin:70px auto;text-align:center}.project-empty-state strong{display:block;font-size:19px}.project-empty-state p{margin:8px 0 24px;color:#797980}.project-empty-state .primary{display:inline-block;box-shadow:none}

@media(max-width:760px){.app-shell .sidebar{padding:12px}.app-shell.sidebar-collapsed .sidebar{padding:12px}.app-shell .messages{padding-left:14px;padding-right:14px}.project-page{padding:0 16px 36px}.project-page-head{height:62px}.project-form-shell{margin-top:38px}.project-form-intro h1,.project-index-head h1{font-size:27px}.project-create-form{padding:18px;margin-top:24px}.project-index-head{margin:38px auto 24px}.project-card{padding:13px 12px}.project-card p{max-width:68vw}}

/* Focused project creation form */
.project-create-page{background:#fafafa;min-height:100%;padding-bottom:64px}.project-create-nav{max-width:960px;border-bottom-color:#ededee}.project-back-link{height:36px;padding:0 10px;display:inline-flex;align-items:center;gap:7px;border-radius:9px;color:#66666d;font-size:12.5px}.project-back-link:hover{background:#f0f0f1;color:#242428}.project-back-link span{font-size:17px;line-height:1}
.project-create-layout{width:min(720px,100%);margin:52px auto 0}.project-create-heading{display:grid;grid-template-columns:48px minmax(0,1fr);gap:16px;align-items:start}.project-form-mark{width:48px;height:48px;border-radius:12px;background:#242529;color:#fff;display:grid;place-items:center;font-size:15px;font-weight:800;box-shadow:0 8px 20px rgba(32,33,36,.1)}.project-create-heading>div:last-child>span{display:block;margin:1px 0 7px;color:#87878e;font-size:10.5px;font-weight:700;text-transform:uppercase}.project-create-heading h1{margin:0;color:#252529;font-size:29px;line-height:1.18}.project-create-heading p{max-width:600px;margin:8px 0 0;color:#74747b;font-size:14px;line-height:1.6}.project-form-alert{margin:22px 0 0}
.project-create-card{margin-top:26px;border:1px solid #e7e7e9;border-radius:14px;background:#fff;box-shadow:0 10px 28px rgba(15,23,42,.045);overflow:hidden}.project-field{padding:22px 24px 0}.project-field+.project-field{padding-top:20px}.project-field-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}.project-field-head label{color:#303035;font-size:13px;font-weight:750}.project-field-head label span{margin-left:6px;padding:2px 6px;border-radius:999px;background:#f0f0f1;color:#73737a;font-size:9px;font-weight:700;text-transform:uppercase}.project-field-head label .optional{background:transparent;color:#9a9aa0;padding:0}.project-field-head output{flex:0 0 auto;color:#9a9aa0;font-size:10.5px;font-variant-numeric:tabular-nums}.project-field-head output.near-limit{color:#b45309}.project-field input,.project-field textarea{display:block;width:100%;border:1px solid #dedee2;border-radius:10px;background:#fdfdfd;color:#252529;outline:0}.project-field input{height:48px;padding:0 14px}.project-field textarea{min-height:132px;padding:13px 14px;line-height:1.55;resize:vertical}.project-field input::placeholder,.project-field textarea::placeholder{color:#aaaab0}.project-field input:hover,.project-field textarea:hover{border-color:#d2d2d7}.project-field input:focus,.project-field textarea:focus{border-color:#a9a9b0;background:#fff;box-shadow:0 0 0 3px rgba(32,33,36,.06)}.project-field>p{margin:7px 2px 0;color:#929299;font-size:11px;line-height:1.45}
.project-context-note{margin:22px 24px 0;padding:13px 14px;display:grid;grid-template-columns:26px minmax(0,1fr);gap:10px;border-radius:10px;background:#f5faf7;color:#355443}.project-note-mark{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#dcefe3;color:#25613c;font-size:12px;font-weight:800}.project-context-note strong{display:block;font-size:12px}.project-context-note p{margin:3px 0 0;color:#60766a;font-size:11px;line-height:1.5}
.project-create-actions{margin-top:22px;padding:16px 24px;display:flex;align-items:center;justify-content:flex-end;gap:10px;border-top:1px solid #eeeeef;background:#fcfcfc}.project-create-actions>a{min-height:40px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;color:#6d6d74;font-size:13px;font-weight:650}.project-create-actions>a:hover{background:#f0f0f1;color:#252529}.project-create-actions .primary{min-width:136px;min-height:40px;padding:0 15px;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:10px;box-shadow:none;cursor:pointer;font-size:13px}.project-create-actions .primary span:first-child{font-size:17px;line-height:1}.project-create-actions .primary:disabled{opacity:.6;cursor:wait}
@media(max-width:760px){.project-create-page{padding:0 14px 32px}.project-create-nav{height:60px}.project-create-layout{margin-top:30px}.project-create-heading{grid-template-columns:40px minmax(0,1fr);gap:12px}.project-form-mark{width:40px;height:40px;border-radius:10px}.project-create-heading h1{font-size:25px}.project-create-heading p{font-size:13px}.project-create-card{margin-top:22px;border-radius:12px}.project-field{padding:18px 16px 0}.project-field+.project-field{padding-top:18px}.project-field textarea{min-height:124px}.project-context-note{margin:18px 16px 0}.project-create-actions{padding:14px 16px}.project-create-actions>a,.project-create-actions .primary{flex:1}.project-create-actions .primary{min-width:0}}
@media(max-width:390px){.project-create-nav .brand{font-size:18px}.project-back-link{padding:0 6px}.project-create-heading{grid-template-columns:1fr}.project-form-mark{display:none}.project-field-head{align-items:flex-start}.project-create-actions{flex-direction:column-reverse}.project-create-actions>a,.project-create-actions .primary{width:100%}}

/* OAuth authorization */
.oauth-consent{width:min(470px,100%)}
.oauth-scope-list{display:grid;gap:8px;margin:22px 0;padding:14px;border:1px solid #ececef;border-radius:10px;background:#fafafa}
.oauth-scope-list div{display:flex;align-items:center;gap:10px;min-height:34px;color:#35353a;font-size:13px}
.oauth-scope-list span{display:grid;width:22px;height:22px;place-items:center;border-radius:50%;background:#e4f3e9;color:#24603b;font-size:11px}
.oauth-consent-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.oauth-consent-actions button{min-height:44px;border:1px solid #e2e2e6;border-radius:10px;background:#fff;cursor:pointer;font-weight:700}
.oauth-consent-actions .primary{border-color:#252529;background:#252529;color:#fff}
.oauth-deny:hover{background:#f5f5f6}
.oauth-security-note{margin:15px 0 0;color:#88888f;font-size:11px;line-height:1.5;text-align:center}

/* Simaunya authenticated chat workspace */
.app-shell{--chat-navy:#071a30;--chat-navy-soft:#0b2948;--chat-navy-light:#0d385b;--chat-blue:#168dd8;--chat-cyan:#69d1ff;--chat-ice:#eaf7ff;--chat-surface:#f7fbff;--chat-line:rgba(47,151,214,.18);--chat-glow:rgba(42,176,255,.24);grid-template-columns:286px minmax(0,1fr);background:var(--chat-surface)}
.app-shell.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
.app-shell .sidebar{padding:13px;background:linear-gradient(155deg,var(--chat-navy) 0%,var(--chat-navy-soft) 57%,var(--chat-navy-light) 100%);border-right:1px solid rgba(110,205,255,.16);box-shadow:8px 0 30px rgba(3,24,45,.08);color:#eaf8ff;backdrop-filter:none}
.app-shell.sidebar-collapsed .sidebar{padding:0;border-right:0;box-shadow:none}
.app-shell .side-head{height:46px;padding:0 3px 0 5px}
.workspace-brand{display:inline-flex;align-items:center;gap:10px;color:#f6fcff;font-size:19px;font-weight:780}
.workspace-brand>span:last-child{color:#f6fcff}
.workspace-brand-mark{position:relative;width:27px;height:27px;display:inline-grid;place-items:center;border:1px solid rgba(115,216,255,.52);border-radius:50%;box-shadow:0 0 16px rgba(44,183,255,.2);flex:0 0 auto}
.workspace-brand-mark::before,.workspace-brand-mark::after{content:"";position:absolute;border:1px solid rgba(114,215,255,.34);border-radius:50%}
.workspace-brand-mark::before{inset:5px}.workspace-brand-mark::after{width:3px;height:3px;right:1px;top:5px;background:#7ad9ff;border:0;box-shadow:0 0 7px #7ad9ff}
.workspace-brand-mark i{width:7px;height:7px;border-radius:50%;background:linear-gradient(135deg,#d9f7ff,#41bfff);box-shadow:0 0 10px rgba(78,197,255,.7)}
.nav-toggle-glyph{width:17px;height:14px;display:flex;flex-direction:column;justify-content:space-between}.nav-toggle-glyph i{display:block;height:1.5px;border-radius:2px;background:currentColor}.nav-toggle-glyph i:nth-child(2){width:12px;align-self:flex-end}
.app-shell .sidebar-toggle{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;color:#a9d9f4}.app-shell .sidebar-toggle:hover{background:rgba(103,205,255,.11);color:#fff}
.app-shell .new-chat{min-height:42px;margin:9px 0 2px;padding:9px 10px;border:1px solid rgba(112,204,252,.17);border-radius:8px;background:rgba(234,248,255,.055);box-shadow:none;color:#dff5ff;display:flex;align-items:center;gap:9px;font-size:13px;font-weight:680}
.app-shell .new-chat:hover{border-color:rgba(111,211,255,.38);background:rgba(100,203,255,.12);color:#fff;box-shadow:0 0 15px rgba(56,185,255,.08)}
.app-shell .primary-action{background:linear-gradient(110deg,#147fca,#22a8ec);border-color:rgba(128,220,255,.42);color:#fff;box-shadow:0 7px 18px rgba(0,119,198,.18)}
.app-shell .primary-action:hover{background:linear-gradient(110deg,#1689d7,#2cb4f2);border-color:rgba(167,232,255,.65);box-shadow:0 7px 22px rgba(24,168,238,.22);color:#fff}
.action-mark{width:22px;height:22px;display:grid;place-items:center;border:1px solid currentColor;border-radius:50%;font-size:16px!important;font-weight:400;line-height:1;opacity:.88}
.app-shell .history-title{padding:15px 8px 6px;color:#7eb0cc;font-size:10px;font-weight:720;text-transform:uppercase}
.app-shell .project-list{max-height:204px;flex:0 0 auto}
.app-shell .conversation-list{min-height:0;flex:1}
.app-shell .project-item,.app-shell .conversation-item{position:relative;min-height:38px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#cbeafa;font:inherit;text-align:left;cursor:pointer}
.app-shell .project-item strong{color:#e8f8ff;font-size:13px;font-weight:680}.app-shell .project-item small{color:#7faec8;font-size:11px}.app-shell .conversation-item{font-size:13px}
.app-shell .project-item:hover,.app-shell .conversation-item:hover{background:rgba(121,211,255,.08);color:#fff}
.app-shell .project-item.active,.app-shell .conversation-item.active{background:linear-gradient(90deg,rgba(37,164,229,.22),rgba(63,190,245,.07));color:#fff;box-shadow:inset 2px 0 #69d1ff,0 0 18px rgba(37,166,232,.07)}
.app-shell .sidebar-empty{color:#78a7c1}.app-shell .all-projects-link{color:#83b6d1;border-radius:7px}.app-shell .all-projects-link:hover{background:rgba(105,209,255,.08);color:#e9f9ff}.app-shell .all-projects-link span{background:rgba(104,208,255,.12);color:#bceaff}
.app-shell .profile{padding:12px 4px 1px;border-top:1px solid rgba(114,203,248,.12);grid-template-columns:35px minmax(0,1fr) 34px}
.app-shell .avatar{width:35px;height:35px;border:1px solid rgba(119,216,255,.32);border-radius:50%;background:linear-gradient(145deg,#1d87c5,#0b4b78);box-shadow:0 0 14px rgba(42,175,237,.15);font-size:13px;color:#fff}
.app-shell .profile-copy strong{color:#effaff;font-size:13px}.app-shell .profile-copy small{color:#7faec8;font-size:10px}
.app-shell .logout-btn{border:0;background:transparent;color:#8dbed7;box-shadow:none}.app-shell .logout-btn:hover{background:rgba(255,112,128,.1);color:#ffb3bd}
.app-shell .chat-main{min-width:0;isolation:isolate;background:linear-gradient(145deg,#f1f9ff 0%,#fff 48%,#edf7ff 100%)}
.app-shell .chat-main::before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,rgba(16,125,196,.035) 1px,transparent 1px),linear-gradient(rgba(16,125,196,.025) 1px,transparent 1px);background-size:56px 56px;mask-image:linear-gradient(to bottom,rgba(0,0,0,.55),transparent 46%);pointer-events:none}
.app-shell .messages{width:min(840px,100%);gap:22px;padding-top:34px;scrollbar-width:thin;scrollbar-color:#b7dcef transparent}
.app-shell .message{position:relative;line-height:1.65}.app-shell .assistant.message{padding-left:22px}.app-shell .assistant.message::before{content:"";position:absolute;left:1px;top:8px;width:7px;height:7px;border-radius:50%;background:#24a7ea;box-shadow:0 0 11px rgba(36,167,234,.48)}
.app-shell .assistant .bubble{color:#173149;font-size:15px}.app-shell .assistant .bubble code{background:#eaf6fd;border-color:#d8edf8;color:#103a59}
.app-shell .user .bubble{border:1px solid rgba(33,142,206,.12);border-radius:8px 8px 2px 8px;background:linear-gradient(135deg,#dff3ff,#eef9ff);box-shadow:0 6px 18px rgba(15,105,164,.07);color:#12344e}
.app-shell .md-table-wrap{border-color:#d8ebf5;border-radius:8px;box-shadow:0 8px 24px rgba(15,88,137,.05)}.app-shell .md-table-wrap th{background:#eaf6fd;color:#113a58}.app-shell .md-table-wrap td{background:rgba(255,255,255,.78)}.app-shell .md-table-wrap th,.app-shell .md-table-wrap td{border-bottom-color:#deedf5}
.app-shell .code-card{border-color:#163f5e;border-radius:8px;background:#061726;box-shadow:0 14px 32px rgba(4,42,68,.14)}.app-shell .assistant .bubble .code-card code{color:#d8efff}.app-shell .code-head{background:linear-gradient(90deg,#0a2a44,#0e3c5d);border-bottom:1px solid rgba(105,209,255,.12)}
.app-shell .composer-wrap{padding:20px 20px 11px;background:linear-gradient(180deg,rgba(247,251,255,0),rgba(247,251,255,.94) 30%,#f7fbff 100%)}
.app-shell .composer{width:min(840px,100%);padding:9px;border:1px solid rgba(30,139,206,.18);border-radius:17px;background:rgba(255,255,255,.95);box-shadow:0 12px 30px rgba(5,71,115,.09),0 0 0 1px rgba(255,255,255,.8);backdrop-filter:blur(9px)}
.app-shell .composer:focus-within{border-color:rgba(36,167,234,.48);box-shadow:0 14px 34px rgba(5,71,115,.11),0 0 20px rgba(42,176,255,.13)}
.app-shell .composer textarea{min-width:0;color:#13354e}.app-shell .composer textarea::placeholder{color:#7693a7}
.app-shell .attach-btn{width:40px;height:40px;border:1px solid #d8ebf5;border-radius:10px;background:#f1f9fe;color:#267eae}.app-shell .attach-btn:hover{border-color:#a9d9ef;background:#e4f5fd;color:#0b679d}.app-shell .attach-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-shell .composer button[type=submit]{width:40px;height:40px;border-radius:10px;background:linear-gradient(135deg,#0a3152,#126d9f);box-shadow:0 5px 14px rgba(7,83,127,.2);display:grid;place-items:center}.app-shell .composer button[type=submit]:hover{background:linear-gradient(135deg,#0c3d63,#1685bb);box-shadow:0 6px 17px rgba(14,132,190,.25),0 0 12px rgba(63,192,245,.13)}.app-shell .composer button[type=submit] svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.app-shell .attachment-strip{width:min(840px,100%)}.app-shell .attachment-chip{border-color:#cfe7f3;border-radius:8px;background:#f3faff;color:#235474}.app-shell .attachment-chip:hover{border-color:#a9d6eb;background:#e9f7fd}
.app-shell .composer-wrap>small{color:#7b98aa;font-size:10px}
.app-shell .reopen-sidebar{border:1px solid rgba(48,156,217,.2);background:#f5fbff;color:#155c87;box-shadow:0 8px 24px rgba(7,78,124,.1)}
.welcome-orbit{position:relative;width:98px;height:98px;margin:auto;display:grid;place-items:center}.welcome-core{position:relative;z-index:2;width:42px;height:42px;border:1px solid rgba(134,222,255,.58);border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#082a49,#117daf);box-shadow:0 0 24px rgba(27,166,225,.28);color:#effcff;font-size:20px;font-weight:800}.welcome-orbit-ring{position:absolute;border:1px solid rgba(30,151,214,.22);border-radius:50%}.welcome-orbit-ring-one{inset:10px}.welcome-orbit-ring-two{inset:0;transform:rotate(58deg)}.welcome-orbit-ring i{position:absolute;width:6px;height:6px;border-radius:50%;background:#47c2f4;box-shadow:0 0 9px rgba(35,176,235,.58)}.welcome-orbit-ring-one i{top:8px;right:12px}.welcome-orbit-ring-two i{left:4px;bottom:22px;background:#9fe4ff}
.app-shell .welcome h1{margin:18px 0 7px;color:#0a2943;font-size:30px;font-weight:740}.app-shell .welcome p{color:#66849a}
.mobile-brand{display:flex;align-items:center;gap:8px}.mobile-brand .workspace-brand-mark{width:24px;height:24px}.app-shell .mobile-project-link{width:34px;height:34px;display:grid;place-items:center;border:1px solid rgba(104,208,255,.28);border-radius:50%;background:rgba(105,209,255,.1);color:#dff6ff;font-size:20px}
.app-shell .code-canvas{border-color:#174765;background:#061726}.app-shell .canvas-head{background:#082943;color:#eaf9ff;border-bottom-color:rgba(108,207,255,.16)}.app-shell .canvas-head small{color:#83b6d1}.app-shell .canvas-head button{border-color:rgba(119,210,255,.2);background:#0c3655;color:#e7f8ff}
@media(max-width:760px){.app-shell .sidebar{width:min(310px,88vw);padding:13px;left:-320px;box-shadow:none}.app-shell.sidebar-collapsed .sidebar{padding:13px}.app-shell .sidebar.open{left:0;box-shadow:24px 0 60px rgba(3,28,49,.28)}.app-shell .mobile-head{height:58px;padding:0 13px;border-bottom:1px solid rgba(100,204,255,.14);background:linear-gradient(110deg,#071a30,#0c3454);color:#eaf8ff;backdrop-filter:none}.app-shell .mobile-head .icon-btn{width:34px;height:34px;display:grid;place-items:center;color:#b8e8ff}.app-shell .messages{padding:24px 14px 184px}.app-shell .assistant.message{padding-left:17px}.app-shell .composer-wrap{padding:16px 10px 9px}.app-shell .composer{gap:6px;padding:7px;border-radius:15px}.app-shell .welcome{padding:24px 18px}.app-shell .welcome h1{font-size:25px}.welcome-orbit{width:86px;height:86px}.welcome-core{width:39px;height:39px}.app-shell .bubble{max-width:92%}}
@media(prefers-reduced-motion:no-preference){.welcome-orbit-ring-one{animation:simaunya-orbit 16s linear infinite}.welcome-orbit-ring-two{animation:simaunya-orbit-reverse 22s linear infinite}}@keyframes simaunya-orbit{to{transform:rotate(360deg)}}@keyframes simaunya-orbit-reverse{from{transform:rotate(58deg)}to{transform:rotate(-302deg)}}
