/**
 * DarMatch Login Page Styles
 * Modern and fluid design
 */

/* Page Layout */
.darmatch-login-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: stretch;
    background: #f8f9fa;
    padding-top: 20px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Left Side - Branding */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, #F5A623 0%, #E8940C 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.branding-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 450px;
}

.brand-logo h1 {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 20px;
    letter-spacing: -1px;
}

.brand-tagline {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 15px;
}

.brand-description {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
    margin: 0 0 40px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    opacity: 0.95;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

/* Right Side - Form */
.login-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

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

.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.form-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Alert Messages */
.login-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: slideDown 0.3s ease;
}

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

.login-alert.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.login-alert.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.login-alert svg {
    flex-shrink: 0;
}

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

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group label svg {
    color: #9ca3af;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px !important;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #F5A623;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(245, 166, 35, 0.15);
}

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

/* Password Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #374151;
}

/* 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: 14px;
    color: #4b5563;
    position: relative;
    padding-left: 30px;
}

.remember-me input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.remember-me .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.remember-me:hover .checkmark {
    border-color: #F5A623;
}

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

.remember-me .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 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-password {
    font-size: 14px;
    color: #F5A623;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #E8940C;
    text-decoration: underline;
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #F5A623 0%, #E8940C 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.4);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 22px;
    height: 22px;
}

.spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

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

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    font-size: 14px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.btn-social:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.btn-social.google:hover {
    border-color: #4285F4;
    background: #f8faff;
}

.btn-social.facebook:hover {
    border-color: #1877F2;
    background: #f5f8ff;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 10px;
}

.register-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #F5A623;
    text-decoration: none;
    transition: all 0.2s;
}

.register-link:hover {
    color: #E8940C;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-branding {
        padding: 40px;
    }

    .brand-logo h1 {
        font-size: 40px;
    }

    .brand-tagline {
        font-size: 28px;
    }
}

@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
    }

    .login-branding {
        padding: 40px 30px;
        min-height: auto;
    }

    .branding-content {
        max-width: 100%;
        text-align: center;
    }

    .brand-features {
        display: none;
    }

    .brand-description {
        margin-bottom: 0;
    }

    .login-form-wrapper {
        padding: 40px 20px 60px;
    }
}

@media (max-width: 768px) {
    .darmatch-login-page {
        padding-top: 0;
    }
}

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

    .brand-logo h1 {
        font-size: 32px;
    }

    .brand-tagline {
        font-size: 22px;
    }

    .brand-description {
        font-size: 15px;
    }

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

    .form-header h2 {
        font-size: 26px;
    }

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

    .btn-login {
        padding: 14px 20px;
    }
}

/* Spacing adjustments */
.darmatch-login-page {
    margin-bottom: 40px;
}
