@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

:root {
    --primary: #003b33;
    --primary-rgb: 0, 59, 51;
    --primary-foreground: #fff;
    --accent: #e7b52e;
    --accent-foreground: #fff;
    --background: #ffffff; /* Changed to white for the left section */
    --foreground: #1f2937;
    --card: #ffffff;
    --card-foreground: #1f2937;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --border: #e5e7eb;
    --radius: 0.75rem;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.login-page {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--foreground);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background); /* Ensure body background is white */
}

.split-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.left-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    padding: 2rem;
}

.right-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary); /* Dark green background */
    position: relative;
    overflow: hidden;
    color: white;
    padding: 2rem;
}

/* Grid pattern for right section */
.right-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; /* Adjust grid size as needed */
    opacity: 0.8;
    z-index: 1;
}

.right-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.opulence-logo {
    font-family: "Great Vibes", cursive;
    font-size: 4rem;
    font-weight: 400;
    color: white;
    margin-bottom: 1rem;
    line-height: 1;
}

.welcome-text {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.destination-text,
.search-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

.login-container { /* This is no longer needed, replaced by .split-container */
    max-width: none;
    width: auto;
    margin: 0;
}

.login-card {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    max-width: 420px; /* Limit card width within left section */
    width: 100%;
}

.login-card::before { /* Remove the top border gradient */
    content: none;
}

.welcome-back {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    text-align: center;
}

.welcome-subtitle {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    text-align: center;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 2.5rem; /* Increased spacing */
    text-align: center;
}

.form-group {
    margin-bottom: 1.75rem; /* Increased spacing */
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.75rem; /* Increased spacing */
}

.input-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem; /* Adjusted padding, removed left icon space */
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.input-icon { /* Adjusted for password toggle */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Role Selection Radio Buttons */
.role-selection {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
    cursor: pointer;
}

.radio-input {
    display: none;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.radio-input:checked + .radio-custom {
    border-color: var(--primary);
}

.radio-input:checked + .radio-custom::after {
    content: "";
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
}

.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background-color: var(--primary); /* Solid primary color */
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem; /* Increased space above the button */
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.error-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-item {
    margin-bottom: 0.25rem;
}

.signup-link {
    text-align: center;
    margin-top: 2rem; /* Increased space above the link */
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.signup-link .link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .split-container {
        flex-direction: column;
    }

    .right-section {
        min-height: 300px; /* Adjust height for mobile */
    }

    .left-section {
        padding: 1.5rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .opulence-logo {
        font-size: 3rem;
    }

    .welcome-text {
        font-size: 2rem;
    }
}

/* Loading animation for button */
.btn-login.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

/* Success message if needed */
.success-msg {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}
