.hidden { display: none !important; }
.auth-page { min-height: 100dvh; padding: max(1rem,var(--safe-top)) max(1rem,var(--safe-right)) max(1rem,var(--safe-bottom)) max(1rem,var(--safe-left)); display: grid; place-items: center; background: var(--gradient-hero); }
.auth-card { width: min(100%,31rem); padding: clamp(1.5rem,5vw,2.75rem); border: 1px solid var(--color-border); border-radius: var(--radius-xl); text-align: center; background: var(--gradient-panel); box-shadow: var(--shadow-lg); }
.auth-card .brand-mark { margin: 0 auto 1rem; }.auth-card h1 { margin: .8rem 0; font-size: var(--text-2xl); letter-spacing: -.045em; }.auth-card > p:not(.eyebrow) { color: var(--color-text-muted); }.auth-actions { margin: 1.5rem 0 1rem; display: grid; gap: .65rem; }.secure-note { color: var(--color-text-subtle); font-size: var(--text-xs); }

/* Reference rebuild: retains the existing ChatGPT sign-in route, without adding unimplemented identity providers. */
.auth-page--rebuild{min-height:100dvh;padding:0;display:grid;place-items:stretch;grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);overflow:hidden;background:#070c1d}.auth-showcase{position:relative;min-height:100%;padding:clamp(2rem,5vw,5.8rem);display:flex;flex-direction:column;overflow:hidden;background:radial-gradient(circle at 72% 28%,rgba(51,153,255,.25),transparent 25rem),radial-gradient(circle at 20% 100%,rgba(119,77,255,.24),transparent 32rem),linear-gradient(145deg,#07112f,#0a1025 56%,#15113b)}.auth-showcase:before{position:absolute;inset:0;content:"";opacity:.52;background-image:linear-gradient(rgba(140,160,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(140,160,255,.07) 1px,transparent 1px);background-size:48px 48px;mask-image:linear-gradient(to bottom,black,transparent 82%)}.auth-wordmark,.auth-showcase-copy,.auth-showcase-products,.auth-showcase-orbit{position:relative;z-index:1}.auth-wordmark{display:inline-flex;align-items:center;gap:.75rem;width:max-content;color:#f3f5ff;text-decoration:none;font-size:.78rem;letter-spacing:.18em}.auth-wordmark-mark{width:2rem;height:2rem;display:grid;place-items:center;border-radius:.6rem;background:linear-gradient(145deg,#805eff,#2fb3ff);font-weight:900;letter-spacing:0}.auth-showcase-copy{max-width:40rem;margin:auto 0 2.4rem}.auth-showcase-copy .eyebrow{color:#a4bdf6;letter-spacing:.18em;font-size:.69rem;font-weight:800}.auth-showcase-copy h1{margin:.8rem 0 1.3rem;color:#f6f7ff;font-size:clamp(2.7rem,5.4vw,5.6rem);line-height:.97;letter-spacing:-.067em}.auth-showcase-copy h1 em{font-style:normal;background:linear-gradient(90deg,#ac8dff,#42c1ff);-webkit-background-clip:text;color:transparent}.auth-showcase-copy>p:last-child{max-width:32rem;color:#abb9d9;font-size:1.04rem;line-height:1.68}.auth-showcase-products{display:flex;flex-wrap:wrap;gap:.6rem;max-width:40rem}.auth-showcase-products span{padding:.55rem .75rem;display:inline-flex;align-items:center;gap:.42rem;color:#d8e4ff;border:1px solid rgba(166,185,255,.19);border-radius:999px;background:rgba(7,16,45,.42);font-size:.78rem}.auth-showcase-products i{color:#70c7ff;font-style:normal}.auth-showcase-orbit{position:absolute;right:clamp(2rem,8vw,9rem);bottom:clamp(2rem,8vh,5rem);width:8.7rem;height:8.7rem;border:1px solid rgba(137,180,255,.34);border-radius:50%;box-shadow:0 0 80px rgba(74,122,255,.26)}.auth-showcase-orbit b{position:absolute;inset:2.45rem;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#8b62ff,#32bdff);box-shadow:0 0 32px rgba(75,166,255,.62);font-size:1.7rem}.auth-showcase-orbit i{position:absolute;width:.55rem;height:.55rem;border-radius:50%;background:#a88aff;box-shadow:0 0 17px #a88aff}.auth-showcase-orbit i:nth-child(2){top:-.22rem;left:50%}.auth-showcase-orbit i:nth-child(3){right:.5rem;bottom:1rem;background:#5bcaff}.auth-showcase-orbit i:nth-child(4){bottom:.8rem;left:1rem;background:#91e1ff}.auth-panel{display:grid;place-items:center;padding:max(1.5rem,var(--safe-top)) max(1.5rem,var(--safe-right)) max(1.5rem,var(--safe-bottom)) max(1.5rem,var(--safe-left));background:linear-gradient(160deg,#0b1128,#070b1a)}.auth-card--rebuild{width:min(100%,28.5rem);padding:clamp(2rem,4vw,3.5rem);border-color:rgba(142,159,222,.2);border-radius:1.55rem;background:rgba(13,20,46,.72);box-shadow:0 34px 90px rgba(0,0,0,.35);text-align:left}.auth-card--rebuild .brand-mark{margin:0 0 2.1rem}.auth-card--rebuild .eyebrow{margin:0;color:#849acb;font-size:.65rem;font-weight:800;letter-spacing:.19em}.auth-card--rebuild h2{margin:.75rem 0;color:#f5f7ff;font-size:clamp(2rem,3vw,2.55rem);letter-spacing:-.055em}.auth-card--rebuild>p:not(.eyebrow):not(.auth-legal){margin:0;color:#9eacca;line-height:1.6}.auth-card--rebuild .auth-actions{margin:2rem 0 1.15rem}.auth-card--rebuild .primary-button,.auth-card--rebuild .secondary-button{min-height:3.25rem;display:flex;align-items:center;justify-content:center;border-radius:.85rem;text-decoration:none;font-weight:780}.auth-card--rebuild .primary-button{color:white;background:linear-gradient(135deg,#725cf2,#299cff);box-shadow:0 16px 30px rgba(74,92,255,.24)}.auth-card--rebuild .secondary-button{color:#d4ddf4;border:1px solid rgba(154,169,222,.2);background:rgba(255,255,255,.035)}.auth-legal{margin:0!important;color:#7383aa!important;font-size:.72rem;line-height:1.6}.auth-card--rebuild .secure-note{display:block;margin-top:1.35rem;color:#8ca1c9}
@media(max-width:760px){.auth-page--rebuild{display:block;overflow:auto}.auth-showcase{min-height:22rem;padding:1.5rem 1.35rem 2rem}.auth-showcase-copy{margin:3.7rem 0 1.5rem}.auth-showcase-copy h1{font-size:clamp(2.5rem,12vw,4rem)}.auth-showcase-copy>p:last-child{font-size:.92rem}.auth-showcase-orbit{right:1.3rem;bottom:1.1rem;width:5.7rem;height:5.7rem;opacity:.76}.auth-showcase-orbit b{inset:1.55rem;font-size:1.1rem}.auth-showcase-products{max-width:75%;gap:.42rem}.auth-showcase-products span{padding:.42rem .55rem;font-size:.66rem}.auth-panel{min-height:auto;padding:1.25rem 1rem max(1.25rem,var(--safe-bottom))}.auth-card--rebuild{width:100%;max-width:31rem;padding:2rem 1.4rem;border-radius:1.2rem}.auth-card--rebuild .brand-mark{margin-bottom:1.55rem}}
.active-project { margin: 1rem 0 0; padding: .75rem 1rem; display: flex; align-items: center; gap: .6rem; border: 1px solid rgba(124,92,255,.25); border-radius: var(--radius-md); background: rgba(124,92,255,.08); font-size: var(--text-sm); }.active-project span { color: var(--color-text-muted); }
.inline-form { margin-bottom: 1rem; padding: 1rem; display: grid; gap: .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
input, textarea, select { color: var(--color-text); border: 1px solid var(--color-border); border-radius: .75rem; background: #0b1324; }
.inline-form input, .settings-card input, .filter-row select { min-height: 2.8rem; padding: .65rem .8rem; }
.record-list { display: grid; gap: .75rem; }.record-card { padding: 1rem; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }.record-icon,.asset-type { width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border-radius: .85rem; color: var(--color-primary-strong); background: rgba(124,92,255,.12); }.record-copy { min-width: 0; }.record-copy h3,.asset-card h3 { margin: 0; font-size: .95rem; }.record-copy p,.asset-card p { margin: .2rem 0; overflow: hidden; color: var(--color-text-muted); font-size: var(--text-sm); text-overflow: ellipsis; white-space: nowrap; }.record-copy small { color: var(--color-text-subtle); }.record-actions { display: flex; gap: .4rem; }
.mini-empty { min-height: 22rem; display: grid; place-content: center; justify-items: center; padding: 2rem; text-align: center; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-xl); background: rgba(12,19,36,.45); }.mini-empty h3 { margin: 1rem 0 .35rem; }.mini-empty p { max-width: 32rem; margin: 0; color: var(--color-text-muted); }
.upload-button { cursor: pointer; }.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }.filter-row { margin-bottom: 1rem; }.filter-row select { min-width: min(100%,17rem); }.asset-grid { display: grid; gap: .75rem; }.asset-card { padding: .9rem; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .8rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.workspace-chat { width: 100%; max-width: none; height: calc(100dvh - var(--topbar-height)); padding: 0; }.chat-layout { height: 100%; display: grid; grid-template-columns: 1fr; }.chat-history { display: none; }.chat-main { min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; }.chat-header { padding: 1rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--color-border); }.chat-header h2,.chat-header p { margin: 0; }.chat-header p { color: var(--color-text-muted); font-size: var(--text-sm); }.messages { min-height: 0; overflow-y: auto; padding: 1rem; overscroll-behavior: contain; }.message { width: min(100%,50rem); margin: 0 auto 1rem; display: grid; grid-template-columns: 2rem minmax(0,1fr); gap: .75rem; }.message.user { direction: rtl; }.message.user > * { direction: ltr; }.message-avatar { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: .65rem; background: var(--gradient-brand); font-size: var(--text-xs); font-weight: 800; }.message.user .message-avatar { background: #273451; }.message-bubble { padding: .85rem 1rem; border: 1px solid var(--color-border); border-radius: .3rem 1rem 1rem 1rem; background: var(--color-surface); }.message.user .message-bubble { border-radius: 1rem .3rem 1rem 1rem; background: rgba(124,92,255,.13); }.message-bubble p { margin: 0; white-space: normal; word-break: break-word; }.thinking { color: var(--color-text-muted); }.chat-error { margin: 0 1rem .5rem; padding: .65rem .8rem; color: #ffc3cd; border: 1px solid rgba(255,104,130,.25); border-radius: .7rem; background: rgba(255,104,130,.08); font-size: var(--text-sm); }.chat-composer { margin: .5rem max(1rem,var(--safe-right)) calc(.75rem + var(--safe-bottom)) max(1rem,var(--safe-left)); padding: .5rem; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .5rem; border: 1px solid var(--color-border-strong); border-radius: 1rem; background: rgba(8,13,27,.95); box-shadow: var(--shadow-lg); }.chat-composer textarea { max-height: 9rem; padding: .7rem; resize: none; border: 0; outline: 0; background: transparent; }.chat-composer .primary-button { width: 2.8rem; padding: 0; }.conversation-item { width: 100%; padding: .7rem; display: flex; align-items: center; gap: .65rem; overflow: hidden; color: var(--color-text-muted); border: 0; border-radius: .7rem; background: transparent; text-align: start; cursor: pointer; }.conversation-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.conversation-item:hover,.conversation-item.active { color: white; background: rgba(124,92,255,.12); }.full { width: 100%; }.small { font-size: var(--text-sm); }.mobile-only { display: inline-flex; }.notice { color: #bfe9ff; border-color: rgba(33,184,255,.25); background: rgba(33,184,255,.08); }.wide { max-width: 100%; }
@media (min-width:48rem) { .inline-form { grid-template-columns: 1fr 1.5fr auto; align-items: center; }.asset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.chat-layout { grid-template-columns: 15rem minmax(0,1fr); }.chat-history { min-height: 0; padding: 1rem; display: block; overflow-y: auto; border-right: 1px solid var(--color-border); background: rgba(7,11,24,.5); }.chat-history h3 { margin: 1.25rem .4rem .6rem; color: var(--color-text-muted); font-size: var(--text-xs); text-transform: uppercase; }.mobile-only { display:none; }.messages { padding: 1.5rem; }.chat-composer { width: min(calc(100% - 3rem),52rem); margin-inline: auto; } }
@media (min-width:72rem) { .asset-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.chat-layout { grid-template-columns: 17rem minmax(0,1fr); } }

/* Vera Chat productization */
.workspace-chat { height: calc(var(--visual-height, 100dvh) - 4rem - var(--safe-top) - var(--bottom-nav-height) - var(--safe-bottom)); }
.conversation-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; border-radius: .7rem; }
.conversation-row.active,.conversation-row:hover { background: rgba(124,92,255,.12); }
.conversation-row .conversation-item:hover,.conversation-row .conversation-item.active { background: transparent; }
.conversation-actions { display: flex; padding-right: .25rem; opacity: 0; transition: opacity var(--motion-fast); }
.conversation-row:hover .conversation-actions,.conversation-row:focus-within .conversation-actions,.conversation-row.active .conversation-actions { opacity: 1; }
.conversation-actions button,.message-actions button,.composer-icon,.history-more { min-width: 2.25rem; min-height: 2.25rem; padding: .4rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; color: var(--color-text-muted); border: 0; border-radius: .55rem; background: transparent; cursor: pointer; }
.conversation-actions button:hover,.message-actions button:hover,.composer-icon:hover,.history-more:hover { color: white; background: rgba(255,255,255,.07); }
.history-more { width: 100%; margin-top: .4rem; font-size: var(--text-xs); }
.message-more { width: auto; margin: 0 auto 1rem; display: flex; }
.message-content { min-width: 0; }
.message-actions { min-height: 2rem; display: flex; gap: .2rem; opacity: 0; transition: opacity var(--motion-fast); }
.message:hover .message-actions,.message:focus-within .message-actions { opacity: 1; }
.message-actions button { min-height: 2rem; font-size: var(--text-xs); }
.message-status { margin-top: .35rem; display: inline-block; color: var(--color-text-subtle); font-size: var(--text-xs); }
.message-status.failed { color: #ffc3cd; }.message-status.cancelled { color: #ffd492; }
.message.streaming .message-bubble { border-color: rgba(80,229,255,.22); }
.stream-caret { width: .42rem; height: 1.05rem; display: inline-block; vertical-align: -.15rem; background: var(--color-cyan); animation: stream-blink .75s steps(1) infinite; }
@keyframes stream-blink { 50% { opacity: .2; } }
.message-bubble { overflow: hidden; }
.message-bubble > :first-child { margin-top: 0; }.message-bubble > :last-child { margin-bottom: 0; }
.message-bubble p { margin: 0 0 .8rem; }.message-bubble h2,.message-bubble h3,.message-bubble h4,.message-bubble h5 { margin: 1.1rem 0 .5rem; line-height: 1.25; }
.message-bubble ul,.message-bubble ol { margin: .5rem 0 .9rem; padding-inline-start: 1.4rem; }.message-bubble li + li { margin-top: .25rem; }
.message-bubble blockquote { margin: .7rem 0; padding: .5rem .8rem; color: var(--color-text-muted); border-inline-start: 3px solid var(--color-primary); background: rgba(124,92,255,.07); }
.message-bubble a { color: var(--color-cyan); text-decoration: underline; text-underline-offset: .18em; }
.message-bubble :not(pre) > code { padding: .12rem .32rem; color: #d9d2ff; border: 1px solid var(--color-border); border-radius: .35rem; background: #090f1e; font: .9em ui-monospace,SFMono-Regular,Consolas,monospace; }
.code-block { margin: .8rem 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: .75rem; background: #060a13; }
.code-head { min-height: 2.25rem; padding: .35rem .55rem .35rem .8rem; display: flex; align-items: center; justify-content: space-between; color: var(--color-text-subtle); border-bottom: 1px solid var(--color-border); font-size: var(--text-xs); }
.code-head button { min-height: 1.8rem; padding: .25rem .55rem; color: var(--color-text-muted); border: 0; border-radius: .4rem; background: rgba(255,255,255,.05); cursor: pointer; }
.code-block pre { margin: 0; padding: .9rem 1rem; overflow-x: auto; overscroll-behavior-inline: contain; }.code-block code { color: #dfe7ff; font: .84rem/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size: 2; }
.markdown-table-wrap { margin: .8rem 0; overflow-x: auto; }.markdown-table-wrap table { width: 100%; min-width: 28rem; border-collapse: collapse; font-size: var(--text-sm); }.markdown-table-wrap th,.markdown-table-wrap td { padding: .55rem .65rem; border: 1px solid var(--color-border); text-align: start; }.markdown-table-wrap th { background: rgba(124,92,255,.1); }
.chat-composer { display: block; }
.composer-tools { min-height: 2.25rem; display: flex; align-items: center; gap: .35rem; padding: 0 .2rem .35rem; }
.composer-tools select { max-width: 11rem; height: 2rem; padding: 0 .55rem; color: var(--color-text-muted); border-radius: .55rem; font-size: var(--text-xs); }
.composer-icon { min-width: 2rem; min-height: 2rem; }.composer-icon:disabled { opacity: .4; cursor: not-allowed; }
.capability-note { min-width: 0; overflow: hidden; color: var(--color-text-subtle); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.composer-input { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: .5rem; }
.composer-input textarea { width: 100%; min-height: 2.7rem; overflow-y: auto; }
.composer-input .primary-button,.stop-button { width: 2.8rem; min-width: 2.8rem; height: 2.8rem; padding: 0; }
.stop-button { display: grid; place-items: center; color: white; border: 1px solid rgba(255,104,130,.35); border-radius: .78rem; background: rgba(255,104,130,.14); cursor: pointer; }
.stop-button:disabled { opacity: .55; }
.composer-attachments { padding: .25rem .2rem .4rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.attachment-chip { max-width: 100%; padding: .3rem .45rem; display: inline-flex; align-items: center; gap: .35rem; color: var(--color-text-muted); border: 1px solid var(--color-border); border-radius: .55rem; background: rgba(255,255,255,.035); font-size: var(--text-xs); }
.attachment-chip button { color: inherit; border: 0; background: transparent; cursor: pointer; }
.attachment-picker { margin-bottom: .5rem; padding: .65rem; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .35rem; border: 1px solid var(--color-border); border-radius: .75rem; background: #0b1324; }
.attachment-picker > div { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: var(--text-xs); }.attachment-picker label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }.attachment-picker label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.attachment-picker > button { min-width: 0; padding: .5rem; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 0 .4rem; color: var(--color-text); border: 0; border-radius: .55rem; background: rgba(255,255,255,.04); text-align: start; cursor: pointer; }.attachment-picker > button span,.attachment-picker > button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.attachment-picker > button small { grid-column: 2; color: var(--color-text-subtle); }
.conversation-skeleton { display: grid; gap: .5rem; }.conversation-skeleton i { height: 2.7rem; border-radius: .65rem; background: linear-gradient(90deg,rgba(255,255,255,.03),rgba(255,255,255,.08),rgba(255,255,255,.03)); background-size: 200% 100%; animation: skeleton 1.2s linear infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }
@media (hover:none) { .conversation-actions,.message-actions { opacity: 1; } }
@media (min-width:48rem) { .workspace-chat { height: calc(var(--visual-height, 100dvh) - var(--topbar-height)); }.attachment-picker { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width:37.99rem) { .capability-note { display: none; }.message-actions button span { display: none; }.message-actions button { min-width: 2.5rem; min-height: 2.5rem; }.conversation-actions button { min-width: 2.5rem; min-height: 2.5rem; } }
