/* Экраны поверх base.css + brand.css: анкета по ссылке, фильтры VIP, календарь ДР, разбор совпадений.
   Тот же язык сайта: подписи 12 px прописными, тонкие серые рамки, выбранное — чёрным. */

/* Общее: сегменты, чипы, поиск, метки */
.seg { display: flex; margin: 0 0 20px; border: 1px solid var(--edge); }
.seg > * { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px;
  background: none; border: 0; font: 700 12px/1 var(--font-ui); text-transform: uppercase; color: var(--muted);
  text-decoration: none; cursor: pointer; }
.seg > * + * { border-left: 1px solid var(--edge); }
.seg > [aria-selected=true], .seg > [aria-current] { background: var(--ink); color: #fff; }
.seg span { font-weight: 400; }
.chip-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 10px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); }
.chip-row button { flex: none; min-height: 40px; padding: 0 14px; background: none; border: 1px solid var(--edge); cursor: pointer;
  font: 400 13px/1 var(--font-ui); color: var(--muted); white-space: nowrap; }
.chip-row button[aria-pressed=true] { color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
input[type=search] { width: 100%; min-height: 52px; padding: 12px 14px; font-size: 17px; border: 1px solid var(--edge);
  border-radius: 0; background: var(--surface); color: var(--ink); -webkit-appearance: none; appearance: none; }
select { min-height: 44px; padding: 0 10px; font: inherit; font-size: 14px; border: 1px solid var(--edge); border-radius: 0; background: #fff; color: var(--ink); }
button.link { background: none; border: 0; padding: 0 0 0 8px; color: var(--ink); text-decoration: underline; cursor: pointer; font: inherit; }
.badge { display: inline-block; min-width: 16px; padding: 2px 4px; margin-left: 2px; background: var(--accent); color: #000;
  font: 700 10px/1 var(--font-ui); text-align: center; vertical-align: 1px; }
.flash { margin: 20px 0 0; padding: 14px 16px; background: var(--ink); color: #fff; font-size: 14px; }
.flash p { margin: 0; }
.flash p + p { margin-top: 6px; }
.people .sub { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; font-size: 14px; }
.inline-form label { color: var(--muted); }
.inline-form input { width: auto; }
.disc { list-style: none; margin: 0; padding: 0; }
.disc li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comment-form { display: grid; gap: 8px; margin-bottom: 12px; }
.comment-form textarea { width: 100%; min-height: 64px; resize: vertical; font: inherit; }
.comment-form .btn { justify-self: start; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.notes p { margin: 0 0 4px; overflow-wrap: anywhere; }
.notes .by, .notes .empty { font-size: 13px; color: var(--muted); }
.bday-block { margin: 28px 0 0; border: 1px solid var(--edge); padding: 0 16px; }
.bday-block summary { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; list-style: none; font-weight: 700; }
.bday-block summary::-webkit-details-marker { display: none; }
.bday-block summary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.bday-block summary .num { margin-left: auto; min-width: 28px; padding: 2px 8px; text-align: center; background: var(--accent); color: var(--accent-ink); }
.bday-block:not([open]) { display: inline-block; }
.bday-block:not([open]) .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bday-block h2 { margin: 12px 0 4px; }
.bday-block ul:last-child { margin-bottom: 8px; }
.people small { display: block; font-size: 13px; color: var(--muted); }
.people.compact a { min-height: 44px; }
.people .when { width: 64px; flex: none; font-size: 13px; color: var(--muted); }
.doc-link { text-decoration: underline; text-underline-offset: 2px; }
.flash a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Анкета: выбор способа */
.ways { display: grid; gap: 12px; }
.way { margin: 0; padding: 20px; border: 1px solid var(--edge); }
.way.main { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.way p { margin: 8px 0 16px; font-size: 15px; }
@media (min-width: 700px) { .ways { grid-template-columns: 3fr 2fr; } .way { display: flex; flex-direction: column; } .way .btn { margin-top: auto; } }
.invites { list-style: none; margin: 0; padding: 0; }
.invites li { border-bottom: 1px solid var(--line); }
.invites a { display: flex; align-items: center; gap: 12px; min-height: 52px; text-decoration: none; }
.invites .when { width: 86px; flex: none; font-size: 13px; color: var(--muted); }
.invites .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.tag { flex: none; padding: 4px 8px; border: 1px solid var(--edge); font: 700 11px/1 var(--font-ui); text-transform: uppercase; color: var(--muted); }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.warn { border-color: var(--ink); background: var(--ink); color: #fff; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--ink); font: 700 13px/1 var(--font-ui); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 1px; background: var(--edge); }
.steps li:nth-child(3)::before { background: var(--accent); border-color: var(--accent); }
.steps b { display: block; font-weight: 700; }
.steps span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

/* Ссылка и QR */
.qr { margin: 0 auto; width: min(100%, 300px); padding: 18px; border: 1px solid var(--edge); background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.link-line { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.link-line .num { white-space: normal; }
.share { margin-top: 16px; }
.status { margin-bottom: 24px; }
.state { padding: 18px 0 0; border-top: 1px solid var(--line); }
.state .fine { margin: 0 0 16px; }
.who-filled { margin: 0 0 14px; }
.who-filled b { display: block; font-size: 22px; font-weight: 400; margin-top: 2px; }
.who-filled small { color: var(--muted); font-size: 13px; }
.pulse { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-weight: 700; }
.pulse i { width: 10px; height: 10px; background: var(--accent); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* VIP: фильтры и строки */
.filters { margin: 0 0 8px; }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.sort-row label { font: 400 12px/1.5 var(--font-ui); text-transform: uppercase; color: var(--muted); }
.found { margin: 0; font-size: 13px; color: var(--muted); }
.found b { color: var(--ink); }
.vip-list .name small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.vip-list .name em { font-style: normal; color: var(--ink); }
.vip-list.near a { flex-wrap: wrap; row-gap: 0; padding: 12px 0; }
.vip-list.near .meter { flex-basis: 100%; margin-top: 8px; }
.vip-list.near .amt { color: var(--muted); }
.vip-list li[hidden] { display: none; }
.vip-list.unranked .rank { visibility: hidden; }

/* Дни рождения: календарь */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; font-size: 14px; }
.cal-head .btn { min-height: 44px; width: 44px; padding: 0; font-size: 20px; font-weight: 400; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid li { position: relative; min-height: 56px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid .wd { min-height: 0; padding: 6px 0; text-align: center; font: 400 11px/1 var(--font-ui); text-transform: uppercase; color: var(--muted); }
.grid li > b, .grid a > b { display: block; padding: 6px 6px 0; font-size: 14px; font-weight: 400; color: var(--muted); }
.grid a { display: block; height: 100%; min-height: 56px; text-decoration: none; }
.grid a:hover { background: var(--tile); }
.grid .has b { color: var(--ink); font-weight: 700; }
.grid .past { background: #fafafa; }
.grid .past b { opacity: .6; }
.grid .today { box-shadow: inset 0 0 0 2px var(--ink); }
.grid .cnt { position: absolute; left: 6px; bottom: 6px; min-width: 20px; padding: 3px 4px; background: var(--ink); color: #fff;
  font: 700 11px/1 var(--font-ui); text-align: center; }
.grid .vip-dot { position: absolute; right: 6px; top: 8px; width: 7px; height: 7px; background: var(--accent); }
.grid .who-list { display: none; }
@media (min-width: 700px) {
  .grid li, .grid a { min-height: 92px; }
  .grid .cnt { display: none; }
  .grid .who-list { display: block; padding: 4px 6px 6px; font-size: 12px; line-height: 1.35; }
  .grid .who-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .grid .who-list .vip { color: var(--warn); }
  .grid .who-list .more { color: var(--muted); }
}
.day-group { scroll-margin-top: 80px; }
.day-group:target h2 { color: var(--ink); }
.dates.past .day b { color: var(--muted); }
.dates .row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 0; }

/* Совпадения: сравнение и последствия выбора */
.compare { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.compare th, .compare td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.compare thead th { font: 400 11px/1.3 var(--font-ui); text-transform: uppercase; color: var(--muted); }
.compare thead th:first-child { width: 28%; }
.compare tbody th { font: 400 12px/1.4 var(--font-ui); text-transform: uppercase; color: var(--muted); }
.compare small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.compare .seal.sm { margin: 0 0 0 4px; vertical-align: 1px; }
.compare tr.diff td { font-weight: 700; }
.compare tr.diff th::after { content: " ≠"; color: var(--accent); font-weight: 700; }
.choices { display: grid; gap: 10px; margin-top: 16px; }
.choice { padding: 14px; border: 1px solid var(--line); }
.choice .btn { width: 100%; }
.choice p { margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.choice .btn.quiet { border: 1px solid var(--edge); color: var(--ink); }
@media (max-width: 899px) { nav.tabs .badge { position: absolute; top: 8px; left: calc(50% + 6px); margin: 0; } }

/* Сотрудники и вход с кодом */
.team li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; }
.team li.off .name { color: var(--muted); text-decoration: line-through; }
.team .who-row { flex: 1 1 260px; min-width: 0; }
.team .name { display: block; }
.row-actions { display: flex; gap: 8px; }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 13px; }
.add-staff { margin-top: 28px; }
.page-login .steps { margin: 20px 0; }
.page-login .qr { width: min(100%, 220px); }
.page-login .link-line { text-align: center; letter-spacing: .08em; overflow-wrap: anywhere; }
.names-group:not([open]) { display: block; }
.names-group + .names-group { margin-top: 12px; }
/* Журнал: фильтры в строку, событие переносится целиком, клиент — второй строкой */
.journal-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin: 0 0 20px; }
.journal-filters label { display: flex; flex-direction: column; gap: 4px; }
.journal-filters .found { flex-basis: 100%; margin: 0; }
.journal-filters .btn { min-height: 44px; }
.journal .w { white-space: normal; }
.journal small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.journal .s { font-weight: 400; color: var(--muted); font-size: 13px; text-align: right; }
.journal li.day { display: block; border: 0; padding: 0; }
.journal li.day h2 { margin: 28px 0 4px; }
