/* Personal OS — Launcher (web). Design: canvas "Personal OS", page «Веб» (dark, lime accent, Onest). */
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/tg/fonts/onest-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/tg/fonts/onest-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0A0B0D; --card: #15171B; --card-2: #1B1D22; --inset: #0F1013; --bubble: #23262C; --nav-on: #2A2D34;
  --line: rgba(255, 255, 255, 0.06); --line-2: rgba(255, 255, 255, 0.14); --chip: rgba(255, 255, 255, 0.07);
  --text: #F2F3F5; --text-2: #D5D8DD; --muted: #9AA0A8; --faint: #8A9098;
  --lime: #C6F36B; --lime-2: #DDF9A0; --amber: #F5B84B; --amber-2: #F7C873; --red: #FF9387; --green: #93E89D;
  --teal: #7FE3D5; --violet: #C9B6FF; --blue: #9AB8FF; --sky: #9FD6FF;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 Onest, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.55; }
a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-2); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; padding: 8px 12px; border-radius: 10px; background: var(--lime); color: var(--bg); }
.skip:focus { left: 8px; }

#bg { position: fixed; left: 0; right: 0; top: 0; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 100% at 85% 0%, rgba(198, 243, 107, 0.1) 0%, rgba(198, 243, 107, 0) 70%); }
body[data-screen="approvals"] #bg { background: radial-gradient(60% 100% at 85% 0%, rgba(245, 184, 75, 0.1) 0%, rgba(245, 184, 75, 0) 70%); }
body[data-screen="chat"] #bg { background: radial-gradient(60% 100% at 85% 0%, rgba(91, 124, 255, 0.12) 0%, rgba(91, 124, 255, 0) 70%); }

/* ---- shell ---- */
.shell { position: relative; z-index: 1; max-width: 1600px; margin: 0 auto; display: flex; min-height: 100vh; }
#side { width: 232px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 24px 16px;
  display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 17px; font-weight: 700; }
.orb-s { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 34% 30%, #E2E9FF 0%, #5B7CFF 45%, #1B2A6B 100%); box-shadow: 0 0 18px rgba(91, 124, 255, 0.5); }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { height: 44px; padding: 0 12px; border-radius: 12px; display: flex; align-items: center; gap: 12px; color: var(--muted);
  font-size: 15px; font-weight: 500; white-space: nowrap; }
#nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
#nav a[aria-current="page"] { background: var(--nav-on); color: var(--text); font-weight: 600; }
#nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--amber);
  color: #1A1206; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.backends { margin-top: auto; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.backends > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.backends > div > span:first-child { white-space: nowrap; }

#app { flex: 1; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; outline: none; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  #side { position: sticky; z-index: 5; width: auto; height: auto; flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(10, 11, 13, 0.94);
    backdrop-filter: blur(12px); overflow: visible; }
  .brand span:last-child { display: none; }
  .brand { padding: 0; }
  #nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
  #nav::-webkit-scrollbar { display: none; }
  #nav a { height: 40px; padding: 0 12px; gap: 8px; }
  #nav a svg { display: none; }
  .backends { display: none; }
  #app { padding: 20px 16px 40px; gap: 18px; }
}

/* ---- header ---- */
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.head .t { flex: 1 1 280px; min-width: 0; }
.head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.head .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.head .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- controls ---- */
.btn { height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  flex-shrink: 0; }
.btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--bg); font-weight: 600; }
.btn.primary:hover { background: var(--lime-2); }
.btn.danger { color: var(--red); }
.btn.sm { height: 36px; border-radius: 18px; padding: 0 14px; }
.btn.xs { height: 32px; border-radius: 16px; padding: 0 12px; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; background: var(--chip); color: #E4E6EA; font-size: 14px;
  font-weight: 500; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); font-weight: 600; }
.link { font-size: 13px; font-weight: 500; color: var(--lime); background: none; border: 0; padding: 12px 0; margin: -12px 0; }
.tag { height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center;
  gap: 5px; white-space: nowrap; flex-shrink: 0; background: var(--chip); color: #C9CDD3; }
.tag.lime { background: rgba(198, 243, 107, 0.14); color: var(--lime); }
.tag.green { background: rgba(126, 224, 138, 0.14); color: var(--green); }
.tag.amber { background: rgba(245, 184, 75, 0.14); color: var(--amber-2); }
.tag.red { background: rgba(255, 107, 94, 0.14); color: var(--red); }
.tag.prof { font-weight: 500; color: var(--text-2); }

/* ---- layout blocks ---- */
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 2 1 500px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.col-list { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card { padding: 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); display: flex;
  flex-direction: column; gap: 2px; min-width: 0; }
.card.warn { border-color: rgba(245, 184, 75, 0.28); }
.card.pad { padding: 24px; gap: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.card-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 44px; color: var(--text); min-width: 0; }
.row + .row { border-top: 1px solid var(--line); }
a.row:hover, button.row:hover { color: var(--text); background: rgba(255, 255, 255, 0.02); }
button.row { width: 100%; border: 0; background: none; text-align: left; padding-left: 0; padding-right: 0; }
.row .main { flex: 1; min-width: 0; }
.row .title { display: block; font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.row .meta { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.35; overflow-wrap: anywhere; }
.row .end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.row .time { font-size: 13px; color: var(--faint); white-space: nowrap; }
.row .clock { width: 52px; flex-shrink: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.row.past { opacity: 0.55; }
.ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--chip); color: var(--text-2); }
.ico.s { width: 36px; height: 36px; border-radius: 11px; }
.ico.teal { background: rgba(95, 212, 196, 0.14); color: var(--teal); }
.ico.blue { background: rgba(122, 162, 255, 0.14); color: var(--blue); }
.ico.violet { background: rgba(183, 156, 255, 0.14); color: var(--violet); }
.ico.sky { background: rgba(124, 200, 255, 0.14); color: var(--sky); }
.ico.red { background: rgba(255, 107, 94, 0.14); color: var(--red); }
.ico.green { background: rgba(126, 224, 138, 0.14); color: var(--green); }
.ico.amber { background: rgba(245, 184, 75, 0.14); color: var(--amber-2); }
.check { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 2px solid #7B828B; background: transparent; padding: 0;
  display: flex; align-items: center; justify-content: center; color: var(--bg); }
.check.over { border-color: #FF8A7A; }
.check.on { background: var(--lime); border-color: var(--lime); }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }
.note { font-size: 13px; color: var(--muted); }
.err { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 107, 94, 0.08); color: var(--red);
  font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.skeleton { height: 120px; border-radius: 22px; background: linear-gradient(90deg, var(--card) 0%, #1B1E23 50%, var(--card) 100%);
  background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.banner { padding: 16px 20px; border-radius: 18px; background: rgba(91, 124, 255, 0.1); border: 1px solid rgba(125, 152, 255, 0.3);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.banner .main { flex: 1 1 260px; min-width: 0; }
.banner b { display: block; font-size: 15px; }

/* ---- approvals ---- */
.ap-item { padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; gap: 12px;
  color: var(--text); width: 100%; text-align: left; }
.ap-item:hover { color: var(--text); background: var(--card-2); }
.ap-item[aria-current="true"] { background: var(--card-2); border-color: rgba(245, 184, 75, 0.45); }
.ap-item .main { flex: 1; min-width: 0; }
.ap-item .title { display: block; font-size: 15px; font-weight: 600; }
.ap-item .meta { display: block; font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.ap-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-top .ico { width: 44px; height: 44px; }
.ap-top .main { flex: 1; min-width: 200px; }
.ap-top .title { font-size: 20px; font-weight: 600; }
.ap-top .meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
dl.kv { margin: 0; }
dl.kv > div { display: flex; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
dl.kv dt { width: 80px; flex-shrink: 0; color: var(--muted); }
dl.kv dd { margin: 0; flex: 1; min-width: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
.inset { padding: 16px; border-radius: 16px; background: var(--inset); border: 1px solid var(--line); font-size: 15px; line-height: 1.6;
  color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; margin: 0; font-family: inherit; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .grow { flex: 1; }

/* ---- chat ---- */
.chat { min-height: 560px; height: calc(100vh - 210px); padding: 20px; gap: 16px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 4px; }
.msg-u { align-self: flex-end; max-width: min(520px, 85%); padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: var(--bubble);
  font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-b { display: flex; flex-direction: column; gap: 8px; max-width: min(680px, 95%); }
.msg-b .who { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.msg-b .who i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #E2E9FF 0%, #5B7CFF 45%, #1B2A6B 100%); }
.msg-b .who button { border: 0; background: none; padding: 0; color: var(--faint); font-weight: 400; font-size: 13px; }
.msg-b .who button:hover { color: var(--lime); }
.msg-b .txt { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-b.thinking .txt { color: var(--muted); }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 28px; background: var(--inset); border: 1px solid rgba(255, 255, 255, 0.08); }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 200px; resize: none; border: 0; background: transparent; color: var(--text);
  font-size: 15px; line-height: 1.45; padding: 11px 10px; outline: none; }
.composer textarea::placeholder { color: var(--faint); }
.send { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--lime); color: var(--bg); display: flex;
  align-items: center; justify-content: center; }
.composer select { height: 44px; max-width: 150px; border-radius: 22px; border: 0; background: var(--chip); color: var(--text-2); padding: 0 10px; font-size: 13px; }

/* ---- runs / steps ---- */
ol.steps { list-style: none; margin: 0; padding: 0; }
ol.steps li { display: flex; gap: 12px; }
ol.steps .rail { width: 22px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
ol.steps .rail::after { content: ""; flex: 1; width: 2px; background: var(--line); margin: 4px 0; }
ol.steps li:last-child .rail::after { display: none; }
.st { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 700; }
.st.done { background: rgba(198, 243, 107, 0.16); color: var(--lime); }
.st.running { background: rgba(245, 184, 75, 0.18); color: var(--amber); box-shadow: 0 0 0 4px rgba(245, 184, 75, 0.1); }
.st.failed { background: rgba(255, 107, 94, 0.16); color: var(--red); }
ol.steps .body { flex: 1; min-width: 0; padding-bottom: 16px; }
ol.steps .name { font-size: 15px; font-weight: 500; }
ol.steps .sm { font-size: 13px; color: var(--faint); margin-top: 2px; }
.reply { font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* ---- sign-in ---- */
.gate { max-width: 420px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 16px; text-align: center; align-items: stretch; }
.gate .orb-l { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 8px;
  background: radial-gradient(circle at 34% 30%, #E2E9FF 0%, #5B7CFF 45%, #1B2A6B 100%); box-shadow: 0 0 40px rgba(91, 124, 255, 0.5); }
.gate h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.gate p { margin: 0; color: var(--muted); }
.gate .btn { width: 100%; }

/* ---- settings ---- */
.set-nav { display: flex; flex-direction: column; gap: 2px; }
.set-nav a { height: 44px; padding: 0 12px; border-radius: 12px; display: flex; align-items: center; color: var(--muted); font-weight: 500; }
.set-nav a[aria-current="page"] { background: var(--nav-on); color: var(--text); font-weight: 600; }
.set-col { flex: 0 1 240px; min-width: 200px; }

#toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px; border-radius: 16px; background: #2A2D34; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; gap: 12px; font-size: 14px; }
#toast .grow { flex: 1; overflow-wrap: anywhere; }
#toast button { border: 0; background: none; color: var(--lime); font-weight: 600; }

/* ---- meetings & live recording ---- */
.rec-dot-s { width: 9px; height: 9px; border-radius: 50%; background: #FF6B5E; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255, 107, 94, 0.18); }
.btn.rec-cta { gap: 9px; }
#nav .rec-on { margin-left: auto; width: 9px; height: 9px; border-radius: 50%; background: #FF6B5E; animation: rec-blink 1.4s ease-in-out infinite; }
#nav .badge + .rec-on { margin-left: 6px; }
@keyframes rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { #nav .rec-on { animation: none; } }
#recbar { position: fixed; z-index: 25; right: 24px; bottom: 24px; height: 40px; padding: 0 14px; border-radius: 20px; display: flex; align-items: center; gap: 10px;
  background: rgba(255, 107, 94, 0.16); border: 1px solid rgba(255, 107, 94, 0.35); color: #FFB3AA; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-variant-numeric: tabular-nums; }
#recbar[hidden] { display: none; }
#recbar .grow { width: 6px; }
@media (max-width: 900px) { #recbar { top: auto; bottom: 16px; left: 16px; right: 16px; justify-content: flex-start; } #recbar .grow { flex: 1; } }
.rec-page { padding-top: 8px; }
.banner.warn { background: rgba(245, 184, 75, 0.08); border-color: rgba(245, 184, 75, 0.3); margin-bottom: 12px; }
.seg { display: inline-flex; align-self: flex-start; width: fit-content; padding: 4px; border-radius: 16px; background: var(--card); margin: 0 0 14px; }
.seg button { height: 36px; padding: 0 18px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; }
.seg button[aria-selected="true"] { background: var(--nav-on); color: var(--text); font-weight: 600; }
.player { margin-bottom: 14px; }
.player audio { width: 100%; height: 40px; color-scheme: dark; }
.prose { line-height: 1.55; color: var(--text-2); }
.prose h3 { margin: 16px 0 6px; font-size: 15px; color: var(--text); }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 8px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; }
.prose li { margin: 3px 0; }
.transcript { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.seg-line { display: flex; gap: 12px; line-height: 1.5; color: var(--text-2); }
.ts { flex-shrink: 0; min-width: 52px; height: 24px; padding: 0 6px; border: 0; border-radius: 8px; background: rgba(198, 243, 107, 0.1); color: var(--lime);
  font: inherit; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; }
span.ts { background: transparent; color: var(--muted); }
button.ts:hover { background: rgba(198, 243, 107, 0.2); }
