:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-border: #dbe3ee;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #00b380;
    --accent-dark: #059669;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #b45309;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

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

header {
    position: static !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 20mm;
    background: #00b380 !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 8px 18px !important;
    font-size: 12pt !important;
    break-after: avoid-page !important;
    page-break-after: avoid !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

header a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.page {
    min-height: calc(100vh - 20mm);
    display: grid;
    place-items: center;
    padding: 24px;
    background: #ffffff;
}

.card {
    width: min(760px, 100%);
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
}

form {
    width: 100%;
}

.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-box {
    width: 100%;
    max-width: 640px;

    position: relative;

    display: flex;
    align-items: center;
}

.search-box input[type="text"] {
    width: 100%;

    padding:
        18px
        72px
        18px
        22px;

    border-radius: 999px;

    border: 1px solid #cbd5e1;

    background: #ffffff;

    color: var(--text);

    outline: none;

    font-size: 16px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.search-box input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 4px rgba(0, 179, 128, 0.12);
}

.search-btn {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    height: 56px;
    min-width: 130px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    background:
        linear-gradient(
            135deg,
            var(--accent),
            var(--accent-dark)
        );
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.search-btn:hover {
    transform:
        translateY(-50%)
        scale(1.04);

    box-shadow:
        0 10px 24px rgba(0, 179, 128, 0.25);
}

.search-btn:active {
    transform:
        translateY(-50%)
        scale(0.98);
}

.search-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}


.search-text {
    white-space: nowrap;
}

.search-box input[type="text"].input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.field-popup {
    width: 100%;
    max-width: 640px;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7f7;
    border: 1px solid rgba(220, 38, 38, 0.18);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.08);
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.field-popup--visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.field-popup__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.field-popup__text {
    line-height: 1.45;
}

.errorlist {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    color: var(--danger);
}

.helper {
    margin-top: 16px;
    font-size: 14px;
    color: var(--muted);
    text-align: center;
}

.page-message {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
}

.page-message.not-found {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.14);
    color: var(--danger);
}

.page-message.error {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(148, 163, 184, 0.20);
    color: var(--text);
}


.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    display: none;
    z-index: 100;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(3px);
}

.loading-overlay.show {
    display: flex;
}

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 28px 22px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    width: min(440px, calc(100vw - 32px));
}

.loading-logo-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e6faf4;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.ring-track {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid #c8f0e2;
    border-top-color: #00b380;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text-block {
    text-align: center;
}

.loading-step-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    min-height: 20px;
    transition: opacity 0.25s;
}

.loading-step-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 3px;
    min-height: 18px;
}

.loading-bar-wrap {
    width: 100%;
    background: #f1f5f9;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.loading-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: #00b380;
    width: 0%;
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-pct-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    color: #64748b;
    margin-top: -8px;
}

.loading-pct-num {
    font-weight: 600;
    color: #00b380;
    font-variant-numeric: tabular-nums;
}

.loading-steps-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loading-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 13px;
    color: #64748b;
    transition: background 0.3s, color 0.3s;
}

.loading-step-item.active {
    background: #e6faf4;
    color: #00b380;
    font-weight: 500;
}

.loading-step-item.done {
    color: #0f172a;
}

.loading-step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #dbe3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.3s;
}

.loading-step-item.active .loading-step-icon {
    border-color: #00b380;
    background: #00b380;
    color: #ffffff;
    font-size: 10px;
}

.loading-step-item.done .loading-step-icon {
    border-color: #00b380;
    background: #e6faf4;
    color: #00b380;
}

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 26px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    color: #0f172a;
    font-weight: 600;
}

.spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid #e2e8f0;
    border-top-color: #00b380;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

button:disabled {
    opacity: 0.75;
    cursor: wait;
}

/* ── Footer ── */
.site-footer {
    background-color: #26cd94;
    padding: 75px 0 90px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    align-items: start;
}

.footer-logo {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
}

.footer-telegram {
    display: inline-block;
    line-height: 0;
}

.footer-col-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    text-transform: none;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 13px;
    color: #ffffff;
    text-decoration: none;
    line-height: 1.4;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-legal p {
    font-size: 13px;
    color: #ffffff;
    margin: 0 0 6px;
    line-height: 1.5;
}

/* ── Cookie banner ── */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    opacity: 0;
    width: min(660px, calc(100vw - 32px));
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.11);
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    z-index: 999;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    pointer-events: none;
}

.cookie-banner--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-banner__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #e6faf4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-banner__body {
    flex: 1;
    min-width: 0;
}

.cookie-banner__title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 5px;
}

.cookie-banner__text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner__text a {
    color: #00b380;
    text-decoration: none;
}

.cookie-banner__text a:hover {
    text-decoration: underline;
}

.cookie-banner__btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-banner__accept {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    background: #00b380;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.cookie-banner__accept:hover { opacity: 0.88; }

.cookie-banner__decline {
    height: 40px;
    padding: 0 16px;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
}

.cookie-banner__decline:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

/* ── Cookie notice (после отказа) ── */
.cookie-notice {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    opacity: 0;
    width: min(560px, calc(100vw - 32px));
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    padding: 10px 14px 10px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 998;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease, opacity 0.3s ease;
    pointer-events: none;
}

.cookie-notice--visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.cookie-notice__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
}

.cookie-notice__text {
    font-size: 12px;
    color: #64748b;
    flex: 1;
    line-height: 1.4;
}

.cookie-notice__text strong {
    color: #0f172a;
    font-weight: 600;
}

.cookie-notice__revoke {
    height: 30px;
    padding: 0 14px;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #ffffff;
    color: #00b380;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.cookie-notice__revoke:hover {
    border-color: #00b380;
}

@media (max-width: 640px) {
    .cookie-banner {
        flex-direction: column;
        gap: 12px;
        bottom: 16px;
        padding: 18px;
    }

    .cookie-banner__btns {
        flex-direction: row;
        width: 100%;
    }

    .cookie-banner__accept,
    .cookie-banner__decline {
        flex: 1;
    }

    .cookie-notice {
        border-radius: 16px;
        flex-wrap: wrap;
        bottom: 12px;
    }
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-legal {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .card {
        padding: 22px;
        border-radius: 20px;
    }

    .search-box input[type="text"] {
        font-size: 15px;
        padding:
            16px
            125px
            16px
            18px;
    }

    .search-btn {
        min-width: 110px;
        height: 50px;

        font-size: 14px;

        padding: 0 16px;
    }

    .helper {
        font-size: 13px;
    }

    .page {
        padding: 16px;
    }
}