/* Authentication Pages - 1:1 React Design Match */

/* ============================================
   Page Layout
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom right, #FFF7ED, #FFFFFF, #FEE2E2);
    padding: 3rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 28rem;
    /* max-w-md (448px) */
}

/* ============================================
   Header Section
   ============================================ */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1.5rem;
    background: #FFEDD5;
    /* orange-100 */
    border-radius: 50%;
}

.auth-icon__svg {
    width: 2rem;
    height: 2rem;
    color: #EA580C;
    /* orange-600 */
}

.auth-title {
    font-size: 1.875rem;
    /* text-3xl (30px) */
    font-weight: 800;
    /* font-extrabold */
    color: #0F172A;
    /* slate-900 */
    margin-bottom: 0.5rem;
    font-family: var(--font-heading, 'Inter', sans-serif);
}

.auth-description {
    font-size: 0.875rem;
    /* text-sm (14px) */
    color: #475569;
    /* slate-600 */
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* ============================================
   Logo Circle (for Register)
   ============================================ */
.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo__circle {
    width: 5rem;
    height: 5rem;
    background: #EA580C;
    /* orange-600 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo__letter {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.auth-header__logo {
    max-width: 150px;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
}

/* ============================================
   Card Container
   ============================================ */
.auth-card {
    background: white;
    padding: 2rem 1.5rem;
    /* py-8 px-6 */
    border-radius: 0.5rem;
    /* rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* shadow-lg */
    border: 1px solid #E2E8F0;
    /* border */
    margin-bottom: 1rem;
}

/* ============================================
   Form Styling
   ============================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* space-y-6 */
}

.auth-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    color: #374151;
    /* gray-700 */
    margin-bottom: 0.25rem;
}

.auth-input {
    appearance: none;
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    /* py-2 px-3 */
    border: 1px solid #D1D5DB;
    /* border-gray-300 */
    border-radius: 0.375rem;
    /* rounded-md */
    font-size: 0.875rem;
    /* text-sm */
    color: #111827;
    /* gray-900 */
    background: white;
    transition: all 0.15s ease-in-out;
}

.auth-input::placeholder {
    color: #9CA3AF;
    /* gray-400 - placeholder-gray-500 */
}

.auth-input:focus {
    outline: none;
    border-color: #EA580C;
    /* orange-500 */
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.auth-input:disabled {
    background: #F9FAFB;
    /* gray-50 */
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-input--error {
    border-color: #DC2626;
    /* red-600 */
}

/* Add dropdown arrow to select elements */
select.auth-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Select dropdown styling */
.auth-input[type="select"],
.auth-input:is(select) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.auth-input__error {
    font-size: 0.75rem;
    /* text-xs */
    color: #DC2626;
    /* red-600 */
    margin-top: 0.25rem;
}

/* ============================================
   Error Alert
   ============================================ */
.auth-error {
    padding: 1rem;
    background: #FEF2F2;
    /* red-50 */
    border: 1px solid #FEE2E2;
    /* red-200 */
    border-radius: 0.375rem;
    /* rounded-md */
}

.auth-error__content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.auth-error__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #DC2626;
    /* red-600 */
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.auth-error__text {
    font-size: 0.875rem;
    /* text-sm */
    color: #991B1B;
    /* red-800 */
    flex: 1;
}

/* ============================================
   Form Row (Remember Me + Forgot Password)
   ============================================ */
.auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-checkbox__input {
    width: 1rem;
    height: 1rem;
    color: #EA580C;
    /* orange-600 */
    border: 1px solid #D1D5DB;
    /* border-gray-300 */
    border-radius: 0.25rem;
    /* rounded */
    cursor: pointer;
}

.auth-checkbox__input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.auth-checkbox__label {
    font-size: 0.875rem;
    /* text-sm */
    color: #111827;
    /* gray-900 */
    cursor: pointer;
}

.auth-link {
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    color: #EA580C;
    /* orange-600 */
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #C2410C;
    /* orange-700 */
}

/* ============================================
   Buttons
   ============================================ */
.auth-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    /* py-3 px-4 */
    border: none;
    border-radius: 0.375rem;
    /* rounded-md */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.auth-button--primary {
    background: #EA580C;
    /* orange-600 */
    color: white;
}

.auth-button--primary:hover:not(:disabled) {
    background: #C2410C;
    /* orange-700 */
}

.auth-button--primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.3);
}

.auth-button--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-button--ghost {
    background: transparent;
    color: #EA580C;
    border: 1px solid #EA580C;
}

.auth-button--ghost:hover:not(:disabled) {
    background: #FFF7ED;
    /* orange-50 */
}

.auth-button--ghost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-button--full {
    width: 100%;
}

.auth-button__text {
    display: inline-block;
}

.auth-button__loading {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.auth-button--loading .auth-button__text {
    display: none;
}

.auth-button--loading .auth-button__loading {
    display: flex;
}

.auth-button__spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Footer Links
   ============================================ */
.auth-footer {
    text-align: center;
    margin-top: 1rem;
}

.auth-footer__text {
    font-size: 0.875rem;
    /* text-sm */
    color: #64748B;
    /* slate-600 */
}

.auth-footer__link {
    font-weight: 500;
    /* font-medium */
    color: #EA580C;
    /* orange-600 */
    text-decoration: none;
}

.auth-footer__link:hover {
    color: #C2410C;
    /* orange-700 */
}

.auth-footer__back {
    background: none;
    border: none;
    color: #64748B;
    /* slate-600 */
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.auth-footer__back:hover {
    color: #334155;
    /* slate-700 */
}

/* ============================================
   Terms Text
   ============================================ */
.auth-terms {
    text-align: center;
    font-size: 0.75rem;
    /* text-xs */
    color: #6B7280;
    /* gray-500 */
}

.auth-terms a {
    color: #EA580C;
    /* orange-600 */
    text-decoration: none;
}

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

/* ============================================
   Progress Bar
   ============================================ */
.auth-progress {
    height: 0.5rem;
    background: #E5E7EB;
    /* gray-200 */
    border-radius: 0.5rem;
    /* rounded-lg */
    margin-bottom: 2rem;
    overflow: hidden;
}

.auth-progress__bar {
    height: 100%;
    background: #EA580C;
    /* orange-600 */
    transition: width 0.3s ease;
    border-radius: 0.5rem;
}

/* ============================================
   OTP Input Grid
   ============================================ */
.auth-otp {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-otp__input {
    width: 100%;
    aspect-ratio: 1;
    text-align: center;
    font-size: 1.5rem;
    /* text-2xl */
    font-weight: 600;
    /* font-semibold */
    border: 2px solid #D1D5DB;
    /* border-gray-300 */
    border-radius: 0.375rem;
    /* rounded-md */
    transition: all 0.15s ease-in-out;
}

.auth-otp__input:focus {
    outline: none;
    border-color: #EA580C;
    /* orange-600 */
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.auth-otp__input--filled {
    border-color: #EA580C;
    background: #FFF7ED;
    /* orange-50 */
}

.auth-otp__input--error {
    border-color: #DC2626;
    /* red-600 */
}

/* ============================================
   Timer
   ============================================ */
.auth-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    /* text-sm */
    color: #64748B;
    /* slate-600 */
    margin-bottom: 1rem;
}

.auth-timer svg {
    width: 1rem;
    height: 1rem;
}

/* ============================================
   Progress Steps
   ============================================ */
.auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-step {
    display: flex;
    align-items: center;
}

.auth-step__circle {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    /* font-semibold */
    background: #E5E7EB;
    /* gray-200 */
    color: #6B7280;
    /* gray-500 */
}

.auth-step--complete .auth-step__circle {
    background: #EA580C;
    /* orange-600 */
    color: white;
}

.auth-step--active .auth-step__circle {
    background: #EA580C;
    /* orange-600 */
    color: white;
}

.auth-step__line {
    width: 3rem;
    height: 0.125rem;
    /* h-0.5 */
    background: #E5E7EB;
    /* gray-200 */
}

.auth-step__line--complete {
    background: #EA580C;
    /* orange-600 */
}

/* ============================================
   Info Display
   ============================================ */
.auth-info {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-info__text {
    font-size: 0.875rem;
    /* text-sm */
    color: #64748B;
    /* slate-600 */
}

.auth-info__email {
    font-size: 1rem;
    font-weight: 600;
    /* font-semibold */
    color: #1E293B;
    /* slate-800 */
    margin-top: 0.25rem;
}

/* ============================================
   Help Box
   ============================================ */
.auth-help {
    margin-top: 1rem;
}

.auth-help__box {
    background: #F8FAFC;
    /* slate-50 */
    border: 1px solid #E2E8F0;
    /* slate-200 */
    border-radius: 0.5rem;
    /* rounded-lg */
    padding: 1rem;
}

.auth-help__title {
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 600;
    /* font-semibold */
    color: #334155;
    /* slate-700 */
    margin-bottom: 0.5rem;
}

.auth-help__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-help__list li {
    font-size: 0.75rem;
    /* text-xs */
    color: #64748B;
    /* slate-600 */
    padding-left: 1rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.auth-help__list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #EA580C;
}

/* ============================================
   Password Strength Meter
   ============================================ */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength__bars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.password-strength__bar {
    flex: 1;
    height: 0.25rem;
    /* h-1 */
    background: #E5E7EB;
    /* gray-200 */
    border-radius: 0.125rem;
    /* rounded-sm */
    transition: background 0.3s;
}

.password-strength__bar--weak {
    background: #DC2626;
    /* red-600 */
}

.password-strength__bar--fair {
    background: #F59E0B;
    /* amber-500 */
}

.password-strength__bar--good {
    background: #10B981;
    /* green-500 */
}

.password-strength__bar--strong {
    background: #059669;
    /* green-600 */
}

.password-strength__text {
    font-size: 0.75rem;
    /* text-xs */
    color: #64748B;
    /* slate-600 */
}

/* ============================================
   Notification
   ============================================ */
.auth-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.auth-notification--success {
    background: #D1FAE5;
    /* green-100 */
    color: #065F46;
    /* green-800 */
    border: 1px solid #6EE7B7;
    /* green-300 */
}

.auth-notification--error {
    background: #FEE2E2;
    /* red-100 */
    color: #991B1B;
    /* red-800 */
    border: 1px solid #FCA5A5;
    /* red-300 */
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   Social Login Buttons
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
    /* gray-200 */
}

.auth-divider__text {
    padding: 0 1rem;
    font-size: 0.875rem;
    /* text-sm */
    color: #6B7280;
    /* gray-500 */
    background: white;
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-social__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    /* py-3 px-4 */
    border: 1px solid #D1D5DB;
    /* border-gray-300 */
    border-radius: 0.375rem;
    /* rounded-md */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    /* font-medium */
    text-decoration: none;
    color: #374151;
    /* gray-700 */
    background: white;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.auth-social__button:hover {
    background: #F9FAFB;
    /* gray-50 */
    border-color: #9CA3AF;
    /* gray-400 */
}

.auth-social__button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.auth-social__button--google {
    border-color: #D1D5DB;
    /* border-gray-300 */
}

.auth-social__button--google:hover {
    background: #F8FAFC;
    /* slate-50 */
    border-color: #4285F4;
}

.auth-social__button--apple {
    border-color: #D1D5DB;
    /* border-gray-300 */
}

.auth-social__button--apple:hover {
    background: #F8FAFC;
    /* slate-50 */
    border-color: #000000;
}

.auth-social__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.auth-social__text {
    font-weight: 500;
    /* font-medium */
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    .auth-page {
        padding: 1rem;
    }

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

    .auth-title {
        font-size: 1.5rem;
        /* text-2xl */
    }

    .auth-otp {
        gap: 0.375rem;
    }

    .auth-otp__input {
        font-size: 1.25rem;
        /* text-xl */
    }

    .auth-step__line {
        width: 2rem;
    }
}

@media (max-width: 375px) {
    .auth-container {
        max-width: 100%;
    }

    .auth-otp {
        gap: 0.25rem;
    }

    .auth-otp__input {
        font-size: 1.125rem;
        /* text-lg */
    }
}