/* Курс — стили. Токены и значения из design_handoff_kurs (tokens.css + README). Цветов, кроме стальной гаммы, нет. */
:root, [data-theme="light"] {
  --font-heading: "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, sans-serif;
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --card: #fcfcfd;
  --inset: #f6f6f8;
  --color-text: #1d1f20;
  --mut: color-mix(in srgb, var(--color-text) 58%, transparent);
  --color-accent: #5980a6;
  --ac-text: #416180;
  --edge: rgba(29,45,61,.09);
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);
  --sh: 0 1px 2px rgba(29,45,61,.06), 0 10px 24px rgba(29,45,61,.09);
  --sh-s: 0 1px 2px rgba(29,45,61,.1);
  --grad-brand: linear-gradient(145deg, #94bce3, #4f7498);
  --r-card: 18px; --r-tray: 20px; --r-dialog: 24px; --r-ctl: 11px; --r-seg: 13px; --r-bubble: 16px; --r-pill: 99px;
  color-scheme: light;
}
[data-theme="dark"] {
  --color-bg: #141618;
  --color-surface: #1c1f21;
  --card: #1d2023;
  --inset: #15171a;
  --color-text: #e8e9ea;
  --color-accent: #6f98c0;
  --ac-text: #94bce3;
  --edge: rgba(232,233,234,.10);
  --color-divider: rgba(232,233,234,.18);
  --sh: 0 1px 2px rgba(0,0,0,.4), 0 10px 24px rgba(0,0,0,.35);
  --sh-s: 0 1px 2px rgba(0,0,0,.45);
  color-scheme: dark;
}
@keyframes kfloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }
@keyframes kspin { to { transform: rotate(360deg) } }

*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: thin; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body); font-size: 15px; line-height: 1.5; font-weight: 400;
  background: var(--color-bg); color: var(--color-text); -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
h6 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
p { margin: 0; }
a { color: var(--ac-text); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }
[hidden] { display: none !important; }
.mut { color: var(--mut); }
.kick { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ac-text); }
.nowrap { white-space: nowrap; }

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none;
  font-weight: 600; font-size: 14px; line-height: 1.2; min-height: 38px; padding: 8px 16px;
  border: 1px solid transparent; border-radius: var(--r-ctl); background: transparent; color: var(--color-text);
}
.btn svg { display: block; flex: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-accent) 82%, #fff), var(--color-accent));
  color: #fff; border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 8px color-mix(in srgb, var(--color-accent) 40%, transparent);
}
[data-theme="dark"] .btn-primary { color: #0f1417; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-primary:active:not(:disabled) { filter: brightness(.95); }
.btn-secondary { background: var(--card); box-shadow: var(--sh-s); border-color: var(--edge); }
.btn-secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--color-accent) 9%, var(--card)); }
.btn-secondary:active:not(:disabled) { background: color-mix(in srgb, var(--color-accent) 16%, var(--card)); }
.btn-ghost { color: var(--ac-text); padding-inline: 8px; }
.btn-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-icon { width: 38px; padding: 0; }
.btn-block { width: 100%; }
.btn-lg { min-height: 44px; font-size: 15px; }
.btn-round { border-radius: 50%; }

/* ── формы ── */
.field > label:not(.check), .field > .lbl { display: block; font-size: 12px; margin-bottom: 5px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px; font-size: 14px; caret-color: var(--color-accent);
  background: var(--inset); border: 1px solid var(--edge); border-radius: var(--r-ctl);
  box-shadow: inset 0 1px 2px rgba(20,30,40,.08);
}
.input::placeholder { color: color-mix(in srgb, var(--color-text) 40%, transparent); }
.input:hover { border-color: color-mix(in srgb, var(--color-text) 28%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px; background: var(--inset); border: 1px solid var(--edge); border-radius: var(--r-seg);
}
.seg-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; font-size: 13px;
  border-radius: 10px; cursor: pointer; user-select: none; position: relative;
}
.seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--color-accent) 40%, transparent); }
[data-theme="dark"] .seg-opt:has(input:checked) { color: #0f1417; }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg-opt .dot { border-color: currentColor; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; position: relative; }
.radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio .rd { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--color-divider); }
.radio:hover .rd { border-color: var(--color-accent); }
.radio input:checked + .rd { border-color: var(--color-accent); background: var(--color-accent); box-shadow: inset 0 0 0 3.5px var(--card); }
.radio input:focus-visible + .rd { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; position: relative; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .bx { width: 18px; height: 18px; flex: none; border-radius: 6px; border: 1.5px solid var(--color-divider); display: grid; place-items: center; color: transparent; background: var(--inset); }
.check input:checked + .bx { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.check input:focus-visible + .bx { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ── поверхности ── */
.card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r-card); box-shadow: var(--sh); }
.dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--color-accent); flex: none; display: inline-block; }
.dot.s0 { background: transparent; }
.dot.s1 { background: linear-gradient(90deg, var(--color-accent) 50%, transparent 50%); }
.dot.s2 { background: var(--color-accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--r-pill); background: var(--card); box-shadow: var(--sh-s); font-size: 12px; }
.ring { width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: radial-gradient(var(--card) 54%, transparent 57%), conic-gradient(var(--color-accent) var(--p), var(--inset) 0); }
.ring.s0 { --p: 43deg; } .ring.s1 { --p: 198deg; } .ring.s2 { --p: 360deg; }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 14px; text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--color-text) 22%, transparent); border-radius: 16px; color: var(--mut); font-size: 13px; line-height: 1.4;
}
.empty .ei { width: 44px; height: 44px; border-radius: 50%; background: var(--card); box-shadow: var(--sh-s); display: grid; place-items: center; color: var(--ac-text); }

.ava {
  --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center; vertical-align: middle;
  background: linear-gradient(145deg, var(--card), color-mix(in srgb, var(--color-accent) 22%, var(--card)));
  box-shadow: var(--sh-s); font-size: calc(var(--s) * .36); font-weight: 600; color: var(--color-text); object-fit: cover; line-height: 1;
}
img.ava { display: inline-block; background: var(--inset); }

/* ── каркас приложения ── */
.shell { display: flex; height: 100dvh; background: var(--color-bg); }
.side {
  width: 208px; flex: none; background: var(--card); box-shadow: var(--sh); z-index: 2; padding: 20px 12px;
  display: flex; flex-direction: column; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand img { width: 28px; height: 28px; filter: drop-shadow(0 2px 5px rgba(79,116,152,.4)); }
.brand b { font-family: var(--font-heading); font-size: 19px; font-weight: 700; letter-spacing: .06em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button, .tabs button {
  border: 0; background: transparent; cursor: pointer; color: var(--color-text); text-align: left;
}
.nav button { border-radius: var(--r-ctl); display: flex; align-items: center; gap: 10px; padding: 9px 10px; font-size: 14px; }
.nav button:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.nav button[aria-current="page"] { background: color-mix(in srgb, var(--color-accent) 16%, transparent); color: var(--ac-text); font-weight: 600; }
.nav .bdg { margin-left: auto; font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--color-accent); color: #fff; font-weight: 600; }
[data-theme="dark"] .nav .bdg { color: #0f1417; }
.me-row { margin-top: auto; display: flex; align-items: center; gap: 2px; }
.me-out { flex: none; width: 32px; min-height: 36px; padding: 0; color: var(--mut); }
.me-out:hover:not(:disabled) { color: var(--ac-text); }
.me { display: flex; gap: 8px; align-items: center; padding: 8px 4px 8px 6px; border: 0; background: transparent; cursor: pointer; text-align: left; border-radius: var(--r-ctl); flex: 1; min-width: 0; }
.me:hover { background: color-mix(in srgb, var(--color-text) 6%, transparent); }
.me .who { display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; min-width: 0; }
.me .who b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { color: var(--mut); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 28px 16px; border-bottom: 1px solid var(--color-divider); }
.top .date { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.top h2 { font-size: 29px; }
.top .acts { display: flex; gap: 8px; align-items: center; }
.top .back { display: none; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px; }
.tabs { display: none; }

/* ── обзор ── */
.stack { display: flex; flex-direction: column; gap: 24px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.stat span { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.stat b { font-family: var(--font-heading); font-size: 54px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.panel h6 { margin-bottom: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-divider); font-size: 14px; }
.row.link { cursor: pointer; }
.row.link:hover .t { color: var(--ac-text); }
.row .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.row .tm { color: var(--mut); white-space: nowrap; font-size: 13px; }
.row .ra { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* ── доска ── */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; background: var(--inset); border-radius: var(--r-tray); padding: 12px; box-shadow: inset 0 1px 3px rgba(20,30,40,.07); min-width: 0; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 13px; }
.col-head b { font-weight: 600; }
.tcard { padding: 14px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; min-width: 0; text-align: left; width: 100%; }
.tcard:hover { border-color: color-mix(in srgb, var(--color-accent) 40%, var(--edge)); }
.tcard .l1 { display: flex; justify-content: space-between; gap: 8px; }
.tcard .l1 span:last-child { font-size: 11px; color: var(--mut); }
.tcard .ttl { font-family: var(--font-heading); font-size: 15px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.tcard .l3 { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--mut); }
.tcard .l3 .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tcard .over { color: var(--color-text); font-weight: 600; }
.more { align-self: center; }

/* ── карточка задачи и чат ── */
.detail { display: grid; grid-template-columns: 1fr 380px; gap: 32px; height: 100%; }
.d-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; overflow: auto; padding-bottom: 8px; }
.d-main h3 { font-size: 29px; margin-top: 4px; overflow-wrap: anywhere; }
.props { display: grid; grid-template-columns: 120px 1fr; gap: 12px 0; font-size: 14px; border-top: 1px solid var(--color-divider); padding-top: 16px; align-items: center; }
.props > span:nth-child(odd) { color: var(--mut); }
.props .pv { display: flex; align-items: center; gap: 8px; }
.desc { font-size: 15px; line-height: 1.6; max-width: 560px; white-space: pre-wrap; overflow-wrap: anywhere; }
.files { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fchip { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--edge); border-radius: 12px; background: var(--card); color: var(--color-text); text-decoration: none; max-width: 100%; }
a.fchip:hover { border-color: color-mix(in srgb, var(--color-accent) 45%, var(--edge)); }
.fchip svg { flex: none; color: var(--ac-text); }
.fchip .fi { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; min-width: 0; }
.fchip .fi b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip .fi span { color: var(--mut); font-size: 11px; }
.frow { display: flex; gap: 6px; align-items: center; max-width: 100%; }
.d-chat { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.d-chat-head { padding: 12px 16px; border-bottom: 1px solid var(--color-divider); }
.chat-list { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 92%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .mb { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg.mine .mb { align-items: flex-end; }
.msg .who { font-size: 11px; color: var(--mut); }
.bubble { padding: 8px 12px; font-size: 14px; line-height: 1.4; border-radius: var(--r-bubble); background: transparent; border: 1px solid var(--color-divider); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.msg .fchip { background: var(--color-bg); }
.msg img.pic { max-width: 220px; max-height: 180px; border-radius: 12px; border: 1px solid var(--edge); object-fit: cover; }
.sysmsg { align-self: center; font-size: 11px; color: var(--mut); text-align: center; padding: 2px 8px; }
.progress { height: 4px; border-radius: 4px; background: var(--inset); overflow: hidden; margin-top: 6px; min-width: 120px; }
.progress i { display: block; height: 100%; background: var(--color-accent); width: 0; }
.composer { padding: 10px; border-top: 1px solid var(--color-divider); display: flex; gap: 6px; align-items: flex-end; background: var(--card); }
.composer .input { min-height: 38px; max-height: 120px; resize: none; padding: 8px 12px; }

/* ── команда, уведомления, профиль ── */
.table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); padding: 4px 14px; font-weight: 600; }
.table td { background: var(--card); padding: 10px 14px; }
.table td:first-child { border-radius: 12px 0 0 12px; }
.table td:last-child { border-radius: 0 12px 12px 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: color-mix(in srgb, var(--color-accent) 7%, var(--card)); }
.table tr.off td { opacity: .55; }
.table .who { display: flex; gap: 10px; align-items: center; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--color-divider); color: var(--mut); margin-left: 6px; }
.notes { max-width: 720px; display: flex; flex-direction: column; }
.note { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--color-divider); cursor: pointer; }
.note svg { color: var(--ac-text); flex: none; }
.note .nt { flex: 1; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.note .tm { color: var(--mut); font-size: 12px; white-space: nowrap; }
.note .new { width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); flex: none; }
.prof { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; max-width: 860px; }
.prof .full { grid-column: 1 / 3; }
.prof .head { display: flex; gap: 16px; align-items: center; }
.prof .head b { font-size: 18px; font-weight: 500; }
.ava-edit { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.ava-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: var(--sh-s); display: grid; place-items: center; color: var(--ac-text); }
.errtxt { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.hint { font-size: 12px; color: var(--mut); line-height: 1.4; margin-top: 6px; }

/* ── диалоги и уведомления-тосты ── */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(18,26,34,.38); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 24px; }
.dialog {
  width: min(600px, 100%); max-height: 100%; overflow: auto; background: var(--card); border-radius: var(--r-dialog);
  box-shadow: 0 24px 60px rgba(18,26,34,.35), 0 2px 6px rgba(18,26,34,.2); padding: 26px 28px; display: flex; flex-direction: column; gap: 20px;
}
.dialog.narrow { width: min(440px, 100%); }
.dialog .dh { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog .dh h3 { font-size: 26px; }
.dialog .dh .back { display: none; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; width: 100%; }
.form2 .full { grid-column: 1 / 3; }
.dacts { display: flex; gap: 8px; flex-wrap: wrap; }
.crop { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.crop canvas { width: 280px; height: 280px; border-radius: 50%; touch-action: none; cursor: grab; background: var(--inset); box-shadow: var(--sh-s); }
.crop input[type=range] { width: 100%; accent-color: var(--color-accent); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--card); color: var(--color-text);
  border: 1px solid var(--edge); border-radius: 12px; box-shadow: var(--sh); padding: 10px 16px; font-size: 14px; max-width: min(92vw, 460px); }

/* ── вход ── */
.login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100dvh; background: var(--color-bg); }
.login-left { padding: 56px 80px; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; gap: 32px; }
.login-left .login-brand { justify-self: start; align-self: start; }
.login-left .login-foot { align-self: end; text-align: center; }
.login-brand { display: flex; flex-direction: column; gap: 8px; }
.login-brand .bl { display: flex; align-items: center; gap: 10px; }
.login-brand img { width: 28px; height: 28px; filter: drop-shadow(0 2px 5px rgba(79,116,152,.4)); }
.login-brand b { font-family: var(--font-heading); font-size: 19px; font-weight: 700; letter-spacing: .06em; }
.login-brand span { font-size: 12px; line-height: 1.3; color: var(--mut); }
.login-form { display: flex; flex-direction: column; gap: 18px; max-width: 360px; width: 100%; margin: 0 auto; }
.login-foot { font-size: 12px; color: var(--mut); line-height: 1.4; }
.login-foot a { color: var(--ac-text); }
.lg-wrap { position: relative; }
.lg-field { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px 0 12px; background: var(--inset); border: 1px solid var(--edge); border-radius: var(--r-ctl); box-shadow: inset 0 1px 2px rgba(20,30,40,.08); }
.lg-field:hover { border-color: color-mix(in srgb, var(--color-text) 28%, transparent); }
.lg-field:focus-within { border-color: var(--color-accent); outline: 2px solid var(--color-accent); outline-offset: 0; }
.lg-field > svg { flex: none; color: var(--mut); }
.lg-field input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; font-size: 14px; outline: none; caret-color: var(--color-accent); }
.lg-field input::placeholder { color: color-mix(in srgb, var(--color-text) 40%, transparent); }
.lg-field.sel { cursor: pointer; padding-left: 6px; }
.lg-field.sel .nm { flex: 1; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-chev { width: 34px; height: 32px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; display: grid; place-items: center; color: var(--mut); flex: none; }
.lg-chev:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.lg-chev svg { transition: transform .15s; }
.lg-chev.open svg { transform: rotate(180deg); }
.lg-menu { position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0; max-height: 300px; overflow: auto; padding: 6px; background: var(--card); border: 1px solid var(--edge); border-radius: 14px; box-shadow: var(--sh); }
.lg-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; text-align: left; font-size: 14px; }
.lg-opt:hover, .lg-opt:focus-visible { background: color-mix(in srgb, var(--color-accent) 12%, transparent); }
.lg-opt .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-opt.manual { color: var(--ac-text); font-size: 13px; }
/* Наведение увеличивает аватарку на 170% с пружинной анимацией, как на входе в ПЛАТФОРМУ. Работает на строке списка,
   на выбранном человеке и на самом кружке; transform не двигает разметку, соседние строки не прыгают. */
.lg-opt .ava, .lg-field.sel .ava { position: relative; transition: transform .22s cubic-bezier(.34, 1.56, .64, 1), box-shadow .22s ease; will-change: transform; }
.lg-opt:hover .ava, .lg-opt:focus-visible .ava, .lg-field.sel:hover .ava, .lg-opt .ava:hover, .lg-field.sel .ava:hover {
  transform: scale(1.7); box-shadow: 0 8px 22px -4px rgba(0, 0, 0, .35); z-index: 1; }
.lg-sep { height: 1px; background: var(--color-divider); margin: 4px 6px; }
.login-right { position: relative; overflow: hidden; background: var(--inset); box-shadow: inset 1px 0 0 var(--edge); }
.art-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--edge) 1px, transparent 1px), linear-gradient(90deg, var(--edge) 1px, transparent 1px); background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 72%); mask-image: radial-gradient(circle at 50% 50%, #000 25%, transparent 72%); }
.art-card { position: absolute; width: 210px; padding: 16px; border-radius: 18px; background: var(--card); box-shadow: var(--sh); display: flex; flex-direction: column; gap: 10px; opacity: .85; }
.art-card i { display: block; border-radius: 5px; background: color-mix(in srgb, var(--color-text) 14%, transparent); height: 10px; }
.art-card i.a { height: 7px; width: 40%; border-radius: 4px; background: color-mix(in srgb, var(--color-accent) 35%, transparent); }
.art-card .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.art-card .ft i.c { width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--color-accent) 30%, var(--card)); }
.art-card .ft i.d { width: 36px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--color-text) 12%, transparent); }
.art-ring { position: absolute; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  background: conic-gradient(from 200deg, transparent 0deg, var(--color-accent) 20deg, #8db3d8 250deg, transparent 252deg, color-mix(in srgb, var(--color-text) 10%, transparent) 252deg);
  box-shadow: 0 20px 50px color-mix(in srgb, var(--color-accent) 28%, transparent); display: grid; place-items: center; }
.art-ring > div { width: 200px; height: 200px; border-radius: 50%; background: var(--card); box-shadow: inset 0 2px 8px rgba(20,30,40,.1), var(--sh); display: grid; place-items: center; }
.art-ring > div > div { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(145deg, #8db3d8, var(--color-accent)); box-shadow: 0 8px 20px color-mix(in srgb, var(--color-accent) 45%, transparent); display: grid; place-items: center; color: #fff; }
.art-pill { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; background: var(--card); box-shadow: var(--sh); font-size: 13px; animation: kfloat 6s ease-in-out infinite; }

.loading { min-height: 100dvh; display: grid; place-items: center; }
.loading i { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--edge); border-top-color: var(--color-accent); animation: kspin .8s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .art-pill, .loading i { animation: none; } .lg-chev svg, .lg-opt .ava, .lg-field.sel .ava { transition: none; }
  .lg-opt:hover .ava, .lg-opt:focus-visible .ava, .lg-field.sel:hover .ava, .lg-opt .ava:hover, .lg-field.sel .ava:hover { transform: none; box-shadow: none; }
}

.mseg, .seg-opt .sh, .ec-m, .table .m, .mob-only { display: none; }
.toolbar { display: flex; gap: 12px 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .tb-proj { min-width: 220px; }
.pj { margin-bottom: 28px; }
.pj-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px 4px; }
.pj-h span:first-child { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--color-text); font-weight: 600; font-family: var(--font-heading); }
.max-line { font-size: 14px; }
.steps { margin: 0 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.word { font-family: var(--font-heading); font-size: 40px; font-weight: 600; letter-spacing: -.02em; text-align: center; padding: 14px 10px; margin: 6px 0 10px; border-radius: var(--r-card); background: var(--inset); box-shadow: inset 0 1px 3px rgba(20,30,40,.1); overflow-wrap: anywhere; }
.empty-wrap { display: block; }
.shell.no-tabs .tabs { display: none; }

/* ── мобильный вид (< 1000 px) ── */
@media (max-width: 999px) {
  .side { display: none; }
  .mseg { display: flex; width: 100%; }
  .mseg .seg-opt { flex: 1; }
  .seg-opt .sh { display: inline; }
  .seg-opt .lg { display: none; }
  .ec-m { display: inline; } .ec-d { display: none; }
  .table .m { display: inline; }
  .view > * { flex: none; }
  .pj-off-m { display: none; }
  .mob-only { display: block; }
  .pj { margin-bottom: 8px; }
  .pj-h { margin-left: 0; }
  .toolbar .tb-proj { flex: 1 1 100%; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg .seg-opt { flex: 1; }
  .view > .detail { flex: 1 0 auto; }
  .top { padding: 20px 18px 12px; padding-top: max(20px, env(safe-area-inset-top)); }
  .top .date { display: none; }
  .top h2 { font-size: 25px; }
  .top .back { display: inline-flex; }
  .top .acts .btn-label { display: none; }
  .top .acts .btn { width: 44px; height: 44px; padding: 0; }
  .top .acts .desk { display: none; }
  .top .ttl { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .view { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
  .stats { gap: 12px; }
  .stat { padding: 12px; border-radius: 16px; }
  .stat b { font-size: 34px; }
  .stat span { font-size: 11px; flex-direction: column; align-items: flex-start; gap: 4px; order: 2; color: var(--mut); }
  .two { grid-template-columns: 1fr; gap: 14px; }
  .board { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .board .col { background: transparent; box-shadow: none; padding: 0; }
  .board .col-head { display: none; }
  .board .col:not(.on) { display: none; }
  .tcard .ttl { font-size: 16px; }
  .tcard .btn { min-height: 44px; }
  .detail { display: flex; flex-direction: column; height: auto; gap: 14px; }
  .d-main { overflow: visible; }
  .d-main h3 { font-size: 24px; }
  .props { grid-template-columns: 96px 1fr; gap: 8px 0; border-top: 0; padding-top: 0; }
  .desc { font-size: 14px; line-height: 1.55; max-width: none; }
  .d-chat { background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible; flex: 1 0 auto; }
  .d-chat-head { padding: 12px 0 0; border-bottom: 0; border-top: 1px solid var(--color-divider); }
  .chat-list { padding: 12px 0; overflow: visible; flex: 1 0 auto; }
  .msg { max-width: 96%; }
  .composer { position: sticky; bottom: 0; margin: 0 -18px -16px; padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); background: var(--color-bg); }
  .composer .btn { width: 44px; height: 44px; }
  .composer .input { font-size: 16px; min-height: 44px; }
  .tabs { display: flex; border-top: 1px solid var(--color-divider); background: var(--color-bg); padding-bottom: env(safe-area-inset-bottom); }
  .tabs button { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: var(--mut); position: relative; }
  .tabs button[aria-current="page"] { color: var(--ac-text); }
  .tabs .bdg { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; border-radius: 99px; background: var(--color-accent); color: #fff; display: grid; place-items: center; font-weight: 600; }
  .table, .table thead, .table tbody, .table tr, .table td { display: block; }
  .table { border-spacing: 0; }
  .table thead { display: none; }
  .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--color-divider); }
  .table td { background: transparent; padding: 0; }
  .table td:first-child, .table td:last-child { border-radius: 0; }
  .table td.pos { order: 3; width: 100%; color: var(--mut); font-size: 12px; padding-left: 48px; margin-top: -4px; }
  .table td.cnt { order: 2; margin-left: -8px; font-size: 12px; color: var(--mut); }
  .table td.cnt:nth-child(3) { margin-left: auto; }
  .prof { grid-template-columns: 1fr; gap: 16px; }
  .prof .full { grid-column: 1; }
  .input, .lg-field input, select.input { font-size: 16px; min-height: 44px; }
  .lg-field { min-height: 44px; }
  .seg-opt { min-height: 40px; }
  .btn { min-height: 44px; }
  .backdrop { padding: 0; }
  .dialog { width: 100%; height: 100%; border-radius: 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); padding-top: max(20px, env(safe-area-inset-top)); }
  .dialog.narrow { height: auto; max-height: 100%; border-radius: 24px 24px 0 0; align-self: end; }
  .backdrop:has(.dialog.narrow) { align-items: end; }
  .dialog .dh h3 { font-size: 24px; }
  .dialog .dh .back { display: inline-flex; }
  .dialog .dh .xbtn { display: none; }
  .dialog .dh { justify-content: flex-start; }
  .form2 { grid-template-columns: 1fr; gap: 16px; }
  .form2 .full { grid-column: 1; }
  .login { grid-template-columns: 1fr; }
  .login-left { padding: 36px 24px 24px; padding-top: max(36px, env(safe-area-inset-top)); }
  .login-right { display: none; }
  .toast { bottom: 76px; }
}
@media (max-width: 999px) and (min-width: 700px) {
  .login-form { max-width: 420px; }
}
