:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0b0d16; color: #edf2f8; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #0b0d16; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 250px; flex: 0 0 250px; min-height: 100vh; background: #262936; border-right: 1px solid #363a49; padding: 24px 14px 16px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 25px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #82a9ff; color: #131724; font-weight: 900; font-size: 20px; }
.brand strong { display: block; letter-spacing: .13em; font-size: 14px; }
.brand span { display: block; color: #9da3b6; font-size: 11px; margin-top: 3px; }
.workspace { border: 1px solid #3a3e4e; background: #2d3040; border-radius: 10px; padding: 12px; margin: 0 2px 18px; }
.workspace .muted { display: block; font-size: 9px; letter-spacing: .14em; }
.workspace strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.role-pill { display: inline-block; color: #a7d7cb; font-size: 10px; margin-top: 7px; }
.nav { overflow-y: auto; }
.nav-group { margin-top: 18px; }
.nav-label { color: #7f8598; font-size: 10px; letter-spacing: .15em; padding: 0 12px 7px; font-weight: 700; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-radius: 7px; background: transparent; color: #cdd1dc; text-align: left; padding: 9px 11px; font-size: 12px; }
.nav-item:hover { background: #323646; color: #fff; }
.nav-item.active { background: #464957; color: #fff; }
.nav-icon { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #777d8e; border-radius: 5px; color: #cbd0db; font-size: 10px; font-weight: 800; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #3a3e4e; padding: 15px 10px 0; color: #9da3b6; font-size: 11px; display: flex; gap: 8px; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #e8a962; }
.main { min-width: 0; flex: 1; padding: 36px 42px 52px; max-width: 1600px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.eyebrow { color: #8fa6de; font-size: 10px; letter-spacing: .16em; margin: 0 0 8px; font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.02em; }
h2 { font-size: 18px; margin-bottom: 4px; }
.muted { color: #8f96a9; }
.badge, .pill { display: inline-flex; align-items: center; border: 1px solid #48516c; border-radius: 999px; padding: 7px 11px; color: #b9c7ec; font-size: 11px; white-space: nowrap; }
.badge.ok { color: #89e0be; border-color: #2f806b; }
.pill.secure { color: #93dbc0; border-color: #2a6d60; }
.pill.warning { color: #f1c37d; border-color: #806333; }
.panel, .stat { background: #151925; border: 1px solid #2c3346; border-radius: 13px; box-shadow: 0 12px 28px rgba(0,0,0,.13); }
.panel { padding: 21px; }
.auth-bar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; background: #121722; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 190px; flex: 1; }
.field.wide { flex: 2; }
.field.max-field { max-width: 480px; margin-bottom: 18px; }
.field label, label { color: #abb3c8; font-size: 11px; }
input, select, textarea { width: 100%; color: #edf2f8; background: #0e1320; border: 1px solid #34405a; border-radius: 8px; outline: none; padding: 10px 11px; }
select { min-height: 39px; }
input:focus, select:focus, textarea:focus { border-color: #82a9ff; box-shadow: 0 0 0 3px rgba(130,169,255,.12); }
button { border: 0; border-radius: 8px; padding: 10px 15px; background: #82a9ff; color: #0d1525; font-weight: 750; }
button:hover { filter: brightness(1.08); }
button.secondary, .secondary { background: #293249; border: 1px solid #46516e; color: #cbd7f2; }
button.link-button { background: transparent; color: #9fbaff; padding: 2px; font-size: 11px; }
.error { background: #401d2c; border: 1px solid #a84867; padding: 12px 14px; border-radius: 10px; margin-bottom: 18px; color: #ffc1d1; }
.toast { position: fixed; right: 28px; bottom: 24px; background: #1b3e36; border: 1px solid #3c927b; color: #c8f5e4; padding: 12px 16px; border-radius: 10px; z-index: 5; }
.view { display: none; }
.view.active { display: block; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.page-head h2 { font-size: 23px; margin-bottom: 7px; }
.page-head p { margin-bottom: 0; }
.actions { display: flex; gap: 9px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards { display: grid; gap: 13px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 18px; }
.stat { padding: 17px; }
.stat span { color: #9299ad; font-size: 11px; }
.stat strong { display: block; font-size: 29px; margin-top: 8px; }
.section-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 17px; }
.section-title h2 { margin-bottom: 0; }
.map-list { display: grid; gap: 7px; }
.map-row { width: 100%; display: grid; grid-template-columns: 34px 1fr 20px; align-items: center; gap: 10px; background: #101522; border: 1px solid #263049; color: #ecf1fb; text-align: left; padding: 12px; }
.map-row:hover { border-color: #56698f; }
.map-row strong, .map-row small { display: block; }
.map-row small { color: #8e97ab; margin-top: 3px; font-size: 11px; }
.map-key { font-size: 11px; font-weight: 800; }
.map-key.accent { color: #8faeff; }
.map-key.blue { color: #77d4dc; }
.map-key.purple { color: #c49cff; }
.map-key.orange { color: #efb875; }
.arrow { color: #75829d; }
.notice { color: #aeb6ca; background: #101521; border: 1px dashed #3a4762; border-radius: 9px; padding: 13px; line-height: 1.5; font-size: 12px; }
.notice.small { margin-top: 14px; font-size: 11px; }
.check-list { display: grid; gap: 12px; margin-top: 18px; color: #c9cede; font-size: 12px; }
.check, .pending { font-size: 9px; font-weight: 800; margin-right: 7px; color: #8ee2bf; }
.pending { color: #efc27c; }
.form-grid, .connection-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.form-grid textarea, .connection-form textarea { grid-column: 1 / -1; min-height: 86px; resize: vertical; }
.form-grid button, .connection-form button { justify-self: start; }
.checkbox { display: flex; align-items: center; gap: 8px; color: #b8c1d4; font-size: 11px; padding: 10px 0; }
.checkbox input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid #273048; }
th { color: #8994af; font-weight: 650; white-space: nowrap; }
td { color: #ced6e6; }
td.long { max-width: 360px; white-space: pre-wrap; word-break: break-word; }
td .row-action { padding: 5px 8px; font-size: 10px; background: #293552; color: #cbd8fb; }
.empty { color: #8f96a9; padding: 12px 0; }
.prompt-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.prompt-editor { min-height: 670px; display: flex; flex-direction: column; }
.prompt-sidebar { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 10px; margin-bottom: 18px; }
.field-row.compact { grid-template-columns: 1fr 1fr; margin-top: 16px; margin-bottom: 0; }
.textarea-label { display: block; margin-bottom: 8px; }
.prompt-textarea { flex: 1; min-height: 430px; resize: vertical; line-height: 1.65; font-size: 13px; padding: 17px; }
.editor-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; font-size: 11px; }
.history-list { display: grid; gap: 7px; max-height: 350px; overflow-y: auto; }
.history-item { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: #101521; border: 1px solid #283149; border-radius: 8px; padding: 9px; color: #cbd4e8; font-size: 11px; }
.history-item button { padding: 5px 7px; font-size: 10px; background: #293552; color: #cbd8fb; }
.connection-form textarea[name="config"] { min-height: 100px; }
.placeholder-view .panel { max-width: 760px; }
@media (max-width: 1180px) { .sidebar { width: 220px; flex-basis: 220px; } .main { padding: 28px; } .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .prompt-layout { grid-template-columns: 1fr; } .prompt-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .app-shell { display: block; } .sidebar { width: 100%; min-height: auto; position: static; } .nav { display: flex; gap: 6px; overflow-x: auto; } .nav-group { display: contents; } .nav-label { display: none; } .nav-item { min-width: max-content; } .sidebar-footer { display: none; } .main { padding: 22px 16px 40px; } .topbar, .page-head { display: grid; } .grid.two, .prompt-sidebar { grid-template-columns: 1fr; } .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid, .connection-form, .field-row { grid-template-columns: 1fr; } .form-grid textarea, .connection-form textarea { grid-column: auto; } .actions { width: 100%; } .actions button { flex: 1; } }
