/* Shafik Hub — витрина, вход и личный кабинет.

   Подключается ПОСЛЕ site.css и переиспользует его переменные (:root) и общие
   блоки (.wrap, .hero, .card, .cta). Здесь только то, чего в site.css нет:
   формы, шапка сайта и карточки кабинета. Цвета своих значений не заводят —
   всё через токены, иначе тема разъедется между страницей подключения и
   кабинетом. */

/* ── Ширины страниц ───────────────────────────── */
.wrap--wide { max-width: 900px; gap: 2.5rem; }
.wrap--auth { max-width: 420px; gap: 1.25rem; }
.wrap--cab  { max-width: 760px; gap: 1.25rem; }

/* ── Шапка сайта ──────────────────────────────── */
.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand svg { width: 26px; height: 26px; color: #93c5fd; }
.site-nav { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.site-nav a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.7rem;
    border-radius: var(--r-sm);
    transition: color var(--t), background var(--t);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }

/* ── Кнопки ───────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.7rem 1.2rem;
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--t), border-color var(--t), filter var(--t), transform 0.12s var(--ease);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
    background: linear-gradient(135deg, var(--brand), #2563eb);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 30px -16px rgba(79, 140, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--primary:hover { background: linear-gradient(135deg, var(--brand), #2563eb); filter: brightness(1.07); }
.btn--wide { width: 100%; }
.btn--sm { min-height: 38px; padding: 0.4rem 0.8rem; font-size: 0.84rem; }
.btn--danger { color: #fca5a5; border-color: rgba(248, 113, 113, 0.28); }
.btn--danger:hover { background: rgba(248, 113, 113, 0.1); }

/* ── Формы ────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 0.9rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-2); }

.input {
    width: 100%;
    min-height: 50px;
    padding: 0.75rem 0.9rem;
    background: var(--bg-deep);
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    color: var(--text);
    font: inherit;
    font-size: 1rem; /* меньше 16px — и Safari на iOS зумит страницу при фокусе */
    transition: border-color var(--t), background var(--t);
}
.input::placeholder { color: var(--text-3); }
.input:focus {
    outline: none;
    border-color: var(--brand);
    background: var(--surface);
}
.input--code {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    padding-left: 0.5rem;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-2);
    cursor: pointer;
}
.checkbox input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--brand);
}
.checkbox a { color: #93c5fd; }

.form-foot {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: var(--text-2);
}
.form-foot a { color: #93c5fd; text-decoration: none; }
.form-foot a:hover { text-decoration: underline; }

/* ── Сообщения ────────────────────────────────── */
.alert {
    padding: 0.8rem 0.95rem;
    border-radius: var(--r);
    font-size: 0.88rem;
    line-height: 1.55;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
    color: var(--text-2);
}
.alert--err {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.09);
    border-color: rgba(248, 113, 113, 0.26);
}
.alert--ok {
    color: #86efac;
    background: rgba(74, 222, 128, 0.09);
    border-color: rgba(74, 222, 128, 0.26);
}
.alert[hidden] { display: none; }

/* ── Карточка ─────────────────────────────────── */
.card {
    background: linear-gradient(180deg, var(--surface-2), var(--surface));
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -30px #000;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.card-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.card p { font-size: 0.9rem; line-height: 1.6; color: var(--text-2); }

/* ── Статус подписки ──────────────────────────── */
.status {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.status b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--surface-3);
    color: var(--text-2);
    white-space: nowrap;
}
.pill--ok  { color: #86efac; background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.26); }
.pill--off { color: #fca5a5; background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.26); }
.pill--tg  { color: #7dd3fc; background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.26); }

/* ── Тарифы ───────────────────────────────────── */
.tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.75rem; }
.tariff {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 1rem;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: border-color var(--t), background var(--t), transform 0.12s var(--ease);
}
.tariff:hover { border-color: var(--line-2); background: var(--surface-2); }
.tariff[aria-pressed="true"] {
    border-color: var(--brand);
    background: rgba(79, 140, 255, 0.09);
}
.tariff .t-name { font-size: 0.86rem; color: var(--text-2); font-weight: 500; }
.tariff .t-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.tariff .t-per { font-size: 0.76rem; color: var(--text-3); }

/* ── Список пар «ключ — значение» ─────────────── */
.rows { display: flex; flex-direction: column; gap: 0.1rem; }
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.89rem;
}
.row:last-child { border-bottom: none; }
.row .k { color: var(--text-2); min-width: 0; }
.row .v { color: var(--text); font-weight: 600; text-align: right; word-break: break-word; }
.row .v small { display: block; font-weight: 400; color: var(--text-3); font-size: 0.78rem; }

/* ── Возможности на витрине ───────────────────── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.9rem; }
.feature {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.feature svg { width: 22px; height: 22px; color: #93c5fd; }
.feature h3 { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.feature p { font-size: 0.86rem; line-height: 1.55; color: var(--text-2); }

/* ── Секции витрины ───────────────────────────── */
.section { display: flex; flex-direction: column; gap: 1rem; }
.section > h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.15rem, 4vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.section > p { color: var(--text-2); font-size: 0.93rem; line-height: 1.6; }

.hero-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.2rem;
}

/* ── Мелочи ───────────────────────────────────── */
.muted { color: var(--text-3); font-size: 0.82rem; line-height: 1.55; }
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
    word-break: break-all;
}
.copy-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    background: var(--bg-deep);
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
}
.copy-box .mono { flex: 1; min-width: 0; }
.spin { opacity: 0.6; pointer-events: none; }

.footer { text-align: center; }

@media (max-width: 480px) {
    .site-nav a { padding: 0.45rem 0.5rem; font-size: 0.84rem; }
    .status b { font-size: 1.7rem; }
}
