:root {
    color-scheme: dark;
    --bg: #151719;
    --panel: #1c1f22;
    --panel-soft: #191c1f;
    --text: #e8e9e7;
    --muted: #92999d;
    --accent: #a8c2bd;
    --line: #303538;
    --danger: #d58c8c;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, p {
    margin-top: 0;
}

.topbar {
    width: min(100% - 48px, 1040px);
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
}

.brand-mark {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid #596763;
    border-radius: 6px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.login-link, .secondary-link {
    color: var(--muted);
    font-size: 13px;
}

.login-link:hover, .secondary-link:hover, .auth-switch a:hover {
    color: var(--accent);
}

.button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #17201e;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.button:hover {
    background: #bdd0cb;
    border-color: #bdd0cb;
}

.button-small {
    min-height: 35px;
    padding: 0 13px;
    font-size: 12px;
}

.home-shell {
    width: min(100% - 48px, 850px);
    margin: 0 auto;
}

.hero {
    padding: 64px 0 38px;
    max-width: 620px;
}

.eyebrow, .section-kicker {
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
}

.hero h1 {
    margin: 17px 0 14px;
    font-size: clamp(38px, 6vw, 58px);
    line-height: 1.12;
    letter-spacing: -.045em;
    font-weight: 650;
}

.hero h1 span {
    color: var(--accent);
}

.hero-text {
    max-width: 430px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 15px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.steps {
    padding: 27px 0 42px;
    border-top: 1px solid var(--line);
}

.steps-heading {
    margin-bottom: 20px;
}

.steps-heading h2 {
    margin: 7px 0 0;
    font-size: 22px;
    font-weight: 550;
    letter-spacing: -.025em;
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step > span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.step b, .step small {
    display: block;
}

.step b {
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
}

.step small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

footer {
    display: flex;
    justify-content: space-between;
    padding: 19px 0 25px;
    border-top: 1px solid var(--line);
    color: #737b7e;
    font-size: 11px;
}

/* Формы и личный кабинет */

.auth-page {
    min-height: 100vh;
}

.auth-shell {
    width: min(100% - 32px, 430px);
    margin: 0 auto;
    padding: 48px 0 30px;
}

.auth-brand {
    margin-bottom: 25px;
}

.auth-card {
    padding: 27px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 12px;
}

.back-link:hover {
    color: var(--accent);
}

.auth-card h1 {
    margin: 9px 0 10px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.035em;
}

.auth-description {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.auth-form label {
    margin-top: 7px;
    color: #c9cecc;
    font-size: 12px;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    min-height: 43px;
    padding: 0 12px;
    border: 1px solid #3a4143;
    border-radius: 5px;
    outline: none;
    background: #141719;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.auth-form input:focus {
    border-color: var(--accent);
}

.auth-form input::placeholder {
    color: #70797c;
}

.field-help {
    margin: -3px 0 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.auth-submit {
    width: 100%;
    margin-top: 13px;
}

.notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: #d5dbd8;
    font-size: 12px;
    line-height: 1.6;
}

.notice p {
    margin: 5px 0 0;
}

.notice-success {
    border-color: #45685d;
    background: #1a2924;
}

.notice-error {
    border-color: #704848;
    background: #2b1e1e;
    color: #e4baba;
}

.notice-info {
    border-color: #465b58;
    background: #202927;
}

.auth-switch {
    margin: 20px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.auth-switch a {
    color: var(--accent);
}

.auth-footnote {
    margin: 15px 5px 0;
    color: #7e8789;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
}

.dashboard-shell {
    width: min(100% - 32px, 520px);
}

/* Административная часть */

.admin-shell {
    width: min(100% - 32px, 780px);
    margin: 0 auto;
    padding: 28px 0 55px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 42px;
}

.admin-header form, .request-actions form {
    margin: 0;
}

.admin-heading {
    margin-bottom: 24px;
}

.admin-heading h1 {
    margin: 8px 0;
    font-size: clamp(25px, 5vw, 34px);
    font-weight: 600;
    letter-spacing: -.035em;
}

.admin-request-list {
    display: grid;
    gap: 12px;
}

.admin-request-card {
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-soft);
}

.request-topline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.request-number {
    color: var(--accent);
    font-weight: 650;
}

.admin-request-card h2 {
    margin: 13px 0 5px;
    font-size: 19px;
    font-weight: 600;
}

.request-telegram {
    color: #c1c8c5;
    font-size: 12px;
}

.request-warning {
    margin: 14px 0;
    padding: 10px 12px;
    border-left: 2px solid #b99a69;
    background: #24231f;
    color: #c9bda8;
    font-size: 11px;
    line-height: 1.55;
}

.request-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.button-danger {
    border-color: #704848;
    background: transparent;
    color: var(--danger);
}

.button-danger:hover {
    border-color: var(--danger);
    background: #2b1e1e;
}

.identity-confirm {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 12px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.identity-confirm input[type="checkbox"] {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--accent);
    cursor: pointer;
}

@media (max-width: 650px) {
    .topbar, .home-shell {
        width: min(100% - 36px, 850px);
    }

    .topbar {
        min-height: 62px;
    }

    .header-actions {
        gap: 13px;
    }

    .hero {
        padding-top: 48px;
    }

    .hero h1 {
        font-size: clamp(37px, 10vw, 50px);
    }

    .steps-list {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .steps {
        padding-top: 23px;
    }

    .auth-shell {
        padding-top: 25px;
    }

    .auth-card {
        padding: 22px 19px;
    }

    .admin-header {
        margin-bottom: 30px;
    }

    .request-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .request-actions form, .request-actions button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
