/* Variables CSS */
:root {
    --color-primary: #991b1b;
    --color-primary-light: color-mix(in srgb, #991b1b, white 30%);
    --color-white: #ffffff;
    --color-gray-100: #f7f7fa;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-900: #111827;
    --color-red-600: #dc2626;
    --color-blue-600: #2563eb;
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --border-radius-md: 0.375rem;
}

/* Reset básico */
* {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: var(--color-gray-200);
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
    margin: 0;
    line-height: inherit;
    min-height: 100vh;
    height: 100vh;
}

/* Utilidades */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Layout principal */
.main-container {
    display: flex;
    min-height: 100vh;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    flex: 1;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    height: 100vh;
}

.sidebar-title {
    font-size: clamp(20px, 5vw, 60px);
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 0;
}

.sidebar-subtitle {
    margin: 0;
    padding: 0;
    text-align: center;
}

.sidebar-logo {
    margin: 0;
    margin-top: 32px;
    padding: 0;
    max-width: 220px;
    height: auto;
}

/* Contenedor de login */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    height: 100vh;
}

/* Wrapper para el espaciado correcto */
.login-wrapper {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
}

/* Espaciado entre elementos (equivalente a space-y-6) */
.login-wrapper > * + * {
    margin-top: 1.5rem;
}

.login-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

/* Espaciado dentro de la tarjeta (equivalente a space-y-6) */
.login-card > * + * {
    margin-top: 1.5rem;
}

.login-header {
    /* Espaciado entre elementos del header (equivalente a space-y-4) */
}

.login-header > * + * {
    margin-top: 1rem;
}

.company-name {
    font-weight: 700;
    text-align: center;
    font-size: 1.5rem;
    line-height: 2rem;
    margin: 0;
}

.login-title {
    text-align: center;
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin: 0;
    font-weight: normal;
}

/* Contenedor del formulario */
.login-form-container {
    /* Espaciado entre elementos del formulario (equivalente a space-y-4) */
}

.login-form-container > * + * {
    margin-top: 1rem;
}

/* Formulario */
.login-form {
    margin: 0;
}

/* Espaciado entre grupos de formulario (equivalente a space-y-4) */
.login-form > * + * {
    margin-top: 1rem;
}

.form-group {
    margin: 0;
}

.form-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5rem;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--border-radius-md);
    background-color: var(--color-white);
    margin-top: 0.25rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--color-blue-600);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.5);
}

.form-input::placeholder {
    color: var(--color-gray-600);
    opacity: 1;
    font-size: 0.875rem;
}

.error-message {
    margin-top: 0.5rem;
    color: var(--color-red-600);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Botón de login */
.form-actions {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
}

/* Espaciado entre elementos del botón (equivalente a space-y-2) */
.form-actions > * + * {
    margin-top: 0.5rem;
}

.login-button {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-radius: var(--border-radius);
    width: 100%;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.login-button:hover {
    background-color: var(--color-primary-light);
}

.login-button:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-primary);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enlaces adicionales */
.additional-links {
    display: flex;
    justify-content: center;
    margin-top: 0;
}

.forgot-password {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: color 0.2s ease;
    margin-top: 10px;
}

.forgot-password:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

.forgot-password:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        flex: none;
        height: auto;
        padding: 1rem;
        min-height: auto;
    }
    
    .sidebar-title,
    .sidebar-subtitle {
        display: none;
    }
    
    .sidebar-logo {
        margin: 0;
        padding: 0;
        max-width: 120px;
    }
    
    .login-container {
        flex: 1;
        height: auto;
        min-height: calc(100vh - 120px);
    }
    
    .login-wrapper {
        margin: 1rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
}

/* Estados de los inputs */
.form-input[aria-invalid="true"] {
    border-color: var(--color-red-600);
}

.form-input[aria-invalid="true"]:focus {
    border-color: var(--color-red-600);
    box-shadow: 0 0 0 3px rgb(220 38 38 / 0.5);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeIn 0.3s ease-out;
} 