@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./assets/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  color: #ecedee;
  background: #000;
  --text: #ecedee;
  --muted: #a1a1aa;
  --primary: #0088fa;
  --accent: #0088fa;
  --border: #ffffff26;
  --line: #ffffff1c;
  --field: #1c2236;
  --card: #1b2133;
  --surface: #121b2a;
  --selected: #2c3554;
  --rail-width: 64px;
  --header-height: 64px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; height: 100dvh; background: radial-gradient(80% 100% at 50% 0, #006fee33, #006fee00), #000; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #489fff; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; vertical-align: middle; }
.app-shell { display: grid; height: 100dvh; grid-template-columns: var(--rail-width) minmax(0, 1fr); grid-template-rows: var(--header-height) minmax(0, 1fr); }
.app-rail { grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 8px 16px; }
.rail-top, .rail-bottom { display: grid; justify-items: center; gap: 8px; }
.rail-bottom { width: 100%; margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.rail-logo, .rail-button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); }
.rail-logo { position: relative; color: #dce9ff; margin: 4px 0 10px; }
.rail-logo img { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); pointer-events: none; }
.rail-button:hover, .rail-button[aria-current="page"] { background: #1a2337; border-color: #ffffff18; }
.rail-button.avatar { width: 32px; height: 32px; border-radius: 50%; background: #3f3f46; font-size: 12px; }
.app-header { grid-column: 2; display: grid; grid-template-columns: minmax(130px, 1fr) auto minmax(130px, 1fr); align-items: center; gap: 12px; padding: 0 18px; z-index: 2; }
.app-crumb { display: flex; align-items: center; min-width: 0; gap: 4px; font-size: 14px; }
.app-crumb a { color: var(--muted); text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.app-crumb button { border: 0; background: none; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; padding: 6px 2px; }
.app-crumb button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-navigation { max-width: 100%; display: flex; align-items: center; gap: 7px; justify-content: center; }
.app-navigation a { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; white-space: nowrap; border-radius: 8px; font-size: 14px; font-weight: 500; }
.app-navigation a:hover { background: #ffffff0c; }
.app-navigation a[aria-current="page"] { background: var(--selected); }
.app-context { justify-self: end; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 7px; background: #3f3f46; color: #f4f4f5; font-size: 12px; white-space: nowrap; font-weight: 600; }
.status.active { background: #16b960; color: #fff; }
.bot-identity { display: flex; gap: 8px; align-items: center; text-align: left; border: 0; padding: 0; background: transparent; font-size: 14px; white-space: nowrap; min-width: 0; }
.bot-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px; color: #c4d4ef; background: #28334f; }
.bot-identity:hover .bot-avatar { background: #334264; }
.bot-identity-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bot-identity-text small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.workspace { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; position: relative; border-radius: 24px 0 0 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); overflow: auto; background: linear-gradient(rgb(15, 27, 43), rgba(15, 27, 43, 0)), #000; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; padding: 0; background: transparent; color: var(--muted); }
.icon-btn:hover:not(:disabled) { background: #ffffff12; color: var(--text); }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 32px; gap: 6px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; }
.btn:hover:not(:disabled) { background: #ffffff10; }
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.btn.primary:hover:not(:disabled) { background: #2098ff; }
.btn.soft { background: #0b2947; color: #8fc4ff; border-color: transparent; }
.btn.danger { color: #ff7791; }
.btn:disabled { opacity: .45; }
.field, .select, .textarea { min-width: 0; width: 100%; background: var(--field); border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; min-height: 32px; font-size: 13px; font-weight: 400; }
.field::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.field:disabled, .select:disabled, .textarea:disabled { opacity: .62; }
.select { appearance: none !important; -webkit-appearance: none !important; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='1.7'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-size: 15px; background-repeat: no-repeat; background-position: right 9px center; }
select::picker-icon { display: none !important; }
.textarea { min-height: 68px; resize: vertical; }
.field-label { display: grid; gap: 7px; min-width: 0; font-size: 13px; }
.field-label small { color: var(--muted); line-height: 1.4; }
.search-box { position: relative; display: flex; align-items: center; min-width: 120px; }
.search-box > svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.search-box > .field { min-height: 32px; padding-left: 34px; }
.stack { display: grid; gap: 14px; }
.two-col { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.caption { color: var(--muted); font-size: 13px; line-height: 1.5; }
.empty-state { text-align: center; color: var(--text); display: grid; justify-items: center; align-content: center; gap: 12px; padding: 32px 16px; }
.empty-state h3 { font-size: 16px; font-weight: 600; }
.empty-state p { font-size: 14px; color: var(--muted); max-width: 360px; line-height: 1.5; }
.empty-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: #aaadb5; background: #ffffff22; }
.dialog { width: min(520px,calc(100% - 28px)); border: 1px solid var(--border); padding: 0; color: var(--text); border-radius: 16px; background: #161d2c; box-shadow: 0 24px 90px #000a; max-height: min(86dvh, 850px); }
.dialog::backdrop { background: #0009; backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 8px 20px; }
.dialog-header h2 { font-size: 18px; font-weight: 600; }
.dialog-body { padding: 12px 20px 20px; }
.dialog-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
#announcements:not(:empty) { position: fixed; z-index: 40; bottom: 24px; right: 26px; padding: 12px 16px; border: 1px solid var(--border); background: #1c2537; color: var(--text); border-radius: 10px; box-shadow: 0 12px 33px #0009; font-size: 14px; }
@media (max-width: 1380px) {
  .app-header { grid-template-columns: minmax(100px,.7fr) auto minmax(80px,.7fr); gap: 6px; }
  .app-navigation { gap: 2px; }
  .app-navigation a { padding-inline: 9px; }
}
@media (max-width: 1020px) {
  .app-header { grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 32px 32px; padding: 0 12px; }
  .app-navigation { justify-content: flex-start; grid-column: 1 / -1; grid-row: 2; overflow-x: auto; scrollbar-width: none; }
  .app-navigation a { min-height: 29px; font-size: 13px; }
  .app-context { grid-column: 2; grid-row: 1; }
  .bot-avatar { width: 29px; height: 29px; border-radius: 8px; }
  .app-context .bot-identity-text small { display: none; }
}
@media (max-width: 580px) {
  :root { --rail-width: 44px; }
  .app-rail { padding-inline: 3px; }
  .rail-logo, .rail-button { width: 33px; }
  .app-crumb { font-size: 12px; }
  .app-context .bot-identity-text { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .workspace { border-radius: 15px 0 0 0; }
}
