/* ============================================
   Ciudad De San Jose - Simple Login Page
   Minimal, Centered Card Design
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: 200ms ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-image: url('../assets/1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Background */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Hide branding section */
.branding-section {
    display: none;
}

/* Main Container */
.login-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Form Section */
.form-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Form Container - The Card */
.form-container {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    padding: 40px 35px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.login-page-logo {
    width: 200px;
    height: auto;
    margin-bottom: 30px;
}

.brand-logo {
    width: 60px;
    height: auto;
    margin-bottom: 15px;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert.error {
    background: #fee2e2;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.alert.success {
    background: #d1fae5;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
}

/* Input */
.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    transition: border-color var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:focus {
    border-color: var(--primary-color);
}

.form-input.error {
    border-color: var(--error-color);
}

.password-input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: background var(--transition);
}

.toggle-password:hover {
    background: var(--gray-100);
}

.eye-icon {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.input-border {
    display: none;
}

/* Error Message */
.error-message {
    font-size: 0.813rem;
    color: var(--error-color);
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -6px;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    transition: all var(--transition);
    position: relative;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked~.checkmark::after {
    display: block;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
}

/* Button */
.btn-login {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-text {
    transition: opacity var(--transition);
}

.btn-login.loading .btn-text,
.btn-login.loading .btn-icon {
    opacity: 0;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-loader {
    position: absolute;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-300);
}

.divider span {
    padding: 0 12px;
    font-size: 0.875rem;
    color: var(--gray-400);
}

/* Additional Options */
.additional-options {
    text-align: center;
}

.help-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all var(--transition);
}

.contact-link:hover {
    background: var(--gray-100);
}

.contact-icon {
    width: 14px;
    height: 14px;
}

/* Footer */
.form-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-300);
    text-align: center;
}

.form-footer p {
    font-size: 0.813rem;
    color: var(--gray-400);
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--primary-dark);
}

.back-icon {
    width: 14px;
    height: 14px;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 30px 20px;
    display: none;
}

.success-message.show {
    display: block;
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    color: var(--success-color);
}

/* Responsive */
@media (max-width: 640px) {
    .form-container {
        padding: 30px 25px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Focus */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hide unused elements */
.logo-container,
.brand-name,
.brand-tagline,
.features-list,
.branding-content {
    display: none;
}