@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --accent: #6c63ff;
    --background: #f4f7ff;
    --card-bg: rgba(255, 255, 255, 0.82);
    --text-color: #1f2937;
    --muted-text: #6b7280;
    --border-color: rgba(13, 110, 253, 0.16);
    --shadow-color: rgba(15, 23, 42, 0.12);
}

body.auth-body {
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(13, 110, 253, 0.18), transparent 55%),
                radial-gradient(circle at bottom right, rgba(108, 99, 255, 0.16), transparent 45%),
                linear-gradient(135deg, #f7f9ff 0%, #eef3ff 40%, #f8fbff 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(0px);
    opacity: 0.8;
}

.auth-orb-primary {
    width: 440px;
    height: 440px;
    top: -180px;
    right: -120px;
    background: radial-gradient(circle at 30% 30%, rgba(13, 110, 253, 0.45), rgba(13, 110, 253, 0));
    filter: blur(12px);
}

.auth-orb-secondary {
    width: 360px;
    height: 360px;
    bottom: -160px;
    left: -120px;
    background: radial-gradient(circle at 60% 60%, rgba(108, 99, 255, 0.45), rgba(108, 99, 255, 0));
    filter: blur(18px);
}

.auth-glass-panel {
    position: absolute;
    width: 320px;
    height: 520px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 32px;
    filter: blur(0px);
    box-shadow: 0 24px 60px rgba(13, 110, 253, 0.12);
    transform: rotate(18deg);
    backdrop-filter: blur(18px);
}

.auth-glass-panel-left {
    top: 12%;
    left: 5%;
}

.auth-glass-panel-right {
    bottom: 8%;
    right: 4%;
    transform: rotate(-18deg);
}

.auth-wrapper {
    width: min(1120px, 95%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: clamp(2rem, 4vw, 4rem);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(130%);
    border-radius: 26px;
    padding: clamp(2rem, 4vw, 3.5rem);
    box-shadow: 0 28px 60px rgba(13, 110, 253, 0.18);
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding-right: clamp(1rem, 2vw, 2rem);
}

.auth-logo {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.25);
}

.auth-title {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin: 0;
    color: #0b3f88;
}

.auth-lead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted-text);
}

.auth-highlight-card {
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 22px;
    padding: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 24px 45px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
    display: grid;
    gap: 1.25rem;
}

.auth-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-highlights li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #0d3b76;
    background: rgba(13, 110, 253, 0.08);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(13, 110, 253, 0.12);
}

.auth-highlights i {
    color: var(--primary);
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.auth-metric {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 18px;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
}

.auth-metric-value {
    font-weight: 700;
    font-size: 1.35rem;
    color: #0d3b76;
}

.auth-metric-label {
    font-size: 0.85rem;
    color: var(--muted-text);
}

.auth-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.72));
    border-radius: 22px;
    padding: clamp(1.75rem, 3vw, 2.5rem);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px);
}

.auth-heading {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    color: #0d3b76;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-step {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.auth-actions .auth-button {
    flex: 1 1 auto;
    min-width: 160px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-field label {
    font-weight: 600;
    color: #0d3b76;
}

.auth-input {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 255, 0.7);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(13, 110, 253, 0.6);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.field-help {
    font-size: 0.85rem;
    color: var(--muted-text);
}

.field-error {
    font-size: 0.85rem;
    color: #c0392b;
}

.auth-checkbox {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8faff;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 500;
    color: #0d3b76;
}

.auth-checkbox-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
}

.auth-errors {
    background: rgba(192, 57, 43, 0.1);
    border: 1px solid rgba(192, 57, 43, 0.35);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    color: #7f1d1d;
    font-weight: 500;
}

.auth-messages {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-message {
    border-radius: 14px;
    padding: 0.8rem 1rem;
    font-weight: 500;
}

.auth-message-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.35);
    color: #065f46;
}

.auth-message-error,
.auth-message-danger {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(185, 28, 28, 0.4);
    color: #7f1d1d;
}

.auth-message-warning {
    background: rgba(250, 204, 21, 0.18);
    border: 1px solid rgba(217, 119, 6, 0.45);
    color: #78350f;
}

.auth-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.auth-button:hover,
.auth-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(108, 99, 255, 0.32);
}

.auth-button:focus {
    outline: none;
}

.auth-button-secondary {
    background: rgba(255, 255, 255, 0.38);
    color: var(--primary);
    border: 1px solid rgba(13, 110, 253, 0.35);
    box-shadow: none;
}

.auth-button-secondary:hover,
.auth-button-secondary:focus {
    background: rgba(13, 110, 253, 0.1);
    box-shadow: none;
}

.auth-button-ghost {
    background: rgba(13, 110, 253, 0.06);
    color: var(--primary);
    border: 1px solid rgba(13, 110, 253, 0.22);
    box-shadow: none;
}

.auth-button-ghost:hover,
.auth-button-ghost:focus {
    background: rgba(13, 110, 253, 0.12);
    box-shadow: none;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--muted-text);
}

.auth-links a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-passkey-message {
    min-height: 1.2rem;
    font-size: 0.9rem;
    color: var(--muted-text);
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(13, 110, 253, 0.12);
}

.auth-passkey-message:empty {
    display: none;
}

.auth-passkey-message.is-info {
    color: #0d3b76;
}

.auth-passkey-message.is-error {
    color: #c0392b;
}

.auth-passkey-message.is-success {
    color: #047857;
}

.auth-alt-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    border-radius: 18px;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.16);
}

.auth-alt-methods-title {
    margin: 0;
    font-size: 1rem;
    color: #0d3b76;
}

.auth-alt-methods-text {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.92rem;
}

.auth-alt-methods-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-backup-section {
    margin-top: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: 16px;
    background: rgba(13, 110, 253, 0.06);
    border: 1px dashed rgba(13, 110, 253, 0.25);
    text-align: center;
}

.auth-backup-section p {
    margin: 0 0 0.75rem 0;
    color: #0d3b76;
    font-weight: 500;
}

.auth-secondary-link {
    text-align: center;
    margin: 0.5rem 0 0;
}

.auth-secondary-link a {
    color: var(--muted-text);
    text-decoration: none;
    font-weight: 500;
}

.auth-secondary-link a:hover {
    color: var(--primary);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--muted-text);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(15, 23, 42, 0.12);
}

.auth-divider span {
    font-weight: 600;
}

.auth-organization {
    display: grid;
    gap: 1.25rem;
    padding: 1.75rem;
    border-radius: 20px;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.18);
    backdrop-filter: blur(12px);
}

.auth-organization-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: rgba(13, 110, 253, 0.16);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    width: fit-content;
}

.auth-organization-title {
    margin: 0;
    font-size: 1.35rem;
    color: #0d3b76;
}

.auth-organization-intro {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.6;
}

.auth-organization-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.auth-organization-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #0d3b76;
}

.auth-organization-features i {
    color: var(--primary);
    font-size: 1.1rem;
}

.auth-organization-support {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted-text);
}

.auth-organization-support a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-organization-support a:hover {
    text-decoration: underline;
}

.auth-info-box {
    background: rgba(13, 110, 253, 0.1);
    border-radius: 18px;
    padding: 1.2rem 1.4rem;
    border: 1px solid rgba(13, 110, 253, 0.18);
    color: #0d3b76;
}

.auth-info-box h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.auth-info-box ul {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.35rem;
}

.pending-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.auth-footnote {
    font-size: 0.9rem;
    color: var(--muted-text);
    text-align: center;
    margin: 0;
}

@media (max-width: 960px) {
    body.auth-body {
        overflow-x: hidden;
        overflow-y: auto;
        align-items: flex-start;
    }

    .auth-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .auth-brand {
        padding-right: 0;
        align-items: center;
    }

    .auth-glass-panel {
        display: none;
    }

    .auth-metrics {
        grid-template-columns: 1fr 1fr;
    }

    .auth-highlights {
        gap: 0.6rem;
    }

    .auth-highlights li {
        justify-content: center;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-organization {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    body.auth-body {
        padding: 1.25rem 0;
    }

    .auth-wrapper {
        width: min(520px, 92%);
        padding: 1.75rem 1.35rem;
        border-radius: 18px;
    }

    .auth-card {
        border-radius: 16px;
    }

    .auth-metrics {
        grid-template-columns: 1fr;
    }

    .auth-info-box ul {
        padding-left: 0;
        list-style: none;
    }
}
