/* =============================================================================
   Ultra Professional Login Modal - SabaHost
   ============================================================================= */

/* Modal Base */
#loginModal .modal-dialog {
    max-width: 900px;
    margin: 1rem auto;
}

.saba-login-modal {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.saba-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    color: white;
    font-size: 18px;
}

.saba-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Main Wrapper */
.saba-login-wrapper {
    display: flex;
    min-height: 550px;
}

/* Left Brand Section */
.saba-login-brand {
    width: 45%;
    background: linear-gradient(135deg, #6d0e80 0%, #4a0d5c 50%, #2d0936 100%) !important;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo {
    margin-bottom: 30px;
}

.brand-logo img {
    filter: brightness(0) invert(1);
}

.saba-login-brand .brand-title {
    color: #ffffff !important;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.4;
}

.saba-login-brand .brand-text {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 35px;
}

/* Features List */
.saba-login-brand .brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.saba-login-brand .feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 500;
}

.saba-login-brand .feature-item span {
    color: #ffffff !important;
}

.saba-login-brand .feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.saba-login-brand .feature-icon svg {
    width: 18px;
    height: 18px;
    color: #4ade80 !important;
    stroke: #4ade80 !important;
}

/* Decorative Circles */
.brand-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.circle-3 {
    width: 150px;
    height: 150px;
    bottom: 100px;
    right: 30px;
    background: rgba(255, 255, 255, 0.03);
}

/* Right Form Section */
.saba-login-form-section {
    width: 55%;
    background: #ffffff;
    padding: 45px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Tabs */
.login-tab {
    display: none;
    animation: fadeSlide 0.4s ease;
}

.login-tab.active {
    display: block;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Header */
.form-header {
    margin-bottom: 30px;
}

.form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.form-header p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

/* Form Styles */
.saba-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px 14px 14px;
    font-size: 0.95rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    background: #f9fafb;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: #9ca3af;
}

.input-wrapper input:focus {
    border-color: #6d0e80;
    background: white;
    box-shadow: 0 0 0 4px rgba(109, 14, 128, 0.1);
}

.input-icon {
    position: absolute;
    right: 14px;
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.25s ease;
    display: flex;
}

.input-wrapper input:focus ~ .input-icon {
    color: #6d0e80;
}

.toggle-password {
    position: absolute;
    left: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px;
    display: flex;
    transition: color 0.25s ease;
}

.toggle-password:hover {
    color: #6d0e80;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
    position: relative;
    padding-right: 28px;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    right: 0;
    width: 20px;
    height: 20px;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.remember-me input:checked ~ .checkmark {
    background: #6d0e80;
    border-color: #6d0e80;
}

.checkmark:after {
    content: '';
    position: absolute;
    display: none;
    right: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input:checked ~ .checkmark:after {
    display: block;
}

.forgot-link {
    font-size: 0.875rem;
    color: #6d0e80;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #4a0d5c;
    text-decoration: underline;
}

/* Alerts */
.form-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    animation: alertSlide 0.3s ease;
}

.form-alert.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

.form-alert.success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.saba-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.saba-btn.primary {
    background: linear-gradient(135deg, #6d0e80 0%, #8b35a0 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(109, 14, 128, 0.3);
}

.saba-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #580869 0%, #6d0e80 100%);
    box-shadow: 0 8px 25px rgba(109, 14, 128, 0.4);
    transform: translateY(-2px);
}

.saba-btn.primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.saba-btn.outline {
    background: white;
    color: #6d0e80;
    border: 2px solid #e5e7eb;
}

.saba-btn.outline:hover {
    border-color: #6d0e80;
    background: linear-gradient(135deg, #faf5fc 0%, #f3e8f7 100%);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.saba-btn:hover .btn-arrow {
    transform: translateX(-4px);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.form-divider span {
    padding: 0 20px;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Footer */
.form-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
}

.form-footer a {
    color: #6d0e80;
    font-weight: 600;
    text-decoration: none;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: #4a0d5c;
    text-decoration: underline;
}

/* Header Login Button - New Modern Style */
.header-login-btn-new {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-right: 15px;
}

.header-login-btn-new:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a2e;
    border-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.25);
}

.header-login-btn-new .btn-icon,
.header-login-btn-new .btn-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
}

.header-login-btn-new .btn-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-login-btn-new .btn-icon svg {
    stroke: currentColor;
    transition: stroke 0.3s ease;
}

/* When header is fixed (scrolled - white bg) */
.header.fixed .header-login-btn-new {
    background: linear-gradient(135deg, var(--primary-color, #a5118c) 0%, var(--secondary-color, #d84882) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(165, 17, 140, 0.3);
}

.header.fixed .header-login-btn-new:hover {
    box-shadow: 0 6px 20px rgba(165, 17, 140, 0.4);
    transform: translateY(-2px);
}

.header.fixed .header-login-btn-new .btn-icon svg {
    stroke: #fff;
}

/* Old style kept for backward compatibility */
.header-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6d0e80 0%, #8b35a0 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(109, 14, 128, 0.25);
}

.header-login-btn:hover {
    background: linear-gradient(135deg, #580869 0%, #6d0e80 100%);
    box-shadow: 0 6px 20px rgba(109, 14, 128, 0.35);
    transform: translateY(-2px);
}

.header-login-btn svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    #loginModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .saba-login-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .saba-login-brand {
        width: 100%;
        padding: 35px 30px;
    }

    .brand-title {
        font-size: 1.4rem;
    }

    .brand-features {
        display: none;
    }

    .saba-login-form-section {
        width: 100%;
        padding: 35px 25px;
    }

    .saba-modal-close {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
    }

    .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .saba-login-brand {
        padding: 30px 20px;
    }

    .brand-title {
        font-size: 1.2rem;
    }

    .brand-text {
        font-size: 0.85rem;
    }

    .saba-login-form-section {
        padding: 30px 20px;
    }

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

    .input-wrapper input {
        padding: 12px 40px 12px 12px;
    }

    .saba-btn {
        padding: 13px 20px;
        font-size: 0.95rem;
    }
}

/* Animation */
#loginModal.show .saba-login-modal {
    animation: modalZoom 0.35s ease;
}

@keyframes modalZoom {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scrollbar for form section if needed */
.saba-login-form-section::-webkit-scrollbar {
    width: 6px;
}

.saba-login-form-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.saba-login-form-section::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.saba-login-form-section::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
