/* ArchiFlow — «Ваш час здесь»: таймер в шапке проекта, доска ставки на дашборде, окна времени (Claude, 18.11.2026; time-v13.js).
   Цвет — только на доске (решение владелицы: «живая» цифра): мягкая подложка и цветное число, без неона.
   green — не ниже цели, amber — до 15 % ниже, orange — ниже больше чем на 15 %, none — цели нет (приглушённый бежевый). */

/* ---------- таймер в шапке ---------- */
.aft-slot { flex: none; display: inline-flex; }
.aft-timer { display: inline-flex; align-items: center; gap: 6px; height: 30px; min-width: 30px; padding: 0 6px; border-radius: 9px; color: var(--muted); border: 1px solid transparent; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; background: transparent; }
.aft-timer:hover { color: var(--text); background: #f2f0ec0d; }
.aft-timer:focus-visible { outline: 1px solid var(--gold-line); outline-offset: 1px; }
.aft-timer svg { flex: none; }
.aft-timer.on { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); padding: 0 10px 0 7px; }
.aft-timer.on svg { animation: aft-pulse 2.4s ease-in-out infinite; }
.aft-timer.else::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: .7; margin-left: -4px; align-self: flex-start; margin-top: 5px; }
.aft-clock { font-weight: 600; letter-spacing: .01em; }
@keyframes aft-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .aft-timer.on svg { animation: none; } }
html.afs-phone .aft-slot { margin-left: auto; }
html.afs-phone .aft-slot + .afg-hset { margin-left: 0; }
html.afs-phone .aft-timer { height: 36px; min-width: 36px; justify-content: center; border-color: var(--line); }
html.afs-phone .aft-timer.on { border-color: var(--gold-line); }

/* ---------- доска на дашборде ---------- */
.aft-board { --tone: #d6cbb2; --tint: rgba(214, 203, 178, .06); --edge: rgba(214, 203, 178, .16);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 26px; row-gap: 10px;
  background: linear-gradient(0deg, var(--tint), var(--tint)), var(--card); border: 1px solid var(--edge); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.aft-board[data-tone="green"] { --tone: #93cfa4; --tint: rgba(126, 196, 148, .10); --edge: rgba(126, 196, 148, .30); }
.aft-board[data-tone="amber"] { --tone: #e6c877; --tint: rgba(226, 190, 96, .10); --edge: rgba(226, 190, 96, .30); }
.aft-board[data-tone="orange"] { --tone: #eaa67c; --tint: rgba(232, 150, 100, .10); --edge: rgba(232, 150, 100, .30); }
.aft-main { display: flex; flex-direction: column; min-width: 0; }
.aft-l { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.aft-l .af-i { opacity: .7; }
.aft-big { font-size: 38px; font-weight: 600; letter-spacing: -.02em; line-height: 1.12; color: var(--tone); white-space: nowrap; font-variant-numeric: tabular-nums; }
.aft-tg { color: var(--tone); opacity: .85; font-size: 12.5px; margin-top: 2px; white-space: nowrap; }
.aft-side { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.aft-facts { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.aft-fi { white-space: nowrap; }
.aft-fi > i { font-style: normal; color: var(--dim); margin: 0 5px 0 7px; }
.aft-f { color: var(--muted); font: inherit; font-size: 13px; padding: 0; background: transparent; border: 0; white-space: nowrap; text-align: left; }
.aft-f b { font-weight: 500; color: var(--text); white-space: nowrap; }
.aft-f em { font-style: normal; color: var(--dim); font-size: 12px; }
button.aft-f { cursor: pointer; }
button.aft-f b { text-decoration: underline dotted var(--dim); text-underline-offset: 3px; }
button.aft-f:hover b, button.aft-f:focus-visible b { color: var(--gold); }
.aft-fc { margin: 0; font-size: 13px; color: var(--muted); }
.aft-empty { grid-column: 1 / 3; margin: 0; font-size: 15px; line-height: 1.4; color: var(--text); }
.aft-board[data-empty] .aft-side { grid-column: 1 / 3; grid-row: 2; }
.aft-board[data-empty] .aft-acts { grid-row: 1 / 3; grid-column: 3; }
.aft-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.aft-b { height: 32px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 16px; border: 1px solid var(--line2); background: transparent; color: var(--text); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.aft-b:hover { border-color: var(--gold-line); color: var(--gold); }
.aft-b.gold { background: var(--gold); border-color: var(--gold); color: #1c1c1e; font-weight: 600; }
.aft-b.gold:hover { color: #1c1c1e; filter: brightness(1.06); }
.aft-b:focus-visible, .aft-f:focus-visible, .aft-x:focus-visible { outline: 1px solid var(--gold-line); outline-offset: 2px; }
@container (max-width: 700px) {
  .aft-board { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .aft-big { font-size: 34px; }
  .aft-acts { justify-content: flex-start; }
  .aft-empty, .aft-board[data-empty] .aft-side, .aft-board[data-empty] .aft-acts { grid-column: 1; grid-row: auto; }
}

/* ---------- окна ---------- */
.aft-ov { position: fixed; inset: 0; z-index: 4000; background: #0009; display: flex; align-items: center; justify-content: center; padding: 16px; }
.aft-dlg { width: 100%; max-width: 380px; max-height: min(86vh, 720px); overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; padding: 16px 18px 18px; box-shadow: 0 20px 60px #000a; color: var(--text); font-variant-numeric: tabular-nums; }
.aft-dlg.wide { max-width: 560px; }
.aft-dh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.aft-dh h3 { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 600; }
.aft-x { flex: none; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 13px; }
.aft-x:hover { color: var(--text); background: #f2f0ec0d; }
.aft-form { display: flex; flex-direction: column; gap: 10px; }
.aft-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aft-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.aft-fld > span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.aft-fld input, .aft-tcard input, .aft-tcard select, .aft-setcard input { width: 100%; box-sizing: border-box; height: 38px; background: #232326; border: 1px solid var(--line2); border-radius: 10px; padding: 0 11px; color: var(--text); font: inherit; font-size: 14px; outline: none; color-scheme: dark; }
.aft-fld input:focus, .aft-tcard input:focus, .aft-tcard select:focus, .aft-setcard input:focus { border-color: var(--gold-line); }
.aft-note { margin: -2px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.aft-link { color: var(--gold); font: inherit; font-size: 12.5px; background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.aft-err { margin: 0; color: var(--conf); font-size: 12.5px; }
.aft-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.aft-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.aft-chips button { height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--line2); background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.aft-chips button.on { color: var(--text); border-color: var(--gold-line); background: var(--gold-soft); }
.aft-list { list-style: none; margin: 0; padding: 0; }
.aft-e { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.aft-e:first-child { border-top: 0; }
.aft-ed { flex: none; width: 62px; color: var(--dim); font-size: 12.5px; padding-top: 1px; }
.aft-et { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; overflow-wrap: anywhere; }
.aft-et b { font-weight: 600; }
.aft-et small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.aft-ea { flex: none; display: flex; gap: 2px; }
.aft-ea button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--dim); cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.aft-ea button:hover { color: var(--text); background: #f2f0ec0d; }
.aft-none { color: var(--muted); font-size: 13.5px; padding: 14px 0 6px; }

/* ---------- тихие строки: простой и «Запись удалена · Вернуть» ---------- */
.aft-idle, .aft-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 92px; z-index: 4100; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); box-sizing: border-box;
  background: #2a2a2d; border: 1px solid var(--line2); border-radius: 14px; padding: 8px 8px 8px 16px; font-size: 13px; color: var(--muted); box-shadow: 0 10px 30px #0000008c; }
.aft-toast { padding: 9px 16px; gap: 14px; bottom: 140px; color: var(--text); }
.aft-toast.err { border-color: var(--conf); color: var(--conf); }
.aft-idle i { font-style: normal; color: var(--dim); }
.aft-idle button:not(.aft-x), .aft-toast button { color: var(--gold); font: inherit; font-size: 13px; font-weight: 600; background: transparent; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
html.afs-phone .aft-idle { bottom: calc(var(--bar, 76px) + 14px); }
html.afs-phone .aft-toast { bottom: calc(var(--bar, 76px) + 62px); }

/* ---------- карточки в настройках ---------- */
.aft-trow { display: grid; grid-template-columns: minmax(0, 1fr) 96px; column-gap: 10px; align-items: end; }
.aft-trow .afset-f { border-top: 0; }
.aft-tcard .aft-tcur { grid-template-columns: minmax(0, 1fr); }
.aft-tcard .aft-tcur .afset-l { display: none; }
.aft-trow .aft-saved { grid-column: 1 / -1; }
.aft-bad { color: var(--conf) !important; }
