/* Calm, app-like visual layer for the live /auth page only. */
body {
    --bg-color: #f2f2f7;
    --surface-color: #fff;
    --text-primary: #1c1c1e;
    --text-secondary: #6e6e73;
    --text-muted: #8e8e93;
    --border-color: rgba(60, 60, 67, 0.16);
    --border-light: #f2f2f7;
    --primary-color: #0a84ff;
    --primary-hover: #0077e6;
    --backdrop-color: rgba(0, 0, 0, 0.38);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    position: static;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--bg-color);
}

body.dark {
    --bg-color: #000;
    --surface-color: #1c1c1e;
    --text-primary: #f5f5f7;
    --text-secondary: #aeaeb2;
    --text-muted: #8e8e93;
    --border-color: rgba(235, 235, 245, 0.18);
    --border-light: #2c2c2e;
    --primary-color: #0a84ff;
    --primary-hover: #2693ff;
    --backdrop-color: rgba(0, 0, 0, 0.68);
}

.main-header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: none;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

body.dark .main-header {
    background: rgba(28, 28, 30, 0.84);
}

.logo-icon {
    border-radius: 12px;
    background: var(--border-light);
}

.auth-main-page {
    box-sizing: border-box;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
    height: auto;
    padding: clamp(24px, 7vh, 72px) 20px;
    overflow: visible;
}

.auth-content {
    max-width: 520px;
}

.welcome-section {
    box-sizing: border-box;
    width: 100%;
    padding: 36px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--surface-color);
    box-shadow: 0 16px 44px rgba(24, 32, 48, 0.08);
}

body.dark .welcome-section {
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.welcome-icon {
    margin-bottom: 22px;
    padding: 16px;
    border-radius: 18px;
    background: var(--border-light);
    box-shadow: none;
}

.welcome-title {
    max-width: 420px;
    margin-bottom: 12px;
    font-size: clamp(25px, 4vw, 32px);
    letter-spacing: -0.025em;
}

.welcome-text {
    max-width: 440px;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.55;
}

.auth-buttons {
    max-width: 360px;
    gap: 10px;
}

.auth-main-btn {
    min-height: 52px;
    border-radius: 14px;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.auth-main-btn.primary,
.submit-btn {
    background: var(--primary-color);
    box-shadow: none;
}

.auth-main-btn.primary:hover,
.submit-btn:hover {
    background: var(--primary-hover);
    transform: none;
    box-shadow: none;
}

.auth-main-btn.secondary {
    background: var(--border-light);
}

.auth-main-btn.secondary:hover {
    background: var(--border-light);
    transform: none;
    box-shadow: none;
}

.auth-modal {
    padding: 20px;
    background: var(--backdrop-color);
}

.auth-modal-content {
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: var(--surface-color);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.modal-header {
    padding: 22px 24px 14px;
}

.modal-header h3 {
    font-size: 21px;
    letter-spacing: -0.015em;
}

.auth-form {
    padding: 24px;
}

.form-group input {
    min-height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--border-light);
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.submit-btn {
    min-height: 50px;
    border-radius: 12px;
}

.bottom-nav {
    min-height: 58px;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(249, 249, 249, 0.84);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

body.dark .bottom-nav {
    background: rgba(28, 28, 30, 0.84);
}

.bottom-nav .nav-item.active {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }

    .auth-main-page {
        min-height: calc(100dvh - 119px - env(safe-area-inset-bottom));
        padding: 16px 12px;
    }

    .welcome-section {
        padding: 26px 18px;
        border-radius: 20px;
    }

    .welcome-icon {
        margin-bottom: 18px;
        padding: 12px;
    }

    .welcome-icon svg {
        width: 64px;
        height: 64px;
    }

    .welcome-text {
        margin-bottom: 24px;
    }

    .auth-modal {
        padding: 0;
    }

    .auth-modal-content {
        padding-bottom: env(safe-area-inset-bottom);
        border-radius: 22px 22px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-main-btn,
    .auth-modal-content {
        animation: none;
        transition: none;
    }
}
