/* Приложение сотрудника Way (№83). Цвета и шрифты — с сайта way-site
   (src/app/globals.css). Белый текст — только на #0073A8 и темнее (5,2:1);
   азур #008AC9 — графика и акценты (белый на нём 3,8:1 — для текста мало). */
@font-face { font-family: 'Manrope'; src: url('/static/Manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Unbounded'; src: url('/static/Unbounded.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
:root {
  --brand: #008AC9; --brand-dark: #0073A8; --brand-hover: #005E8A; --deep: #1E4FA0;
  --navy: #0A1E33; --ink2: #34414E; --muted: #5E6E7E; --surface: #F1F6FB;
  --line: #DCE3EA; --line2: #EBF0F5; --tint: #E6F4FB; --sky: #5FB8F2;
  --warm-bg: #FBF0DA; --warm: #8A4B00; --warm-ink: #5C3300; --warm-border: #E2C68E;
  --field: #8494A3; --chip: #C5D0DA; --check: #7A8B99; --danger: #B3261E;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --text: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--surface); color: var(--navy); font-family: var(--text); }
body { font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-dark); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { flex-shrink: 0; }

#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.dock { position: sticky; bottom: 0; z-index: 5; background: var(--surface); }
.dock-pad { padding: 10px 16px 12px; }
.dock-white { background: #fff; border-top: 1px solid var(--line); }

/* верх экрана: логотип и профиль */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.logo { height: 18px; width: 47px; display: block; }
.avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--tint); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
  border: 0; text-decoration: none; }
.avatar.owner { background: var(--deep); color: #fff; }
.caption { font-size: 14px; font-weight: 600; color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
h1.small { font-size: 22px; }
.lead { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink2); }
.muted { color: var(--muted); }
.num { font-family: var(--display); font-weight: 600; }

/* метки */
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap; }
.tag.warm { background: var(--warm-bg); color: var(--warm); }
.tag.blue { background: var(--tint); color: var(--brand-dark); }
.tag.dark { background: var(--navy); color: #fff; }

/* карточки */
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(10,30,51,.05); }
.card.pad { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.list { padding: 2px 6px 4px 16px; }
.card.attn { border-color: var(--warm-border); }
.card-title { font-size: 15px; font-weight: 800; margin: 0; }
.sec-title { margin: 6px 4px 0; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.info { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--warm-bg);
  color: var(--warm-ink); font-size: 14px; line-height: 1.45; }
.info.blue { background: var(--tint); color: #15416B; }
.info svg { flex-shrink: 0; margin-top: 1px; }

/* кнопки */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border-radius: 16px;
  border: 0; background: var(--brand-dark); color: #fff; font-size: 16px; font-weight: 800; text-decoration: none; }
.btn:active { background: var(--brand-hover); }
.btn[disabled] { background: #9DB5C6; color: #fff; cursor: default; }
.btn.ghost { background: #fff; color: var(--brand-dark); border: 1px solid var(--chip); }
.btn.small { min-height: 44px; font-size: 14px; border-radius: 12px; width: auto; padding: 0 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--tint); color: var(--brand-dark); font-size: 14px; font-weight: 800; border: 0; text-decoration: none; }
.link-btn { border: 0; background: transparent; color: var(--brand-dark); font-size: 14px; font-weight: 800; min-height: 44px;
  display: flex; align-items: center; gap: 8px; padding: 0; }
.dashed { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1.5px dashed var(--field);
  border-radius: 16px; background: transparent; color: var(--brand-dark); font-size: 15px; font-weight: 800; }
.big-choice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; width: 100%; }
.big-choice .ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; background: var(--tint);
  display: flex; align-items: center; justify-content: center; }
.big-choice b { display: block; font-size: 16px; font-weight: 800; }
.big-choice small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 3px; }

/* чипы проектов */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--chip); background: #fff; font-size: 14px; font-weight: 700; }
.chip.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.chip .cnt { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; background: var(--warm-bg); color: var(--warm); }
.chip.on .cnt { background: #fff; color: var(--brand-dark); }

/* поля */
.field { position: relative; }
.field input, .input { width: 100%; height: 48px; border: 1px solid var(--field); border-radius: 14px; padding: 0 14px;
  font-size: 16px; background: #fff; }
.field input { padding-left: 42px; }
.field svg { position: absolute; left: 14px; top: 15px; }
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: none; line-height: 1.4; }
.sugg { display: flex; flex-direction: column; }
.sugg button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 0; border: 0; border-top: 1px solid var(--line2);
  background: transparent; text-align: left; }
.sugg b { display: block; font-size: 15px; font-weight: 700; }
.sugg small { display: block; font-size: 12px; color: var(--muted); }
.sugg .grow { flex: 1; }

/* прогресс */
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .25s; }

/* задачи */
.grp-head { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.grp-head h2 { margin: 0; flex: 1; font-size: 15px; font-weight: 800; }
.grp-head .cnt { font-size: 13px; font-weight: 600; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; display: flex; align-items: center;
  justify-content: center; padding: 0; }
.icon-btn span { width: 30px; height: 30px; border-radius: 15px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.task { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--line2); padding-right: 10px; }
.chk { width: 44px; height: 48px; flex-shrink: 0; border: 0; background: transparent; display: flex; align-items: center; padding: 0; }
.box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--check); background: #fff;
  display: flex; align-items: center; justify-content: center; }
.box svg { opacity: 0; }
.done .box { background: var(--brand); border-color: var(--brand); }
.done .box svg { opacity: 1; }
.task-text { flex: 1; padding: 12px 0; font-size: 15px; font-weight: 500; line-height: 1.35; border: 0; background: transparent;
  text-align: left; }
.done .task-text { color: var(--muted); text-decoration: line-through; font-weight: 400; }
.empty { border-top: 1px solid var(--line2); padding: 12px 10px 12px 0; font-size: 14px; color: var(--muted); }
.close-task { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0; border: 0;
  border-top: 1px solid var(--line2); background: transparent; text-align: left; }
.close-task .task-text { padding: 11px 0; }

/* переключатели */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg button { min-height: 44px; border-radius: 12px; border: 1px solid var(--chip); background: #fff; font-size: 14px; font-weight: 800; }
.seg button.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.seg button[disabled] { opacity: .5; cursor: default; }
.segbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--line); }
.segbar.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segbar button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; font-size: 14px; font-weight: 800; color: var(--ink2); }
.segbar button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(10,30,51,.12); }
.segbar button[disabled] { opacity: .45; cursor: default; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 50px; padding: 0;
  border: 0; border-top: 1px solid var(--line2); background: transparent; text-align: left; font-size: 14px; font-weight: 600; }
.sw { width: 50px; height: 30px; border-radius: 15px; background: var(--check); position: relative; flex-shrink: 0; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 12px; background: #fff; transition: left .2s; }
.switch[aria-checked="true"] .sw { background: var(--brand-dark); }
.switch[aria-checked="true"] .sw::after { left: 23px; }

/* нижняя панель ввода задачи */
.composer { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); position: relative; }
.draft { display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; flex-wrap: wrap; }
.draft .proj { font-weight: 800; color: var(--brand-dark); }
.draft .proj.none { color: var(--warm); }
.draft .mini { margin-left: auto; min-height: 32px; padding: 0 12px; border: 1px solid var(--chip); border-radius: 999px; background: #fff;
  color: var(--brand-dark); font-size: 13px; font-weight: 800; }
.cin { display: flex; gap: 8px; }
.cin input { flex: 1; min-width: 0; height: 48px; border: 1px solid var(--field); border-radius: 24px; padding: 0 18px; font-size: 16px; background: var(--surface); }
.send { width: 48px; height: 48px; flex-shrink: 0; border: 0; border-radius: 24px; background: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; }

/* нижние вкладки */
.tabs { display: grid; background: #fff; border-top: 1px solid var(--line2); padding: 4px 0 calc(8px + env(safe-area-inset-bottom)); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 50px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; }
.tabs a[aria-current="page"] { color: var(--brand-dark); font-weight: 800; }

/* плитки цифр */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 10px; }
.tile .num { font-size: 22px; }
.tile .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }

/* всплывашка «Отменить» */
.toast { position: absolute; left: 12px; right: 12px; bottom: 100%; margin-bottom: 10px; display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 6px 0 16px; border-radius: 14px; background: var(--navy); color: #fff; box-shadow: 0 8px 24px rgba(10,30,51,.25);
  font-size: 14px; font-weight: 600; }
.toast span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { min-height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--sky); font-size: 14px; font-weight: 800; }
.flash { position: fixed; left: 16px; right: 16px; top: 12px; z-index: 30; padding: 12px 16px; border-radius: 14px; background: var(--navy);
  color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(10,30,51,.25); }
.flash.err { background: var(--danger); }

/* нижний лист (правка задачи) */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgba(10,30,51,.35); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 88vh; overflow: auto; background: #fff; border-radius: 20px 20px 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); align-self: center; }
.danger { color: var(--danger); }

/* «Команда» */
.person { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 0; border: 0; background: transparent; text-align: left; }
.person .av { width: 42px; height: 42px; flex-shrink: 0; border-radius: 21px; background: var(--tint); color: var(--brand-dark); font-weight: 800;
  font-size: 14px; display: flex; align-items: center; justify-content: center; }
.person .grow { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.minibar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; display: block; }
.minibar > i { display: block; height: 100%; background: var(--brand); }
.ptask { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line2); }
.ptask .box { width: 22px; height: 22px; border-radius: 7px; margin-top: 1px; }
.hrow { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.hrow + .hrow { border-top: 1px solid var(--line2); }
.hrow .d { width: 46px; flex-shrink: 0; display: flex; flex-direction: column; }

/* код входа */
.code { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: .08em; }
.code-input { text-align: center; font-family: var(--display); font-size: 26px; letter-spacing: .3em; height: 60px !important; }
.center { text-align: center; align-items: center; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 0 4px; text-align: center; }
.hero .circle { width: 76px; height: 76px; border-radius: 38px; background: var(--brand); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px var(--tint); }
.skeleton { height: 64px; border-radius: 18px; background: linear-gradient(90deg, #E7EEF4, #F4F8FB, #E7EEF4); background-size: 200% 100%;
  animation: sk 1.2s infinite linear; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
