.auth-page {
    min-height: 60vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 50px 20px !important;
    background: #f7fafb !important;
}

.auth-card {
    width: min(100%, 520px) !important;
    background: #ffffff !important;
    border: 1px solid #dce7e9 !important;
    border-radius: 14px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.08) !important;
}

.auth-card h1 {
    margin: 0 0 8px !important;
    color: #008080 !important;
    text-align: center !important;
}

.auth-subtitle,
.auth-message,
.auth-otp-status {
    text-align: center !important;
    line-height: 1.5 !important;
}

.auth-message {
    min-height: 24px !important;
    color: #006666 !important;
    font-weight: 600 !important;
}

.auth-form {
    display: grid !important;
    gap: 14px !important;
}

.auth-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
}

.auth-field {
    display: grid !important;
    gap: 6px !important;
}

.auth-field label {
    font-weight: 700 !important;
    color: #334155 !important;
}

.auth-field input {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    outline: none !important;
}

.auth-field input:focus {
    border-color: #008080 !important;
    box-shadow: 0 0 0 3px rgba(0,128,128,.12) !important;
}

.auth-otp-row {
    display: flex !important;
    gap: 10px !important;
    align-items: end !important;
}

.auth-otp-row .auth-field {
    flex: 1 1 auto !important;
}

.auth-link-button,
.auth-google-button {
    border: 1px solid #008080 !important;
    background: #ffffff !important;
    color: #008080 !important;
}

.auth-google-button {
    width: 100% !important;
}

.auth-divider {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    color: #64748b !important;
    margin: 5px 0 !important;
}

.auth-divider::before,
.auth-divider::after {
    content: "" !important;
    height: 1px !important;
    background: #e2e8f0 !important;
    flex: 1 !important;
}

.auth-switch {
    text-align: center !important;
    margin: 5px 0 0 !important;
}

.auth-switch a {
    color: #008080 !important;
    font-weight: 700 !important;
}

.profile-page {
    min-height: 60vh !important;
    display: flex !important;
    justify-content: center !important;
    padding: 50px 20px !important;
    background: #f7fafb !important;
}

.profile-card {
    width: min(100%, 650px) !important;
    height: fit-content !important;
    background: #ffffff !important;
    border: 1px solid #dce7e9 !important;
    border-radius: 14px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.08) !important;
}

.profile-card h1 {
    margin-top: 0 !important;
    color: #000000 !important;
    text-align: center !important;
    font-size: clamp(1.5rem, 5vw, 2.2rem) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
}

.profile-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
}

.profile-item {
    padding: 15px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
}

.profile-item strong {
    display: block !important;
    margin-bottom: 5px !important;
    color: #475569 !important;
}

.profile-actions {
    display: flex !important;
    justify-content: flex-end !important;
    margin-top: 22px !important;
}

.profile-icon-link {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin-left: 10px !important;
    border: 1px solid rgba(255,255,255,.55) !important;
    background: rgba(255,255,255,.12) !important;
    font-size: 21px !important;
    line-height: 1 !important;
}

.profile-icon-link:hover {
    background: #ffffff !important;
    color: #008080 !important;
}

@media (max-width: 650px) {
    .auth-grid,
    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .auth-otp-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .auth-card,
    .profile-card {
        padding: 22px !important;
    }
}

.profile-icon-link svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    fill: currentColor !important;
}


.auth-otp-row .auth-link-button {
    min-height: 44px !important;
    white-space: nowrap !important;
}

.auth-link-button:disabled,
.auth-form button:disabled {
    opacity: .55 !important;
    cursor: not-allowed !important;
}

.auth-success-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(15, 23, 42, .58) !important;
}

.auth-success-modal.is-visible {
    display: flex !important;
}

.auth-success-dialog {
    width: min(100%, 430px) !important;
    padding: 30px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.25) !important;
    text-align: center !important;
}

.auth-success-icon {
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto 14px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #008080 !important;
    color: #ffffff !important;
    font-size: 34px !important;
    font-weight: 800 !important;
}

.auth-success-dialog h2 {
    margin: 0 0 8px !important;
    color: #008080 !important;
}

.auth-success-dialog p {
    margin: 0 0 22px !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}

.auth-success-dialog button {
    width: 100% !important;
}

/* Standard email + Verify layout: the Verify control stays on the same line as the email field. */
.auth-email-verify-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: end !important;
}

.auth-verify-button {
    min-width: 100px !important;
    min-height: 44px !important;
    white-space: nowrap !important;
}

.auth-secondary-button {
    width: 100% !important;
    min-height: 44px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #334155 !important;
}

.auth-secondary-button:hover:not(:disabled) {
    border-color: #008080 !important;
    color: #008080 !important;
}

@media (max-width: 520px) {
    .auth-email-verify-row {
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 8px !important;
    }

    .auth-verify-button {
        min-width: 88px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
