/* ============================================
   AUTH PAGES - Mumtalakat Brand Design
   REG2DO - Professional Authentication

   Brand Colors:
   - Onyx Grey: #3c3c3c
   - Mumtalakat Bronze: #bf7f6a
   - Ivory White: #f9f6f3
   - Dark Teal: #004E59
   - Cassis: #4C3041
   - Sage: #8E9C9C
   - Light Gray: #e1e2e0
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PT Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f9f6f3;
    min-height: 100vh;
}

/* ============================================
   Main Auth Container - Split Screen
   ============================================ */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Left Side - Branding Panel */
.auth-brand-panel {
    flex: 0 0 45%;
    background: #3c3c3c;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

/* The Line - Mumtalakat graphic element */
.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 60px;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, #bf7f6a 20%, #bf7f6a 80%, transparent 100%);
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: 80px;
    left: 60px;
    width: 120px;
    height: 2px;
    background: #bf7f6a;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-left: 40px;
}

.auth-brand-logo {
    width: 260px;
    height: auto;
    margin-bottom: 48px;
    filter: brightness(1.1);
}

.auth-brand-title {
    color: #f9f6f3;
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: 16px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.auth-brand-subtitle {
    color: #8E9C9C;
    font-size: 1rem;
    font-weight: 400;
    max-width: 300px;
    line-height: 1.7;
    margin: 0 auto;
}

/* Decorative Elements - Subtle */
.auth-brand-panel .decoration {
    position: absolute;
    border: 1px solid rgba(191, 127, 106, 0.15);
}

.auth-brand-panel .decoration-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    bottom: -200px;
    right: -200px;
}

.auth-brand-panel .decoration-2 {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-brand-panel .decoration-3 {
    display: none;
}

/* Right Side - Form Panel */
.auth-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    background: #ffffff;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

/* Mobile Logo (hidden on desktop) */
.auth-mobile-logo {
    display: none;
    margin-bottom: 40px;
    text-align: center;
}

.auth-mobile-logo img {
    width: 180px;
    height: auto;
}

/* Form Header */
.auth-form-header {
    margin-bottom: 40px;
}

.auth-form-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3c3c3c;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.auth-form-header p {
    color: #8E9C9C;
    font-size: 0.95rem;
}

/* Form Styling */
.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3c3c3c;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group .form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    border: 1px solid #e1e2e0;
    border-radius: 4px;
    background: #f9f6f3;
    transition: all 0.2s ease;
    color: #3c3c3c;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #bf7f6a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(191, 127, 106, 0.1);
}

.form-group .form-control::placeholder {
    color: #A9989D;
}

/* Password Field with Toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8E9C9C;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #bf7f6a;
}

/* Submit Button - Mumtalakat Bronze */
.btn-auth-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: #3c3c3c;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-auth-submit:hover {
    background: #bf7f6a;
}

.btn-auth-submit:active {
    transform: translateY(1px);
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading State */
.btn-auth-submit.loading {
    position: relative;
    color: transparent;
}

.btn-auth-submit.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Footer Links */
.auth-form-footer {
    margin-top: 32px;
    text-align: center;
}

.auth-form-footer p {
    color: #8E9C9C;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.auth-form-footer a {
    color: #bf7f6a;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-form-footer a:hover {
    color: #3c3c3c;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e1e2e0;
}

.auth-divider span {
    padding: 0 16px;
    color: #A9989D;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Alert Messages */
.auth-alert {
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
}

.auth-alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.auth-alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #d97706;
}

/* Custom Alert Styling (for existing messages) */
.custom-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 14px 16px;
    margin-top: 16px;
}

.custom-alert .text-danger {
    color: #dc2626;
    font-size: 0.9rem;
}

.custom-alerts {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 4px;
    padding: 14px 16px;
    margin-top: 16px;
    color: #16a34a;
    font-size: 0.9rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 12px;
}

.password-strength-bar {
    height: 3px;
    background: #e1e2e0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-fill.weak {
    width: 33%;
    background: #dc2626;
}

.password-strength-fill.medium {
    width: 66%;
    background: #bf7f6a;
}

.password-strength-fill.strong {
    width: 100%;
    background: #004E59;
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-strength-text.weak { color: #dc2626; }
.password-strength-text.medium { color: #bf7f6a; }
.password-strength-text.strong { color: #004E59; }

/* Password Requirements List */
.password-strength-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.password-strength-list li {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.password-strength-list li.invalid {
    color: #A9989D;
}

.password-strength-list li.invalid::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 1px solid #e1e2e0;
    border-radius: 50%;
    flex-shrink: 0;
}

.password-strength-list li.valid {
    color: #004E59;
}

.password-strength-list li.valid::before {
    content: '\2713';
    width: 12px;
    height: 12px;
    background: #004E59;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    flex-shrink: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .auth-brand-panel {
        flex: 0 0 40%;
        padding: 40px;
    }

    .auth-brand-panel::before {
        left: 40px;
    }

    .auth-brand-panel::after {
        left: 40px;
    }

    .auth-brand-logo {
        width: 200px;
    }

    .auth-brand-title {
        font-size: 1.5rem;
    }

    .auth-form-panel {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-mobile-logo {
        display: block;
    }

    .auth-form-panel {
        padding: 40px 24px;
        min-height: 100vh;
        background: #f9f6f3;
    }

    .auth-form-container {
        max-width: 100%;
        background: #ffffff;
        padding: 32px;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(60, 60, 60, 0.08);
    }

    .auth-form-header h1 {
        font-size: 1.35rem;
    }

    .password-strength-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 24px 16px;
    }

    .auth-form-container {
        padding: 24px;
    }

    .auth-mobile-logo img {
        width: 150px;
    }

    .form-group .form-control {
        padding: 12px 14px;
    }

    .btn-auth-submit {
        padding: 12px 20px;
    }
}

/* ============================================
   Legacy Support (for old structure)
   ============================================ */
.auth-container {
    min-height: 100vh;
}

.auth-bg-column {
    background-image: url('/Mumtalakat.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #3c3c3c;
}

@media (max-width: 1199px) {
    .auth-bg-column {
        display: none !important;
    }
}

.auth-logo {
    display: block;
    margin: 0 auto;
    max-width: 180px;
    height: auto;
}

.login-main .form-group {
    margin-bottom: 1.25rem;
}

.login-main .btn-primary {
    background: #3c3c3c;
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-main .btn-primary:hover {
    background: #bf7f6a;
}

/* Disabled Link State */
.disabled {
    pointer-events: none;
    opacity: 0.5;
}
