/* ==========================================================================
   Authentication Pages - Modern UI/UX
   Consistent with Hydribazar theme (#f15a24 primary, Inter & Figtree fonts)
   ========================================================================== */

/* ==========================================================================
   Auth Layout
   ========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    padding: 60px 1rem 6rem;
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(20, 21, 26, 0.08);
    overflow: hidden;
    display: flex;
    min-height: 600px;
}

/* Left Side - Branding */
.auth-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 100%);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-branding-logo {
    margin-bottom: 2rem;
    max-width: 180px;
    filter: brightness(0) invert(1);
}

.auth-branding h1 {
    font-family: 'Figtree', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.auth-branding p {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 2rem;
}

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

.auth-branding-features li {
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.auth-branding-features li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Right Side - Form */
.auth-form-section {
    flex: 1;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-header h2 {
    font-family: 'Figtree', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-form-header p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.auth-form-header .auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-form-header .auth-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Role Selector Cards
   ========================================================================== */
.role-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-card {
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    text-align: center;
}

.role-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(241, 90, 36, 0.15);
}

.role-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(241, 90, 36, 0.2);
}

.role-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.role-card-title {
    font-family: 'Figtree', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.role-card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.role-card-check {
    margin-top: 0.5rem;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.role-card.selected .role-card-check {
    opacity: 1;
}

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

.auth-form-group {
    position: relative;
}

.auth-form-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-form-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

.auth-form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-fade);
}

.auth-form-input.error {
    border-color: #dc3545;
}

.auth-form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.auth-form-error {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #dc3545;
    margin-top: 0.5rem;
    display: none;
}

.auth-form-error.show {
    display: block;
}

.auth-form-input-wrapper {
    position: relative;
}

.auth-form-input-wrapper .auth-form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.auth-form-forgot {
    text-align: right;
    margin-top: -0.5rem;
}

.auth-form-forgot a {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.auth-btn {
    width: 100%;
    height: 48px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.auth-btn-loading {
    position: relative;
    color: transparent;
}

.auth-btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: auth-spin 0.6s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Divider
   ========================================================================== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    padding: 0 1rem;
}

/* ==========================================================================
   Google Login Button
   ========================================================================== */
.auth-google-btn {
    width: 100%;
    height: 48px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
}

.auth-google-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

.auth-google-btn i {
    font-size: 1.25rem;
}

/* ==========================================================================
   Alert Messages
   ========================================================================== */
.auth-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    display: none;
}

.auth-alert.show {
    display: block;
}

.auth-alert-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.auth-alert-success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #2f855a;
}

.auth-alert-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2b6cb0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .auth-branding h1 {
        font-size: 2rem;
    }

    .auth-branding p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        min-height: auto;
    }

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

    .auth-branding-logo {
        max-width: 140px;
        margin-bottom: 1.5rem;
    }

    .auth-branding h1 {
        font-size: 1.75rem;
    }

    .auth-branding p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .auth-branding-features {
        display: none;
    }

    .auth-form-section {
        padding: 2rem 1.5rem;
    }

    .auth-form-header h2 {
        font-size: 1.5rem;
    }

    .role-selector {
        grid-template-columns: 1fr;
    }

    .role-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 1rem;
        gap: 1rem;
    }

    .role-card-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .role-card-check {
        margin-top: 0;
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 1rem 0.75rem;
    }

    .auth-branding {
        padding: 1.5rem 1.25rem;
    }

    .auth-form-section {
        padding: 1.5rem 1.25rem;
    }

    .auth-branding h1 {
        font-size: 1.5rem;
    }

    .auth-form-header h2 {
        font-size: 1.25rem;
    }

    .auth-form-input,
    .auth-btn,
    .auth-google-btn {
        height: 44px;
    }
}
