/* login.css - No Scroll Version */

/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: #ffffff;
    overflow: hidden; /* Prevent body scrolling */
}

/* ===== VARIABLES ===== */
:root {
    --primary-color: #0e1f42;
    --accent-color: #9f7539;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --gray-light: #e2e8f0;
    --gray: #64748b;
    --dark-gray: #334155;
    --success: #10b981;
    --error: #dc2626;
    --warning: #f59e0b;
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    display: flex;
    height: 100vh; /* Full viewport height */
    overflow: hidden; /* Prevent container scrolling */
}

/* ===== HERO SECTION ===== */
.login-hero {
    flex: 1;
    background-image: url('/ASSECT/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden; /* Prevent hero scrolling */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 31, 66, 0.9) 0%, rgba(26, 45, 95, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem; /* Reduced padding */
    overflow: hidden; /* Prevent overlay scrolling */
}

.hero-content {
    max-width: 450px; /* Slightly smaller */
    text-align: center;
    color: var(--white);
}

.hero-logo {
    width: 100px; /* Smaller logo */
    height: auto;
    margin-bottom: 1.5rem; /* Reduced spacing */
    filter: brightness(0) invert(1);
}

.hero-content h1 {
    font-size: 2rem; /* Smaller font */
    font-weight: 700;
    margin-bottom: 0.75rem; /* Reduced spacing */
    line-height: 1.2;
}

.hero-content p {
    font-size: 1rem; /* Smaller font */
    opacity: 0.9;
    margin-bottom: 1.5rem; /* Reduced spacing */
    line-height: 1.5;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Reduced spacing */
    margin-top: 1.5rem; /* Reduced spacing */
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced spacing */
    padding: 0.75rem; /* Reduced padding */
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(3px); /* Smaller hover effect */
}

.feature i {
    font-size: 1.2rem; /* Smaller icons */
    color: var(--accent-color);
}

.feature span {
    font-weight: 600;
    font-size: 0.9rem; /* Smaller text */
}

/* ===== FORM SECTION ===== */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem; /* Reduced padding */
    background: var(--white);
    overflow-y: auto; /* Allow only form section to scroll if needed */
    max-height: 100vh;
}

.form-container {
    width: 100%;
    max-width: 420px; /* Slightly smaller */
    max-height: 95vh; /* Prevent overflow */
    overflow-y: auto; /* Scroll only form if absolutely necessary */
    padding: 1rem 0;
}

/* Hide scrollbar for form container */
.form-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem; /* Reduced spacing */
    transition: color 0.3s ease;
    font-size: 0.9rem; /* Smaller text */
}

.back-link:hover {
    color: var(--primary-color);
}

/* ===== WELCOME BACK MESSAGE ===== */
.welcome-back-message {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced spacing */
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px; /* Slightly smaller */
    padding: 1rem; /* Reduced padding */
    margin-bottom: 1.5rem; /* Reduced spacing */
    animation: slideInDown 0.5s ease;
}

.welcome-avatar {
    width: 45px; /* Smaller avatar */
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-color); /* Thinner border */
    flex-shrink: 0;
}

.welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-text h3 {
    color: var(--primary-color);
    font-size: 1.1rem; /* Smaller font */
    margin-bottom: 0.2rem; /* Reduced spacing */
    font-weight: 700;
}

.welcome-text p {
    color: var(--gray);
    font-size: 0.85rem; /* Smaller text */
    margin: 0;
}

/* ===== FORM HEADER ===== */
.form-header {
    text-align: center;
    margin-bottom: 1.5rem; /* Reduced spacing */
}

.form-header h2 {
    font-size: 1.8rem; /* Smaller font */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--gray);
    font-size: 0.9rem; /* Smaller text */
}

/* ===== SOCIAL LOGIN ===== */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Reduced spacing */
    margin-bottom: 1.5rem; /* Reduced spacing */
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced spacing */
    padding: 0.8rem 1rem; /* Reduced padding */
    border: 2px solid var(--gray-light);
    border-radius: 10px; /* Slightly smaller */
    background: var(--white);
    font-size: 0.9rem; /* Smaller text */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.social-btn:hover {
    transform: translateY(-1px); /* Smaller hover effect */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.google-btn {
    color: #4285F4;
    border-color: #4285F4;
}

.google-btn:hover {
    background: #4285F4;
    color: white;
}

.apple-btn {
    color: #000000;
    border-color: #000000;
}

.apple-btn:hover {
    background: #000000;
    color: white;
}

.social-icon {
    width: 18px; /* Smaller icons */
    text-align: center;
}

.social-text {
    flex: 1;
    text-align: center;
}

/* ===== DIVIDER ===== */
.divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0; /* Reduced spacing */
    color: var(--gray);
    font-size: 0.9rem; /* Smaller text */
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-light);
}

.divider span {
    background: var(--white);
    padding: 0 0.75rem; /* Reduced padding */
    position: relative;
    z-index: 1;
}

/* ===== PHONE LOGIN FORM ===== */
.phone-login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Reduced spacing */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* Reduced spacing */
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem; /* Smaller text */
}

.form-group input {
    padding: 0.8rem; /* Reduced padding */
    border: 2px solid var(--gray-light);
    border-radius: 8px; /* Slightly smaller */
    font-size: 0.9rem; /* Smaller text */
    transition: all 0.3s ease;
    background: var(--white);
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(159, 117, 57, 0.1);
}

.form-group input.error {
    border-color: var(--error);
    background: #fef2f2;
}

.form-group input:valid {
    border-color: #10b981;
}

/* Phone Input Container */
.phone-input-container {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-light);
    border-radius: 8px; /* Slightly smaller */
    overflow: hidden;
    transition: all 0.3s ease;
}

.phone-input-container:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(159, 117, 57, 0.1);
}

.phone-input-container.error {
    border-color: var(--error);
    background: #fef2f2;
}

.country-code {
    padding: 0.8rem; /* Reduced padding */
    background: var(--light-gray);
    color: var(--dark-gray);
    font-weight: 600;
    border-right: 2px solid var(--gray-light);
    min-width: 70px; /* Smaller width */
    text-align: center;
    font-size: 0.9rem; /* Smaller text */
}

.phone-input-container input {
    flex: 1;
    border: none;
    border-radius: 0;
    padding: 0.8rem; /* Reduced padding */
}

.phone-input-container input:focus {
    border: none;
    box-shadow: none;
}

/* Error Messages */
.error-message {
    color: var(--error);
    font-size: 0.75rem; /* Smaller text */
    margin-top: 0.2rem; /* Reduced spacing */
    display: none;
}

.error-message.show {
    display: block;
}

/* ===== LOGIN OPTIONS ===== */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -0.5rem 0 0.5rem 0; /* Reduced spacing */
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 16px; /* Smaller checkboxes */
    height: 16px;
    accent-color: var(--accent-color);
}

.remember-me label {
    font-size: 0.85rem; /* Smaller text */
    color: var(--dark-gray);
    cursor: pointer;
}

.forgot-password {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem; /* Smaller text */
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* ===== LOGIN BUTTON ===== */
.login-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem; /* Reduced padding */
    border-radius: 10px; /* Slightly smaller */
    font-size: 1rem; /* Smaller text */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem; /* Reduced spacing */
    font-family: inherit;
    width: 100%;
}

.login-btn:hover:not(:disabled) {
    background: #b58a4a;
    transform: translateY(-1px); /* Smaller hover effect */
    box-shadow: 0 5px 15px rgba(159, 117, 57, 0.3);
}

.login-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem; /* Smaller text */
}

/* ===== SIGNUP REDIRECT ===== */
.signup-redirect {
    text-align: center;
    margin-top: 1.5rem; /* Reduced spacing */
    padding-top: 1rem; /* Reduced padding */
    border-top: 1px solid var(--gray-light);
}

.signup-redirect p {
    color: var(--gray);
    font-size: 0.85rem; /* Smaller text */
}

.link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        height: auto; /* Allow height to adjust */
        min-height: 100vh; /* Minimum full height */
        overflow-y: auto; /* Allow scrolling on mobile */
    }
    
    .login-hero {
        min-height: 250px; /* Smaller hero on mobile */
        flex: none;
    }
    
    .hero-content {
        max-width: 350px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .login-form-section {
        padding: 1rem;
        overflow-y: visible;
    }
    
    .welcome-back-message {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .welcome-text h3 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .hero-features {
        gap: 0.5rem;
    }
    
    .feature {
        padding: 0.6rem;
    }
    
    .feature i {
        font-size: 1rem;
    }
    
    .feature span {
        font-size: 0.8rem;
    }
    
    .login-options {
        flex-direction: column;
        gap: 0.75rem; /* Reduced spacing */
        align-items: flex-start;
    }
    
    .welcome-back-message {
        padding: 0.8rem; /* Reduced padding */
    }
    
    .welcome-avatar {
        width: 35px; /* Smaller on mobile */
        height: 35px;
    }
}

@media (max-width: 480px) {
    .login-form-section {
        padding: 1rem;
    }
    
    .form-header h2 {
        font-size: 1.3rem;
    }
    
    .social-btn {
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .form-group input {
        padding: 0.7rem;
    }
    
    .login-btn {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.2rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .welcome-back-message {
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
    }
    
    .country-code {
        min-width: 65px; /* Smaller on mobile */
        padding: 0.7rem;
        font-size: 0.85rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.form-container {
    animation: fadeIn 0.6s ease-out;
}

.welcome-back-message {
    animation: slideInDown 0.5s ease;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ===== NOTIFICATION STYLES ===== */
.global-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
}

.global-notification.notification-error {
    background: var(--error);
}

.global-notification.notification-warning {
    background: var(--warning);
}

/* ===== LOADING STATES ===== */
.social-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

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