/* Дежурства КС54 — по брендбуку «Линии связи».
   Линии под 45°, срезанные углы вместо скруглений, без градиентов и теней. */

/* ---------- Шрифты: Unbounded — заголовки и цифры, Golos Text — текст, JetBrains Mono — метки ---------- */
@font-face { font-family: 'Unbounded'; font-display: swap; font-weight: 200 900; src: url(/fonts/display/unbounded-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-display: swap; font-weight: 200 900; src: url(/fonts/display/unbounded-latin-wght-normal.woff2) format('woff2-variations'); 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; }
@font-face { font-family: 'Golos Text'; font-display: swap; font-weight: 400 900; src: url(/fonts/sans/golos-text-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-display: swap; font-weight: 400 900; src: url(/fonts/sans/golos-text-latin-wght-normal.woff2) format('woff2-variations'); 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; }
@font-face { font-family: 'JetBrains Mono'; font-display: swap; font-weight: 100 800; src: url(/fonts/mono/jetbrains-mono-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-display: swap; font-weight: 100 800; src: url(/fonts/mono/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations'); 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 {
  /* бренд — одинаков в обеих темах */
  --navy: #012673; --blue: #005EAA; --orange: #FF7614; --op5: #C4F03A;
  --paper: #FFFFFF; --ink: #0B1533;
  /* тема: светлая */
  --bg: #F4F6FB; --surface: #FFFFFF; --surface-2: #E9EEF7; --fg: #0B1533; --muted: #4A5675; --line: #D5DCE8;
  --link: #005EAA; --hot: #B34700; --ring: #005EAA; --navy-ui: #012673; --hot-soft: rgba(255, 118, 20, .14);
  --display: 'Unbounded', 'Montserrat', system-ui, sans-serif;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --cut-s: 8px; --cut-m: 16px; --cut-l: 40px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #060B1A; --surface: #0D1634; --surface-2: #13204A; --fg: #EEF2FA; --muted: #A3AFCC; --line: #22305C;
  --link: #7DBBF5; --hot: #FF8A3D; --ring: #7DBBF5; --navy-ui: #5AA9F0; --hot-soft: rgba(255, 138, 61, .16);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060B1A; --surface: #0D1634; --surface-2: #13204A; --fg: #EEF2FA; --muted: #A3AFCC; --line: #22305C;
    --link: #7DBBF5; --hot: #FF8A3D; --ring: #7DBBF5; --navy-ui: #5AA9F0; --hot-soft: rgba(255, 138, 61, .16);
    color-scheme: dark;
  }
}

/* ---------- База ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0; }
.display { font: 800 clamp(34px, 6.4vw, 72px)/.95 var(--display); letter-spacing: -.035em; }
h1, .headline { font-size: clamp(26px, 4vw, 44px); line-height: 1.02; font-weight: 700; letter-spacing: -.025em; }
h2, .title { font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 600; }
.lbl, .overline { font: 500 12px/16px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.overline { color: var(--hot); display: flex; align-items: center; gap: 10px; }
.overline::before { content: ""; width: 24px; height: 3px; background: var(--orange); transform: skewX(-45deg); flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tabular, .num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.ico { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.ico.sm { width: 16px; height: 16px; }

/* срезанные углы — верхний левый и нижний правый, под 45° */
.cut-s, .btn, .pill, .chip, .avatar, .stat, .note, .photo, .capture-btn, .task-item, .shift, .award, .report, .review-box, .secret, .notif, .leader, .badge-count, .switch i { clip-path: polygon(var(--cut-s) 0, 100% 0, 100% calc(100% - var(--cut-s)), calc(100% - var(--cut-s)) 100%, 0 100%, 0 var(--cut-s)); }
.cut-m, .card, .modal-box, .day, .place-card { clip-path: polygon(var(--cut-m) 0, 100% 0, 100% calc(100% - var(--cut-m)), calc(100% - var(--cut-m)) 100%, 0 100%, 0 var(--cut-m)); }
.cut-l { clip-path: polygon(var(--cut-l) 0, 100% 0, 100% calc(100% - var(--cut-l)), calc(100% - var(--cut-l)) 100%, 0 100%, 0 var(--cut-l)); }
.pill, .chip, .badge-count { --cut-s: 6px; }

/* ---------- Знак ---------- */
.mk { display: block; width: auto; overflow: visible; flex-shrink: 0; }
.mk .m1 { fill: var(--m1); } .mk .m2 { fill: var(--m2); } .mk .m3 { fill: var(--m3); }
.mk-color, .mk-auto { --m1: #005EAA; --m2: #012673; --m3: #FF7614; }
.mk-white { --m1: #fff; --m2: #fff; --m3: #fff; }
.mk-hero { --m1: #fff; --m2: rgba(255, 255, 255, .88); --m3: #FF7614; }
:root[data-theme="dark"] .mk-auto { --m1: #fff; --m2: #fff; --m3: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mk-auto { --m1: #fff; --m2: #fff; --m3: #fff; } }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); }
.lockup-text { display: flex; flex-direction: column; line-height: 1.05; }
.lockup-text b { font: 700 15px var(--display); letter-spacing: .02em; }
.lockup-text .lbl { font-size: 10px; line-height: 14px; color: var(--muted); }

/* линии связи */
.ks-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ks-lines .l1 { fill: var(--blue); } .ks-lines .l2 { fill: var(--navy-ui); } .ks-lines .l3 { fill: var(--orange); }
.on-navy .ks-lines .l2, .ks-intro .ks-lines .l2 { fill: var(--op5); }
.ks-lines .ln { transform-box: fill-box; animation: draw 1.2s cubic-bezier(.6, 0, .2, 1) both; }
.ks-lines .l2 { animation-delay: .1s; } .ks-lines .l3 { animation-delay: .2s; }
@keyframes draw { from { transform: translate(-100%, 100%); } }

.ticks { display: inline-flex; gap: 4px; }
.ticks s { width: 16px; height: 3px; transform: skewX(-45deg); }
.ticks s:nth-child(1) { background: var(--blue); } .ticks s:nth-child(2) { background: var(--navy-ui); } .ticks s:nth-child(3) { background: var(--orange); }
.ticks.run s { animation: tick 1.2s var(--ease) infinite; }
.ticks.run s:nth-child(2) { animation-delay: .15s; } .ticks.run s:nth-child(3) { animation-delay: .3s; }
@keyframes tick { 0%, 100% { transform: skewX(-45deg) scaleX(.2); opacity: .4; } 50% { transform: skewX(-45deg) scaleX(1); opacity: 1; } }

/* ---------- Каркас: шапка сверху, на телефоне — нижняя панель ---------- */
#app { min-height: 100vh; }
#view { padding: 32px clamp(16px, 4vw, 40px) 110px; max-width: 1180px; margin: 0 auto; }
#view > * { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translate(-10px, 10px); } }

#nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; height: 64px; padding: 0 clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
#nav[hidden] { display: none; }
#nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: repeating-linear-gradient(-45deg, var(--blue) 0 6px, var(--navy) 6px 12px, var(--orange) 12px 18px); transform-origin: 0 50%; transform: scaleX(var(--scroll, 0)); }
.nav-brand { flex: none; text-decoration: none !important; }
.nav-org { display: none; }
.nav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 11px; color: var(--muted); white-space: nowrap; position: relative;
  font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none !important;
}
.nav-link .ico { display: none; }
.nav-link:hover, .nav-link.active { color: var(--fg); background: var(--surface-2); }
.nav-link.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; background: var(--orange); }
.nav-spacer { display: none; }
.nav-user { display: flex; align-items: center; gap: 10px; flex: none; color: inherit; text-decoration: none !important; }
.nav-user .who { display: flex; flex-direction: column; line-height: 1.15; text-align: right; }
.nav-user .who b { font-weight: 600; font-size: 14px; }
.nav-user .who .lbl { font-size: 10px; color: var(--muted); }
.badge-count { background: var(--orange); color: var(--navy); font: 700 10.5px/1 var(--mono); padding: 3px 6px; font-variant-numeric: tabular-nums; }
.nav-more, #topbar { display: none; }

@media (max-width: 860px) {
  #view { padding: 16px 16px 108px; }
  #topbar {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; position: sticky; top: 0; z-index: 25; height: 56px;
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  #topbar[hidden] { display: none; }
  #topbar .org { flex: 1; min-width: 0; }
  #nav {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
    border-bottom: 0; border-top: 1px solid var(--line); background: var(--surface); backdrop-filter: none; gap: 0;
  }
  #nav::after { display: none; }
  .nav-brand, .nav-user, .nav-link.secondary { display: none; }
  .nav-links { mask-image: none; overflow: visible; justify-content: space-around; width: 100%; }
  .nav-more { display: inline-flex; }
  .nav-link { flex-direction: column; gap: 4px; flex: 1; padding: 6px 2px; font-size: 9.5px; letter-spacing: .04em; background: none !important; }
  .nav-link .ico { display: block; width: 22px; height: 22px; }
  .nav-link.active { color: var(--link); }
  .nav-link.active::after { left: 30%; right: 30%; bottom: auto; top: -7px; height: 3px; transform: skewX(-45deg); }
  .nav-link .badge-count { position: absolute; top: 0; left: 50%; margin-left: 6px; }
}

/* ---------- Заголовки страниц, карточки ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { margin-top: 10px; }
.page-head p { margin-top: 10px; color: var(--muted); max-width: 40em; font-size: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 22px; margin-bottom: 16px; position: relative; }
.card > h2, .card > .card-head { margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card.tight { padding: 6px; }
.card.on-navy { background: var(--navy); color: #fff; border-color: var(--navy); overflow: hidden; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-2 > * { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; color: var(--fg); display: flex; flex-direction: column; gap: 8px; transition: transform .35s var(--ease); text-decoration: none !important; }
a.stat:hover { transform: translate(3px, -3px); border-color: var(--fg); }
.stat .num { font: 700 32px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font: 500 11px/14px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.stat.accent .num { color: var(--link); }
.stat.danger .num { color: var(--hot); }
.stat.lavender .num { color: var(--navy-ui); }
.stat.ok .num { color: var(--fg); }
.stat.feature { background: var(--navy); border-color: var(--navy); color: #fff; }
.stat.feature .lbl { color: rgba(255, 255, 255, .75); }
.stat.feature .num { color: var(--op5); }

.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
ul.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
ul.list li { position: relative; padding-left: 24px; }
ul.list li::before { content: ""; position: absolute; left: 0; top: .66em; width: 12px; height: 3px; background: var(--orange); transform: skewX(-45deg); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border: 0;
  background: var(--surface-2); color: var(--fg); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .3s var(--ease), background .2s, color .2s; text-decoration: none !important;
}
.btn:hover { background: var(--line); }
.btn:active { transform: translate(2px, 2px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn.primary { background: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--blue); } }
.btn.primary:hover { background: var(--blue); }
.btn.hot { background: var(--orange); color: var(--navy); }
.btn.hot:hover { background: #ff8a3d; }
.btn.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); }
.btn.outline:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.btn.text { background: transparent; color: var(--link); padding: 0 10px; }
.btn.text:hover { background: var(--surface-2); }
.btn.danger { background: var(--hot-soft); color: var(--hot); }
.btn.ok { background: var(--blue); color: #fff; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 42px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn.block { width: 100%; }
.fab { position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 18; height: 54px; padding: 0 20px; display: none; }
@media (max-width: 860px) { .fab { display: inline-flex; } .hide-mobile { display: none !important; } }

/* ---------- Поля ---------- */
label.field { display: block; margin: 14px 0 0; }
label.field > span { display: block; margin: 0 0 6px; font: 500 11px/14px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input, select, textarea {
  width: 100%; font: 400 16px var(--sans); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 0; padding: 11px 12px;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: inset 0 0 0 1px var(--ring); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--blue); padding: 0; flex-shrink: 0; border-radius: 0; }
textarea { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.check { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 9px 6px; cursor: pointer; }
.check:hover { background: var(--surface-2); }
.pick-list { max-height: 280px; overflow: auto; background: var(--bg); border: 1px solid var(--line); padding: 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.switch { position: relative; width: 54px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); --cut-s: 6px; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 5px; top: 5px; width: 20px; height: 20px; background: var(--muted); transition: transform .35s var(--ease), background .2s; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.switch input:checked + i { background: var(--navy); box-shadow: none; }
.switch input:checked + i::after { transform: translateX(24px); background: var(--orange); }

/* ---------- Чипы, вкладки, статусы ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted); font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; text-decoration: none !important;
}
.chip:hover { color: var(--fg); }
.chip.active { background: var(--fg); color: var(--bg); box-shadow: none; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.segmented a {
  padding: 10px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 13px var(--display);
  text-decoration: none !important; transition: background .2s;
}
.segmented a:hover { border-color: var(--fg); }
.segmented a.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.pill { display: inline-flex; align-items: center; padding: 4px 9px; font: 500 10.5px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; background: var(--surface-2); color: var(--fg); }
.st-new { background: var(--surface-2); color: var(--fg); }
.st-in_progress { background: var(--blue); color: #fff; }
.st-review { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .st-review { background: #5AA9F0; color: var(--navy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-review { background: #5AA9F0; color: var(--navy); } }
.st-rework { background: var(--hot-soft); color: var(--hot); }
.st-done { background: var(--op5); color: var(--navy); }
.st-cancelled { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); text-decoration: line-through; }
.pr-urgent, .pill.overdue { background: var(--orange); color: var(--navy); }
.pr-high { background: var(--hot-soft); color: var(--hot); }
.pill.issue { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }

/* ---------- Задачи ---------- */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: flex; gap: 14px; align-items: flex-start; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px; color: var(--fg);
  transition: transform .3s var(--ease), box-shadow .2s; text-decoration: none !important; position: relative; overflow: hidden;
}
.task-item:hover { transform: translate(3px, -3px); box-shadow: inset 0 0 0 1px var(--fg); }
.task-item .bar { width: 4px; align-self: stretch; background: var(--line); flex-shrink: 0; }
.task-item.p-urgent .bar { background: var(--orange); }
.task-item.p-high .bar { background: repeating-linear-gradient(-45deg, var(--orange) 0 4px, transparent 4px 8px); }
.task-item .body { flex: 1; min-width: 0; }
.task-item .title { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.task-item .meta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; align-items: center; }
.task-item .meta span { display: inline-flex; align-items: center; gap: 5px; }
.task-item .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Прогресс — полосы под 45° */
.wave { position: relative; height: 6px; flex: 1; min-width: 60px; background: var(--surface-2); overflow: hidden; }
.wave .track { display: none; }
.wave .fill { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, var(--blue) 0 6px, var(--navy-ui) 6px 12px, var(--orange) 12px 18px); background-size: 25.5px 100%; transition: width .6s var(--ease); }
.wave.animated .fill { animation: stripes .8s linear infinite; }
@keyframes stripes { to { background-position: 25.5px 0; } }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .tabular { font: 500 12px var(--mono); color: var(--muted); }

.checklist-item { display: flex; gap: 14px; align-items: center; padding: 12px 6px; cursor: pointer; border-bottom: 1px solid var(--line); }
.checklist-item:last-child { border-bottom: 0; }
.checklist-item:hover { background: var(--surface-2); }
.checklist-item input { width: 22px; height: 22px; }
.checklist-item.done span { text-decoration: line-through; text-decoration-color: var(--orange); text-decoration-thickness: 2px; color: var(--muted); }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; margin: 12px 0; }
.photo { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--navy); cursor: zoom-in; border: 0; padding: 0; color: #fff; --cut-s: 12px; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.photo:hover img { transform: scale(1.04); }
.photo .tag { position: absolute; left: 0; top: 10px; font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--navy); color: #fff; padding: 3px 8px 3px 12px; }
.photo .when { position: absolute; left: 0; right: 0; bottom: 0; font: 500 10.5px var(--mono); background: rgba(1, 38, 115, .86); color: #fff; padding: 4px 8px; text-align: left; font-variant-numeric: tabular-nums; }
.photo .when.warn { background: var(--orange); color: var(--navy); }
.photo .rm { position: absolute; right: 0; top: 0; background: var(--navy); color: #fff; border: 0; width: 30px; height: 30px; cursor: pointer; display: grid; place-items: center; }

.capture { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.capture-btn {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 4px; min-height: 104px; padding: 16px; position: relative; overflow: hidden;
  background: var(--surface-2); color: var(--fg); cursor: pointer; font: 600 15px var(--display); margin: 0; transition: transform .3s var(--ease);
}
.capture-btn:active { transform: translate(2px, 2px); }
.capture-btn.main { background: var(--navy); color: #fff; }
.capture-btn.main::after { content: ""; position: absolute; right: -30px; top: -10px; width: 12px; height: 160px; background: var(--orange); transform: rotate(45deg); box-shadow: -24px 0 0 var(--blue); }
.capture-btn input { display: none; }
.capture-btn .ico { width: 26px; height: 26px; margin-bottom: auto; }
.capture-btn small { font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface-2); font-size: 14.5px; position: relative; }
.note::before { content: ""; position: absolute; left: 0; top: var(--cut-s); bottom: 0; width: 3px; background: var(--blue); }
.note.warn { background: var(--hot-soft); color: var(--fg); }
.note.warn::before { background: var(--orange); }
.note.warn .ico { color: var(--hot); }
.note.info::before { background: var(--navy-ui); }
.note .ico { margin-top: 1px; color: var(--link); }

.report { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 16px; margin-bottom: 10px; --cut-s: 12px; }
.review-box { margin-top: 12px; padding: 14px; background: var(--surface-2); }

.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { padding: 6px 0 6px 24px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 15px; width: 12px; height: 3px; background: var(--orange); transform: skewX(-45deg); }
.timeline li::after { content: ""; position: absolute; left: 5px; top: 24px; bottom: -6px; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }

.comment { display: flex; gap: 10px; padding: 8px 0; }
.comment .bubble { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 8px 14px; flex: 1; clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px); }

.stars { display: inline-flex; gap: 6px; margin: 10px 0; }
.stars button { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 700 15px var(--display); cursor: pointer; transition: background .2s; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.stars button.on { background: var(--orange); color: var(--navy); border-color: var(--orange); }

/* ---------- Аватары: квадрат со срезом, инициалы шрифтом Unbounded ---------- */
.avatar { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; font: 700 13px var(--display); background: var(--blue); color: #fff; letter-spacing: -.02em; }
.avatar.c2 { background: var(--navy); color: #fff; }
.avatar.c3 { background: var(--orange); color: var(--navy); }
.avatar.c4 { background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.avatar.lg { width: 72px; height: 72px; font-size: 22px; --cut-s: 14px; }
.avatar.sm { width: 30px; height: 30px; font-size: 10.5px; --cut-s: 6px; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.inactive td { opacity: .5; }
.person { display: flex; align-items: center; gap: 12px; min-width: 200px; }

/* ---------- График ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.day { background: var(--surface); border: 1px solid var(--line); padding: 12px; min-height: 150px; }
.day.today { background: var(--navy); border-color: var(--navy); color: #fff; }
.day.today .muted { color: rgba(255, 255, 255, .7); }
.day h4 { margin: 0 0 10px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.shift { font-size: 13px; background: var(--surface-2); padding: 7px 10px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; --cut-s: 6px; }
.day.today .shift { background: rgba(255, 255, 255, .12); }
.shift.me { background: var(--orange) !important; color: var(--navy); }
.shift button { background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 0; }
@media (max-width: 860px) { .week { grid-template-columns: 1fr; } .day { min-height: 0; } }

/* ---------- Рейтинг: как на медиаэкране ОП5 ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin-bottom: 16px; }
.podium .place-card { background: var(--surface); border: 1px solid var(--line); padding: 18px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; overflow: hidden; }
.podium .place-card.first { background: var(--navy); color: #fff; border-color: var(--navy); padding-top: 28px; }
.podium .place-card.first .muted { color: rgba(255, 255, 255, .7); }
.podium .place-card .medal { position: relative; z-index: 1; }
.podium .place-card b { font-size: 14px; line-height: 1.2; position: relative; }
.podium .place-card .pts { font: 700 28px/1 var(--display); color: var(--link); position: relative; }
.podium .place-card.first .pts { color: var(--orange); font-size: 36px; }
.leader { display: grid; grid-template-columns: 34px 40px 1fr auto; align-items: center; gap: 12px; padding: 12px 10px; }
.leader + .leader { border-top: 1px solid var(--line); clip-path: none; }
.leader.me { background: var(--hot-soft); }
.leader .place { font: 700 20px var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.leader.first .place { color: var(--orange); }
.leader .info { min-width: 0; }
.leader .info b { font-weight: 600; }
.leader .pts { font: 700 20px var(--display); font-variant-numeric: tabular-nums; }
.leader .bar { height: 8px; background: var(--blue); margin-top: 8px; transform-origin: 0 50%; animation: grow 1s var(--ease) both; }
.leader.first .bar { background: var(--orange); }
@keyframes grow { from { transform: scaleX(0); } }
.level-pill { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--link); }

.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.award { text-align: left; padding: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); --cut-s: 12px; }
.award .shape { width: 100%; height: 52px; margin-bottom: 10px; background: repeating-linear-gradient(-45deg, var(--line) 0 2px, transparent 2px 10px); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.award.earned .shape { background: repeating-linear-gradient(-45deg, var(--navy) 0 14px, var(--blue) 14px 19px, var(--navy) 19px 28px, var(--orange) 28px 33px); }
.award b { display: block; font: 600 13px/1.25 var(--display); }
.award span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.award:not(.earned) b { color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bars > div { flex: 1; background: var(--blue); min-height: 3px; }
.bars > div:last-child { background: var(--orange); }
.bars > div.zero { background: var(--line); }
.bars-labels { display: flex; gap: 6px; font: 500 10px var(--mono); color: var(--muted); margin-top: 6px; }
.bars-labels > span { flex: 1; text-align: center; }

/* ---------- Уведомления, пустые состояния ---------- */
.notif { display: flex; gap: 12px; padding: 14px 16px; color: var(--fg); align-items: flex-start; text-decoration: none !important; }
.notif:hover { background: var(--surface-2); }
.notif + .notif { border-top: 1px solid var(--line); clip-path: none; }
.notif .dot { width: 12px; height: 3px; margin-top: 10px; flex-shrink: 0; background: var(--orange); transform: skewX(-45deg); }
.notif.read .dot { background: var(--line); }
.notif.read { color: var(--muted); }
.empty { position: relative; overflow: hidden; text-align: left; color: var(--muted); padding: 28px 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-height: 140px; justify-content: flex-end; }
.empty .ks-lines { opacity: .9; }
.empty p { max-width: 30em; position: relative; color: var(--fg); }

.hero-greet { margin: 8px 0 26px; }
.hero-greet .display { margin: 12px 0 10px; }
.hero-greet .display span { color: var(--link); }
.level-card { display: flex; align-items: center; gap: 18px; }
.level-card .info { flex: 1; min-width: 0; }
.level-card .title { font: 700 22px var(--display); margin: 2px 0 10px; }

/* ---------- Вход ---------- */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(20px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.auth-box .eyebrow { color: var(--muted); }
.auth-box h1 { font: 800 clamp(40px, 7vw, 88px)/.92 var(--display); letter-spacing: -.035em; margin: 18px 0 18px; }
.auth-box h1 span { display: block; color: var(--link); }
.auth-box .tagline { color: var(--muted); font-size: 17px; max-width: 30em; margin-bottom: 24px; }
.auth-box .card { max-width: 440px; }
.auth-stage { position: relative; aspect-ratio: 5 / 4; background: var(--navy); overflow: hidden; color: #fff; }
.auth-stage .mk { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: 46%; }
.auth-stage .cap { position: absolute; left: 20px; bottom: 16px; opacity: .85; }
.auth-stage .cap2 { position: absolute; right: 20px; top: 16px; color: var(--op5); }
@media (max-width: 860px) {
  .auth-screen { grid-template-columns: 1fr; padding: 16px; }
  .auth-stage { order: -1; aspect-ratio: 16 / 9; }
}
.assemble .m1 { animation: slide45 1.1s var(--ease) .15s both; --dx: -60px; --dy: 60px; }
.assemble .m2 { animation: slide45 1.1s var(--ease) .35s both; --dx: -90px; --dy: 90px; }
.assemble .m3 { animation: slide45 1.1s var(--ease) .55s both; --dx: 90px; --dy: -90px; }
@keyframes slide45 { from { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* ---------- Модальные окна, тосты ---------- */
#modal { position: fixed; inset: 0; background: rgba(6, 11, 26, .62); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .2s both; }
#modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: var(--surface); border: 1px solid var(--line); padding: 26px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; animation: rise .35s var(--ease) both; }
.modal-box h2 { font-size: 22px; margin-bottom: 8px; }
.lightbox { max-width: 96vw; max-height: 92vh; }
.lightbox img { max-width: 96vw; max-height: 84vh; display: block; margin: 0 auto; }
.lightbox .cap { color: #fff; margin-top: 10px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; text-align: center; }
#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%); background: var(--fg); color: var(--bg);
  padding: 12px 18px; font: 500 13px/1.45 var(--mono); opacity: 0; transition: transform .3s var(--ease), opacity .2s; pointer-events: none; z-index: 60; max-width: min(92vw, 520px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--orange); color: var(--navy); }
@media (min-width: 861px) { #toast { bottom: 28px; } }
.secret { font: 500 20px var(--mono); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; user-select: all; letter-spacing: .04em; }

/* ---------- Загрузка, награда, заставка ---------- */
.ks-loader { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 60px 0; color: var(--muted); }
.ks-loader .ticks s { width: 28px; height: 5px; }
.ks-reward { position: fixed; z-index: 70; pointer-events: none; width: 0; height: 0; }
.ks-reward i { position: absolute; width: 10px; height: 180px; left: -5px; top: -90px; transform: rotate(45deg) translateY(120px); opacity: 0; animation: sweep .8s var(--ease) forwards; }
.ks-reward i:nth-child(1) { background: var(--blue); margin-left: -20px; }
.ks-reward i:nth-child(2) { background: var(--navy-ui); animation-delay: .06s; }
.ks-reward i:nth-child(3) { background: var(--orange); margin-left: 20px; animation-delay: .12s; }
@keyframes sweep { 0% { opacity: 1; transform: rotate(45deg) translateY(120px) scaleY(.2); } 60% { opacity: 1; } 100% { opacity: 0; transform: rotate(45deg) translateY(-120px) scaleY(1); } }
.ks-intro { position: fixed; inset: 0; z-index: 100; background: var(--navy); display: grid; place-items: center; color: #fff; overflow: hidden; }
.ks-intro.out { animation: wipe-out .65s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes wipe-out { to { clip-path: polygon(100% 0, 100% 0, 100% 0, 100% 0); transform: translate(3%, -3%); } }
.ks-intro-mark { position: relative; }
.ks-intro-cap { position: absolute; left: 24px; bottom: 20px; opacity: .85; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
