*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-main: #050816;
    --bg-card: rgba(16, 24, 40, 0.95);
    --bg-card-soft: rgba(15, 23, 42, 0.9);
    --accent: #3b82f6;
    --accent-soft: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-glow: rgba(59, 130, 246, 0.35);
    --border-subtle: rgba(148, 163, 184, 0.15);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --danger: #f97373;
    --danger-soft: rgba(248, 113, 113, 0.1);
    --radius-lg: 18px;
    --radius-full: 999px;
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.9);
    --transition-fast: 0.18s ease-out;
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
}

html,
body {
    height: 100%;
}

body.app-body {
    min-height: 100vh;
    font-family: var(--font-main);
    background: radial-gradient(circle at top left, #1e293b, #020617 55%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Центровка для страницы логина */
.app-body.app-body--centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== TOPBAR ===== */

.topbar {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.98),
        rgba(15, 23, 42, 0.9)
    );
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.9);
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar__logo-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #e5f2ff, #60a5fa 50%, #1d4ed8);
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.8);
}

.topbar__title {
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 14px;
    color: #e5e7eb;
}

.topbar__accent {
    color: var(--accent);
}

/* ===== PAGE LAYOUT ===== */

.page {
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

/* ===== CARD ===== */

.card {
    background: radial-gradient(circle at top left, #111827, #020617);
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: var(--shadow-soft);
    padding: 28px 30px 26px;
    max-width: 720px;
    width: 100%;
    color: var(--text-main);
}

.search-card {
    margin: 0 auto;
}

.login-card {
    max-width: 420px;
}

.login-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.login-card__title-wrap {
    display: flex;
    flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */

.card__title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card__subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== FIELDS ===== */

.field__input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast),
        box-shadow var(--transition-fast), background var(--transition-fast);
    margin-bottom: 16px;
    resize: none;
}

.field__input::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.field__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4),
        0 0 0 8px rgba(37, 99, 235, 0.18);
    background: rgba(15, 23, 42, 0.98);
}

.field__input--textarea {
    min-height: 80px;
    max-height: 220px;
}

/* ===== BUTTONS ===== */

.btn {
    border-radius: var(--radius-full);
    border: none;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast),
        box-shadow var(--transition-fast), transform var(--transition-fast),
        color var(--transition-fast), border-color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    box-shadow: 0 12px 30px var(--accent-glow);
    border-radius: 999px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-strong));
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-main);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
    background: rgba(30, 64, 175, 0.4);
    border-color: rgba(129, 140, 248, 0.8);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-radius: 999px;
    padding-inline: 14px;
    border: 1px solid transparent;
}

.btn-ghost:hover {
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--text-main);
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.btn-full {
    width: 100%;
    margin-top: 6px;
}

/* ===== RESULTS ===== */

.results {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(12, 20, 38, 0.98);
    font-size: 13px;
}

.result-card.found {
    border-color: rgba(52, 211, 153, 0.55);
    background: radial-gradient(circle at top left, #022c22, #020617);
}

.result-card.not-found {
    border-color: rgba(248, 113, 113, 0.6);
    background: radial-gradient(circle at top left, #3f1d1d, #020617);
}

.result-card__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.result-card__status {
    margin-top: 4px;
}

.result-card__status--bad {
    color: var(--danger);
}

.results__info {
    font-size: 13px;
    color: var(--text-muted);
}

.results__error {
    font-size: 13px;
    color: var(--danger);
}

/* ===== FORM ERROR ===== */

.form-error {
    margin-top: 8px;
    font-size: 13px;
    color: var(--danger);
    min-height: 18px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
    }

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

    .page {
        padding: 24px 12px;
    }
}
