@font-face {
  font-family: "IBM Plex Sans";
  src: url("/IBMPlexSans.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font: 16px/1.4 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  background: #0a0b0c;
  color: #f5f5f6;
  --canvas: #0a0b0c;
  --panel: #0e0f11;
  --surface: #15171a;
  --stroke: #25272b;
  --muted: #a8abb3;
}
* { box-sizing: border-box; }
[hidden], .symbols { display: none !important; }
body, h1, h2, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #9ca7bb;
  outline-offset: 3px;
}
button, input, textarea, select { border: 0; }
button { background: transparent; }
svg { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
input, textarea, select { background: transparent; min-width: 0; }
input::placeholder, textarea::placeholder { color: #a4a7af; opacity: 1; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
textarea { resize: vertical; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: .96; }
.brand strong { font-family: "Segoe UI", system-ui, sans-serif; font-size: 45px; font-weight: 400; letter-spacing: -.105em; transform: scaleX(1.04); transform-origin: left; }
.brand span { font-size: 21px; font-weight: 370; margin-top: 7px; letter-spacing: -.035em; }
.pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #202226; font-weight: 600; font-size: .82rem; line-height: 1; }
.pill.light { color: #101116; background: #f4f4f6; }
.icon-button { display: inline-grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; padding: 0; flex: none; }
.icon-button:hover:not(:disabled) { background: #23252a; }
.outline-button, .light-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 43px; padding: 0 14px; white-space: nowrap; border: 1px solid #34373d;
  border-radius: 15px; font-size: .9rem;
}
.outline-button:hover:not(:disabled) { background: #1a1c20; border-color: #51545d; }
.light-button { color: #101115; background: #fafafa; border-color: #e2e4e8; font-weight: 650; }
.light-button:hover:not(:disabled) { background: #e0e2e7; }
.light-button svg, .outline-button svg { width: 18px; height: 18px; }

.desk {
  display: grid; grid-template-columns: minmax(174px, 14.65%) minmax(245px, 23.45%) minmax(0, 1fr) minmax(230px, 17.55%);
  height: 100dvh; min-height: 460px; overflow: hidden;
  background: radial-gradient(ellipse at 38% 30%, #101113 0%, #0a0b0c 55%);
}
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 28px 11px 38px 12px; border-right: 1px solid var(--stroke); }
.sidebar .brand { margin: 0 0 37px 13px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 17px; width: 100%; min-height: 51px; padding: 0 12px 0 16px; border-radius: 15px; text-align: left; font-size: .95rem; }
.nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item b { margin-left: auto; }
.nav-item.active { background: #202227; font-weight: 650; }
.nav-item:hover { background: #191b1f; }
.connection { display: flex; align-items: center; gap: 10px; margin: auto auto 8px 20px; padding: 7px; border-radius: 8px; font-size: .88rem; text-align: left; }
.connection:hover { background: #1a1c20; }
.connection i { width: 12px; height: 12px; flex: none; border-radius: 50%; background: #696d76; }
.connection.online i { background: #4ccc8d; }

.inbox { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--stroke); overflow: hidden; }
.inbox-header { padding: 25px 23px 12px 24px; }
.inbox-header h1 { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; font-size: 1.5rem; letter-spacing: -.025em; }
.inbox-header h1 .pill { background: #16181b; height: 27px; min-width: 33px; font-size: .96rem; }
.search { display: flex; align-items: center; gap: 12px; height: 45px; padding: 0 13px 0 16px; border-radius: 17px; color: var(--muted); background: #15171a; }
.search svg { width: 20px; height: 20px; }
.search input { width: 100%; height: 100%; padding: 0; font-size: .94rem; }
.search input:focus-visible { outline: 0; }
.search:focus-within { box-shadow: 0 0 0 1px #666a74; }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 17px; }
.filter { display: flex; align-items: center; gap: 6px; border-radius: 14px; min-height: 39px; padding: 0 8px; font-size: .86rem; white-space: nowrap; }
.filter.active { background: #f6f6f7; color: #101115; font-weight: 650; }
.filter.active .pill { color: #fff; background: #7e838d; }
.filter:hover:not(.active) { background: #15171a; }
.threads { overflow: auto; padding: 3px 10px 18px 11px; }
.thread { display: grid; grid-template-columns: 51px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; min-height: 102px; padding: 15px 13px; border-bottom: 1px solid #191b1e; text-align: left; }
.thread.selected { background: #17191c; border: 0; border-radius: 16px; }
.thread:hover { background: #15171a; border-radius: 16px; }
.avatar { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(145deg,#1e2023,#141619); font-size: 1.13rem; font-weight: 550; flex: none; }
.thread.selected .avatar { box-shadow: inset 0 0 0 1px #64666e; }
.thread-content { min-width: 0; }
.thread-name { display: block; margin-bottom: 5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-preview { display: block; margin-bottom: 7px; color: #c0c2c9; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-time { color: #c1c4cb; font-size: .82rem; white-space: nowrap; }
.thread-side { display: grid; justify-items: end; gap: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 29px; padding: 0 12px; border-radius: 999px; background: #212328; color: #f1f1f4; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-list { padding: 20px 13px; font-size: .9rem; color: var(--muted); }

.conversation { min-width: 0; min-height: 0; border-right: 1px solid var(--stroke); }
.conversation-body { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.empty-chat { display: grid; place-content: center; justify-items: center; height: 100%; gap: 12px; color: var(--muted); }
.empty-chat svg { width: 33px; height: 33px; }
.chat-header { display: flex; align-items: center; min-height: 81px; gap: 14px; padding: 0 19px; }
.chat-header .avatar { width: 44px; height: 44px; font-size: 1rem; }
.person { display: grid; gap: 2px; min-width: 0; }
.person strong, .person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person span { color: var(--muted); font-size: .84rem; }
.chat-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; min-width: 0; }
.chat-actions .top-model { max-width: 195px; }
.top-model span, .model-choice span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.claim-top { box-shadow: 0 0 12px #e3e5f325; }
.more { background: #15171a; font-weight: 700; font-size: .88rem; border-radius: 50%; }
.back { display: none; }
.banner { display: flex; align-items: center; gap: 17px; min-height: 72px; margin: 13px 20px 0; padding: 10px 17px; background: linear-gradient(100deg,#151619,#111215); border-radius: 18px; }
.banner svg { width: 25px; height: 25px; }
.banner strong { font-size: 1.05rem; }
.banner p { margin-top: 4px; font-size: .9rem; color: #c1c3c9; }
.messages { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 24px; padding: 22px 21px 22px 19px; }
.bubble { position: relative; align-self: flex-start; max-width: min(87%, 425px); padding: 12px 16px; border-radius: 17px; border: 1px solid #25272b; background: #15171a; font-size: 1.01rem; line-height: 1.48; overflow-wrap: anywhere; }
.bubble.ai, .bubble.human { align-self: flex-end; background: #222429; border-color: #222429; }
.message-body { white-space: pre-wrap; }
.message-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 5px; color: #c0c4cd; font-size: .78rem; white-space: nowrap; }
.bubble.customer.compact { display: flex; align-items: end; gap: 18px; }
.bubble.customer.compact .message-meta { margin-top: 0; }
.bubble .source { position: absolute; top: -10px; right: 11px; display: inline-flex; border-radius: 999px; padding: 2px 9px; background: #f5f5f6; color: #111215; font-size: .72rem; font-weight: 700; }
.message-flag { font-size: .79rem; color: #c2c5cd; }
.composer { display: flex; align-items: center; gap: 9px; min-height: 65px; margin: 0 19px 33px; padding: 4px 7px 4px 11px; border: 1px solid #565a62; background: #111214; border-radius: 22px; }
.composer textarea { flex: 1; padding: 8px 4px; max-height: 110px; outline: none; resize: none; }
.composer .icon-button svg { width: 23px; height: 23px; }
.composer .send { width: 48px; height: 48px; background: #1b1d21; border-radius: 16px; }
.composer .send:hover:not(:disabled) { background: #2b2e35; }
.attachment-name { align-self: flex-start; margin: 0 19px 8px; padding: 5px 10px; border-radius: 9px; background: #222429; color: #dfe1e7; font-size: .84rem; }

.inspector { min-width: 0; overflow: auto; padding: 41px 18px 18px; }
.inspector section { padding-bottom: 23px; margin-bottom: 22px; border-bottom: 1px solid #181a1d; }
.inspector section:last-child { border: 0; }
.inspector h2 { margin-bottom: 13px; font-size: 1.08rem; font-weight: 680; letter-spacing: -.012em; }
.mode-switch { display: flex; gap: 2px; padding: 2px; margin-bottom: 23px; border: 1px solid var(--stroke); border-radius: 15px; }
.mode-switch button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border-radius: 12px; padding: 0 4px; font-size: .86rem; white-space: nowrap; }
.mode-switch svg { width: 17px; height: 17px; }
.mode-switch .active { color: #14161a; background: #fff; box-shadow: 0 0 9px #e5e7ef51; }
.model-label { display: block; color: var(--muted); font-size: .85rem; }
.model-choice { width: 100%; justify-content: space-between; color: #fff; margin-top: 6px; background: #111214; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 7px; }
.tags .chip { gap: 5px; background: #1b1d21; border: 1px solid #292b30; min-height: 34px; }
.tags .icon-button { width: 19px; height: 19px; }
.tags svg { width: 14px; height: 14px; }
.add-tag { min-height: 39px; background: #111214; }
.tag-form { display: flex; gap: 6px; margin-bottom: 7px; }
.tag-form input { flex: 1; }
.quick-actions { display: grid; gap: 3px; }
.quick-actions button { justify-content: flex-start; min-height: 46px; gap: 12px; padding: 0 12px; }
.inspector textarea { display: block; min-height: 84px; width: 100%; border-radius: 16px; padding: 12px 14px; background: #111214; border: 1px solid #36383e; font-size: .88rem; }
.field-tip { min-height: 18px; margin-top: 4px; color: var(--muted); font-size: .75rem; }

.login-screen { position: relative; min-height: 100dvh; display: flex; align-items: center; padding: 44px clamp(23px, 13vw, 205px); overflow: hidden; isolation: isolate; background: #090a0b; }
.login-image { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#090a0b 14%,#090a0bde 34%,#090a0b3a 78%), url("/csky-uav.png") center right / cover; opacity: .51; animation: image-in 1s ease-out both; }
.login-form { width: min(100%,360px); display: grid; gap: 16px; animation: form-in .44s cubic-bezier(.2,.72,.24,1) both; }
.login-form .brand { margin-bottom: 16px; }
.login-heading h1 { font-size: 1.9rem; line-height: 1.1; letter-spacing: -.035em; margin-bottom: 5px; }
.login-heading p { color: var(--muted); font-size: .94rem; }
.login-form label, .modal-form label { display: grid; gap: 6px; font-size: .88rem; color: #d9dbe0; }
.login-form input, .modal-form input, .modal-form select, .tag-form input {
  height: 46px; width: 100%; border: 1px solid #323439; border-radius: 12px; padding: 0 12px; background: #141619;
}
.password-control { position: relative; }
.password-control input { padding-right: 45px; }
.password-control button { position: absolute; top: 2px; right: 2px; }
.password-control svg { width: 18px; height: 18px; }
.login-submit { margin-top: 2px; min-height: 47px; justify-content: space-between; }
.form-error { color: #ffadad; font-size: .875rem; }
.form-error:empty { display: none; }
@keyframes form-in { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes image-in { from { opacity: 0; transform: scale(1.025); } to { opacity: .51; transform: scale(1); } }

dialog { background: #141619; color: inherit; width: min(550px,calc(100vw - 26px)); max-height: 88vh; border: 1px solid #3c3e44; border-radius: 20px; padding: 18px 21px 21px; box-shadow: 0 28px 90px #000a; }
dialog::backdrop { background: #000a; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.dialog-header h2 { font-size: 1.2rem; }
.modal-form { display: grid; gap: 10px; margin-top: 13px; }
.modal-form .light-button { justify-self: start; }
.modal-list { display: grid; gap: 7px; }
.modal-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #2b2d31; }
.modal-row span { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; text-align: right; }
.article { border-bottom: 1px solid #2b2d31; padding: 10px 0; }
.article summary { cursor: pointer; font-weight: 600; }
.article p { margin-top: 6px; white-space: pre-wrap; color: #c1c4cc; font-size: .9rem; }
.toast { position: fixed; right: 16px; bottom: 16px; max-width: min(440px,calc(100vw - 32px)); border: 1px solid #43454c; padding: 11px 14px; border-radius: 12px; background: #24262b; z-index: 4; box-shadow: 0 12px 38px #0009; }
.toast.error { border-color: #9b6060; }

@media (max-width: 1270px) {
  .desk { grid-template-columns: 174px minmax(243px,26%) minmax(0,1fr) 225px; }
  .inbox-header { padding-left: 15px; padding-right: 15px; }
  .thread { grid-template-columns: 40px minmax(0,1fr) auto; gap: 8px; padding-left: 6px; padding-right: 6px; }
  .thread .avatar { width: 40px; height: 40px; }
  .top-model { display: none; }
  .inspector { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 990px) {
  .desk { grid-template-columns: 65px minmax(245px,34%) minmax(0,1fr); }
  .sidebar { padding: 20px 7px; }
  .sidebar .brand { margin: 0 auto 25px; }
  .sidebar .brand strong { font-size: 23px; }
  .sidebar .brand span { font-size: 10px; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item span, .nav-item b, .connection span { display: none; }
  .connection { margin: auto auto 10px; }
  .inspector { position: fixed; inset: 0 0 0 auto; width: min(290px,92vw); z-index: 2; background: #0e0f11; border-left: 1px solid var(--stroke); box-shadow: -12px 0 46px #0009; }
  .desk:not(.show-inspector) .inspector { display: none; }
  .conversation { border-right: 0; }
}
@media (max-width: 630px) {
  .desk { grid-template-columns: 56px minmax(0,1fr); min-height: 0; }
  .conversation { display: none; }
  .desk.open-chat { grid-template-columns: minmax(0,1fr); }
  .desk.open-chat .sidebar, .desk.open-chat .inbox { display: none; }
  .desk.open-chat .conversation { display: block; }
  .chat-header { gap: 8px; min-height: 64px; padding: 0 9px; }
  .back { display: inline-grid; width: 30px; }
  .back svg { transform: rotate(90deg); }
  .chat-actions { gap: 5px; }
  .claim-top { min-height: 39px; padding: 0 8px; }
  .claim-top span { font-size: .75rem; }
  .banner { margin: 8px 10px 0; min-height: 62px; padding: 8px 10px; gap: 10px; }
  .banner p { font-size: .82rem; }
  .messages { padding: 18px 11px; }
  .bubble { font-size: .94rem; }
  .composer { margin: 0 10px 10px; min-height: 55px; }
  .composer .icon-button { width: 34px; height: 34px; }
  .login-image { background-position: 66% center; opacity: .25; }
  .login-form { margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .login-form, .login-image { animation: none; }
}
.login-screen { justify-content:center; padding:32px 20px; }
.login-image { opacity:.20; background-position:center; }
.login-form { padding:32px; width:min(100%,424px); border:1px solid var(--stroke); border-radius:22px; background:#0e0f11ed; box-shadow:0 24px 90px #0006; }
.login-form .brand { align-self:center; justify-self:center; }
.login-heading { text-align:center; }
.brand img { display:block; width:103px; max-width:100%; height:auto; }
.model-choice, #history { color-scheme:dark; cursor:pointer; }
#history { margin:10px 20px 0; align-self:flex-start; background:#141519; color:#d7d8dd; border:1px solid var(--stroke); border-radius:8px; padding:6px 10px; }
.desk.section-view > :is(.inbox,.conversation,.inspector) { display:none; }
#section-page { grid-column:2/-1; overflow:auto; }
.page-wrap { width:min(100%,740px); margin:auto; padding:clamp(24px,5vw,72px); }
.page-wrap h1 { margin-bottom:28px; }
#page-content { display:grid; gap:20px; }
#page-content > :is(.modal-list,.modal-form,.article,.modal-row) { padding:20px; background:#121316; border:1px solid var(--stroke); border-radius:16px; }
@media(max-width:990px) { .sidebar .brand img { width:42px; } }
@media(max-width:630px) { .desk.section-view { grid-template-columns:56px minmax(0,1fr); } .desk.section-view .sidebar { display:flex; } }
.case-divider { align-self:center; color:var(--muted); font-size:.77rem; padding:4px 12px; border:1px solid var(--stroke); border-radius:20px; }
.quick-actions { gap:8px; }
#claim-side { --action:#9fc4ff; }
#route { --action:#e9bd80; }
#close-chat { --action:#90d8ae; }
.quick-actions button {
  color:var(--action); border-color:color-mix(in srgb,var(--action) 24%,#16181b);
  background:color-mix(in srgb,var(--action) 6%,#0d0f12); border-radius:12px;
}
.quick-actions button:hover:not(:disabled) {
  background:color-mix(in srgb,var(--action) 13%,#0d0f12);
  border-color:color-mix(in srgb,var(--action) 48%,#16181b);
}
@supports (appearance:base-select) {
  :is(.model-choice,.modal-form select), :is(.model-choice,.modal-form select)::picker(select) { appearance:base-select; }
  :is(.model-choice,.modal-form select) { align-items:center; justify-content:space-between; white-space:normal; overflow-wrap:anywhere; }
  :is(.model-choice,.modal-form select)::picker(select) {
    margin-block:5px; padding:5px; min-width:anchor-size(width); max-width:min(360px,94vw); max-height:min(340px,50vh);
    color:#eceef3; background:#191b20; border:1px solid #383b43; border-radius:14px; box-shadow:0 14px 40px #0008;
  }
  :is(.model-choice,.modal-form select)::picker-icon { color:#9b9faa; font-size:12px; }
  :is(.model-choice,.modal-form select) option { display:flex; align-items:center; gap:8px; padding:9px 11px; border-radius:8px; white-space:normal; overflow-wrap:anywhere; font-size:14px; cursor:pointer; }
  :is(.model-choice,.modal-form select) option:checked { color:#eeeaff; background:#302e3b; }
  :is(.model-choice,.modal-form select) option:is(:hover,:focus-visible) { background:#363941; outline:0; }
  :is(.model-choice,.modal-form select) option::checkmark { order:1; margin-left:auto; color:#d3c7ff; }
}
.page-wrap:has(.team-directory) { width:min(100%,1080px); }
.team-directory { overflow:hidden; background:#111215; border:1px solid #2a2c32; border-radius:18px; }
.team-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:20px 24px; }
.team-toolbar h2 { display:flex; align-items:center; gap:9px; font-size:1.06rem; margin:0; }
.team-count { padding:1px 8px; border-radius:8px; color:#babdc7; background:#25272d; font-size:.76rem; }
.team-toolbar button { gap:7px; min-height:36px; border-radius:10px; font-size:.85rem; }
.team-table { width:100%; border-collapse:collapse; text-align:left; }
.team-table th { background:#17181c; color:#b2b4bf; font-weight:500; font-size:.77rem; }
.team-table :is(th,td) { padding:12px 16px; border-top:1px solid #292a30; }
.team-table :is(th,td):first-child { padding-left:24px; }
.team-person,.alert-state { display:flex; align-items:center; gap:11px; }
.team-avatar { flex:none; display:grid; place-items:center; background:#2b2b36; color:#dddbe9; border-radius:12px; width:40px; height:40px; }
.team-names { display:grid; overflow-wrap:anywhere; gap:2px; }
.team-names strong { font-size:.92rem; }
.team-names span,.alert-state { color:#aeb1bb; font-size:.81rem; }
.team-role { display:inline-flex; padding:3px 9px; border-radius:7px; background:#24272d; font-size:.77rem; }
.admin-role { background:#2b2539; color:#d8c6f2; }
.alert-state { gap:7px; }
.alert-state::before { content:""; width:6px; height:6px; flex:none; border-radius:50%; background:#737781; }
.alert-state.enabled::before { background:#72c693; }
.team-form { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.team-form label:nth-last-child(2),.team-form button { grid-column:1/-1; }
.team-form button { justify-self:end !important; }
@media(max-width:760px) {
  .team-toolbar { padding:16px; }
  .team-table thead { position:absolute; clip-path:inset(100%); }
  .team-table tbody tr { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:16px; border-top:1px solid var(--stroke); }
  .team-table tbody td,.team-table tbody td:first-child { display:block; border:0; padding:0; }
  .team-table tbody td:first-child { width:100%; }
}
@media(max-width:460px) { .team-form { grid-template-columns:1fr; } }
.page-wrap h1 { font-size:clamp(1.65rem,2.4vw,2.2rem); font-weight:640; letter-spacing:-.045em; line-height:1.12; }
.page-wrap h2 { letter-spacing:-.025em; }
[data-section=settings] .modal-form label { grid-template-columns:minmax(0,1fr) minmax(0,1.25fr); align-items:center; gap:16px; padding:12px 0; }
[data-section=settings] .modal-form label + label { border-top:1px solid var(--stroke); }
[data-section=models] .modal-form { grid-template-columns:minmax(0,1fr) auto; align-items:end; }
[data-section=models] .field-tip { grid-column:1/-1; }
[data-section=templates] #page-content { gap:0; overflow:hidden; border:1px solid var(--stroke); border-radius:16px; }
[data-section=templates] #page-content .article { margin:0; padding:16px 20px; border:0; border-radius:0; }
[data-section=templates] #page-content .article + .article { border-top:1px solid var(--stroke); }
.article summary:focus-visible { outline:2px solid #acb9d2; outline-offset:4px; }
.stats-summary { padding:clamp(20px,4vw,36px); border:1px solid var(--stroke); border-radius:18px; background:#111215; }
.stats-summary h2 { font-size:1rem; margin:0; color:#c7c9d1; }
.stats-total { display:block; font-size:3.6rem; letter-spacing:-.05em; line-height:1.2; font-weight:560; margin:8px 0 24px; }
.stats-bars { margin:0; display:grid; gap:16px; }
.stats-line { display:grid; grid-template-columns:1fr auto; gap:6px; align-items:center; }
.stats-line dd,.thread-time { margin:0; font-variant-numeric:tabular-nums; }
.stats-line progress { grid-column:1/-1; width:100%; appearance:none; height:6px; border:0; border-radius:6px; overflow:hidden; }
.stats-line progress::-webkit-progress-bar { background:#27292e; }
.stats-line progress::-webkit-progress-value { background:#aaa5c5; border-radius:6px; }
.stats-line:nth-child(2) progress::-webkit-progress-value { background:#95b8df; }
.stats-line:nth-child(3) progress::-webkit-progress-value { background:#d5b082; }
.stats-line:nth-child(4) progress::-webkit-progress-value { background:#8cb49c; }
.mode-chip.mode-human { color:#b0cbee; background:#202934; }
.mode-chip.mode-waiting { color:#e2c49c; background:#302a23; }
.mode-chip.mode-ai { color:#d6cfe4; background:#28252e; }
.mode-chip.mode-closed { color:#adceb8; background:#232d27; }
@media(max-width:630px) {
  [data-section=settings] .modal-form label,[data-section=models] .modal-form { grid-template-columns:1fr; gap:8px; }
}
/* CSKY workspace */
:root { --canvas:#101011; --panel:#171718; --surface:#222223; --stroke:#323233; --muted:#afafb0; --ink:#f0f0f1; --accent:#cececf; color:var(--ink); background:var(--canvas); }
button,input,select,textarea { font-family:inherit; }
.desk,.desk.section-view { grid-template-columns:clamp(265px,23vw,370px) minmax(0,1fr) clamp(234px,19vw,310px); grid-template-rows:68px minmax(0,1fr); background:var(--canvas); }
.sidebar,.desk.open-chat .sidebar { grid-column:1/-1; display:flex; flex-direction:row; align-items:center; gap:clamp(16px,3vw,52px); padding:0 clamp(14px,2vw,32px); background:#171718; border:0; border-bottom:1px solid var(--stroke); }
.sidebar .brand { margin:0; flex:none; }
.sidebar .brand img { width:67px; height:40px; object-fit:contain; }
.nav { height:100%; flex-direction:row; align-items:stretch; gap:4px; overflow-x:auto; scrollbar-width:none; }
.nav-item { flex:none; width:auto; border-radius:0; padding:0 clamp(8px,1vw,16px); gap:8px; min-height:42px; color:#b5b5b6; font-size:.85rem; }
.nav-item svg { width:17px; }
.nav-item.active { color:#ebebec; background:linear-gradient(0deg,#cacacb16,transparent 75%); box-shadow:inset 0 -2px var(--accent); }
.nav-item:hover:not(.active) { background:#212122; }
.nav-item .pill { display:none; }
.connection { flex:none; margin:0 0 0 auto; padding:8px 0; font-size:.78rem; }
.inbox,.inspector { background:#161617; }
.inbox-header { padding:23px 17px 7px; }
.inbox-header h1 { font-size:1.65rem; letter-spacing:-.045em; }
.inbox-header h1 .pill { background:#2c2c2d; color:#c7c7c8; border-radius:7px; }
.search { background:#212122; border:1px solid var(--stroke); height:39px; border-radius:9px; }
.filters { justify-content:flex-start; gap:2px; margin:10px 0 3px; }
.filter { flex:auto; justify-content:center; min-height:32px; font-size:.75rem; padding:0 4px; border-radius:7px; }
.filter.active,.filter.active .pill { background:#343435; color:#e7e7e8; }
.threads { padding:0 9px 12px; }
.thread { grid-template-columns:36px minmax(0,1fr) auto; min-height:88px; gap:10px; padding:14px 9px; border-color:#272728; }
.thread .avatar,.chat-header .avatar,.team-avatar { width:36px;height:36px;border-radius:11px;background:#353536;color:#e0e0e1;font-weight:650; }
.thread.selected,.thread:hover { background:#262627; border-radius:10px; }
.thread.selected { box-shadow:inset 3px 0 #bebebf; }
.thread.selected .avatar { box-shadow:none; }
.thread-name { font-size:.92rem; }.thread-preview,.thread-time { color:#b4b4b5; }.thread-time { font-size:.73rem; }
.chip { min-height:22px; padding:0 7px; border-radius:5px; font-size:.72rem; }
.conversation { background:#121213; }
.chat-header { min-height:73px; background:#181819; border-bottom:1px solid var(--stroke); }
.chat-header .person { flex:1; }
.chat-actions .top-model { max-width:150px; min-height:34px; font-size:.76rem; }
.light-button { background:#dfdfe0; color:#202021; border:0; border-radius:9px; font-weight:650; }
.light-button:hover:not(:disabled) { background:#ebebec; }
.claim-top { min-height:35px; box-shadow:none; font-size:.8rem; }
.outline-button,.icon-button { border-radius:9px; }
.banner { min-height:0; margin:0; border-radius:0; padding:11px 21px; background:#222223; border-bottom:1px solid #303031; color:#e3e3e4; }
.banner svg { width:19px; height:19px; }
.banner strong { font-size:.86rem; }.banner p { margin:2px 0 0; font-size:.78rem; color:#b7b7b8; }
.messages { padding:22px clamp(14px,3vw,55px); gap:16px; }
.bubble { background:#252526; border-color:#353536; border-radius:3px 15px 15px; font-size:.94rem; line-height:1.5; max-width:min(88%,570px); }
.bubble.ai,.bubble.human { background:#2f2f30; border-color:#3f3f40; border-radius:15px 3px 15px 15px; }
.bubble .source { position:static; padding:0; background:none; color:#cececf; font-size:.72rem; margin-bottom:5px; }
.message-meta { font-size:.68rem; color:#b2b2b3; }
.case-divider { border:0; color:#b1b1b2; }
.composer { min-height:52px; margin:8px 18px 17px; border:1px solid #464647; background:#202021; border-radius:13px; }
.composer:focus-within { border-color:#b6b6b7; }
.composer .send { width:37px;height:37px;border-radius:9px;background:#d9d9da;color:#262627; }
.inspector { padding:0 17px 20px; }
.inspector-head { display:flex; align-items:center; justify-content:space-between; min-height:73px; border-bottom:1px solid var(--stroke); margin-bottom:20px; }
.inspector-head h2 { margin:0; font-size:1.05rem; }
#hide-inspector { display:none; }
.inspector section h2 { font-size:.84rem; font-weight:650; color:#c4c4c5; }
.inspector section { border-color:var(--stroke); padding-bottom:17px; margin-bottom:17px; }
.case-summary { margin:0 0 10px; font-size:.84rem; line-height:1.45; overflow-wrap:anywhere; }
.case-classification { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.25fr); gap:6px 9px; margin:0; font-size:.79rem; line-height:1.4; }
.case-classification dt { color:var(--muted); }
.case-classification dd { margin:0; overflow-wrap:anywhere; }
.mode-switch { padding:3px; border-radius:10px; background:#101011; margin-bottom:16px; }
.mode-switch button { min-height:31px; border-radius:7px; }
.mode-switch .active { background:#383839;color:#eaeaeb;box-shadow:none; }
.model-choice,.inspector textarea { background:#1e1e1f;border-color:#3e3e3f;border-radius:9px; }
.quick-actions button { min-height:39px; font-size:.84rem; }
#section-page { grid-column:1/-1; background:#121213; }
.page-wrap,.page-wrap:has(.team-directory) { width:min(100%,1240px); display:grid; grid-template-columns:minmax(190px,.74fr) minmax(0,2fr); gap:clamp(28px,5vw,78px); padding:clamp(32px,6vw,88px) clamp(22px,5vw,64px); }
.page-intro { align-self:start; }
#page-icon { display:grid; place-items:center; width:44px;height:44px;background:#2f2f30;color:#d9d9da;border-radius:12px;margin-bottom:20px; }
.page-intro h1 { margin:0 0 12px;font-size:clamp(1.8rem,3vw,2.55rem); }
.page-intro p { margin:0; line-height:1.6; color:var(--muted); font-size:.92rem; max-width:32ch; }
#page-content { align-content:start; }
.team-directory,.stats-summary,#page-content > :is(.modal-form,.article) { background:#1d1d1e; border-color:#373738; border-radius:14px; }
.team-table th { background:#232324;color:#bcbcbd; }.team-table :is(th,td) { border-color:#353536; }
.team-count { background:#363637; }.team-toolbar { gap:10px; }
[data-section=models] .modal-form,[data-section=settings] .modal-form { margin:0; }
.modal-form input,.modal-form select,.login-form input { background:#171718; border-color:#424243;border-radius:8px; }
[data-section=templates] #page-content .article { background:#1d1d1e; }
.stats-summary { display:grid;grid-template-columns:minmax(96px,.65fr) minmax(0,1.4fr);column-gap:22px;align-items:start; }
.stats-summary h2 { grid-column:1; }.stats-total { grid-column:1;grid-row:2;align-self:start;color:#e3e3e4; }
.stats-bars { grid-column:2;grid-row:1/3;padding-left:20px;border-left:1px solid var(--stroke); }
dialog { background:#1e1e1f;border-color:#424243;border-radius:15px; }
.login-screen { background:#111112; }
.login-shell { display:grid; grid-template-columns: .74fr 1fr; width:min(800px,100%); min-height:430px; overflow:hidden; background:#1c1c1d; border:1px solid #3f3f40; border-radius:19px; box-shadow:0 22px 70px #0005; }
.login-image { position:relative;inset:auto;z-index:0;opacity:1;background:linear-gradient(180deg,#101011e0,#10101139),url("/csky-uav.png") 68% center/cover; padding:32px; }
.login-image img { width:87px; }
.login-form { width:100%;padding:clamp(24px,4vw,48px);align-content:center;background:none;border:0;box-shadow:none; }
.login-form .brand { display:none; }.login-heading { text-align:left; }.login-heading h1 { font-size:2.1rem; }
@media(max-width:1050px) { .nav-item { padding:0 8px; } .sidebar { gap:12px; } .connection span { display:none; } }
@media(max-width:990px) {
  .desk,.desk.section-view { grid-template-columns:minmax(247px,34%) minmax(0,1fr); }
  .nav-item span { display:inline; }.sidebar .brand img { width:60px; }
  .inspector { padding:0 16px; background:#19191a; }.inspector #hide-inspector { display:inline-grid; }
  .page-wrap,.page-wrap:has(.team-directory) { grid-template-columns:1fr; gap:24px; }.page-intro p { max-width:65ch; }
}
@media(max-width:740px) {
  .nav-item { flex-direction:column;justify-content:center;gap:3px;font-size:.66rem; padding:0 5px; }
  .nav { flex:1;justify-content:space-around;gap:0; }.sidebar,.desk.open-chat .sidebar { padding:0 5px;gap:2px; }
  .sidebar .brand { display:none; }.connection { margin:0; }
}
@media(max-width:630px) {
  .desk,.desk.open-chat,.desk.section-view { grid-template-columns:minmax(0,1fr);grid-template-rows:55px minmax(0,1fr); }
  .desk.section-view .conversation { display:none; }
  .desk.section-view .sidebar { display:flex; } .chat-header { min-height:56px; }
  .banner { padding:9px 13px; }.messages { padding:16px 12px; }.composer { margin:6px 9px 10px; }
  .inspector-head { min-height:56px; }.stats-summary { display:block; }.stats-bars { border:0;padding:0; }
  .login-shell { display:block; max-width:410px;min-height:0; }.login-image { height:100px;padding:22px; background-position:center,70% 48%; }
}
.thread-side > svg { width:15px; height:15px; color:#b8b8b9; }
.thread[aria-expanded=true] .thread-side > svg { transform:rotate(180deg); }
.thread-cases { margin:2px 8px 10px 26px; border-left:1px solid #464647; padding:3px 0 3px 9px; display:grid; gap:3px; }
.thread-case { text-align:left; padding:8px 10px; border-radius:6px; font-size:.8rem; color:#c6c6c7; }
.thread-case:hover,.thread-case[aria-pressed=true] { color:#e9e9ea; background:#2b2b2c; }
[data-section=templates] #page-content:has(.knowledge-tools) { gap:12px; border:0; border-radius:0; overflow:visible; }
.knowledge-tools { display:flex; flex-wrap:wrap; gap:8px; }
.knowledge-tools :is(input,select) { min-height:40px; padding:8px 12px; border:1px solid var(--stroke); border-radius:9px; background:var(--panel); }
.knowledge-tools input { flex:1 1 220px; }
.knowledge-count,.knowledge-meta { color:var(--muted); font-size:.81rem; }
.knowledge-meta { overflow-wrap:anywhere; }
.knowledge-results { border:1px solid var(--stroke); border-radius:12px; overflow:hidden; }
.knowledge-results:empty { display:none; }
.knowledge-type { float:right; color:var(--muted); padding-left:10px; font-size:.72rem; font-weight:500; }

.archive-plan { display:grid; gap:16px; margin:16px 0; max-width:76ch; overflow-wrap:anywhere; }
.archive-plan-meta { display:grid; grid-template-columns:max-content minmax(0, 1fr); gap:5px 12px; margin:0; font-size:.86rem; }
.archive-plan-meta dt,.archive-step-detail strong { color:var(--muted); }
.archive-plan-meta dd { margin:0; }
.archive-plan-section h3 { margin:0 0 5px; font-size:.9rem; }
.archive-plan-section p { margin:0; }
.archive-plan-section :is(ul,ol) { margin:0; padding-inline-start:22px; }
.archive-plan-section li + li { margin-top:4px; }
.archive-steps li + li { margin-top:12px; }
.archive-step-detail { display:grid; gap:2px; padding-top:5px; font-size:.86rem; }
