:root {
    --primary: #1b4d7a;
    --primary-dark: #0f3454;
    --accent: #2ac5b3;
    --background: #f4f6f8;
    --surface: #ffffff;
    --text: #1f2a37;
    --muted: #6b7280;
    --danger: #cc0f35;
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 2rem;
}

.auth-shell {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: min(1100px, 100%);
    background: var(--surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 35px 45px -30px rgba(15, 52, 84, 0.45);
}

.auth-hero {
    background: linear-gradient(145deg, rgba(27, 77, 122, 0.95), rgba(42, 197, 179, 0.85));
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.auth-hero h1 {
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.2;
    margin: 0 0 1.5rem;
    font-weight: 700;
}

.auth-hero p {
    font-size: 1rem;
    max-width: 440px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.auth-hero .highlights {
    display: grid;
    gap: 1rem;
}

.highlight-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    display: grid;
    gap: 0.35rem;
    backdrop-filter: blur(6px);
}

.highlight-card strong {
    font-size: 1.05rem;
    color: #fff;
}

.auth-form-wrapper {
    padding: clamp(2rem, 5vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 800;
    color: var(--primary-dark);
    box-shadow: 0 18px 35px -20px rgba(42, 197, 179, 0.8);
}

.auth-form-wrapper h2 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.auth-form-wrapper .subtitle {
    color: var(--muted);
    margin-bottom: 2.2rem;
    font-size: 0.95rem;
}

form.auth-form {
    display: grid;
    gap: 1.2rem;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-field label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.input-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(15, 52, 84, 0.04);
    border: 1px solid transparent;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-control:focus-within {
    border-color: rgba(27, 77, 122, 0.35);
    background: #fff;
    box-shadow: 0 12px 22px -18px rgba(27, 77, 122, 0.6);
}

.input-control span {
    color: var(--primary);
    font-size: 1.1rem;
}

.input-control input,
.input-control select {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1rem;
    color: var(--text);
    outline: none;
}

.input-control select {
    appearance: none;
    cursor: pointer;
}

.flex-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 720px) {
    .flex-row.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: none;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 18px 30px -18px rgba(27, 77, 122, 0.8);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(15, 52, 84, 0.08);
    color: var(--primary-dark);
}

.auth-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-footer a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.alert-error {
    background: rgba(204, 15, 53, 0.08);
    color: var(--danger);
    border: 1px solid rgba(204, 15, 53, 0.15);
}

.alert-success {
    background: rgba(42, 197, 179, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(42, 197, 179, 0.25);
}

.form-feedback {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--danger);
}

.input-field.error .input-control {
    border-color: rgba(204, 15, 53, 0.4);
    background: rgba(204, 15, 53, 0.05);
}

.input-field.error .form-feedback {
    display: block;
}

.divider {
    position: relative;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 32%;
    height: 1px;
    background: rgba(107, 114, 128, 0.25);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.terms {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.terms input {
    margin-top: 0.2rem;
}

.loading {
    position: relative;
}

.loading::after {
    content: "";
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-top-color: #fff;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    position: absolute;
    right: 1.25rem;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 960px) {
    body {
        padding: 1.5rem;
    }

    .auth-shell {
        border-radius: 20px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .auth-hero {
        padding: 2rem;
    }

    .auth-form-wrapper {
        padding: 2rem;
    }
}

