:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #252823;
  background: #f5f6f3;
  font-size: 14px;
  --accent: #e96a3e;
  --accent-dark: #d7572c;
  --muted: #8b8e85;
  --border: #e7e9e2;
  --green: #38946a;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #f2b69f; outline-offset: 3px; }
input, textarea, select { color: #30342c; background: #fff; border: 1px solid #dfe3d9; border-radius: 8px; padding: 11px 13px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #fbe9df; }
input::placeholder, textarea::placeholder { color: #a1a59b; }
input[type=checkbox] { width: auto; }
textarea { resize: vertical; min-height: 70px; line-height: 1.7; }
select { padding-right: 30px; }
label { display: block; font-size: 13px; font-weight: 550; margin: 0 0 8px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.4px; }
h3 { font-size: 15px; }
code { font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace; font-size: 12px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; padding: 10px 16px; min-height: 42px; border-radius: 8px; font-size: 13px; font-weight: 550; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.button:hover:enabled { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover:enabled { background: var(--accent-dark); }
.button-dark { background: #292e25; color: #fff; }
.button-dark:hover:enabled { background: #424b39; }
.button-outline { background: #fff; border-color: var(--border); color: #51574b; }
.button-outline:hover:enabled { background: #f8f9f6; border-color: #cdd4c5; }
.button-full { width: 100%; }
.button-small { min-height: 35px; padding: 7px 12px; font-size: 12px; }
.button-small .icon { width: 16px; height: 16px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; color: #8c9185; border: none; border-radius: 7px; background: transparent; }
.icon-button:hover { background: #f1f3ec; color: #444d3b; }
.text-button { background: transparent; border: none; padding: 0; color: #747c68; font-size: 12px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.text-button:hover { color: var(--accent-dark); }
.text-button .icon { width: 15px; height: 15px; }
.danger { color: #c76254; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.8px; color: #949b8a; }
.tiny-dot { width: 6px; height: 6px; background: #adb5a0; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.tiny-dot.green { background: var(--green); box-shadow: 0 0 0 3px #eaf5eb; }
.tiny-dot.orange { background: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; padding: 4px 9px; border-radius: 5px; white-space: nowrap; font-weight: 500; }
.pill .icon { width: 13px; height: 13px; }
.pill-green { color: #498165; background: #edf6ee; }
.pill-orange { color: #c37a41; background: #fff3e7; }
.pill-neutral { color: #7a8370; background: #f2f4ed; border: 1px solid #eaede4; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 23px; font-weight: 700; letter-spacing: -.9px; line-height: 1.25; }
.brand-mark { width: 39px; height: 39px; background: #2d3228; color: #fff; font-size: 37px; font-weight: 700; line-height: 31px; padding-left: 7px; border-radius: 11px; letter-spacing: -4px; flex: 0 0 auto; }
.brand-mark span { color: var(--accent); }
.brand-caption { font-size: 8px; font-weight: 600; letter-spacing: 2px; color: #9ba08f; display: block; margin-top: 5px; }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: #41483b; }
.brand-light .brand-caption { color: #999f91; }
.orange-dot { color: var(--accent); }
.mobile-brand { display: none; }

.login-layout { display: grid; grid-template-columns: 44% 56%; min-height: 100svh; }
.login-art { position: relative; background: #242920; color: #fff; padding: 44px 52px; overflow: hidden; min-height: 730px; }
.login-art-copy { margin-top: 104px; position: relative; z-index: 1; }
.login-art-copy .eyebrow { color: #a3ac97; font-size: 10px; }
.login-art-copy h1 { font-size: clamp(36px, 3.8vw, 56px); line-height: 1.3; letter-spacing: -2px; margin: 22px 0; font-weight: 600; }
.login-art-copy p { color: #adb5a3; font-size: 14px; line-height: 1.95; }
.art-composition { position: relative; height: 260px; width: 360px; margin: 35px auto 25px; }
.art-orbit { position: absolute; width: 380px; height: 380px; border: 1px solid #414a36; border-radius: 50%; left: -15px; top: -30px; transform: rotate(-15deg) scaleY(.55); }
.art-orbit-small { width: 310px; height: 310px; left: 20px; top: 2px; border-color: #36402e; }
.art-tile { position: absolute; padding: 20px; width: 155px; height: 163px; border-radius: 14px; background: #f0f3e7; color: #3e4936; box-shadow: 0 22px 55px #12180d66; }
.art-tile > .icon { width: 26px; height: 26px; }
.art-tile > span { display: block; font-size: 14px; font-weight: 600; margin-top: 11px; }
.art-tile-chat { top: 22px; left: 20px; transform: rotate(-9deg); }
.art-tile-chat i { display: block; height: 5px; background: #c6d0b7; margin-top: 11px; border-radius: 5px; }
.art-tile-chat i:nth-last-child(2) { width: 84%; }
.art-tile-chat i:last-child { width: 55%; }
.art-tile-image { top: 59px; left: 167px; background: #e98058; color: #fff5e7; transform: rotate(11deg); }
.art-image { height: 50px; border-radius: 5px; margin-top: 10px; background: linear-gradient(140deg, transparent 45%, #d7654380 46%, #f2ad7766 67%), linear-gradient(50deg, #ffd2a699 40%, transparent 41%), #f9b78466; }
.art-api { position: absolute; top: 221px; left: 48px; display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 11px 16px; background: #3a4432; color: #c2ccb6; font-size: 11px; box-shadow: 0 10px 20px #14200b33; }
.art-api > span:last-child { color: #97a988; padding-left: 28px; }
.art-api-dot { width: 6px; height: 6px; border-radius: 50%; background: #aac490; }
.login-art-footer { position: absolute; bottom: 30px; left: 52px; right: 52px; display: flex; justify-content: space-between; font-size: 8px; letter-spacing: 1.3px; color: #79836e; }
.login-main { display: flex; align-items: center; justify-content: center; padding: 48px; background: #fafbf8; }
.login-card { width: 100%; max-width: 365px; }
.login-kicker { color: #a0a593; font-size: 12px; letter-spacing: 2px; }
.login-card h2 { font-size: 33px; font-weight: 650; margin: 11px 0 12px; letter-spacing: -1px; }
.login-card > p { font-size: 13px; }
.login-card form { margin-top: 34px; }
.input-with-button { position: relative; }
.input-with-button input { padding-right: 43px; height: 46px; }
.input-with-button .icon-button { position: absolute; right: 6px; top: 6px; }
.login-submit, #login-submit { margin-top: 19px; height: 45px; justify-content: space-between; padding: 10px 17px; }
.separator { display: flex; align-items: center; gap: 12px; color: #acb2a1; font-size: 11px; margin: 22px 0; }
.separator::before, .separator::after { content: ""; height: 1px; background: #e7ebe1; flex: 1; }
.login-note { display: flex; align-items: flex-start; gap: 9px; font-size: 11px !important; color: #a1a793; line-height: 1.8; margin-top: 22px; }
.login-note .icon { width: 14px; height: 14px; margin-top: 3px; }
.login-card-footer { display: flex; align-items: center; gap: 6px; border-top: 1px solid #e6eade; margin-top: 47px; padding-top: 17px; font-size: 10px; color: #a4aa98; }
.login-card-footer > span:last-child { margin-left: auto; }
.form-message { font-size: 12px; line-height: 1.7; padding: 10px 12px; margin-top: 13px; background: #edf5ec; border-radius: 6px; color: #537d4c; overflow-wrap: anywhere; }
.form-message.error { background: #fff0eb; color: #b9654e; }

.sidebar { width: 230px; position: fixed; inset: 0 auto 0 0; background: #fdfefa; border-right: 1px solid #e5e9de; display: flex; flex-direction: column; padding: 30px 18px 21px; z-index: 10; }
.sidebar .brand { margin: 4px 10px 49px; font-size: 22px; }
.sidebar-label { color: #b0b6a5; font-size: 9px; letter-spacing: 2px; margin: 0 15px 12px; }
.navigation { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; background: transparent; border: none; color: #818977; width: 100%; text-align: left; padding: 12px 14px; border-radius: 7px; font-size: 13px; }
.nav-item .icon { color: #9ba48c; width: 18px; height: 18px; }
.nav-item:hover { background: #f4f6ef; color: #48563c; }
.nav-item.active { color: #be653d; background: #fcf0e7; font-weight: 600; }
.nav-item.active .icon { color: #d4855b; }
.nav-active-dot { display: none; width: 5px; height: 5px; border-radius: 50%; background: #d58359; margin-left: auto; }
.active .nav-active-dot { display: block; }
.nav-count { color: #9eaa8e; background: #eff2e8; font-size: 9px; margin-left: auto; padding: 1px 6px; border-radius: 4px; }
.nav-divider { height: 1px; background: #edf0e6; margin: 15px 14px 12px; }
.sidebar-bottom { margin-top: auto; padding: 30px 11px 0; }
.sidebar-service { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.sidebar-service strong { font-weight: 500; color: #7a886b; }
.sidebar-service > span:last-child { margin-left: auto; color: #abb89a; font-size: 9px; }
.sidebar-bottom p { font-size: 10px; color: #a9b19d; margin: 9px 0 23px; }
.sidebar-version { display: flex; justify-content: space-between; color: #b1b9a5; font-size: 8px; }
.sidebar-overlay { position: fixed; inset: 0; background: #27331d55; z-index: 9; border: none; }
.console-content { margin-left: 230px; min-height: 100svh; display: flex; flex-direction: column; }
.topbar { height: 76px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e4e8dd; background: #fcfdf9; }
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #adb6a0; }
.breadcrumb strong { font-weight: 500; color: #646f57; }
.breadcrumb-slash { color: #c9d0c0; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.avatar { width: 31px; height: 31px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: #e8eddf; color: #84916e; border: 3px solid #f4f6ef; border-radius: 50%; }
.logout-button { width: 26px; }
.logout-button .icon { width: 16px; height: 16px; }
.mobile-menu { display: none; }
.workspace { width: 100%; max-width: 1450px; margin: 0 auto; padding: 30px 34px 26px; flex: 1; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; gap: 20px; }
.page-heading h1 { font-size: 27px; font-weight: 650; letter-spacing: -.8px; margin-top: 3px; margin-bottom: 5px; }
.page-heading p { font-size: 12px; color: #969e8b; }
.update-time { color: #aab29c; font-size: 10px; align-self: flex-end; margin-bottom: 5px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 23px; }
.stat-card, .card { background: #fff; border: 1px solid #e3e8db; border-radius: 11px; box-shadow: 0 2px 3px #3d52290a; }
.stat-card { padding: 18px 21px; min-height: 139px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #929c83; font-size: 11px; }
.stat-icon { display: flex; justify-content: center; align-items: center; width: 29px; height: 29px; border-radius: 7px; }
.stat-icon .icon { width: 16px; height: 16px; }
.mint { background: #eef5e9; color: #7f9b67; }
.peach { background: #fff1e7; color: #cb9265; }
.lilac { background: #f3eff7; color: #a395b2; }
.sky { background: #ecf3f6; color: #8ba9b4; }
.stat-number { display: flex; align-items: center; gap: 9px; font-size: 31px; line-height: 1.35; font-weight: 600; margin-top: 12px; letter-spacing: -1px; color: #424e35; }
.stat-number.text-value { font-size: 24px; }
.stat-unit { font-size: 11px; color: #a6b395; align-self: flex-end; padding-bottom: 4px; font-weight: 400; letter-spacing: 0; }
.stat-indicator { width: 6px; height: 6px; background: #84a76b; border-radius: 50%; box-shadow: 0 0 0 4px #f1f6eb; }
.stat-card > p { color: #adb69e; font-size: 10px; margin-top: 5px; }
.card { padding: 22px 23px; min-width: 0; }
.card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 21px; }
.card-title h2 { font-size: 14px; color: #59674c; letter-spacing: -.2px; }
.card-title p { margin-top: 4px; font-size: 10px; color: #a2ac95; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr); gap: 20px; }
.connection-card { background: linear-gradient(130deg, #fff 55%, #f5f8ee); }
.connection-card h2 { color: #4c5d3e; font-size: 21px; font-weight: 600; margin: 0 0 7px; }
.connection-card > p { font-size: 11px; color: #a1af91; }
.small-label { font-size: 8px; color: #a6b496; letter-spacing: 1.5px; font-weight: 600; margin-top: 23px; margin-bottom: 8px; }
.code-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 43px; background: #f7f9f2; border: 1px solid #e7eddd; border-radius: 7px; padding: 5px 7px 5px 13px; }
.code-copy code { color: #849371; font-size: 11px; }
.code-copy .icon-button { width: 28px; height: 28px; }
.code-copy .icon { width: 14px; height: 14px; }
.card-actions { display: flex; gap: 10px; margin-top: 21px; }
.card-actions .button { font-size: 11px; min-height: 36px; padding: 8px 12px; }
.card-actions .icon { width: 14px; height: 14px; }
.account-card .card-title { margin-bottom: 8px; }
.account-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: #949f86; font-size: 11px; }
.account-line strong { font-size: 10px; font-weight: 500; color: #7c8d69; text-align: right; overflow-wrap: anywhere; }
.field-state { font-size: 10px; color: #b5bba9; }
.field-state.configured { color: #76a265; }
.account-card-note { color: #a1af93; background: #f8faf4; border-radius: 6px; padding: 10px 12px; margin: 6px 0 13px; font-size: 10px; }
.account-card .button { font-size: 11px; min-height: 33px; padding: 6px 11px; justify-content: space-between; }
.account-card .button .icon { width: 14px; height: 14px; }
.model-preview-card .card-title { margin-bottom: 10px; }
.popular-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f0f3e9; }
.popular-row:last-child { border: none; }
.model-avatar { width: 30px; height: 30px; background: #f0f4e9; color: #879b71; border: 1px solid #e5ecd9; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: 0 0 auto; }
.model-avatar.orange { background: #fff1e8; color: #c58f64; border-color: #f9e4d3; }
.model-avatar.purple { background: #f2eef7; color: #a096b4; border-color: #e7e0ef; }
.model-avatar.blue { background: #edf4f5; color: #8cabb2; border-color: #dfebed; }
.model-name-group { min-width: 0; }
.model-name-group strong { display: block; font-size: 11px; font-weight: 550; color: #657953; overflow-wrap: anywhere; }
.model-name-group > span { display: block; font-size: 9px; color: #adbba0; overflow-wrap: anywhere; }
.popular-row > .pill { margin-left: auto; font-size: 9px; padding: 2px 7px; }
.popular-row > .icon-button .icon { width: 14px; height: 14px; }
.credit-line { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #9da890; margin: 18px 0; }
.credit-line strong { font-size: 13px; font-weight: 550; color: #80966a; text-align: right; }
.credit-line:last-of-type strong { font-size: 10px; }
.credit-divider { height: 1px; background: #eef2e6; margin: 21px 0; }
.hint-box { padding: 12px 13px; border: 1px solid #ecf0e2; border-radius: 7px; background: #fafcf6; font-size: 10px; color: #a2b190; line-height: 1.85; }
.hint-box strong { font-weight: 550; font-size: 11px; color: #85996e; }
.hint-box p { margin-top: 5px; }
.credit-card .text-button { margin-top: 16px; font-size: 10px; }
.workspace-note { display: flex; align-items: center; gap: 9px; margin-top: 21px; color: #a6b299; font-size: 9px; }
.workspace-note > span:last-child { margin-left: auto; }
.console-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 34px 20px; font-size: 9px; color: #b1bda3; }
.footer-dot { margin: 0 8px; }

.model-library { padding: 0; overflow: hidden; }
.model-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; }
.filter-tabs { display: flex; background: #f4f7ee; padding: 4px; gap: 4px; border-radius: 7px; }
.filter-tab { background: transparent; color: #98a889; border: none; border-radius: 5px; padding: 6px 12px; font-size: 11px; white-space: nowrap; }
.filter-tab span { font-size: 9px; margin-left: 3px; opacity: .8; }
.filter-tab.active { background: #fff; color: #c08d66; box-shadow: 0 1px 3px #4c642115; }
.search-input { width: 260px; position: relative; }
.search-input > .icon { position: absolute; top: 11px; left: 12px; width: 15px; height: 15px; color: #acb999; }
.search-input input { padding-left: 34px; font-size: 11px; background: #fcfdf9; }
.table-scroll { width: 100%; overflow-x: auto; }
.model-table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
.model-table th { color: #a4b191; background: #fafcf6; font-size: 10px; font-weight: 500; padding: 13px 20px; border-top: 1px solid #eef2e6; border-bottom: 1px solid #eef2e6; white-space: nowrap; }
.model-table td { padding: 14px 20px; border-bottom: 1px solid #f0f4e8; color: #8c9f79; vertical-align: middle; }
.model-table td:first-child { min-width: 210px; }
.model-table td:nth-child(2) { white-space: nowrap; }
.model-table td:nth-child(2) code { font-size: 10px; }
.model-table tr:hover td { background: #fcfdf9; }
.table-model-name { display: flex; gap: 11px; align-items: center; }
.align-right { text-align: right; }
.table-id { display: flex; align-items: center; gap: 6px; }
.table-id .icon-button { width: 24px; height: 24px; }
.table-id .icon { width: 12px; height: 12px; }
.table-actions { font-size: 10px; padding: 5px 9px; min-height: 28px; }
.capability-tags { display: flex; gap: 4px; flex-wrap: wrap; font-size: 9px; min-width: 75px; }
.capability-tags > span { background: #f6f9f0; color: #a0b28b; border-radius: 4px; padding: 2px 5px; white-space: nowrap; }
.table-footer { display: flex; justify-content: space-between; gap: 16px; color: #b0bfa0; font-size: 9px; padding: 15px 22px; }
.empty-state { text-align: center; color: #a9b79a; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.empty-state > .icon { width: 32px; height: 32px; color: #c6d3b7; margin-bottom: 17px; }
.empty-state h2, .empty-state h3 { color: #92a57c; font-size: 17px; font-weight: 500; }
.empty-state p { font-size: 11px; margin-top: 8px; color: #b1bfa1; }
.empty-state.compact { padding: 60px 20px; }

.playground-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; align-items: start; gap: 20px; }
.chat-card { padding: 0; overflow: hidden; }
.chat-card-header { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid #edf2e3; min-height: 60px; }
.chat-card-header strong { font-size: 12px; font-weight: 500; color: #809767; }
.chat-card-header .pill { margin-left: auto; font-size: 9px; }
.chat-thread { min-height: 390px; height: min(54vh, 560px); overflow-y: auto; padding: 23px; scroll-behavior: smooth; }
.chat-empty { height: 100%; min-height: 290px; }
.empty-brand { font-size: 58px; color: #d2ddc2; line-height: 1.2; font-weight: 600; letter-spacing: -5px; margin-bottom: 12px; }
.empty-brand span { color: #ecc4a5; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 24px; }
.suggestions button { color: #a1b289; border: 1px solid #eaf0df; background: #fbfdf8; border-radius: 7px; font-size: 10px; padding: 7px 10px; }
.suggestions button:hover { background: #f5f9ed; }
.chat-composer { padding: 16px 20px; border-top: 1px solid #edf2e3; }
.chat-composer textarea { border: none; background: #fafcf6; font-size: 12px; min-height: 73px; max-height: 180px; resize: vertical; }
.chat-composer textarea:focus { box-shadow: none; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.composer-footer > span { font-size: 10px; color: #b3c0a0; }
.composer-footer > div { display: flex; gap: 8px; }
.stop-square { width: 8px; height: 8px; border-radius: 1px; background: #aa947c; }
.message-row { display: flex; flex-direction: column; margin-bottom: 23px; align-items: flex-start; }
.message-row.user { align-items: flex-end; }
.message-author { color: #a7b997; font-size: 9px; font-weight: 550; letter-spacing: .5px; margin-bottom: 6px; }
.message-content { color: #657c50; background: #f7faf1; border: 1px solid #edf2e3; border-radius: 3px 11px 11px; padding: 12px 14px; line-height: 1.9; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.user .message-content { background: #fcf0e6; border-color: #f7e8d7; color: #ae8b67; border-radius: 11px 3px 11px 11px; }
.message-content:empty::before { content: "正在思考…"; color: #bccaa9; }
.message-row.failed .message-content { border-color: #f0ddcb; }
.message-reasoning { max-width: 100%; border-left: 2px solid #e0e9d3; padding: 4px 12px; margin-bottom: 9px; font-size: 11px; color: #a8b897; }
.message-reasoning summary { cursor: pointer; font-size: 10px; }
.message-reasoning p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.message-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-width: 100%; }
.message-sources a { font-size: 9px; border: 1px solid #e6eedb; border-radius: 4px; color: #90a878; padding: 3px 7px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-error { font-size: 10px; color: #c48764; padding-top: 7px; }
.options-card label { font-size: 11px; color: #95a584; }
.options-card select { font-size: 11px; }
.option-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; }
.option-line label { margin: 0; color: #839c6d; font-size: 12px; }
.option-line p { font-size: 9px; color: #b1c09e; margin-top: 4px; }
.switch { appearance: none; width: 31px !important; height: 18px; border: none; border-radius: 20px; background: #e2e9d7; padding: 0; flex: 0 0 auto; position: relative; cursor: pointer; }
.switch::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: #fff; position: absolute; top: 3px; left: 3px; transition: transform .15s; }
.switch:checked { background: #dea27b; }
.switch:checked::after { transform: translateX(13px); }
.switch:focus { box-shadow: 0 0 0 3px #f5e6d4; }
.switch:disabled { cursor: not-allowed; opacity: .45; }
.options-card .hint-box { margin-top: 29px; }
.options-note { margin-top: 18px; font-size: 10px; color: #b1c09d; }

.image-studio-grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 20px; align-items: start; }
.image-options label { font-size: 11px; color: #98a787; margin-top: 18px; }
.image-options input, .image-options select, .image-options textarea { font-size: 11px; }
.image-options > .card-title + label { margin-top: 0; }
.image-options > p.muted { font-size: 10px; margin-top: 15px; line-height: 1.9; color: #afbf9d; }
.image-options .button-full { margin-top: 20px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.image-gallery-card { min-height: 600px; }
.image-empty { min-height: 440px; }
.empty-image-shape { width: 82px; height: 94px; border-radius: 14px; background: linear-gradient(145deg, #f4f8ed, #ecf1e3); border: 1px solid #e6eeda; display: flex; align-items: center; justify-content: center; transform: rotate(-7deg); margin-bottom: 29px; box-shadow: 10px 9px 0 -2px #f4f7ed; }
.empty-image-shape .icon { width: 35px; height: 35px; color: #b6c6a2; }
.image-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.generated-image { border: 1px solid #e6eddc; border-radius: 8px; overflow: hidden; margin: 0; background: #fbfdf7; }
.generated-image img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: repeating-conic-gradient(#f8faf4 0% 25%, #f0f4e8 0% 50%) 50% / 16px 16px; }
.generated-image figcaption { padding: 11px 12px; }
.generated-image figcaption > p { font-size: 10px; color: #8fa778; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.generated-image figcaption > div { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 7px; }
.generated-image figcaption > div span { font-size: 9px; color: #b1c29e; }
.generated-image a { font-size: 10px; color: #c9956d; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(285px, 1fr); gap: 20px; align-items: start; }
.account-settings { padding: 25px; }
.account-settings > input { font-size: 12px; }
.label-with-state { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-top: 21px; margin-bottom: 8px; }
.label-with-state label { margin: 0; font-size: 11px; color: #8a9e75; }
.label-with-state label .muted { font-size: 9px; margin-left: 5px; color: #bec9b0; }
.account-help { font-size: 10px; margin-top: 22px; color: #acbd97; line-height: 1.9; }
.settings-actions { display: flex; align-items: center; gap: 10px; margin-top: 25px; flex-wrap: wrap; }
.settings-actions .button { font-size: 11px; min-height: 36px; padding: 8px 12px; }
.settings-actions .button .icon { width: 13px; height: 13px; }
.settings-actions .text-button { margin-left: auto; font-size: 10px; }
.settings-side { display: flex; flex-direction: column; gap: 20px; }
.settings-side .card > p { font-size: 10px; color: #abbd98; }
.settings-side .card-title { margin-bottom: 13px; }
.settings-side .code-copy { padding-left: 10px; }
.settings-side .code-copy code { font-size: 10px; }
.private-key-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e7eedc; background: #fafcf6; border-radius: 7px; padding: 8px 10px; margin-bottom: 13px; color: #b3c39b; }
.private-key-line > span { font-size: 10px; letter-spacing: 1px; overflow: hidden; }
.private-key-line .button { padding: 4px 8px; min-height: 27px; font-size: 9px; }
.private-key-line .icon { width: 12px; height: 12px; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #34462c; border: 1px solid #566c45; color: #e7eedf; border-radius: 8px; padding: 11px 19px; font-size: 12px; box-shadow: 0 5px 20px #23351a22; z-index: 40; max-width: min(90vw, 500px); text-align: center; }

.pool-heading-actions, .pool-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pool-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: -3px 0 20px; font-size: 12px; color: #82936f; flex-wrap: wrap; }
.pool-policy { margin-bottom: 20px; }
.pool-policy .card-title { margin-bottom: 17px; }
.pool-policy-fields { display: grid; grid-template-columns: minmax(185px, 1.3fr) minmax(170px, 1.2fr) minmax(140px, .8fr) 90px; gap: 18px; align-items: start; }
.pool-policy-fields label { font-size: 11px; color: #879c74; }
.pool-policy-fields input, .pool-policy-fields select { font-size: 12px; }
.pool-switch-field { display: flex; flex-direction: column; align-items: center; }
.pool-switch-field .switch { margin-top: 10px; }
.pool-policy-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 19px; }
.pool-policy-footer p { max-width: 650px; font-size: 11px; }
.pool-library { padding: 0; overflow: hidden; }
.pool-library .model-toolbar p { margin-top: 4px; font-size: 10px; }
.pool-toolbar-actions .search-input { width: 200px; }
.pool-table { min-width: 870px; }
.pool-table td:first-child { min-width: 170px; max-width: 240px; }
.pool-table td:nth-child(2) { min-width: 110px; white-space: normal; }
.pool-table td:nth-child(3) { min-width: 130px; }
.pool-table td:nth-child(4) { min-width: 160px; }
.pool-table td:last-child { width: 230px; }
.pool-name-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; }
.pool-name-title strong { color: #647b51; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.pool-name .small { font-size: 10px; }
.pool-name-title .pill { font-size: 9px; padding: 2px 5px; }
.pool-balance { font-size: 11px; margin-top: 8px; color: #798e64; }
.pool-session-mode { color: #7e9569; font-size: 11px; font-weight: 550; }
.pool-table .small { font-size: 10px; margin-top: 4px; }
.pool-dates p { font-size: 10px; }
.pool-row-actions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; max-width: 230px; margin-left: auto; }
.pool-row-actions .button { font-size: 10px; min-height: 27px; padding: 4px 7px; }
.pool-message { margin: 0 22px 16px; }
.pool-import-help { margin-top: 18px; font-size: 11px; color: #8c9f78; }
.pool-import-help summary { cursor: pointer; }
.pool-import-help p { margin-top: 8px; }
.pool-import-help pre { border: 1px solid #e7eedc; background: #f9fcf3; padding: 13px; border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pool-import-help code { font-size: 10px; }
.token-help { margin-bottom: 20px; padding: 18px 22px; color: #718463; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; }
.token-help summary { cursor: pointer; color: #5d724c; font-weight: 600; font-size: 13px; }
.token-help-content { margin-top: 14px; }
.token-help ol, .token-help ul { padding-left: 20px; margin: 10px 0; }
.token-help li + li { margin-top: 9px; }
.token-help a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.token-help code { font-size: 11px; overflow-wrap: anywhere; }
.token-help-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin-top: 10px; font-size: 11px; text-align: left; }
.token-help-table th, .token-help-table td { padding: 8px 10px; border: 1px solid #e7eedc; vertical-align: top; }
.token-help-table th { background: #f9fcf3; font-weight: 600; }
.token-help-table th:first-child { width: 60%; }
.token-help-fallback { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e7eedc; }
.token-help-fallback summary { font-size: 12px; }
.token-help-fallback p { margin-top: 10px; }
.token-help-note { margin-top: 14px; font-size: 11px; color: #82936f; }
.token-help-inline { padding: 13px 14px; border: 1px solid #e7eedc; border-radius: 7px; background: #f9fcf3; font-size: 11px; }
.token-help-inline summary { font-size: 11px; }
.security-settings { margin-top: 20px; }
.security-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; }
.security-fields .label-with-state { margin-top: 0; }
.security-fields label { font-size: 11px; color: #829a6e; }
.security-fields input { font-size: 12px; }
.security-fields .text-button { font-size: 10px; }
.security-confirm-label { margin-top: 17px; font-size: 11px; color: #879d76; }
.security-copy { margin-top: 10px; }
.security-hint { margin-top: 23px; font-size: 11px; }
.account-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100svh - 40px); border: 1px solid #e1e8d5; border-radius: 12px; padding: 25px; background: #fff; color: #718463; box-shadow: 0 20px 80px #293b2330; overflow-y: auto; }
.account-dialog::backdrop { background: #26331e55; }
.account-dialog h2 { color: #5d724c; }
.account-dialog .card-title { margin-bottom: 20px; }
.account-dialog label, .account-dialog .small { font-size: 11px; }
.account-dialog input { font-size: 12px; }
.account-dialog .label-with-state { margin-top: 17px; }
.pool-editor-switches { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0 14px; }
.pool-editor-switches label { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; }
.pool-editor-switches input { accent-color: var(--accent); }

@media (min-width: 1600px) {
  .workspace { padding-top: 39px; }
  .stats-grid { gap: 24px; }
  .stat-card { min-height: 153px; padding: 22px 24px; }
  .overview-grid { gap: 24px; }
  .card { padding: 25px 27px; }
  .chat-card, .model-library { padding: 0; }
}
@media (max-width: 1100px) {
  .sidebar { width: 205px; padding-left: 12px; padding-right: 12px; }
  .console-content { margin-left: 205px; }
  .workspace { padding: 25px; }
  .topbar { padding: 0 25px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 16px; }
  .overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(235px, 1fr); gap: 15px; }
  .card { padding: 20px; }
  .chat-card, .model-library { padding: 0; }
  .playground-grid { grid-template-columns: minmax(0, 1fr) 220px; gap: 15px; }
  .image-studio-grid { grid-template-columns: 275px minmax(0, 1fr); gap: 15px; }
  .settings-grid { gap: 15px; grid-template-columns: minmax(0, 1.1fr) minmax(245px, 1fr); }
  .pool-policy-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pool-switch-field { align-items: flex-start; }
  .pool-library .model-toolbar { flex-wrap: wrap; }
  .login-art { padding: 35px; }
  .login-art-copy { margin-top: 100px; }
  .login-art-footer { left: 35px; right: 35px; }
  .art-composition { transform: scale(.85); transform-origin: left top; }
}
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .connection-card { grid-column: auto; }
  .account-card { grid-row: 3; }
  .credit-card { grid-row: 4; }
  .account-card-note { margin-top: 10px; }
  .playground-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .options-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .options-card > .card-title, .options-card > .hint-box, .options-note { grid-column: 1 / -1; }
  .options-card > label { grid-column: 1; }
  .options-card > select { grid-column: 2; grid-row: 2; }
  .options-card .option-line { margin-top: 18px; }
  .options-card .hint-box { margin-top: 20px; }
  .image-studio-grid { grid-template-columns: minmax(0, 1fr); }
  .image-gallery-card { min-height: 380px; }
  .image-empty { min-height: 270px; }
  .settings-side { display: grid; grid-template-columns: minmax(0, 1fr); }
  .model-toolbar { flex-wrap: wrap; }
  .search-input { width: 100%; }
  .table-footer { flex-direction: column; gap: 5px; }
  .workspace-note > span:last-child { display: none; }
  .login-art-copy h1 { font-size: 36px; }
  .art-composition { transform: scale(.68); }
  .login-art-footer > span:last-child { display: none; }
}
@media (max-width: 680px) {
  .sidebar { transform: translateX(-100%); width: 230px; transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .console-content { margin-left: 0; }
  .mobile-menu { display: inline-flex; margin-left: -7px; }
  .topbar { height: 64px; padding: 0 19px; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb > span:first-of-type { display: none; }
  .breadcrumb-slash { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button > span { display: none; }
  .topbar-actions .button { min-height: 30px; padding: 6px 9px; }
  .topbar-actions .pill { font-size: 9px; padding: 4px 6px; }
  .avatar { display: none; }
  .workspace { padding: 23px 17px; }
  .page-heading { margin-bottom: 20px; gap: 10px; }
  .page-heading h1 { font-size: 24px; margin-top: 5px; }
  .page-heading p { font-size: 11px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.5px; }
  .update-time { display: none; }
  .stat-card { padding: 16px; min-height: 128px; }
  .stat-number { font-size: 28px; }
  .stat-card > p { font-size: 9px; }
  .card { padding: 19px; }
  .chat-card, .model-library { padding: 0; }
  .connection-card h2 { font-size: 20px; }
  .card-actions { flex-wrap: wrap; }
  .code-copy code { font-size: 10px; }
  .popular-row > .pill { display: none; }
  .popular-row .icon-button { margin-left: auto; }
  .model-name-group > span { font-size: 9px; }
  .model-toolbar { padding: 15px; gap: 13px; }
  .model-table th, .model-table td { padding: 12px 15px; }
  .table-footer { padding: 13px 15px; }
  .filter-tabs { width: 100%; }
  .filter-tab { flex: 1; font-size: 10px; padding: 6px 9px; }
  .chat-thread { min-height: 325px; height: 48vh; padding: 17px; }
  .chat-empty { min-height: 260px; }
  .empty-state h2 { font-size: 16px; }
  .suggestions { gap: 5px; }
  .suggestions button { font-size: 9px; padding: 6px 8px; }
  .chat-composer { padding: 13px 15px; }
  .composer-footer > span { font-size: 9px; }
  .message-content { font-size: 12px; padding: 11px 13px; }
  .chat-card-header { padding: 13px 17px; }
  .options-card { padding: 19px; }
  .settings-actions .text-button { margin-left: 0; }
  .pool-heading { flex-direction: column; align-items: flex-start; }
  .pool-heading-actions { width: 100%; }
  .pool-heading-actions .button { flex: 1; }
  .pool-summary { font-size: 11px; gap: 10px; }
  .pool-policy-fields { gap: 15px; }
  .pool-policy-fields select { font-size: 11px; }
  .pool-policy-footer { align-items: flex-start; flex-direction: column; gap: 12px; }
  .pool-policy-footer .button { width: 100%; }
  .pool-library { padding: 0; }
  .pool-toolbar-actions { width: 100%; }
  .pool-toolbar-actions .search-input { width: 100%; }
  .pool-row-actions { max-width: 190px; }
  .security-fields { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .security-settings .settings-actions .button { width: 100%; }
  .account-dialog { padding: 20px; }
  .console-footer { padding: 11px 17px 19px; font-size: 8px; }
  .console-footer > span:last-child { display: none; }
  .login-layout { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-main { padding: 38px 26px; min-height: 100svh; }
  .mobile-brand { display: flex; margin-bottom: 60px; }
  .login-card h2 { font-size: 31px; }
  .login-card-footer { margin-top: 39px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
