/* ============================================
   FixiBo Login Pages - Modern Redesign
   ============================================ */

/* ---------- Login Shell ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #f8fafc;
}

/* ---------- Left Branding Panel ---------- */
.login-brand-panel {
    flex: 0 0 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.login-brand-panel.customer {
    background: linear-gradient(160deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
}
.login-brand-panel.company {
    background: linear-gradient(160deg, #5b21b6 0%, #7c3aed 50%, #a78bfa 100%);
}
.login-brand-panel.engineer {
    background: linear-gradient(160deg, #065f46 0%, #059669 50%, #34d399 100%);
}

.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 360px;
}

.login-brand-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
    border: 1px solid rgba(255,255,255,0.2);
}

.login-brand-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.login-brand-content p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 32px;
}

.login-brand-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.login-brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.login-brand-features li i {
    font-size: 0.85rem;
    background: rgba(255,255,255,0.2);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Floating shapes on brand panel */
.login-brand-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.login-brand-shape-1 { width: 200px; height: 200px; top: -60px; right: -60px; }
.login-brand-shape-2 { width: 150px; height: 150px; bottom: -40px; left: -40px; }
.login-brand-shape-3 { width: 100px; height: 100px; top: 40%; left: 10%; }

/* ---------- Right Form Panel ---------- */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

/* Back link */
.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.login-back-link:hover {
    color: #334155;
}

/* Form header */
.login-form-header {
    margin-bottom: 32px;
}

.login-form-header .login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    text-decoration: none;
}

.login-form-header .login-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.login-logo-icon.customer { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.login-logo-icon.company { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.login-logo-icon.engineer { background: linear-gradient(135deg, #059669, #10b981); }

.login-form-header .login-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.login-form-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.login-form-header p {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0;
}

/* Form elements */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.login-field .form-control {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.login-field .form-control:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
    outline: none;
}

.login-field .input-group {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.login-field .input-group:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
}

.login-field .input-group .input-group-text {
    background: #f8fafc;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 14px;
}

.login-field .input-group .form-control {
    border: none;
    border-radius: 0;
    padding: 12px 16px;
    box-shadow: none !important;
}

.login-field .input-group .btn {
    border: none;
    border-left: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0 14px;
}

.login-field .input-group .btn:hover {
    color: #374151;
    background: #f1f5f9;
}

.login-field .form-text {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 6px;
}

/* OTP input */
.login-otp-input {
    letter-spacing: 0.6em;
    font-size: 1.5rem !important;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding: 14px 16px !important;
}

/* Info bar (OTP sent) */
.login-info-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #1e40af;
    margin-bottom: 20px;
}

.login-info-bar i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Error bar */
.login-error-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #991b1b;
    margin-bottom: 20px;
}

.login-error-bar i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Submit buttons */
.login-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-submit-btn.customer {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.login-submit-btn.customer:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.login-submit-btn.company {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25);
}
.login-submit-btn.company:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
    transform: translateY(-1px);
}

.login-submit-btn.engineer {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.login-submit-btn.engineer:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
    transform: translateY(-1px);
}

/* Secondary / outline button */
.login-secondary-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.login-secondary-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.login-divider span {
    padding: 0 16px;
}

/* Register link */
.login-register-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1.5px solid;
    border-radius: 10px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.login-register-btn.company {
    border-color: #7c3aed;
    color: #7c3aed;
}
.login-register-btn.company:hover {
    background: #7c3aed;
    color: #fff;
}

/* Footer link */
.login-form-footer {
    margin-top: 32px;
    text-align: center;
}

.login-form-footer a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.login-form-footer a:hover {
    color: #334155;
}

/* ---------- Responsive ---------- */

/* Tablet: shrink brand panel */
@media (max-width: 1024px) {
    .login-brand-panel {
        flex: 0 0 380px;
        padding: 36px;
    }
    .login-brand-content h2 { font-size: 1.5rem; }
}

/* Mobile: stack vertically, hide brand panel */
@media (max-width: 768px) {
    .login-page {
        flex-direction: column;
    }

    .login-brand-panel {
        flex: none;
        padding: 32px 24px 28px;
    }

    .login-brand-features {
        display: none;
    }

    .login-brand-content {
        max-width: 100%;
    }

    .login-brand-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    .login-brand-content h2 {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .login-brand-content p {
        font-size: 0.88rem;
        margin-bottom: 0;
    }

    .login-form-panel {
        padding: 32px 20px;
    }

    .login-form-wrapper {
        max-width: 100%;
    }

    .login-form-header .login-logo {
        display: none;
    }

    .login-back-link {
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .login-brand-panel {
        padding: 24px 16px 20px;
    }

    .login-brand-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .login-brand-content h2 { font-size: 1.15rem; }
    .login-brand-content p { font-size: 0.82rem; }

    .login-form-panel {
        padding: 24px 16px;
    }

    .login-form-header h1 { font-size: 1.35rem; }
    .login-submit-btn { padding: 13px 20px; }
}
