/* ZUMO ID — базовые стили. Без сборки: файл подключается напрямую. */

:root {
    --bg: #f6f6f9;
    --surface: #ffffff;
    --text: #15151c;
    --muted: #6a6a78;
    --line: #e4e4ec;
    --accent: #6d4aff;
    --accent-strong: #5634ef;
    --accent-soft: #efebff;
    --error: #d93636;
    --error-soft: #fdeeee;
    --ok-soft: #e9f7ef;
    --ok: #1d7a46;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 24px rgba(20, 20, 40, .06);
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f0f14;
        --surface: #191920;
        --text: #f1f1f5;
        --muted: #9d9dab;
        --line: #2b2b35;
        --accent: #8b70ff;
        --accent-strong: #a08bff;
        --accent-soft: #241f3d;
        --error: #ff6b6b;
        --error-soft: #3a1d1f;
        --ok-soft: #173024;
        --ok: #5fd394;
        --shadow: none;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Шапка --- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: .02em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    font-weight: 800;
}

.brand-name b { color: var(--accent); }

.lang select {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 14px;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

/* --- Страница --- */

.page {
    flex: 1;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

body.wide .page { max-width: 720px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

h1 {
    font-size: 26px;
    line-height: 1.25;
    margin: 0 0 8px;
}

.muted { color: var(--muted); }

.card > .muted { margin: 0 0 24px; }

.fine-print {
    margin: 20px 0 0;
    font-size: 13px;
    color: var(--muted);
}

/* --- Поля --- */

.field { display: block; margin-bottom: 12px; }

.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font: inherit;
    font-size: 18px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input.invalid { border-color: var(--error); }

.code-input {
    letter-spacing: .4em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    font-size: 24px !important;
}

.error {
    margin: -4px 0 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--error-soft);
    color: var(--error);
    font-size: 14px;
}

.notice {
    margin: 0 0 16px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--ok-soft);
    color: var(--ok);
    font-size: 14px;
}

/* --- Кнопки --- */

.button {
    display: block;
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.button:hover { background: var(--accent-strong); }

.button:focus-visible, .link:focus-visible, .lang select:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 2px;
}

.button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
}

.button.secondary:hover { background: var(--surface); }

.link {
    border: 0;
    background: none;
    padding: 0;
    color: var(--accent);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.link:disabled { color: var(--muted); cursor: default; }

.row-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* --- Кабинет --- */

.profile {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile h1 { margin: 0; }
.profile p { margin: 4px 0 0; }

.avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 26px;
    font-weight: 700;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 20px;
}

.facts { margin: 0; }

.facts > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; word-break: break-all; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }

.section-title {
    font-size: 18px;
    margin: 32px 0 12px;
}

.services {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (min-width: 640px) {
    .services { grid-template-columns: repeat(6, 1fr); }
}

.service {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-align: center;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    color: #fff;
    font-weight: 700;
}

.service-go { background: linear-gradient(135deg, #22c1c3, #4ade80); }
.service-taxi { background: linear-gradient(135deg, #a855f7, #f472b6); }
.service-delivery { background: linear-gradient(135deg, #f59e0b, #facc15); }
.service-eats { background: linear-gradient(135deg, #ef4444, #f97316); }
.service-market { background: linear-gradient(135deg, #10b981, #34d399); }
.service-pay { background: linear-gradient(135deg, #3b82f6, #a78bfa); }

.sections {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.section-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.section-item:last-child { border-bottom: 0; }

.badge {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}

.logout { margin-top: 32px; }

.footer {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 420px) {
    .card { padding: 24px 18px; }
    h1 { font-size: 22px; }
}
