/* Native frontend: no framework runtime or generated class names. */
:root {
  color-scheme: dark;
  font-family: "Onest", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0e1011;
  --surface: rgba(18, 20, 21, 0.88);
  --surface-strong: #151718;
  --surface-soft: rgba(224, 238, 238, 0.035);
  --text: #e0eeee;
  --text-soft: rgba(224, 238, 238, 0.68);
  --text-muted: rgba(224, 238, 238, 0.44);
  --border: rgba(224, 238, 238, 0.08);
  --border-bright: rgba(99, 246, 248, 0.24);
  --accent: #63f6f8;
  --accent-soft: rgba(99, 246, 248, 0.1);
  --danger: #ff7b8c;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body, #root { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.loadingScreen, .authScreen, .workspace, .adminScreen { min-height: 100vh; min-height: 100svh; }
.loadingScreen { display: grid; place-content: center; justify-items: center; gap: 20px; background: radial-gradient(circle at 50% 40%, rgba(99, 246, 248, .07), transparent 28%), var(--bg); color: var(--text-soft); }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .22em; color: rgba(99, 246, 248, .7); }
.muted { color: var(--text-soft); line-height: 1.55; }

.brand { display: inline-flex; align-items: center; gap: 13px; }
.brandMark { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--border-bright); border-radius: 17px; background: linear-gradient(145deg, rgba(99, 246, 248, .16), rgba(99, 246, 248, .03)); color: var(--accent); box-shadow: 0 0 34px rgba(99, 246, 248, .09), inset 0 1px rgba(255,255,255,.08); }
.brandText { display: flex; align-items: baseline; gap: 5px; letter-spacing: -.04em; }
.brandText strong { font-size: 21px; letter-spacing: -.05em; }
.brandText em { font-style: normal; font-weight: 500; color: var(--accent); }
.brandCompact .brandMark { width: 38px; height: 38px; border-radius: 13px; }
.brandCompact .brandText strong { font-size: 17px; }
.brandCompact .brandText em { font-size: 13px; }

.authScreen { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(180deg, #141414, #0d1011); }
.authScreen::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: linear-gradient(rgba(224,238,238,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(224,238,238,.025) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle, #000 10%, transparent 72%); }
.ambient { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(80px); pointer-events: none; }
.ambientOne { top: -300px; right: 5%; background: rgba(99,246,248,.065); }
.ambientTwo { bottom: -360px; left: 3%; background: rgba(120,94,255,.05); }
.authStage { position: relative; z-index: 1; display: grid; width: min(calc(100% - 32px), 440px); justify-items: center; gap: 30px; }
.authBrand { animation: rise .65s cubic-bezier(.22,1,.36,1) both; }
.authPanel { width: 100%; padding: 30px; border: 1px solid var(--border); border-radius: 30px; background: linear-gradient(180deg, rgba(24,26,27,.92), rgba(15,17,18,.88)); box-shadow: 0 28px 70px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.03); backdrop-filter: blur(24px); animation: rise .7s .08s cubic-bezier(.22,1,.36,1) both; }
.authPanel h1 { margin: 10px 0 8px; font-size: clamp(30px, 6vw, 42px); line-height: 1; letter-spacing: -.055em; }
.authPanel > p { margin: 0 0 26px; font-size: 14px; }
.authForm { display: grid; gap: 15px; }
.authForm label { display: grid; gap: 7px; color: var(--text-soft); font-size: 12px; }
.authForm input, .createUserForm input, .createUserForm select { width: 100%; height: 47px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; outline: none; background: rgba(224,238,238,.035); color: var(--text); transition: .2s ease; }
.authForm input:focus, .createUserForm input:focus, .createUserForm select:focus { border-color: var(--border-bright); box-shadow: 0 0 0 3px rgba(99,246,248,.06); }
.primaryButton, .secondaryButton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; cursor: pointer; transition: .2s ease; }
.primaryButton { border: 1px solid rgba(99,246,248,.52); background: linear-gradient(135deg, rgba(99,246,248,.92), rgba(75,208,213,.86)); color: #081011; font-weight: 720; box-shadow: 0 12px 28px rgba(99,246,248,.1); }
.primaryButton:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 15px 32px rgba(99,246,248,.16); }
.primaryButton:disabled { cursor: not-allowed; opacity: .48; }
.secondaryButton { border: 1px solid var(--border); background: var(--surface-soft); color: var(--text); }
.textButton { display: block; margin: 18px auto 0; padding: 0; border: 0; background: none; color: var(--text-soft); cursor: pointer; font-size: 13px; }
.textButton:hover { color: var(--accent); }
.fullButton { width: 100%; margin-top: 18px; }
.errorBanner, .composerError { border: 1px solid rgba(255,123,140,.2); background: rgba(255,123,140,.07); color: #ffabb6; }
.errorBanner { padding: 11px 13px; border-radius: 12px; font-size: 12px; line-height: 1.4; }
.authFootnote { font-size: 9px; letter-spacing: .18em; color: var(--text-muted); }

.workspace { position: relative; display: grid; grid-template-columns: 286px minmax(0,1fr); background: linear-gradient(180deg, #121415 0%, #0d0f10 100%); overflow: hidden; isolation: isolate; }
.workspaceGlow { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 83% 4%, rgba(99,246,248,.035), transparent 22%), radial-gradient(circle at 18% 95%, rgba(92,110,255,.025), transparent 20%); }
.sidebar { z-index: 20; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; gap: 18px; height: 100vh; height: 100svh; padding: 19px 15px 15px; border-right: 1px solid var(--border); background: rgba(12,14,15,.88); backdrop-filter: blur(20px); }
.sidebarTop { display: flex; align-items: center; justify-content: space-between; padding: 0 5px; }
.mobileClose, .mobileMenu { display: none; }
.newChatButton { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--border-bright); border-radius: 15px; background: var(--accent-soft); cursor: pointer; font-size: 13px; font-weight: 620; }
.newChatButton:hover { background: rgba(99,246,248,.14); transform: translateY(-1px); }
.historyList { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(224,238,238,.13) transparent; }
.sectionLabel { display: block; margin: 4px 10px 9px; color: var(--text-muted); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.historyRow { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; margin-bottom: 4px; border: 1px solid transparent; border-radius: 13px; transition: .18s ease; }
.historyRow:hover, .historyRow.active { border-color: var(--border); background: rgba(224,238,238,.035); }
.historyRow.active { background: rgba(99,246,248,.07); }
.historyRow > button:first-child { display: flex; align-items: center; gap: 9px; min-width: 0; height: 41px; padding: 0 5px 0 11px; border: 0; background: transparent; color: var(--text-soft); cursor: pointer; }
.historyRow > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.deleteChat { display: grid; width: 28px; height: 28px; margin-right: 6px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: transparent; cursor: pointer; }
.historyRow:hover .deleteChat { color: var(--text-muted); }
.deleteChat:hover { background: rgba(255,123,140,.08); color: var(--danger) !important; }
.emptyHint { padding: 8px 11px; color: var(--text-muted); font-size: 11px; }
.sidebarFooter { display: grid; gap: 5px; }
.sidebarFooter > button { display: flex; align-items: center; gap: 10px; height: 39px; padding: 0 11px; border: 0; border-radius: 12px; background: transparent; color: var(--text-soft); cursor: pointer; font-size: 12px; }
.sidebarFooter > button:hover { background: var(--surface-soft); color: var(--text); }
.userCard { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 7px; padding: 10px; border: 1px solid var(--border); border-radius: 16px; background: rgba(224,238,238,.025); }
.avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 750; text-transform: uppercase; }
.avatar.small { display: grid; width: 32px; height: 32px; }
.userCard > span:nth-child(2), .adminIdentity > span:last-child { display: grid; min-width: 0; gap: 2px; }
.userCard strong, .adminIdentity { font-size: 11px; }
.userCard small, .adminIdentity small { color: var(--text-muted); font-size: 9px; text-transform: capitalize; }
.userCard button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); cursor: pointer; }
.userCard button:hover { background: rgba(255,123,140,.08); color: var(--danger); }

.chatShell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; min-width: 0; height: 100vh; height: 100svh; }
.chatHeader { display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 70px; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(14,16,17,.66); backdrop-filter: blur(18px); }
.modeTabs { display: flex; align-items: center; gap: 5px; }
.modeTabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 11px; }
.modeTabs button:hover, .modeTabs button.active { border-color: var(--border); background: var(--surface-soft); color: var(--text); }
.modeTabs button.active { border-color: rgba(99,246,248,.15); background: rgba(99,246,248,.07); }
.chatHeader select { max-width: 230px; height: 37px; padding: 0 34px 0 12px; border: 1px solid var(--border); border-radius: 12px; background: #17191a; color: var(--text-soft); outline: none; font-size: 11px; }
.chatContent { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(224,238,238,.14) transparent; }
.welcome { display: grid; width: min(calc(100% - 40px), 760px); min-height: 100%; margin: 0 auto; padding: 12vh 0 30px; align-content: center; justify-items: center; text-align: center; }
.welcomeMark { display: grid; width: 76px; height: 76px; margin-bottom: 24px; place-items: center; border: 1px solid rgba(99,246,248,.18); border-radius: 26px; background: radial-gradient(circle at 50% 20%, rgba(99,246,248,.16), rgba(99,246,248,.035)); color: var(--accent); box-shadow: 0 0 55px rgba(99,246,248,.08); }
.welcome h1, .generationIntro h1 { margin: 10px 0 13px; font-size: clamp(38px,6vw,65px); line-height: .96; letter-spacing: -.065em; }
.welcome > p, .generationIntro > p { max-width: 570px; margin: 0; color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.suggestions { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; width: 100%; margin-top: 38px; }
.suggestions button { display: flex; min-height: 94px; padding: 15px; align-items: flex-start; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, rgba(224,238,238,.035), rgba(224,238,238,.018)); color: var(--text-soft); text-align: left; cursor: pointer; font-size: 12px; line-height: 1.45; transition: .2s ease; }
.suggestions button:hover { transform: translateY(-2px); border-color: var(--border-bright); background: rgba(99,246,248,.055); color: var(--text); }
.messageList { width: min(calc(100% - 44px), 880px); margin: 0 auto; padding: 32px 0 80px; }
.message { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 15px; padding: 22px 0; }
.message + .message { border-top: 1px solid rgba(224,238,238,.045); }
.messageIdentity > span { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); color: var(--text-soft); font-size: 10px; font-weight: 700; }
.messageAssistant .messageIdentity > span { border-color: rgba(99,246,248,.18); background: var(--accent-soft); color: var(--accent); }
.messageBody { min-width: 0; padding-top: 5px; color: rgba(224,238,238,.88); font-size: 14px; line-height: 1.7; }
.messageBody p { margin: 0 0 12px; white-space: pre-wrap; }
.messageBody p:last-child { margin-bottom: 0; }
.messageBody h1, .messageBody h2, .messageBody h3 { margin: 24px 0 10px; line-height: 1.2; letter-spacing: -.025em; }
.messageBody ul, .messageBody ol { padding-left: 22px; }
.messageBody li { margin: 5px 0; }
.messageBody pre { overflow-x: auto; margin: 16px 0; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: #090b0c; color: #d8eeee; font: 12px/1.6 "JetBrains Mono", monospace; }
.messageBody code:not(pre code) { padding: 2px 5px; border-radius: 6px; background: rgba(99,246,248,.07); color: #a6fbfc; font: 12px "JetBrains Mono", monospace; }
.failedLabel { color: var(--danger); }
.composerDock { position: relative; z-index: 5; display: grid; justify-items: center; padding: 8px 24px 14px; background: linear-gradient(0deg, rgba(14,16,17,1) 50%, rgba(14,16,17,0)); }
.composer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; width: min(100%, 880px); min-height: 58px; padding: 8px 8px 8px 18px; border: 1px solid rgba(224,238,238,.11); border-radius: 21px; background: linear-gradient(180deg, rgba(27,29,30,.96), rgba(19,21,22,.98)); box-shadow: 0 20px 46px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.035); }
.composer:focus-within { border-color: rgba(99,246,248,.24); box-shadow: 0 20px 46px rgba(0,0,0,.25), 0 0 0 3px rgba(99,246,248,.035); }
.composer textarea { align-self: center; width: 100%; max-height: 160px; padding: 9px 0; resize: none; border: 0; outline: none; background: transparent; color: var(--text); line-height: 1.45; }
.composer textarea::placeholder { color: var(--text-muted); }
.sendButton { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(99,246,248,.5); border-radius: 14px; background: var(--accent); color: #071011; cursor: pointer; transition: .2s ease; }
.sendButton:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99,246,248,.18); }
.sendButton:disabled { border-color: var(--border); background: rgba(224,238,238,.07); color: var(--text-muted); cursor: not-allowed; }
.composerCaption { margin-top: 8px; color: var(--text-muted); font-size: 9px; }
.composerError { width: min(100%, 860px); margin-bottom: 7px; padding: 9px 12px; border-radius: 11px; font-size: 11px; }

.generationWorkspace { width: min(calc(100% - 44px), 980px); margin: 0 auto; padding: 70px 0; }
.generationIntro { display: grid; justify-items: center; text-align: center; }
.generationIcon { display: grid; width: 64px; height: 64px; margin-bottom: 19px; place-items: center; border: 1px solid var(--border-bright); border-radius: 21px; background: var(--accent-soft); color: var(--accent); }
.generationGrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 38px; }
.generationCard, .emptyStudio { min-height: 170px; border: 1px solid var(--border); border-radius: 19px; background: var(--surface-soft); overflow: hidden; }
.generationMeta, .emptyStudio { padding: 17px; }
.generationImage { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #090b0c; }
.generationPreviewButton { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.generationLoading { display: grid; min-height: 230px; place-items: center; align-content: center; gap: 12px; background: radial-gradient(circle at 50% 45%, rgba(99,246,248,.08), transparent 55%), #090b0c; color: var(--text-muted); font-size: 10px; text-align: center; }
.generationLoading > span { width: 28px; height: 28px; border: 2px solid rgba(99,246,248,.15); border-top-color: var(--accent); border-radius: 50%; animation: generationSpin .8s linear infinite; }
.generationLoading button { border: 0; background: transparent; color: var(--accent); cursor: pointer; }
.generationStatus { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.generationExpiry { color: var(--text-muted) !important; font-size: 9px; }
.generationCard p { color: var(--text-soft); font-size: 12px; line-height: 1.5; }
.generationCard small { color: var(--danger); }
.generationCard a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 10px; text-decoration: none; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: rgba(224,238,238,.06); color: var(--text-muted); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.statuscomplete { background: rgba(99,246,248,.08); color: var(--accent); }
.statusfailed { background: rgba(255,123,140,.08); color: var(--danger); }
.emptyStudio { display: grid; grid-column: 1/-1; place-items: center; color: var(--text-muted); font-size: 12px; }
@keyframes generationSpin { to { transform: rotate(360deg); } }

.generationLightbox { z-index: 120; }
.generationLightboxPanel { width: min(94vw, 920px); max-height: 94vh; padding: 18px; }
.generationLightboxPanel .modalHeader { margin-bottom: 13px; }
.generationLightboxPanel > img { display: block; width: 100%; max-height: calc(94vh - 150px); object-fit: contain; border-radius: 17px; background: #050607; }
.generationLightboxPanel footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 4px 0; color: var(--text-muted); font-size: 10px; }
.generationLightboxPanel footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; }

.modalBackdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(4,5,6,.72); backdrop-filter: blur(10px); }
.modalPanel { width: min(100%, 560px); padding: 25px; border: 1px solid var(--border); border-radius: 26px; background: linear-gradient(180deg, #1a1c1d, #111314); box-shadow: 0 35px 90px rgba(0,0,0,.5); }
.passwordPanel { width: min(100%, 510px); }
.passwordPanel .authForm { margin-top: 17px; }
.profileNotice { padding: 11px 13px; border-radius: 12px; font-size: 11px; }
.modalHeader { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
.modalHeader h2 { margin: 7px 0 0; font-size: 27px; letter-spacing: -.04em; }
.iconButton { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); cursor: pointer; }
.apiEndpoint, .secretBox { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 14px; background: #0c0e0f; }
.apiEndpoint span { color: var(--text-muted); font-size: 10px; }
.apiEndpoint code, .secretBox code { overflow: hidden; color: #a8fbfc; font: 11px "JetBrains Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.apiEndpoint button, .secretBox button { display: grid; place-items: center; border: 0; background: transparent; color: var(--text-soft); cursor: pointer; }
.modalPanel > p { margin: 13px 0; font-size: 12px; }
.modalPanel > .primaryButton { width: 100%; margin-top: 12px; }
.tokenList { display: grid; gap: 7px; margin-top: 17px; }
.tokenList > div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--border); color: var(--text-soft); font-size: 11px; }
.tokenList code { color: var(--text-muted); }

.adminScreen { display: grid; grid-template-columns: 74px minmax(0,1fr); height: 100vh; height: 100svh; background: linear-gradient(180deg, #121415, #0d1011); overflow: hidden; }
.adminRail { display: grid; grid-template-rows: auto minmax(0,1fr) auto; justify-items: center; gap: 24px; padding: 17px 11px; border-right: 1px solid var(--border); background: rgba(12,14,15,.9); }
.adminRail .brandText { display: none; }
.adminRail nav { display: grid; align-content: start; gap: 8px; }
.adminRail a, .adminRail > button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--text-muted); cursor: pointer; }
.adminRail a.active, .adminRail a:hover, .adminRail > button:hover { border-color: rgba(99,246,248,.15); background: var(--accent-soft); color: var(--accent); }
.adminMain { min-width: 0; padding: 34px clamp(20px,4vw,58px) 60px; overflow-y: auto; }
.adminHeader { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 27px; }
.adminHeader h1 { margin: 8px 0 7px; font-size: clamp(32px,5vw,52px); line-height: 1; letter-spacing: -.055em; }
.adminHeader p { margin: 0; color: var(--text-soft); font-size: 13px; }
.adminIdentity { display: flex; align-items: center; gap: 10px; padding: 8px 11px 8px 8px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface-soft); }
.metricGrid { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 13px; }
.metricGrid article { display: grid; gap: 12px; padding: 17px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(180deg, rgba(224,238,238,.035), rgba(224,238,238,.015)); }
.metricGrid span { color: var(--text-muted); font-size: 10px; }
.metricGrid strong { font-size: 28px; letter-spacing: -.045em; }
.adminGrid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 13px; margin-bottom: 13px; }
.adminPanel { padding: 21px; border: 1px solid var(--border); border-radius: 21px; background: linear-gradient(180deg, rgba(24,26,27,.82), rgba(16,18,19,.82)); }
.adminPanel > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.adminPanel h2 { margin: 7px 0 0; font-size: 20px; letter-spacing: -.035em; }
.featureList, .providerList { display: grid; gap: 2px; }
.featureRow { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid rgba(224,238,238,.05); }
.featureRow > span { display: grid; gap: 4px; }
.featureRow strong, .providerList strong { font-size: 12px; }
.featureRow small, .providerList small { color: var(--text-muted); font-size: 10px; line-height: 1.35; }
.toggle { position: relative; width: 39px; height: 22px; padding: 2px; border: 1px solid var(--border); border-radius: 999px; background: rgba(224,238,238,.07); cursor: pointer; transition: .2s ease; }
.toggle span { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); transition: .2s ease; }
.toggle.on { border-color: rgba(99,246,248,.3); background: rgba(99,246,248,.16); }
.toggle.on span { transform: translateX(17px); background: var(--accent); box-shadow: 0 0 10px rgba(99,246,248,.3); }
.providerList > div { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid rgba(224,238,238,.05); }
.providerGlyph { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.providerList > div > span:nth-child(2) { display: grid; gap: 4px; }
.providerList i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); }
.providerList i.online { background: var(--accent); box-shadow: 0 0 10px rgba(99,246,248,.5); }
.createUserForm { display: grid; grid-template-columns: repeat(5,1fr) auto; gap: 8px; margin-bottom: 16px; padding: 13px; border: 1px solid var(--border); border-radius: 16px; background: rgba(224,238,238,.02); }
.createUserForm input, .createUserForm select { height: 40px; font-size: 11px; }
.createUserForm .primaryButton { min-height: 40px; }
.userTable { min-width: 680px; }
.tableHead, .tableRow { display: grid; grid-template-columns: minmax(230px,1.5fr) .65fr .65fr 90px; align-items: center; gap: 14px; padding: 11px 8px; }
.tableHead { color: var(--text-muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.tableRow { border-top: 1px solid rgba(224,238,238,.05); color: var(--text-soft); font-size: 11px; }
.tableRow > span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tableRow > span:first-child > span { display: grid; gap: 3px; min-width: 0; }
.tableRow small { overflow: hidden; color: var(--text-muted); text-overflow: ellipsis; }
.activeStatus { color: var(--accent); }
.disabledStatus { color: var(--danger); }
.tableRow > button { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 10px; }
.tableRow > button:hover:not(:disabled) { color: var(--text); }
.tableRow > button:disabled { opacity: .25; cursor: not-allowed; }
.usersPanel { overflow-x: auto; }

.developerPanel { width: min(100%, 820px); max-height: min(90vh, 850px); overflow-y: auto; }
.connectionSummary { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(190px,.6fr); gap: 10px; }
.modelPicker { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 14px; background: #0c0e0f; }
.modelPicker span { color: var(--text-muted); font-size: 10px; }
.modelPicker select { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.privacyNote { display: flex; align-items: center; gap: 9px; margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(99,246,248,.1); border-radius: 13px; background: rgba(99,246,248,.04); color: var(--text-soft); font-size: 11px; line-height: 1.45; }
.privacyNote svg { flex: 0 0 auto; color: var(--accent); }
.issueToken { width: 100%; margin-top: 10px; }
.guideTabs { display: flex; gap: 5px; margin-top: 20px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: #0d0f10; }
.guideTabs button { flex: 1; height: 35px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 11px; }
.guideTabs button.active { background: var(--accent-soft); color: var(--accent); }
.guideBody { min-height: 260px; padding: 17px 2px 3px; }
.guideBody ol { margin: 0 0 15px; padding-left: 22px; color: var(--text-soft); font-size: 11px; line-height: 1.7; }
.guideBody p { color: var(--text-soft); font-size: 11px; }
.guideBody code { color: #a8fbfc; font: 11px "JetBrains Mono", monospace; }
.codeRecipe { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #080a0b; }
.codeRecipe button { position: absolute; top: 9px; right: 9px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; background: #171a1b; color: var(--text-soft); cursor: pointer; font-size: 9px; }
.codeRecipe pre { overflow-x: auto; margin: 0; padding: 18px; color: #b8d8d9; font: 10px/1.65 "JetBrains Mono", monospace; }
.fieldRecipe { display: grid; gap: 8px; }
.fieldRecipe span { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text-muted); font-size: 10px; }
.tokenList > div { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; }
.tokenList > div > span { display: grid; gap: 3px; }
.tokenList small { color: var(--text-muted); font-size: 9px; }
.tokenList button { border: 0; background: transparent; color: var(--danger); cursor: pointer; font-size: 9px; }

.successBanner { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(99,246,248,.18); background: rgba(99,246,248,.07); color: var(--accent); }
.adminNotice { position: sticky; top: 0; z-index: 40; margin-bottom: 12px; padding: 11px 13px; border-radius: 12px; font-size: 11px; backdrop-filter: blur(18px); }
.metricGrid { grid-template-columns: repeat(4,1fr); }
.accessMatrix { display: grid; grid-template-columns: minmax(250px,300px) minmax(0,1fr); gap: 13px; margin-bottom: 13px; scroll-margin-top: 20px; }
.userDirectory { align-self: start; padding: 15px; }
.userDirectory > header { margin: 3px 4px 14px; }
.adminSearch { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; height: 40px; margin-bottom: 9px; padding: 0 11px; border: 1px solid var(--border); border-radius: 12px; background: #0d0f10; color: var(--text-muted); }
.adminSearch input { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.directoryList { display: grid; gap: 4px; max-height: 620px; overflow-y: auto; }
.directoryList > button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--text-soft); text-align: left; cursor: pointer; }
.directoryList > button:hover, .directoryList > button.active { border-color: var(--border); background: var(--surface-soft); }
.directoryList > button.active { border-color: rgba(99,246,248,.16); background: rgba(99,246,248,.07); }
.directoryList span { display: grid; min-width: 0; gap: 3px; }
.directoryList strong { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; }
.directoryList small { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.directoryList i { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.directoryList i.online { background: var(--accent); box-shadow: 0 0 8px rgba(99,246,248,.45); }
.accessEditor { min-height: 600px; }
.accessHeader p { margin: 5px 0 0; color: var(--text-muted); font-size: 10px; }
.accessHeader .primaryButton { min-height: 40px; font-size: 11px; }
.accessActions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.accessActions .secondaryButton { min-height: 40px; font-size: 10px; }
.adminResetBox { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin: -4px 0 12px; padding: 13px; border: 1px solid rgba(99,246,248,.18); border-radius: 15px; background: rgba(99,246,248,.055); }
.adminResetBox > div { display: flex; grid-column: 1/-1; align-items: center; gap: 9px; color: var(--accent); }
.adminResetBox > div > span { display: grid; gap: 3px; }
.adminResetBox strong { color: var(--text); font-size: 11px; }
.adminResetBox small { color: var(--text-muted); font-size: 9px; line-height: 1.4; }
.adminResetBox code { min-width: 0; overflow: hidden; padding: 11px; border: 1px solid var(--border); border-radius: 11px; background: #090b0c; color: #a8fbfc; font: 9px "JetBrains Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.adminResetBox .secondaryButton { min-height: 38px; font-size: 9px; }
.identityControls { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 10px; }
.identityControls > label { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; min-height: 58px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 14px; background: rgba(224,238,238,.02); color: var(--text-muted); font-size: 9px; }
.identityControls select { min-width: 0; height: 35px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.identityControls .switchCard { grid-template-columns: minmax(0,1fr) auto; }
.switchCard > span { display: grid; gap: 3px; }
.switchCard strong { color: var(--text); font-size: 11px; }
.switchCard small { color: var(--text-muted); font-size: 9px; }
.accessSection { margin-top: 10px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: rgba(5,7,8,.24); }
.accessSection > header { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: var(--accent); }
.accessSection > header > div { display: grid; gap: 3px; }
.accessSection > header strong { color: var(--text); font-size: 11px; }
.accessSection > header small { color: var(--text-muted); font-size: 9px; }
.capabilityGrid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.capabilityGrid > button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; min-height: 68px; padding: 11px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); color: var(--text-muted); text-align: left; cursor: pointer; }
.capabilityGrid > button > span { display: grid; gap: 3px; }
.capabilityGrid strong { color: var(--text-soft); font-size: 10px; }
.capabilityGrid small { color: var(--text-muted); font-size: 8px; }
.capabilityGrid > button > svg:last-child { opacity: .15; }
.capabilityGrid > button.granted { border-color: rgba(99,246,248,.2); background: rgba(99,246,248,.075); color: var(--accent); }
.capabilityGrid > button.granted strong { color: var(--text); }
.capabilityGrid > button.granted > svg:last-child { opacity: 1; }
.modelGrantGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.modelGrantGrid > button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-soft); color: var(--text-muted); text-align: left; cursor: pointer; }
.modelGrantGrid > button > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.modelGrantGrid strong { overflow: hidden; color: var(--text-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.modelGrantGrid small { overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.modelGrantGrid em { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 8px; font-style: normal; white-space: nowrap; }
.modelGrantGrid > button.granted { border-color: rgba(99,246,248,.17); background: rgba(99,246,248,.055); }
.modelGrantGrid > button.granted em { color: var(--accent); }
.modelGrantGrid > button:disabled { cursor: default; opacity: .75; }
.emptyAccess { display: grid; min-height: 500px; place-items: center; color: var(--text-muted); font-size: 11px; }
.createPanel { margin-bottom: 13px; }
.createUserForm { grid-template-columns: repeat(5,minmax(100px,1fr)) auto auto auto; }
.miniCheck { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 12px; color: var(--text-soft); font-size: 9px; }
.miniCheck input { width: auto; height: auto; accent-color: var(--accent); }
.adminLowerGrid { grid-template-columns: 1fr 1fr; align-items: start; scroll-margin-top: 20px; }
.providerPolicyList { display: grid; gap: 3px; }
.providerPolicyList > div { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(224,238,238,.05); }
.providerPolicyList > div > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.providerPolicyList strong { font-size: 10px; }
.providerPolicyList small { overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.providerPolicyList button { display: inline-flex; align-items: center; gap: 5px; min-height: 31px; padding: 0 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text-muted); cursor: pointer; font-size: 8px; }
.providerPolicyList button.public { border-color: rgba(99,246,248,.18); background: rgba(99,246,248,.07); color: var(--accent); }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 240px minmax(0,1fr); }
  .suggestions { grid-template-columns: 1fr; }
  .suggestions button { min-height: 60px; }
  .metricGrid { grid-template-columns: repeat(3,1fr); }
  .adminGrid { grid-template-columns: 1fr; }
  .accessMatrix { grid-template-columns: 240px minmax(0,1fr); }
  .capabilityGrid { grid-template-columns: 1fr; }
  .modelGrantGrid { grid-template-columns: 1fr; }
  .createUserForm { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  body { overflow: hidden; }
  .workspace { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); transform: translateX(-104%); transition: transform .25s cubic-bezier(.22,1,.36,1); box-shadow: 28px 0 60px rgba(0,0,0,.34); }
  .sidebarOpen { transform: none; }
  .sidebarScrim { position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.56); }
  .mobileClose, .mobileMenu { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); cursor: pointer; }
  .chatHeader { grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; padding: 0 12px; }
  .modeTabs { min-width: 0; overflow-x: auto; }
  .modeTabs button { padding: 0 9px; white-space: nowrap; }
  .modeTabs button { font-size: 0; }
  .modeTabs button svg { width: 17px; height: 17px; }
  .chatHeader select { width: 126px; }
  .welcome { padding-top: 7vh; }
  .welcome h1, .generationIntro h1 { font-size: 40px; }
  .messageList { width: calc(100% - 28px); }
  .message { grid-template-columns: 30px minmax(0,1fr); gap: 11px; }
  .composerDock { padding: 7px 12px 11px; }
  .composerCaption { display: none; }
  .generationGrid { grid-template-columns: 1fr; }
  .adminScreen { grid-template-columns: 1fr; overflow-y: auto; }
  .adminRail { position: sticky; top: 0; z-index: 30; display: flex; height: 62px; align-items: center; justify-content: space-between; padding: 9px 13px; border-right: 0; border-bottom: 1px solid var(--border); }
  .adminRail nav { display: none; }
  .adminMain { overflow: visible; padding: 24px 14px 50px; }
  .adminHeader { align-items: flex-start; }
  .adminIdentity { display: none; }
  .metricGrid { grid-template-columns: repeat(2,1fr); }
  .accessMatrix { grid-template-columns: 1fr; }
  .directoryList { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 240px; }
  .identityControls { grid-template-columns: 1fr; }
  .connectionSummary { grid-template-columns: 1fr; }
  .createUserForm { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .authPanel { padding: 23px; border-radius: 24px; }
  .authStage { gap: 22px; }
  .chatHeader select { width: 104px; font-size: 9px; }
  .welcome { width: calc(100% - 28px); }
  .welcomeMark { width: 64px; height: 64px; border-radius: 21px; }
  .suggestions { margin-top: 27px; }
  .messageBody { font-size: 13px; }
  .composer { min-height: 54px; border-radius: 18px; }
  .sendButton { width: 39px; height: 39px; }
  .metricGrid { grid-template-columns: 1fr 1fr; }
  .metricGrid article { padding: 14px; }
  .adminPanel { padding: 17px; }
  .directoryList { grid-template-columns: 1fr; }
  .accessHeader { align-items: flex-start !important; }
  .accessActions { display: grid; }
  .accessHeader .primaryButton, .accessHeader .secondaryButton { padding: 0 11px; font-size: 0; }
  .accessHeader .primaryButton svg, .accessHeader .secondaryButton svg { margin: 0; }
  .adminResetBox { grid-template-columns: 1fr; }
  .adminResetBox > div { grid-column: auto; }
  .fieldRecipe span { grid-template-columns: 1fr; }
  .guideTabs button { font-size: 9px; }
}
