/* ===== RESET & BASE ===== */
[hidden] { display: none !important; }

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

html {
    scroll-behavior: smooth;
    background-color: #f3f4f6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    background-color: #f3f4f6;
}

.aurora-bg {
    display: none;
}

/* ===== AUTH PAGE LAYOUT ===== */
.auth-page {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    overflow-wrap: anywhere;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}

/* ===== LOGO ===== */
.auth-logo {
    display: block;
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo-image {
    height: 32px;
    width: auto;
}

/* ===== TITLE & SUBTITLE ===== */
.auth-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1.8rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 8px;
    color: #0f172a;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.65);
    margin-bottom: 24px;
    font-weight: 400;
}

/* ===== FORM ===== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.8);
    letter-spacing: 0.01em;
}

.auth-input {
    padding: 12px 16px;
    border: 1.5px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input::placeholder {
    color: rgba(15, 23, 42, 0.35);
}

.auth-input:focus {
    border-color: #7c4dff;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.auth-hint {
    font-size: 0.78rem;
    color: rgba(15, 23, 42, 0.45);
    font-weight: 400;
}

/* ===== SUBMIT BUTTON ===== */
.auth-submit {
    padding: 14px 24px;
    background: #7c4dff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.auth-submit:hover:not(:disabled) {
    background: #651fff;
}

.auth-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== SPINNER ===== */
.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* ===== MESSAGES ===== */
.auth-error {
    padding: 12px 16px;
    background: rgba(211, 47, 47, 0.07);
    border: 1px solid rgba(211, 47, 47, 0.25);
    border-radius: 8px;
    color: #c62828;
    font-size: 0.9rem;
    text-align: center;
    text-wrap: balance;
}

.auth-success {
    padding: 12px 16px;
    background: rgba(46, 125, 50, 0.07);
    border: 1px solid rgba(46, 125, 50, 0.25);
    border-radius: 8px;
    color: #2e7d32;
    font-size: 0.9rem;
    text-align: center;
    text-wrap: balance;
}

/* ===== RESEND ===== */
.auth-resend {
    text-align: center;
    margin-top: 8px;
}

.auth-resend-button {
    background: none;
    border: none;
    color: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0;
    transition: color 0.2s;
}

.auth-resend-button:hover {
    color: #0f172a;
}

/* ===== LINKS ===== */
.auth-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
}

.auth-link {
    color: rgba(15, 23, 42, 0.55);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #0f172a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-card {
        max-width: none;
        margin: 0;
        padding: 32px 24px;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 20px 12px;
    }

    .auth-card {
        padding: 24px 20px;
    }
}
