/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Color Palette */
    --primary-color: #ffb703;      /* Construction Yellow */
    --primary-hover: #fd9e02;
    --secondary-color: #023047;    /* Deep Blue/Navy */
    --accent-color: #219ebc;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success: #2ecc71;
    
    /* Spacing & sizing */
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    /* Background: gradient + image overlay. The project image is `Login/login-bg.jpeg`. */
    background: linear-gradient(135deg, rgba(246,249,252,0.6), rgba(234,242,248,0.6)), url('login-bg.jpeg') no-repeat center/cover;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative; /* For absolute positioning of Back button */
}

/* NOTE: consolidated .form-card styling appears later; its background will be translucent so the image shows through */

/* =========================================
   2. BACK TO HOME BUTTON
   ========================================= */
.back-home-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 20px;
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    z-index: 10;
}

.back-home-btn:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateX(-5px);
}

.back-home-btn .icon {
    font-size: 1.2rem;
}

/* =========================================
   3. MAIN LAYOUT (CARD STYLE)
   ========================================= */
.main-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.form-card {
    /* translucent card so background image is visible while content remains readable */
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    width: 100%;
    max-width: 550px;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: relative;
    max-height: 90vh;
    overflow-y: auto; /* Scroll inside card if screen is short */
}

/* Custom Scrollbar for the card */
.form-card::-webkit-scrollbar {
    width: 6px;
}
.form-card::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.form-card::-webkit-scrollbar-thumb {
    background: #ccc; 
    border-radius: 4px;
}

/* Logo Header inside Form Card */
.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header .logo-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.form-header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
    font-weight: 800;
}

.form-header h1 span {
    color: var(--primary-color);
}

/* =========================================
   4. FORM ELEMENTS
   ========================================= */
h2 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.5rem;
    text-align: center;
}

.form-description {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.5;
    text-align: center;
}

/* Toggle Switch */
.form-toggle {
    background: var(--bg-light);
    padding: 5px;
    border-radius: 50px;
    display: flex;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.toggle-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.toggle-btn.active {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* User Type Selector */
.user-type-selector {
    margin-bottom: 25px;
    background: #fff8e1; 
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid #ffe082;
}

.user-type-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* Inputs & Groups */
.form-group {
    margin-bottom: 18px;
}

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

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.2);
}

.file-input {
    padding: 10px;
    background: var(--bg-light);
    border: 1px dashed var(--border-color);
}

/* Checkboxes */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: var(--bg-light);
    padding: 15px;
    border-radius: var(--radius);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 0.9rem;
    margin-bottom: 0;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 183, 3, 0.3);
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.form-footer a {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
}

/* Social Login */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 10px;
}

.social-login {
    display: flex;
    gap: 15px;
}

.btn-social {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.btn-social:hover {
    background: var(--bg-light);
    border-color: #ccc;
}

/* =========================================
   5. DYNAMIC SECTIONS & UTILITIES
   ========================================= */
.hidden {
    display: none !important;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 20px 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-color);
}

.customer-message {
    text-align: center;
    background: #e8f5e9;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid #c8e6c9;
}

.success-icon {
    width: 40px;
    height: 40px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin: 0 auto 10px auto;
}

.verification-note {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid var(--accent-color);
    font-size: 0.85rem;
    color: #0d47a1;
    border-radius: 4px;
}

/* =========================================
   6. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 600px) {
    body {
        padding: 10px;
        align-items: flex-start; /* Allows scrolling on mobile */
    }

    .back-home-btn {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 15px;
        align-self: flex-start;
        display: inline-flex;
    }

    .main-wrapper {
        display: flex;
        flex-direction: column;
    }

    .form-card {
        max-height: none; /* Let it grow naturally on mobile */
        padding: 25px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Logo Header inside Form Card */
.form-header {
    text-align: center;
    margin-bottom: 25px;
}

/* ADD THIS TO CONTROL SIZE */
.form-header img {
    width: 120px;       /* <--- CHANGE THIS NUMBER TO RESIZE */
    height: auto;       /* Maintains the aspect ratio */
    margin-bottom: 10px;
    display: inline-block;
}