:root{font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,SF Pro Display,Helvetica Neue,sans-serif;color:#1d1d1f;background:#f5f5f7;font-synthesis:none;text-rendering:optimizeLegibility;--blue: #0071e3;--blue-soft: #e8f2ff;--ink: #1d1d1f;--secondary: #6e6e73;--tertiary: #86868b;--line: #d2d2d7;--soft-line: #e5e5ea;--surface: #ffffff;--canvas: #f5f5f7;--green: #248a3d;--red: #d70015}*{box-sizing:border-box}html{min-width:320px;overflow-x:hidden}*{scrollbar-width:thin;scrollbar-color:rgba(142,142,147,.62) transparent}*::-webkit-scrollbar{width:7px;height:7px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:#8e8e939e;background-clip:padding-box}*::-webkit-scrollbar-thumb:hover{background:#aeaeb2d1;background-clip:padding-box}body{min-width:320px;min-height:100dvh;margin:0;overflow-x:hidden;background:var(--canvas);-webkit-text-size-adjust:100%}button,input,select,textarea{font:inherit}button{cursor:pointer;touch-action:manipulation}.button-base{border:0;border-radius:980px;padding:10px 17px;color:#fff;background:var(--blue);font-size:14px;font-weight:600;transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease}.button-base:hover{background:#0077ed}.button-base:focus-visible,.chat-list-item:focus-visible{outline:3px solid rgba(0,113,227,.28);outline-offset:2px}.button-base:disabled{cursor:not-allowed;opacity:.45;transform:none}.shell,.app-shell{min-height:100vh;background:var(--canvas)}.shell{display:grid;place-items:center;padding:24px}.card{width:min(100%,420px);padding:42px;border:1px solid var(--soft-line);border-radius:24px;background:var(--surface);box-shadow:0 16px 42px #00000014}.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:28px;width:100%;min-height:64px;padding:0 max(24px,calc((100% - 1180px)/2));border-bottom:1px solid rgba(210,210,215,.85);background:#fafafce0;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.brand{color:var(--ink);font-size:15px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand:before{display:inline-block;width:8px;height:8px;margin:0 9px 1px 0;border-radius:50%;background:var(--blue);content:""}.menu{display:flex;align-items:center;gap:4px;flex:1}.mobile-bottom-nav{display:none}.topbar>.theme-toggle{flex:0 0 auto}.menu-item{border:0;border-radius:9px;padding:8px 11px;color:var(--secondary);background:transparent;font-size:14px;font-weight:500}.menu-item:hover,.menu-item.active{color:var(--ink);background:#e8e8ed}.logout{display:inline-grid;width:40px;height:40px;place-items:center;border:0;border-radius:980px;padding:0;color:#fff;background:var(--blue);transition:background .18s ease,transform .18s ease}.logout svg{display:block;width:19px;height:19px;transform:translate(1px);fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}button:active{transform:scale(.98)}.content{display:grid;place-items:start center;padding:36px 24px 100px}.panel{width:min(100%,1120px)}.panel>h1,.card h1{margin:12px 0 14px;color:var(--ink);font-size:clamp(34px,5vw,52px);font-weight:650;letter-spacing:-.055em;line-height:1.04}.card h1{font-size:42px}h2{letter-spacing:-.035em}.muted,.status{color:var(--secondary)}.status{font-size:13px}.toast-container{position:fixed;right:24px;bottom:24px;z-index:100;display:grid;gap:10px;width:min(360px,calc(100vw - 32px));pointer-events:none}.toast{pointer-events:auto;width:100%;border:1px solid var(--soft-line);border-radius:14px;padding:13px 15px;color:var(--ink);background:var(--surface);box-shadow:0 14px 34px #0000002e;text-align:left;font-size:13px;line-height:1.4;animation:toast-in .2s ease-out}.toast-info{border-color:#0071e34d}.toast-success{border-color:#248a3d59}.toast-error{border-color:#d7001559}@keyframes toast-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}form{display:grid;gap:18px;margin-top:28px}.field{display:grid;gap:8px;color:#424245;font-size:13px;font-weight:600;line-height:1.2}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px 13px;color:var(--ink);outline:0;background:var(--surface);font-size:14px;line-height:1.35;transition:border-color .18s ease,box-shadow .18s ease}input:hover,select:hover,textarea:hover{border-color:#a1a1a6}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #0071e32e}.field input,.field select,.field textarea{margin:0}.field input::placeholder,.field textarea::placeholder{color:var(--tertiary)}.checkbox-row{display:flex;align-items:center;gap:10px;min-height:40px;color:var(--ink);font-size:13px;font-weight:500}.checkbox-row input{width:18px;height:18px;margin:0;accent-color:var(--blue)}.switch{color:var(--blue);cursor:pointer;font-size:14px;font-weight:500}.stats{display:grid;grid-template-columns:repeat(2,minmax(0,280px));gap:16px;margin:46px 0 68px}.stat-card{display:grid;gap:14px;min-height:148px;padding:22px;border:1px solid var(--soft-line);border-radius:18px;background:var(--surface);box-shadow:0 5px 18px #00000009}.stat-card span{color:var(--secondary);font-size:14px}.stat-card strong{color:var(--ink);font-size:36px;font-weight:600;letter-spacing:-.05em}.request-history{margin-top:68px}.history-heading,.settings-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.history-heading h2,.settings-heading h2{margin:5px 0 0;color:var(--ink);font-size:24px;font-weight:600}.history-heading span,.settings-heading>span{color:var(--secondary);font-size:13px}.history-heading .section-title{color:var(--ink);font-size:17px;font-weight:600}.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--soft-line);border-radius:16px;background:var(--surface);box-shadow:0 5px 18px #00000009}.data-table{display:grid;gap:12px}.data-table-toolbar{display:flex;justify-content:flex-end}.data-table-search-wrap{width:min(280px,100%)}.data-table-search{height:38px;padding:9px 12px;border-radius:10px;background:var(--surface)}.table-sort-button{display:inline-flex;align-items:center;gap:7px;border:0;padding:0;color:inherit;background:transparent;font:inherit;font-size:inherit;font-weight:inherit;text-transform:inherit}.table-sort-button:hover{color:var(--blue)}.table-sort-indicator{color:var(--tertiary);font-size:13px;text-transform:none}.table-sort-indicator.active{color:var(--blue)}.data-table-footer{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;color:var(--secondary);font-size:12px}.data-table-page-size{display:inline-flex;align-items:center;justify-self:start;gap:7px}.data-table-page-size select{width:auto;min-width:58px;padding:7px 25px 7px 9px;font-size:12px}.data-table-count{justify-self:center;white-space:nowrap}.data-table-pagination{display:flex;justify-content:flex-end;gap:5px}.data-table-page{min-width:30px;height:30px;padding:0 7px;color:var(--secondary);background:var(--surface);box-shadow:none;font-size:12px}.data-table-page:hover,.data-table-page.active{color:#fff;background:var(--blue)}table{width:100%;min-width:760px;border-collapse:collapse;font-size:13px}th,td{padding:15px 16px;border-bottom:1px solid #ededf0;text-align:left;vertical-align:middle}tr:last-child td{border-bottom:0}th{color:var(--tertiary);font-size:11px;font-weight:600;text-transform:uppercase}.fact{display:grid;justify-items:end;gap:3px;color:var(--secondary);text-align:right;white-space:nowrap}.fact-heading,.charged-heading{text-align:right}.fact-total{color:var(--ink);font-size:13px;font-weight:600}.fact-label{display:inline-block;margin-right:6px;text-align:left}.request-date{display:grid;gap:3px;white-space:nowrap}.request-date strong{color:var(--ink);font-size:13px;font-weight:600}.request-date span{color:var(--secondary);font-size:12px}.request-status-cell{display:grid;gap:5px;justify-items:start}.channel-badge{display:inline-flex;align-items:center;width:fit-content;border:1px solid rgba(0,113,227,.18);border-radius:999px;padding:5px 9px;color:var(--blue);background:var(--blue-soft);font-size:11px;font-weight:600;white-space:nowrap}.request-duration{color:var(--secondary);font-size:12px;white-space:nowrap}.request-status{display:inline-block;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:600}.request-status.success{color:var(--green);background:#e4f6e9}.request-status.failed{color:var(--red);background:#ffe5e7}.request-status-button{display:inline-flex;align-items:center;justify-content:center;width:fit-content;height:auto!important;border:0;min-height:0!important;padding:5px 9px;cursor:pointer;font:inherit;font-size:11px;font-weight:600;line-height:1.2}.request-status-button:hover{filter:brightness(.96)}.request-error-details{display:grid;gap:12px;color:var(--ink)}.request-error-details p{margin:0;color:var(--secondary);line-height:1.5;overflow-wrap:anywhere}td small{display:block;margin-top:5px;color:var(--secondary);font-size:11px;white-space:nowrap}.charged{display:grid;gap:5px;white-space:nowrap}.charged-cell{justify-items:end;text-align:right}.charged small{margin:0}.charged strong{color:var(--ink);font-size:13px;font-weight:600}.mobile-request-list{display:none}.admin-users{margin-top:52px;padding:24px;border:1px solid var(--soft-line);border-radius:20px;background:#ffffff9e}.admin-table{display:grid;gap:8px;margin-top:24px}.users-block{margin-top:0}.admin-users-table{min-width:680px}.admin-profiles-table{min-width:760px}.admin-profiles-actions{text-align:right}.admin-profile-endpoint,.admin-profile-key{display:block;max-width:280px;overflow:hidden;color:var(--secondary);background:transparent;text-overflow:ellipsis;white-space:nowrap}.admin-profile-key{color:var(--ink)}.admin-users-balance-action{padding-left:28px}.admin-models-table{min-width:720px}.admin-users-actions,.admin-models-actions{text-align:right}.model-table-list{display:grid;gap:8px}.model-table-list>span{min-height:22px;color:var(--secondary)}.multiplier-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;color:var(--blue);background:var(--blue-soft);font-size:11px;font-weight:600;white-space:nowrap}.settings-columns{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.9fr);align-items:start;gap:20px;margin-top:40px}.settings-api-block,.profile-settings-block{margin-top:0}.profile-settings-block form{max-width:520px;margin-top:20px}.profile-settings-block{display:flex;flex-direction:column}.profile-details{display:grid;gap:18px}.profile-details div{display:grid;gap:6px}.profile-details span{color:var(--secondary);font-size:12px}.profile-details strong{color:var(--ink);font-size:14px;overflow-wrap:anywhere}.profile-password-button{width:100%;margin-top:28px}.api-settings-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.create-key-button{margin-left:auto}.api-docs-header{margin-bottom:18px}.api-docs-columns{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.9fr);align-items:start;gap:20px;margin-top:32px}.api-docs{display:grid;gap:32px;margin-top:32px}.api-docs-columns .api-docs{margin-top:0}.api-docs-endpoints{min-height:0}.api-docs-selectors{display:grid;gap:12px}.api-step{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:start;gap:12px;padding:12px;border:1px solid var(--soft-line);border-radius:16px;background:var(--canvas)}.api-step-number{display:grid;width:30px;height:30px;place-items:center;border-radius:50%;color:#fff;background:var(--blue);font-size:13px;font-weight:700}.api-choice-field{display:grid;gap:9px;min-width:0}.api-choice-field>span{color:var(--secondary);font-size:12px;font-weight:600}.api-choice-list{display:flex;flex-wrap:wrap;gap:8px}.api-choice-button{padding:8px 13px;color:var(--secondary);background:var(--surface);box-shadow:none}.api-choice-button:hover{color:var(--blue);background:var(--blue-soft)}.api-choice-button.active{color:#fff;background:var(--blue);box-shadow:0 4px 12px #0071e333}.api-docs-section{display:grid;gap:10px}.api-docs-section h2{margin:0;font-size:20px}.api-docs-section p{margin:0;color:var(--secondary);line-height:1.5}.api-docs-values{display:grid;gap:10px;margin-top:18px}.api-endpoint-card{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:stretch;gap:12px;padding:12px;border:1px solid var(--soft-line);border-radius:14px;background:var(--canvas)}.api-endpoint-info{display:grid;align-content:center;gap:9px;min-width:0}.api-endpoint-info>span{color:var(--secondary);font-size:12px;font-weight:600;white-space:nowrap}.api-endpoint-value{display:flex;align-items:center;min-width:0}.api-endpoint-value code{min-width:0;flex:1;overflow:hidden;padding:0;color:var(--ink);background:transparent;text-overflow:ellipsis;white-space:nowrap}.api-copy-action{display:grid;align-items:center;justify-items:center;min-height:34px}.api-copy-button{display:inline-grid;width:34px;height:34px;margin:0;padding:0;place-items:center;border:0;border-radius:10px;color:var(--blue);background:transparent;box-shadow:none}.api-copy-button:hover{color:var(--blue);background:var(--blue-soft);box-shadow:none}.api-copy-button svg{display:block;width:17px;height:17px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.api-show-all-button{width:100%;margin-top:4px;color:var(--blue);background:var(--blue-soft);box-shadow:none}.api-show-all-button:hover{color:var(--blue);background:color-mix(in srgb,var(--blue-soft) 80%,var(--blue));box-shadow:none}.api-docs-values code{padding:0;color:var(--blue);background:transparent}.api-docs pre{overflow-x:auto;margin:0;padding:16px;border:1px solid var(--soft-line);border-radius:14px;background:var(--canvas)}.api-docs pre code{padding:0;color:var(--ink);background:transparent;font-family:SFMono-Regular,Consolas,monospace;font-size:12px;line-height:1.6;white-space:pre}.api-faq{margin-top:20px;padding-bottom:18px}.api-faq .api-docs-section{gap:14px}.api-faq .api-docs-section h2{display:flex;align-items:center;gap:10px}.api-faq .api-docs-section h2:before{display:inline-grid;width:28px;height:28px;place-items:center;border:1px solid rgba(0,113,227,.2);border-radius:9px;color:var(--blue);background:var(--blue-soft);content:"?";font-size:15px;font-weight:700}.faq-list{display:grid;gap:10px;margin-top:0}.faq-item{overflow:hidden;border:1px solid var(--soft-line);border-radius:16px;background:var(--canvas);transition:border-color .18s ease,background .18s ease,box-shadow .18s ease}.faq-item.open{border-color:#0071e359;background:color-mix(in srgb,var(--blue-soft) 24%,var(--canvas));box-shadow:0 8px 24px #00000014}.faq-question{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;border:0;padding:17px 18px;color:var(--ink);background:transparent;text-align:left;font-size:14px;font-weight:600;line-height:1.4}.faq-question:hover{background:var(--blue-soft)}.faq-question>span:first-child{min-width:0}.faq-plus{position:relative;display:block;flex:0 0 25px;width:25px;height:25px;border:1px solid var(--soft-line);border-radius:50%;background:var(--surface);transition:background .18s ease,border-color .18s ease,transform .2s ease}.faq-plus:before,.faq-plus:after{position:absolute;top:50%;left:50%;width:10px;height:1.5px;border-radius:999px;background:currentColor;content:"";transform:translate(-50%,-50%)}.faq-plus:after{transform:translate(-50%,-50%) rotate(90deg);transition:transform .2s ease}.faq-item.open .faq-plus{color:#fff;background:var(--blue);border-color:var(--blue)}.faq-item.open .faq-plus:after{transform:translate(-50%,-50%) rotate(0)}.faq-answer{margin:0 18px 17px;padding:13px 14px;border-left:2px solid var(--blue);border-radius:0 10px 10px 0;color:var(--secondary);background:var(--surface);font-size:13px;line-height:1.6}.admin-row.api-key-row{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:12px}.api-key-main{display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:0}.api-key-main{grid-column:1;grid-row:1}.api-key-info{display:grid;gap:5px;min-width:0}.api-key-row small{color:var(--secondary);font-size:12px}.api-key-usage{display:grid;grid-column:1;grid-row:2;gap:7px;width:100%;color:var(--secondary);font-size:12px;font-variant-numeric:tabular-nums}.api-key-usage-line{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}.api-key-unlimited{display:inline-flex;vertical-align:middle;color:var(--blue)}.api-key-unlimited svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.api-key-progress{display:block;width:100%;height:5px;overflow:hidden;border-radius:999px;background:var(--soft-line)}.api-key-progress>span{display:block;height:100%;border-radius:inherit;background:var(--blue);transition:width .25s ease}.api-key-copy-button,.api-key-limit-button{color:var(--blue)}.new-api-key{display:grid;gap:16px}.new-api-key code{overflow-wrap:anywhere;color:var(--ink);background:var(--canvas);font-size:13px;-webkit-user-select:all;user-select:all}.balance-button{margin-left:0}.model-access-list{display:grid;max-height:280px;gap:8px;overflow-y:auto;padding:10px;border:1px solid var(--soft-line);border-radius:12px;background:var(--canvas)}.model-access-list .checkbox-row{min-height:36px}.model-access-all{padding-bottom:4px;border-bottom:1px solid var(--soft-line)}.balance-user{margin:0;color:var(--ink);font-weight:600}.balance-current{margin:-8px 0 4px;color:var(--secondary);font-size:13px}.user-role{display:inline-flex;border-radius:999px;padding:5px 9px;color:var(--secondary);background:#7676801f;font-size:11px;font-weight:600;white-space:nowrap}.user-role.admin{color:var(--blue);background:var(--blue-soft)}.admin-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:17px 18px;border:1px solid #e5e5ea;border-radius:13px;background:var(--surface)}.admin-row span{color:var(--secondary)}.profile-row div,.model-row div{display:grid;gap:5px;min-width:0}.profile-row small,.model-row small{overflow-wrap:anywhere;color:var(--secondary);font-size:12px}.profile-toolbar{display:flex;align-items:center;gap:16px;margin:28px 0 10px}.profile-toolbar .status{margin:0}.edit-button,.delete-button{display:inline-grid;width:30px;height:30px;margin-left:8px;padding:0;border:1px solid transparent;border-radius:10px;place-items:center;transition:color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease}.edit-button{color:var(--blue);border-color:#0a84ff33;background:#0a84ff1f}.delete-button{color:var(--red);border-color:#ff453a33;background:var(--surface)}.refresh-button{display:inline-grid;width:30px;height:30px;margin-left:4px;padding:0;place-items:center;color:var(--blue);border:1px solid rgba(10,132,255,.2);border-radius:10px;background:#0a84ff1a;box-shadow:none}.refresh-button:hover{color:#fff;border-color:var(--blue);background:var(--blue);box-shadow:0 4px 12px #0a84ff3d}.refresh-button:active{transform:scale(.92)}.edit-button:hover{color:#fff;border-color:var(--blue);background:var(--blue);box-shadow:0 4px 12px #0a84ff3d}.delete-button:hover{color:#fff;border-color:var(--red);background:var(--red);box-shadow:0 4px 12px #ff453a38}.edit-button:active,.delete-button:active{transform:scale(.92)}.row-actions{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}.row-actions .edit-button,.row-actions .delete-button{margin-left:4px}.edit-button svg,.delete-button svg,.refresh-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.icon-button{margin:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10;display:grid;place-items:center;padding:24px;background:#1d1d1f61;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.modal{width:min(100%,560px);max-height:calc(100vh - 48px);display:flex;flex-direction:column;overflow:hidden;padding:0;border:1px solid rgba(255,255,255,.8);border-radius:20px;background:#fffffff5;box-shadow:0 24px 80px #00000038}.model-modal{width:min(100%,680px)}.modal>.settings-heading{flex:0 0 auto;flex-direction:row;align-items:center;width:100%;margin:0;padding:20px 24px 18px;border-bottom:1px solid var(--soft-line)}.modal>.settings-heading h2{min-width:0;margin:0 auto 0 0;line-height:1.2}.modal-content{min-height:0;overflow-y:auto;padding:24px}.modal-content form{margin-top:0}.modal-content>.settings-actions,.modal-content form>.settings-actions{position:sticky;bottom:-24px;z-index:2;margin:10px -24px -24px;padding:16px 24px 24px;border-top:1px solid var(--soft-line);background:var(--surface)}.modal-close{width:32px;height:32px;display:inline-grid;place-items:center;flex:0 0 32px;align-self:center;border:1px solid transparent;border-radius:50%;padding:0;margin-left:auto;color:var(--secondary);background:transparent;transition:color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease}.modal-close svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:2}.modal-close:hover{color:var(--ink);border-color:var(--soft-line);background:#76768029;box-shadow:none}.modal-close:active{transform:scale(.9)}.secondary-button{color:var(--ink);background:#e9e9ed;box-shadow:none}.secondary-button:hover{color:var(--ink);background:#dedee3}.settings-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.settings-actions .status{margin:0}.pagination{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:18px}.pagination-page{display:inline-grid;width:32px;height:32px;place-items:center;border:1px solid var(--soft-line);border-radius:10px;color:var(--secondary);background:var(--surface);font-size:13px;font-weight:600}.pagination-page:hover,.pagination-page.active{border-color:var(--blue);color:#fff;background:var(--blue)}.confirm-message{margin:0 0 22px;color:var(--secondary);line-height:1.5}.confirm-danger{color:#fff;background:var(--red)}.model-profile-list{display:grid;gap:12px}.form-section-title{margin:6px 0 0;color:var(--ink);font-size:17px;font-weight:600}.model-profile-card{display:grid;gap:12px;padding:16px;border:1px solid var(--soft-line);border-radius:14px;background:#f8f8fa}.model-profile-card .field{font-size:12px}.profile-picker,.profile-model-actions{display:grid;gap:8px}.profile-picker .muted{font-size:12px}.model-profile-title{display:flex;align-items:center;justify-content:space-between;gap:16px}.model-profile-title .delete-button{margin:0}.empty{padding:28px 0;color:var(--secondary);text-align:center}.feed{display:grid;gap:8px;margin:28px 0}code{overflow-wrap:anywhere;padding:12px;border-radius:10px;background:var(--surface);color:#424245;font-size:12px}.chat-layout{display:grid;grid-template-columns:260px minmax(0,1fr);width:min(100%,1180px);margin:36px auto 48px;height:calc(100dvh - 140px);min-height:calc(100dvh - 140px);overflow:hidden;border:1px solid var(--soft-line);border-radius:20px;background:var(--surface);box-shadow:0 5px 18px #00000009}.chat-sidebar{display:flex;min-width:0;min-height:0;flex-direction:column;border-right:1px solid var(--soft-line);background:#76768014}.chat-sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 16px 14px;border-bottom:1px solid var(--soft-line)}.chat-sidebar-header div{display:grid;gap:3px}.chat-sidebar-header strong{font-size:17px}.chat-sidebar-header span,.chat-header>div>span{color:var(--secondary);font-size:12px}.new-chat-button{display:grid!important;width:30px;height:30px;padding:0!important;border:1px solid rgba(10,132,255,.25);border-radius:10px!important;place-items:center;color:#fff;background:var(--blue);box-shadow:0 3px 9px #0a84ff3d}.new-chat-button.button-base{padding:0}.new-chat-button:hover{background:#0077ed;box-shadow:0 5px 14px #0a84ff4d}.new-chat-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:2}.chat-list{display:grid;flex:1;min-height:0;align-content:start;grid-auto-rows:max-content;gap:3px;overflow-y:auto;padding:8px;scrollbar-width:thin;scrollbar-color:rgba(142,142,147,.7) transparent}.chat-list::-webkit-scrollbar,.chat-messages::-webkit-scrollbar{width:8px}.chat-list::-webkit-scrollbar-track,.chat-messages::-webkit-scrollbar-track{background:transparent}.chat-list::-webkit-scrollbar-thumb,.chat-messages::-webkit-scrollbar-thumb{min-height:34px;border:2px solid transparent;border-radius:999px;background:#8e8e93b3;background-clip:padding-box}.chat-list::-webkit-scrollbar-thumb:hover,.chat-messages::-webkit-scrollbar-thumb:hover{background:#aeaeb2e6;background-clip:padding-box}.chat-list-row{position:relative;display:flex;align-items:center;min-width:0;border-radius:10px}.chat-list-row.active,.chat-list-row:hover{background:#76768024}.chat-list-item{flex:1;display:grid;gap:4px;min-width:0;border:0;border-radius:10px;padding:11px 10px;color:var(--ink);background:transparent;text-align:left}.chat-list-item.button-base{color:var(--ink);background:transparent;font-size:inherit;font-weight:inherit}.chat-list-row .chat-list-item:hover,.chat-list-row .chat-list-item.active{background:transparent;box-shadow:none}.chat-list-item strong,.chat-list-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-list-item strong{font-size:13px;font-weight:600}.chat-list-item span{color:var(--secondary);font-size:12px}.chat-empty{padding:18px 10px;color:var(--secondary);font-size:13px}.chat-row-actions{display:flex;flex:0 0 auto;gap:2px;padding-right:6px}.chat-action-button,.chat-save-button,.chat-cancel-button{display:grid;width:26px;height:26px;padding:0!important;border:0;border-radius:7px;place-items:center;color:var(--secondary);background:transparent}.chat-action-button:hover,.chat-save-button:hover{color:var(--blue);background:#0a84ff24}.chat-action-button.delete:hover,.chat-cancel-button:hover{color:var(--red);background:#ff453a1f}.chat-action-button svg,.chat-cancel-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.chat-save-button{font-size:15px;font-weight:600}.chat-rename-form{display:flex;flex:1;align-items:center;gap:4px;margin:0;padding:5px 6px}.chat-rename-form input{min-width:0;padding:7px 8px;border-radius:7px;font-size:12px}.chat-main{position:relative;display:grid;min-width:0;grid-template-rows:auto minmax(0,1fr) auto}.chat-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14.5px 24px;border-bottom:1px solid var(--soft-line)}.chat-header>div:first-child{min-width:0}.chat-header-title{display:flex;align-items:center;gap:10px}.mobile-chat-back{display:none}.chat-header h1{overflow:hidden;margin:0 0 5px;font-size:22px;font-weight:600;letter-spacing:-.035em;text-overflow:ellipsis;white-space:nowrap}.chat-header-title h1{min-width:0}.chat-model-controls{display:flex;align-items:center;gap:8px}.chat-model-controls select{width:auto;min-width:130px;padding:8px 10px;font-size:12px}.chat-error{position:absolute;z-index:20;top:64px;right:24px;left:24px;height:fit-content;margin:12px 0 0;padding:12px 14px;border:1px solid rgba(255,69,58,.24);border-radius:12px;box-shadow:0 8px 24px #0000002e;color:var(--red);background:#ff453a1a;font-size:13px;font-weight:600;line-height:1.4}.chat-messages{display:flex;max-height:calc(100dvh - 294px);min-height:360px;flex-direction:column;gap:20px;overflow-y:auto;padding:30px clamp(20px,7vw,100px)}.chat-message{max-width:720px}.chat-message.user{align-self:flex-end;text-align:right}.chat-message-role{margin-bottom:6px;color:var(--secondary);font-size:11px;font-weight:600}.chat-message-content{white-space:pre-wrap;color:var(--ink);font-size:15px;line-height:1.55}.chat-message.user .chat-message-content{display:inline-block;padding:11px 15px;border-radius:18px 18px 5px;color:#fff;background:var(--blue);text-align:left}.chat-message.failed .chat-message-content{border:1px solid rgba(255,69,58,.28);color:var(--red);background:#ff453a1a}.chat-retry-button{width:30px;height:30px;margin-left:8px;margin-top:8px;padding:0;color:var(--red);background:#ff453a1a}.chat-retry-button:hover{background:#ff453a2e}.chat-retry-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.chat-message small{display:block;margin-top:7px;color:var(--tertiary);font-size:11px}.chat-welcome{display:grid;place-items:center;align-content:center;flex:1;min-height:260px;color:var(--secondary);text-align:center}.chat-welcome h2{margin:0 0 8px;color:var(--ink);font-size:26px}.chat-welcome p{margin:0 0 20px}.chat-composer{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:16px 24px;border-top:1px solid var(--soft-line)}.chat-composer textarea{height:44px;min-height:44px;max-height:44px;resize:none;overflow-y:auto;border-radius:14px;padding:12px 14px}.chat-composer button{align-self:center;width:44px;height:44px;padding:0!important;border-radius:14px!important;font-size:22px}.chat-composer small{grid-column:1 / -1;min-height:14px;color:var(--tertiary);font-size:11px}.chat-typing{display:flex;gap:4px;padding:8px 0}.chat-typing span{width:6px;height:6px;border-radius:50%;background:var(--secondary);animation:chat-pulse 1s infinite ease-in-out}.chat-typing span:nth-child(2){animation-delay:.15s}.chat-typing span:nth-child(3){animation-delay:.3s}@keyframes chat-pulse{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}@media(max-width:700px){.modal-backdrop{z-index:40;align-items:end;padding:0}.chat-page .topbar{display:none}.chat-page:has(.mobile-chat-open) .mobile-bottom-nav{display:none}.chat-page .chat-layout{grid-template-columns:1fr;width:100%;height:100dvh;min-height:100dvh;margin:0;border-top:0;border-right:0;border-left:0;border-radius:0}.chat-page .chat-layout:not(.mobile-chat-open) .chat-main{display:none}.chat-page .chat-layout.mobile-chat-open .chat-sidebar{display:none}.chat-page .chat-layout.mobile-chat-open .chat-main{display:grid;height:100dvh;min-height:0;overflow:hidden;grid-template-rows:auto minmax(0,1fr) auto}.chat-page .chat-layout.mobile-chat-open .chat-messages{min-height:0;max-height:none;padding-bottom:32px}.chat-page .chat-layout.mobile-chat-open .chat-composer{flex-shrink:0;padding-bottom:max(16px,env(safe-area-inset-bottom))}.chat-page .chat-sidebar{min-height:calc(100dvh - 100px);border-right:0;border-bottom:0}.chat-page .chat-list{max-height:calc(100dvh - 166px);padding-bottom:18px}.new-chat-button{width:38px;height:38px;min-height:38px;padding:0!important;place-items:center}.new-chat-button svg{display:block;width:18px;height:18px;margin:0}.topbar{flex-wrap:wrap;gap:8px 10px;min-height:60px;padding:max(10px,env(safe-area-inset-top)) 16px 10px}.brand{flex:1 1 auto}.desktop-menu{display:none}.theme-toggle{flex:0 0 auto}.logout{width:40px;height:40px}.mobile-bottom-nav{position:fixed!important;right:12px;bottom:max(12px,calc(env(safe-area-inset-bottom) + 12px));left:12px;z-index:30;display:flex;align-items:stretch;justify-content:space-around;gap:2px;min-width:0;min-height:64px;padding:8px;border:1px solid rgba(255,255,255,.16);border-radius:24px;background:#2c2c2ec7;box-shadow:0 12px 34px #0000004d,inset 0 1px #ffffff1a;backdrop-filter:saturate(180%) blur(28px);-webkit-backdrop-filter:saturate(180%) blur(28px);overflow-x:auto;scrollbar-width:none}.mobile-bottom-nav::-webkit-scrollbar{display:none}.menu-item{flex:1 1 0;min-width:0;min-height:48px;padding:7px;border-radius:12px;color:var(--secondary);font-size:0;line-height:1;white-space:nowrap}.menu-label{display:none}.menu-item svg{display:block;width:24px;height:24px;margin:0 auto;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.mobile-bottom-nav .menu-item.active{color:#fff;background:#0a84ffe6;box-shadow:0 4px 12px #0a84ff47}.menu-item:hover,.menu-item.active{color:var(--ink);background:#7676803d}.content{padding:28px 16px calc(112px + env(safe-area-inset-bottom))}.panel>h1,.card h1{font-size:clamp(32px,10vw,40px)}.stats{grid-template-columns:1fr;margin:34px 0 50px}.stat-card{min-height:124px;padding:18px}.stat-card strong{font-size:32px}.history-heading,.settings-heading{align-items:flex-start;flex-direction:column;gap:6px}.settings-heading>span{line-height:1.4}.admin-users{padding:18px}.admin-row{align-items:flex-start;flex-direction:column}.admin-row>span{width:100%}.admin-row .edit-button,.admin-row .delete-button{margin-left:0;margin-right:8px}.admin-row .row-actions .edit-button,.admin-row .row-actions .delete-button{margin-left:0;margin-right:4px}}@media(max-width:480px){.shell{padding:16px}.card{padding:28px 18px;border-radius:18px}form{gap:15px;margin-top:22px}input,select,textarea{min-height:44px;font-size:16px}.button-base{min-height:44px}.toast-container{right:16px;bottom:max(16px,env(safe-area-inset-bottom));width:calc(100vw - 32px)}.modal{padding:0}.modal-backdrop{align-items:end;padding:0}.modal{width:100%;max-height:calc(100dvh - env(safe-area-inset-top));border-radius:20px 20px 0 0}.modal-content{padding:22px}.modal-content>.settings-actions,.modal-content form>.settings-actions{bottom:-22px;margin-right:-22px;margin-left:-22px;padding-right:22px;padding-left:22px}.profile-toolbar{align-items:flex-start;flex-direction:column}.api-docs-selectors,.settings-columns,.api-docs-columns{grid-template-columns:1fr}.data-table-footer{grid-template-columns:1fr;justify-items:center;gap:10px}.data-table-page-size,.data-table-count,.data-table-pagination{justify-self:center}.request-history{margin-top:46px}.request-history>.table-wrap{display:none}.mobile-request-list{display:grid;gap:10px}.mobile-request-card{display:grid;gap:12px;padding:15px;border:1px solid var(--soft-line);border-radius:16px;background:var(--surface);box-shadow:0 5px 18px #00000009}.mobile-request-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.mobile-request-badges{display:flex;align-items:flex-start;flex-wrap:wrap;justify-content:flex-end;gap:6px}.mobile-request-badges .request-status-button{display:inline-flex;width:fit-content;height:auto!important;min-height:0!important;padding:5px 9px;font-size:11px;line-height:1.2}.mobile-request-model{overflow-wrap:anywhere;color:var(--ink);font-size:14px;line-height:1.35}.mobile-request-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.mobile-request-details span{display:grid;gap:3px;color:var(--secondary);font-size:11px}.mobile-request-details strong{color:var(--ink);font-size:12px;font-weight:600}.mobile-request-breakdown{overflow-wrap:anywhere;padding-top:10px;border-top:1px solid var(--soft-line);color:var(--secondary);font-size:11px;line-height:1.45}.chat-layout{grid-template-columns:1fr;width:100%;margin:16px 0 calc(100px + env(safe-area-inset-bottom));min-height:calc(100dvh - 130px);border-radius:16px}.chat-page:has(.mobile-chat-open) .chat-layout{margin-bottom:0}.chat-layout:not(.mobile-chat-open) .chat-main{display:none}.chat-layout.mobile-chat-open .chat-sidebar{display:none}.chat-layout.mobile-chat-open .chat-main{display:grid}.chat-sidebar{max-height:none;min-height:calc(100dvh - 130px);border-right:0;border-bottom:0}.chat-list{display:grid;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}.chat-list-item{min-width:0}.chat-header{align-items:flex-start;flex-direction:column;padding:12px 16px 16px}.chat-header-title{width:100%;min-width:0;overflow:hidden}.mobile-chat-back{display:inline-flex;flex:0 0 auto;width:38px;height:38px;min-height:38px;padding:0;place-items:center;color:var(--blue);background:transparent;box-shadow:none}.mobile-chat-back svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.mobile-chat-back:hover{color:var(--blue);background:var(--blue-soft);box-shadow:none}.chat-header h1{min-width:0;max-width:100%;margin:0;font-size:18px;line-height:38px}.chat-error{top:112px;right:16px;left:16px}.chat-model-controls{width:100%}.chat-model-controls select{flex:1;min-width:0}.chat-messages{min-height:320px;max-height:calc(100dvh - 500px);padding:24px 16px}.chat-message{max-width:100%}.chat-composer{padding:12px 16px max(16px,env(safe-area-inset-bottom))}}:root{--blue: #0a84ff;--blue-soft: #173b63;--ink: #f5f5f7;--secondary: #a1a1a6;--tertiary: #8e8e93;--line: #48484a;--soft-line: #38383a;--surface: #1c1c1e;--canvas: #000000;--green: #30d158;--red: #ff453a}[data-theme=light]{--blue: #0071e3;--blue-soft: #e8f2ff;--ink: #1d1d1f;--secondary: #6e6e73;--tertiary: #86868b;--line: #d2d2d7;--soft-line: #e5e5ea;--surface: #ffffff;--canvas: #f5f5f7;--green: #248a3d;--red: #d70015}.theme-toggle{position:relative;display:inline-flex;align-items:center;gap:6px;border:0;border-radius:999px;padding:5px 7px;color:var(--secondary);background:#2c2c2e;box-shadow:inset 0 0 0 1px #ffffff14}.theme-toggle:hover{color:var(--ink);background:#3a3a3c}.theme-icon{display:grid;width:16px;height:16px;place-items:center;opacity:.72}.theme-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7}.sun-icon{color:#ffd60a}.moon-icon{color:#bf5af2}.theme-switch-track{position:relative;display:block;width:34px;height:20px;border-radius:999px;background:#636366;box-shadow:inset 0 0 0 1px #0000002e}.theme-switch-thumb{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #00000052;transition:transform .2s ease}.theme-toggle[aria-checked=true] .theme-switch-thumb{transform:translate(14px)}body{color:var(--ink)}.topbar{background:#1c1c1ee0;border-color:#38383a}.menu-item:hover,.menu-item.active{color:var(--ink);background:#2c2c2e}.card,.stat-card,.table-wrap,.admin-row,code{border-color:var(--soft-line);background:var(--surface)}.admin-users{border-color:var(--soft-line);background:#1c1c1e9e}.field,.checkbox-row{color:#d1d1d6}input,select,textarea{border-color:var(--line);color:var(--ink);background:var(--surface)}input:hover,select:hover,textarea:hover{border-color:#636366}th,td{border-color:#38383a}.model-profile-card{border-color:var(--soft-line);background:#2c2c2e}.secondary-button{color:var(--ink);background:#3a3a3c}.secondary-button:hover{background:#48484a}.edit-button{color:#64b5ff;border-color:#64b5ff33;background:#64b5ff24}.delete-button{color:#ff6961;border-color:#ff696133;background:#ff69611f}.edit-button:hover{color:#071a2c;border-color:#64b5ff;background:#64b5ff}.delete-button:hover{color:#2b0806;border-color:#ff6961;background:#ff6961}.request-status.success{color:#63e681;background:#193d27}.request-status.failed{color:#ff6961;background:#4b1c1b}.modal-backdrop{background:#0000009e}.modal{border-color:#48484a;background:#1c1c1ef7}[data-theme=light] .topbar{background:#fafafce0;border-color:#d2d2d7d9}[data-theme=light] .theme-toggle{color:#6e6e73;background:#fff;box-shadow:inset 0 0 0 1px #d2d2d7,0 2px 5px #0000000f}[data-theme=light] .theme-toggle:hover{color:#1d1d1f;background:#f5f5f7;box-shadow:inset 0 0 0 1px #c7c7cc,0 3px 8px #00000014}[data-theme=light] .theme-toggle:focus-visible{outline-color:#0071e359}[data-theme=light] .theme-switch-track{background:#d2d2d7;box-shadow:inset 0 0 0 1px #0000001f}[data-theme=light] .theme-switch-thumb{background:#fff}[data-theme=light] .sun-icon{color:#ff9f0a}[data-theme=light] .moon-icon{color:#8e8e93}[data-theme=light] .menu-item:hover,[data-theme=light] .menu-item.active{background:#e8e8ed}[data-theme=light] .field,[data-theme=light] .checkbox-row{color:#424245}[data-theme=light] input:hover,[data-theme=light] select:hover,[data-theme=light] textarea:hover{border-color:#a1a1a6}[data-theme=light] th,[data-theme=light] td{border-color:#ededf0}[data-theme=light] .secondary-button:hover{background:#dedee3}[data-theme=light] .edit-button{color:var(--blue);border-color:#0071e333;background:#0071e31a}[data-theme=light] .delete-button{color:var(--red);border-color:#d7001533;background:#d7001514}[data-theme=light] .edit-button:hover{color:#fff;border-color:var(--blue);background:var(--blue)}[data-theme=light] .delete-button:hover{color:#fff;border-color:var(--red);background:var(--red)}[data-theme=light] .request-status.success{color:var(--green);background:#e4f6e9}[data-theme=light] .request-status.failed{color:var(--red);background:#ffe5e7}[data-theme=dark] .channel-badge{border-color:#64b5ff33;color:#64b5ff;background:#64b5ff24}[data-theme=light] .modal-backdrop{background:#1d1d1f61}[data-theme=light] .modal{border-color:#fffc;background:#fffffff5}[data-theme=light] body,[data-theme=light] .shell,[data-theme=light] .app-shell{background:var(--canvas);color:var(--ink)}[data-theme=light] .admin-users{background:#ffffff9e}[data-theme=light] .model-profile-card{background:#f8f8fa}[data-theme=light] .chat-layout{border-color:#d2d2d7;background:#fff;box-shadow:0 5px 18px #0000000f}[data-theme=light] .chat-sidebar{border-color:#d2d2d7;background:#f2f2f7}[data-theme=light] .chat-sidebar-header{border-color:#e5e5ea}[data-theme=light] .chat-list-row:hover{background:#e5e5ea}[data-theme=light] .chat-list-row.active{background:#dfeeff}[data-theme=light] .chat-list-item,[data-theme=light] .chat-list-item.button-base,[data-theme=light] .chat-list-row .chat-list-item:hover,[data-theme=light] .chat-list-row .chat-list-item.active{color:#1d1d1f;background:transparent}[data-theme=light] .chat-list-item span{color:#6e6e73}[data-theme=light] .chat-action-button,[data-theme=light] .chat-cancel-button{color:#6e6e73;background:transparent}[data-theme=light] .chat-action-button:hover{color:#0071e3;background:#d6e9ff}[data-theme=light] .chat-action-button.delete:hover,[data-theme=light] .chat-cancel-button:hover{color:#d70015;background:#ffe5e7}[data-theme=light] .modal-close:hover{background:#e8e8ed}[data-theme=light] .secondary-button{color:var(--ink);background:#e9e9ed}[data-theme=light] .secondary-button:hover{color:var(--ink);background:#dedee3}[data-theme=light] .chat-error{background:var(--surface)}[data-theme=light] .chat-composer{border-color:var(--soft-line)}[data-theme=light] *{scrollbar-color:rgba(99,99,102,.42) transparent}[data-theme=light] *::-webkit-scrollbar-thumb{background:#6363666b;background-clip:padding-box}[data-theme=light] *::-webkit-scrollbar-thumb:hover{background:#6363669e;background-clip:padding-box}[data-theme=light] .menu{border-color:#d2d2d7e6;background:#fafafcc7;box-shadow:0 12px 34px #00000024,inset 0 1px #fffc}[data-theme=light] .menu-item:hover,[data-theme=light] .menu-item.active{background:#76768024}[data-theme=light] .mobile-bottom-nav .menu-item.active{color:#fff;background:var(--blue);box-shadow:0 4px 12px #0071e33d}
