/* Страницы входа, тарифов и админ-панели. Токены и базовые элементы — в styles.css */

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.center { text-align: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.btn--lg { height: 42px; font-size: 15px; width: 100%; }
a.btn { text-decoration: none; color: inherit; }
a.btn--primary { color: #fff; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--column); color: var(--muted); vertical-align: middle; }
.tag--accent { background: var(--accent-soft); color: var(--accent-text); }
.tag--muted { background: transparent; border: 1px dashed var(--line-strong); }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-text); font-size: 13px; }
.form-error { background: var(--danger-soft); color: var(--high); border-radius: 9px; padding: 10px 12px; font-size: 13px; }

/* ─── Поля ──────────────────────────────────────────────── */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.field > small { font-weight: 400; font-size: 12px; }
.field__error { color: var(--high); font-weight: 400; font-size: 12px; min-height: 0; }
.field__error:empty { display: none; }
.input.is-invalid { border-color: var(--high); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.input-icon { position: relative; }
.input-icon > .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .input { height: 40px; padding-left: 36px; padding-right: 40px; font-size: 15px; }
.reveal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--faint); }
.reveal:hover { color: var(--text); background: var(--hover); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; font-weight: 400; }
.checkbox--top { align-items: flex-start; line-height: 1.45; }
.checkbox--top .check { margin-top: 1px; }
.strength { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 400; }
.strength i { width: 28px; height: 4px; border-radius: 2px; background: var(--column); }
.strength span { margin-left: 6px; }
.strength[data-level="1"] i:nth-child(-n+1) { background: var(--high); }
.strength[data-level="2"] i:nth-child(-n+2) { background: var(--medium); }
.strength[data-level="3"] i { background: var(--done); }

/* Переключатель */
.switch { appearance: none; flex: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(16px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-of-type { border-top: 0; }
.switch-row > span { display: grid; gap: 2px; }
.switch-row b { font-weight: 500; }
.switch-row small { color: var(--muted); font-size: 12px; }
.range { width: 100%; accent-color: var(--accent); }

.seg--sm { display: inline-flex; }
.seg--sm button { height: 26px; font-size: 12px; padding: 0 10px; white-space: nowrap; }
.seg--period { display: inline-flex; margin-top: 18px; }
.seg--period button { height: 36px; padding: 0 18px; display: inline-flex; align-items: center; gap: 6px; }
.seg__save { font-size: 11px; font-weight: 700; color: var(--done); background: var(--done-soft); padding: 1px 6px; border-radius: 999px; }
.seg__save:empty { display: none; }
.select--sm { height: 30px; font-size: 13px; }

/* ─── Вход и регистрация ────────────────────────────────── */
.auth-page { background: var(--bg); }
.auth { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.1fr); min-height: 100vh; }
.auth__promo { background: linear-gradient(160deg, #1d1d3f 0%, #2b2366 55%, #4b3aa8 100%); color: #eeeefc; padding: 40px 48px; display: flex; flex-direction: column; }
.auth__promo .brand { color: #fff; }
.auth__pitch { margin: auto 0; max-width: 420px; }
.auth__pitch h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 24px; }
.auth__pitch ul { list-style: none; display: grid; gap: 14px; }
.auth__pitch li { display: flex; align-items: center; gap: 12px; color: #d6d6f5; }
.auth__pitch li .ic { width: 20px; height: 20px; color: #b3b3ff; padding: 7px; box-sizing: content-box; background: rgba(255, 255, 255, .08); border-radius: 9px; }
.auth__foot { color: rgba(238, 238, 252, .5); font-size: 12px; }
.auth__panel { display: grid; place-items: center; padding: 40px 24px; }
.auth__card { width: min(400px, 100%); display: grid; gap: 18px; }
.brand--mobile { display: none; }
.auth__form { display: grid; gap: 16px; }
.auth__form h1 { font-size: 26px; letter-spacing: -.02em; }
.auth__form > .muted { margin-top: -10px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; }
.auth__hint { font-size: 13px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.auth__setup { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.auth__setup > div { display: grid; gap: 2px; font-size: 13px; }
.auth__setup .ic { width: 20px; height: 20px; margin-top: 1px; }
.auth__plan { font-size: 13px; padding: 10px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); }

/* ─── Шапка публичных страниц ───────────────────────────── */
.site-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.site-head__nav { display: flex; gap: 8px; }

/* ─── Карточка тарифа ───────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plans__loading { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; }
.plan { --plan: var(--accent); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); border-top: 3px solid var(--plan); }
.plan--highlight { border-color: var(--plan); box-shadow: 0 0 0 1px var(--plan), var(--shadow-hover); }
.plan__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan__title h3 { font-size: 18px; letter-spacing: -.01em; }
.plan__badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--plan); color: #fff; white-space: nowrap; }
.plan__badge .ic { width: 11px; height: 11px; fill: currentColor; }
.plan__tagline { color: var(--muted); font-size: 13px; margin-top: 4px; min-height: 2.9em; }
.plan__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan__price b { font-size: 32px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan__price span { color: var(--muted); font-size: 13px; }
.plan__note { font-size: 12px; color: var(--muted); margin-top: -8px; min-height: 16px; }
.plan__trial { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--done); background: var(--done-soft); padding: 3px 8px; border-radius: 999px; }
.plan__trial .ic { width: 12px; height: 12px; }
.plan__cta { width: 100%; height: 40px; }
.plan--highlight .plan__cta.btn--primary { background: var(--plan); border-color: var(--plan); }
.plan__list { list-style: none; display: grid; gap: 8px; font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.plan__list li { display: flex; gap: 8px; align-items: flex-start; }
.plan__list .ic { width: 15px; height: 15px; margin-top: 1px; color: var(--done); stroke-width: 2.5; }
.plan__list li.is-off { color: var(--faint); }
.plan__list li.is-off .ic { color: var(--faint); }
.plan__list em, .compare em { font-style: normal; font-size: 11px; color: var(--muted); background: var(--column); padding: 0 5px; border-radius: 4px; }

/* ─── Страница тарифов ──────────────────────────────────── */
.pricing { max-width: 1160px; margin: 0 auto; padding: 48px 24px 80px; display: grid; gap: 48px; }
.pricing__hero { text-align: center; }
.pricing__hero h1 { font-size: 40px; letter-spacing: -.03em; }
.pricing__hero p { font-size: 16px; margin-top: 8px; }
.compare h2, .faq h2 { font-size: 22px; margin-bottom: 16px; }
.compare__scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.compare__table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14px; }
.compare__table th, .compare__table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; }
.compare__table thead th { font-size: 15px; border-bottom: 2px solid var(--line); }
.compare__table thead th:not(:first-child) { box-shadow: inset 0 3px 0 var(--plan); }
.compare__table tbody th { font-weight: 400; color: var(--text-2); }
.compare__table tr:last-child > * { border-bottom: 0; }
.compare__table .ic { color: var(--done); stroke-width: 2.5; }
.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin-top: 8px; }

/* ─── Админ-панель ──────────────────────────────────────── */
.admin { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin__side { background: var(--sidebar); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.admin__side > .brand { padding: 4px 8px; }
.admin__label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 600; padding: 14px 10px 4px; }
.admin__nav { display: grid; gap: 2px; }
.admin__nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.admin__nav a .ic { color: var(--muted); }
.admin__nav a:hover { background: var(--hover); }
.admin__nav a.is-active { background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); color: var(--text); }
.admin__nav a.is-active .ic { color: var(--accent); }
.admin__side-foot { margin-top: auto; display: grid; gap: 2px; }
.admin__side-foot .side-btn { text-decoration: none; }
.admin__main { min-width: 0; display: flex; flex-direction: column; }
.admin__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.admin__title h1 { font-size: 20px; letter-spacing: -.01em; }
.admin__crumb { font-size: 13px; color: var(--muted); }
.admin__crumb:empty { display: none; }
.admin__actions { display: flex; gap: 8px; }
.admin__body { padding: 24px 28px 48px; display: grid; gap: 20px; align-content: start; }
.view-lead { margin-top: -4px; }
.skeleton { height: 240px; border-radius: 14px; background: linear-gradient(90deg, var(--column), var(--surface-2), var(--column)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; }
.panel--flush { padding: 0; overflow: hidden; }
.panel--empty, .panel .panel--empty { display: grid; justify-items: center; gap: 10px; padding: 40px 20px; text-align: center; color: var(--muted); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel__head h2 { font-size: 15px; font-weight: 600; }
.panel__foot { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); display: grid; gap: 4px; }
.kpi__label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.kpi__label .ic { width: 15px; height: 15px; }
.kpi__value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi__sub { font-size: 12px; color: var(--muted); }
.kpi__sub .up { color: var(--done); font-weight: 600; }

/* Столбцы: тонкие, закругления сверху, 2 px просвет, сетка приглушена */
.bars { position: relative; display: grid; grid-template-rows: 200px auto; padding-left: 28px; }
.bars__grid { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; margin-left: -28px; pointer-events: none; }
.bars__grid div { border-top: 1px dashed var(--line); position: relative; height: 0; }
.bars__grid div:last-child { border-top: 1px solid var(--line-strong); }
.bars__grid span { position: absolute; left: 0; top: -8px; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bars__cols { grid-row: 1; grid-column: 1; display: flex; align-items: flex-end; gap: 2px; }
.bars__col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border: 0; background: none; padding: 0 2px; cursor: default; border-radius: 6px; }
.bars__col:hover, .bars__col:focus-visible { background: var(--hover); outline: none; }
.bars__bar { position: relative; width: 100%; max-width: 26px; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.bars__bar.is-zero { background: var(--line-strong); height: 2px !important; }
.bars__bar b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--text-2); }
.bars__x { grid-row: 2; display: flex; gap: 2px; margin-top: 6px; }
.bars__x span { flex: 1; text-align: center; font-size: 11px; color: var(--faint); white-space: nowrap; }
.tip { position: absolute; z-index: 3; pointer-events: none; background: #1f1f24; color: #f4f4f6; font-size: 12px; padding: 5px 9px; border-radius: 7px; white-space: nowrap; box-shadow: var(--shadow-lg); }

.hbars { display: grid; gap: 12px; }
.hbars__row { display: grid; grid-template-columns: 110px 1fr 70px; align-items: center; gap: 12px; font-size: 13px; }
.hbars__label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars__track { height: 10px; background: var(--column); border-radius: 0 5px 5px 0; overflow: hidden; }
.hbars__track span { display: block; height: 100%; min-width: 2px; background: var(--accent); border-radius: 0 4px 4px 0; }
.hbars__value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.hbars__value small { font-weight: 400; color: var(--muted); }

.feed { list-style: none; display: grid; gap: 12px; }
.feed li { display: flex; gap: 12px; font-size: 13px; }
.feed__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-top: 5px; flex: none; }
.feed small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }

.toolbar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-row .search-box { width: 280px; }
.toolbar-row .select { width: auto; }
.table-scroll { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--surface-2); }
.dtable .num small { display: block; color: var(--muted); }
.dtable .nowrap { white-space: nowrap; }
.dtable--users { min-width: 980px; }
.panel .dtable th { background: transparent; }
.who { display: flex; align-items: center; gap: 10px; }
.who b { font-weight: 600; }
.who small { display: block; color: var(--muted); }
.role { font-size: 12px; font-weight: 500; }
.role--owner { color: var(--accent-text); }
.role--admin { color: var(--text); }
.role--user { color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status--active::before { background: var(--done); }
.status--blocked { color: var(--high); }
.status--blocked::before { background: var(--high); }
.icon-btn--xs:disabled { opacity: .3; cursor: default; }

.secret { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--column); }
.secret code { flex: 1; font: 600 18px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; user-select: all; }

.denied { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.denied__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--danger-soft); color: var(--high); display: grid; place-items: center; }
.denied__icon .ic { width: 26px; height: 26px; }

/* Тарифы в админке */
.plans--admin .plan { gap: 10px; }
.plan__admin { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-strong); display: grid; gap: 10px; }
.plan__meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.plan__meta > span:first-child { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.plan__meta .ic { width: 13px; height: 13px; }
.plan__buttons { display: flex; align-items: center; gap: 4px; }
.plan__buttons .btn { margin-right: auto; }

/* Конструктор тарифа */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.builder__form { display: grid; gap: 16px; }
.bsec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: grid; gap: 14px; box-shadow: var(--shadow-sm); }
.bsec header h2 { font-size: 15px; }
.bsec header p { font-size: 12px; margin-top: 2px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.limit-row { display: grid; grid-template-columns: 1fr 120px 150px; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.limit-row:first-of-type { border-top: 0; }
.limit-row small { display: block; font-size: 12px; }
.limit-row .input:disabled { opacity: .45; }
.swatches { display: flex; gap: 8px; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 28px; height: 28px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.builder__preview { position: sticky; top: 88px; display: grid; gap: 14px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.preview-head h2 { font-size: 15px; }
.preview-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 6px; }
.mini-plans { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-plan { --plan: var(--accent); flex: 1; min-width: 90px; display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--plan); font-size: 12px; }
.mini-plan span { color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-plan.is-current { box-shadow: 0 0 0 2px var(--accent-soft); border-color: var(--accent); border-top-color: var(--plan); }

/* ─── Адаптив ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .builder { grid-template-columns: 1fr; }
  .builder__preview { position: static; order: -1; }
  .plans { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth__promo { display: none; }
  .brand--mobile { display: inline-flex; margin-bottom: 8px; }
  .admin { grid-template-columns: 1fr; }
  .admin__side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; padding: 10px 12px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin__label, .admin__side-foot .side-btn { display: none; }
  .admin__nav { display: flex; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .admin__nav a { white-space: nowrap; }
  .admin__side-foot { margin: 0 0 0 auto; }
  .admin__side-foot .user-btn { margin: 0; padding: 4px 8px 4px 4px; }
  .admin__side-foot .user-btn__main { display: none; }
  .admin__head { position: static; padding: 14px 16px; }
  .admin__body { padding: 16px; }
  .plans { grid-template-columns: 1fr; }
  .site-head { padding: 12px 16px; }
  .pricing { padding: 32px 16px 60px; gap: 36px; }
  .pricing__hero h1 { font-size: 32px; }
  .fgrid { grid-template-columns: 1fr; }
  .limit-row { grid-template-columns: 1fr 110px; }
  .limit-row .checkbox { grid-column: 1 / -1; }
  .toolbar-row .search-box { width: 100%; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi__value { font-size: 22px; }
  .site-head__nav .btn--ghost { display: none; }
  .hbars__row { grid-template-columns: 80px 1fr 56px; }
}

/* ─── Вход для администраторов (всегда тёмная тема) ─────── */
.alogin-page { min-height: 100vh; background: radial-gradient(1200px 600px at 50% -10%, rgba(116, 116, 238, .18), transparent 60%), linear-gradient(var(--bg), var(--bg)); }
.alogin-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at 50% 30%, #000, transparent 70%); }
.alogin { position: relative; min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; }
.alogin__card { width: min(400px, calc(100vw - 32px)); display: grid; gap: 24px; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); }
.alogin__head { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.alogin__shield { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(116, 116, 238, .35); }
.alogin__shield .ic { width: 20px; height: 20px; }
.alogin__brand { font-weight: 600; font-size: 15px; }
.alogin__label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-text); font-weight: 600; }
.alogin h1 { font-size: 22px; letter-spacing: -.02em; }
.alogin .auth__form > div > .muted { margin-top: 4px; font-size: 13px; }
.alogin__notes { list-style: none; display: grid; gap: 8px; padding-top: 4px; }
.alogin__notes li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.alogin__notes .ic { width: 14px; height: 14px; color: var(--faint); }
.alogin__denied { display: grid; gap: 14px; }
.alogin__back { font-size: 13px; }
.denied__actions { display: flex; gap: 8px; }

/* ─── Проекты (стартовая страница) ──────────────────────── */
.projects-page .site-head__nav { align-items: center; gap: 12px; }
.sync--inline { padding: 0; }
.user-btn--compact { margin: 0; width: auto; padding: 4px 10px 4px 4px; }
.user-btn--compact .user-btn__main { max-width: 180px; }
.avatar--lg { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
.projects { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 24px; }
.projects__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.projects__head h1 { font-size: 28px; letter-spacing: -.02em; }
.projects__head .muted { margin-top: 4px; }
.projects__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.projects__actions .search-box { width: 260px; }

.usage { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.usage[hidden] { display: none; }
.usage__plan { display: flex; gap: 10px; align-items: center; margin-right: auto; }
.usage__row { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.usage__row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.usage__bar { width: 90px; height: 6px; border-radius: 999px; background: var(--column); overflow: hidden; }
.usage__bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.usage__row.is-full .usage__bar i { background: var(--high); }
.usage__row.is-full b { color: var(--high); }

.recent h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 10px; }
.recent__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rcard { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.rcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.rcard__main { flex: 1; min-width: 0; display: grid; }
.rcard__main b, .rcard__main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard__main small { color: var(--muted); font-size: 12px; }
.rcard__count { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--column); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.pgrid__none { grid-column: 1 / -1; text-align: center; padding: 24px; }
.pcard { --c: var(--accent); display: grid; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--c); }
.pcard__head { display: flex; align-items: center; gap: 12px; }
.pcard__title { flex: 1; min-width: 0; }
.pcard__title h2 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__title small { color: var(--muted); font-size: 12px; }
.pcard__progress { display: flex; align-items: center; gap: 10px; }
.pcard__progress .bar { flex: 1; height: 6px; }
.pcard__progress small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pcard__boards { list-style: none; display: grid; gap: 2px; margin: 0 -8px; }
.brow { display: grid; grid-template-columns: 16px 1fr auto 48px; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text-2); }
.brow:hover { background: var(--surface-2); color: var(--text); }
.brow .ic { color: var(--faint); }
.brow:hover .ic { color: var(--accent); }
.brow__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.brow__meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.brow__bar { height: 4px; border-radius: 999px; background: var(--column); overflow: hidden; }
.brow__bar span { display: block; height: 100%; background: var(--done); border-radius: inherit; }
.brow--empty { padding: 8px; font-size: 13px; }
.pcard__add { display: flex; align-items: center; gap: 6px; padding: 8px; margin: -6px -8px -4px; border: 0; border-radius: 8px; background: none; color: var(--muted); text-align: left; }
.pcard__add:hover { background: var(--hover); color: var(--text); }
.pcard--new { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 180px; border: 1.5px dashed var(--line-strong); border-top-width: 1.5px; background: transparent; box-shadow: none; color: var(--muted); font-weight: 500; }
.pcard--new:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.pcard--new .ic { width: 22px; height: 22px; }
.pempty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 16px; }

/* Ссылка «Все проекты» в боковой панели доски */
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: -6px 2px 8px; border-radius: 8px; color: var(--text-2); text-decoration: none; font-weight: 500; }
.side-link:hover { background: var(--hover); color: var(--text); }
.side-link .ic { color: var(--muted); }

@media (max-width: 1000px) { .recent__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .projects { padding: 20px 16px 48px; }
  .projects__actions { width: 100%; }
  .projects__actions .search-box { width: 100%; }
  .recent__list, .pgrid { grid-template-columns: 1fr; }
  .user-btn--compact .user-btn__main, .sync--inline span { display: none; }
}
