:root {
    --auth-bg: #0b1020;
    --auth-surface: rgba(13, 18, 38, 0.86);
    --auth-surface-strong: rgba(10, 14, 28, 0.96);
    --auth-card: rgba(255, 255, 255, 0.08);
    --auth-border: rgba(255, 255, 255, 0.14);
    --auth-text: #f4f7ff;
    --auth-muted: #acb5d0;
    --auth-primary: #4bd4ff;
    --auth-primary-strong: #007aff;
    --auth-accent: #8effc1;
    --auth-danger: #ff7e8a;
    --auth-shadow: 0 30px 80px rgba(1, 8, 22, 0.55);
}

* {
    box-sizing: border-box;
}

body.auth-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(0, 122, 255, 0.25), transparent 28%),
        radial-gradient(circle at 85% 15%, rgba(75, 212, 255, 0.18), transparent 20%),
        linear-gradient(160deg, #060914 0%, #0b1020 45%, #09172d 100%);
    color: var(--auth-text);
    font-family: "Instrument Sans", sans-serif;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.55;
    pointer-events: none;
}

.auth-orb-primary {
    width: 18rem;
    height: 18rem;
    top: -5rem;
    right: -3rem;
    background: radial-gradient(circle, rgba(75, 212, 255, 0.6), rgba(75, 212, 255, 0.02) 70%);
}

.auth-orb-secondary {
    width: 14rem;
    height: 14rem;
    bottom: 8%;
    left: -4rem;
    background: radial-gradient(circle, rgba(142, 255, 193, 0.34), rgba(142, 255, 193, 0.02) 70%);
}

.auth-container {
    position: relative;
    z-index: 1;
    padding: 1rem;
}

.auth-frame {
    overflow: hidden;
    border: 1px solid var(--auth-border);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    box-shadow: var(--auth-shadow);
}

.auth-hero,
.auth-panel {
    min-height: 100%;
}

.auth-hero {
    position: relative;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
        linear-gradient(180deg, rgba(7, 14, 32, 0.2), rgba(7, 14, 32, 0.8));
}

.auth-brand,
.auth-mobile-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-logo {
    max-width: 9rem;
    width: 100%;
    height: auto;
}

.auth-logo-mobile {
    max-width: 8rem;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--auth-text);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-kicker,
.auth-section-label {
    margin: 0 0 0.75rem;
    color: var(--auth-primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-hero-copy h1,
.auth-view-header h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 700;
    line-height: 1.03;
}

.auth-view-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.auth-lead,
.auth-view-header p,
.auth-feature-card p,
.auth-legal,
.auth-footer-note {
    color: var(--auth-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.auth-view-header p,
.auth-lead {
    margin: 0.9rem 0 0;
}

.auth-feature-list {
    display: grid;
    gap: 0.9rem;
}

.auth-feature-card {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.04);
}

.auth-feature-card strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    font-weight: 700;
}

.auth-feature-card p {
    margin: 0;
    font-size: 0.92rem;
}

.auth-feature-icon {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(75, 212, 255, 0.25), rgba(0, 122, 255, 0.18));
    color: #ffffff;
    font-size: 1.1rem;
}

.auth-footer-note {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
}

.auth-status-dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-primary));
    box-shadow: 0 0 0 0.4rem rgba(142, 255, 193, 0.1);
}

.auth-panel {
    padding: 1rem;
    background: linear-gradient(180deg, rgba(9, 14, 30, 0.94), rgba(7, 11, 23, 0.98));
}

.auth-panel-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.5rem;
}

.auth-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-inline-alert {
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--auth-text);
}

.auth-inline-alert.alert-danger {
    border-color: rgba(255, 126, 138, 0.35);
    background: rgba(255, 126, 138, 0.14);
}

.auth-inline-alert.alert-success {
    border-color: rgba(142, 255, 193, 0.35);
    background: rgba(142, 255, 193, 0.14);
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(244, 247, 255, 0.92);
}

.auth-input-group {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    inset: 0 auto 0 1rem;
    display: inline-flex;
    align-items: center;
    color: rgba(172, 181, 208, 0.88);
    pointer-events: none;
}

.auth-input {
    min-height: 3.5rem;
    padding: 0.95rem 1rem 0.95rem 2.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--auth-text);
    font-size: 1rem;
    box-shadow: none;
}

.auth-input::placeholder {
    color: rgba(172, 181, 208, 0.78);
}

.auth-input:focus {
    border-color: rgba(75, 212, 255, 0.72);
    background: rgba(255, 255, 255, 0.09);
    color: var(--auth-text);
    box-shadow: 0 0 0 0.25rem rgba(75, 212, 255, 0.12);
}

.help-block,
label.error {
    display: block;
    margin-top: 0.4rem;
    color: #ffb6bf;
    font-size: 0.84rem;
    font-weight: 500;
}

.auth-meta {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-start;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--auth-muted);
    font-size: 0.95rem;
    cursor: pointer;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-primary-strong);
}

.auth-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--auth-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-link-button:hover,
.auth-link-button:focus {
    color: #7fe2ff;
}

.auth-submit,
.auth-secondary-btn {
    min-height: 3.6rem;
    border-radius: 1rem;
    border: 0;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    color: #041221;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-primary));
    box-shadow: 0 18px 30px rgba(0, 122, 255, 0.24);
}

.auth-submit:hover,
.auth-secondary-btn:hover {
    transform: translateY(-1px);
}

.auth-submit:disabled,
.auth-secondary-btn:disabled {
    opacity: 0.75;
    transform: none;
}

.auth-submit-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 18, 33, 0.12);
}

.auth-secondary-btn {
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-actions-stack {
    display: grid;
    gap: 0.85rem;
}

.auth-legal {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.auth-modal {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    background: var(--auth-surface-strong);
    color: var(--auth-text);
    box-shadow: var(--auth-shadow);
}

.auth-modal .modal-body {
    padding: 1.5rem;
    text-align: center;
}

.auth-modal-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: var(--auth-primary);
    font-size: 1.4rem;
}

.auth-modal-icon.is-success {
    color: var(--auth-accent);
}

.auth-modal-icon.is-danger {
    color: var(--auth-danger);
}

.auth-modal h3 {
    margin: 0 0 0.45rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.5rem;
}

.auth-modal p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

@media (min-width: 576px) {
    .auth-container {
        padding: 1.5rem;
    }

    .auth-panel,
    .auth-hero {
        padding: 2rem;
    }

    .auth-panel-inner {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    .auth-container {
        padding: 2rem;
    }

    .auth-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (min-width: 992px) {
    .auth-container {
        padding: 2.5rem;
    }

    .auth-hero {
        padding: 2.5rem;
    }

    .auth-panel {
        padding: 2rem;
    }

    .auth-panel-inner {
        padding: 1.5rem;
    }
}
