/* ==========================================================================
   Auth Pages Styles (Login, Register, Verify OTP, Password Reset)
   Standalone pages that don't extend base.html
   ========================================================================== */

/* Box-sizing reset */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   CSS Variables - Light Mode (Default)
   ========================================================================== */
:root {
    --auth-bg-page: #f9fafb;
    --auth-bg-card: #ffffff;
    --auth-text-primary: #1f2937;
    --auth-text-secondary: #4b5563;
    --auth-text-muted: #6b7280;
    --auth-border-color: #e5e7eb;
    --auth-input-border: #d1d5db;
    --auth-input-bg: #ffffff;
    --auth-green: #16a34a;
    --auth-green-dark: #15803d;
    --auth-green-light: #dcfce7;
    --auth-red: #dc2626;
    --auth-red-light: #fef2f2;
    --auth-blue: #2563eb;
    --auth-blue-light: #eff6ff;
}

/* Dark Mode */
[data-theme="dark"] {
    --auth-bg-page: #111827;
    --auth-bg-card: #1f2937;
    --auth-text-primary: #f9fafb;
    --auth-text-secondary: #d1d5db;
    --auth-text-muted: #9ca3af;
    --auth-border-color: #374151;
    --auth-input-border: #4b5563;
    --auth-input-bg: #374151;
    --auth-green-light: rgba(22, 163, 74, 0.2);
    --auth-red-light: rgba(220, 38, 38, 0.2);
    --auth-blue-light: rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   Base Layout
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--auth-bg-page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 28rem;
}

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

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--auth-green);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-logo:hover {
    color: var(--auth-green-dark);
}

.auth-logo__icon {
    font-size: 2.5rem;
}

.auth-logo__text {
    font-size: 2.5rem;
    font-weight: 700;
}

.auth-header__tagline {
    color: var(--auth-text-secondary);
    margin-top: 0.75rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   Card Container
   ========================================================================== */
.auth-card {
    background-color: var(--auth-bg-card);
    border: 1px solid var(--auth-border-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
}

.auth-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card__subtitle {
    color: var(--auth-text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.auth-form__label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-secondary);
    margin-bottom: 0.5rem;
}

.auth-form__label i {
    color: var(--auth-green);
    margin-right: 0.25rem;
}

.auth-form__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--auth-input-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: var(--auth-input-bg);
    color: var(--auth-text-primary);
}

.auth-form__input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.auth-form__input::placeholder {
    color: var(--auth-text-muted);
}

.auth-form__help {
    font-size: 0.75rem;
    color: var(--auth-text-muted);
    margin-top: 0.375rem;
    line-height: 1.4;
}

.auth-form__help ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.auth-form__help li {
    margin-bottom: 0.25rem;
}

/* Style Django form inputs */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--auth-input-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: var(--auth-input-bg);
    color: var(--auth-text-primary);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* ==========================================================================
   Submit Button
   ========================================================================== */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.auth-btn--primary {
    background: linear-gradient(135deg, var(--auth-green) 0%, var(--auth-green-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.3);
}

.auth-btn--primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 10px -1px rgba(22, 163, 74, 0.4);
}

.auth-btn--secondary {
    background: transparent;
    color: var(--auth-green);
    border: 2px solid var(--auth-green);
}

.auth-btn--secondary:hover {
    background: var(--auth-green-light);
}

.auth-btn--large {
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   Alerts/Messages
   ========================================================================== */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    margin-bottom: 1.5rem;
}

.auth-alert--error {
    background-color: var(--auth-red-light);
    border-left-color: var(--auth-red);
    color: #b91c1c;
}

.auth-alert--success {
    background-color: var(--auth-green-light);
    border-left-color: var(--auth-green);
    color: #15803d;
}

.auth-alert--info {
    background-color: var(--auth-blue-light);
    border-left-color: var(--auth-blue);
    color: #1d4ed8;
}

.auth-alert__icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.auth-alert__content {
    flex: 1;
}

.auth-alert__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-alert__list {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.auth-alert__list li {
    margin-bottom: 0.25rem;
}

[data-theme="dark"] .auth-alert--error {
    color: #fca5a5;
}

[data-theme="dark"] .auth-alert--success {
    color: #86efac;
}

[data-theme="dark"] .auth-alert--info {
    color: #93c5fd;
}

/* ==========================================================================
   Dividers and Links
   ========================================================================== */
.auth-divider {
    border-top: 1px solid var(--auth-border-color);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: center;
}

.auth-link {
    color: var(--auth-green);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--auth-green-dark);
}

.auth-link--muted {
    color: var(--auth-text-muted);
    font-weight: 400;
}

.auth-link--muted:hover {
    color: var(--auth-text-secondary);
}

.auth-text {
    color: var(--auth-text-secondary);
}

.auth-text--center {
    text-align: center;
}

.auth-text--small {
    font-size: 0.875rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   OTP Specific Styles
   ========================================================================== */
.auth-otp {
    text-align: center;
}

.auth-otp__icon {
    font-size: 4rem;
    color: var(--auth-green);
    margin-bottom: 1rem;
}

.auth-otp__info {
    color: var(--auth-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.auth-otp__phone {
    font-weight: 700;
    color: var(--auth-text-primary);
}

/* OTP Input Field - Large centered digits */
.auth-otp__input {
    text-align: center;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    font-weight: 700;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-logo__icon {
        font-size: 2rem;
    }

    .auth-logo__text {
        font-size: 2rem;
    }

    .auth-card__title {
        font-size: 1.25rem;
    }
}
