/* FUENTES ORIGINALES DE LA APP */
@font-face { font-family: 'Inter'; src: url('/fuentes/inter-v20-latin-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fuentes/inter-v20-latin-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fuentes/inter-v20-latin-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* VARIABLES DE COLOR ADAPTADAS */
:root {
    --bg-body: #c0c0c0;           
    --bg-container: #e5e5e5;      
    --border-container: #cccccc;  
    --text-main: #333333;         
    --text-muted: #555555;        
    --bg-input: #ffffff;          
    --border-input: #999999;      
    --text-input: #000000;        
    --dots-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.dark {
    --bg-body: #121214;           
    --bg-container: #18181b;      
    --border-container: #27272a;  
    --text-main: #d4d4d8;         
    --text-muted: #a1a1aa;        
    --bg-input: #09090b;          
    --border-input: #52525b;      
    --text-input: #f4f4f5;        
    --dots-color: rgba(113, 113, 122, 0.15);
    --shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
}

/* RESET Y BASE CON FONDO DE PUNTOS DINÁMICO */
* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-main);
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    height: 100vh;
    background-color: var(--bg-body); 
    background-image: radial-gradient(var(--dots-color) 1px, transparent 1px); 
    background-size: 16px 16px; 
    transition: background-color 0.3s, color 0.3s;
}

.company-logo-wrapper { margin-bottom: 24px; }
.company-logo { max-height: 60px; width: auto; object-fit: contain; }

.login-container {
    background-color: var(--bg-container); 
    border: 1px solid var(--border-container); 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    padding: 40px;
    width: 100%;
    max-width: 400px;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 32px;
}

.logo-box { 
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background-color: #dc2626; width: 48px; height: 48px; border-radius: 12px; 
    border: none; color: white; font-weight: 900; font-size: 20px; 
    box-shadow: 0 4px 6px -1px rgba(127,29,29,0.2); 
}

.logo-box span { line-height: 1; padding-top: 1px; } 
.app-title { font-weight: 700; font-size: 18px; color: var(--text-input); line-height: 1.2; }
.app-version { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 4px; }

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 11px; 
    font-weight: 600; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%; 
    background-color: var(--bg-input); 
    border: 1px solid var(--border-input); 
    border-radius: 6px; 
    padding: 10px 12px; 
    font-size: 13px; 
    color: var(--text-input); 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); 
    transition: border-color 0.2s, background-color 0.3s, color 0.3s;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus { border-color: var(--text-muted); }

.btn-submit {
    width: 100%; 
    padding: 12px;
    background-color: #dc2626; 
    border: none; 
    color: white; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background-color 0.2s; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover:not(:disabled) { background-color: #b91c1c; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.plans-link-wrapper { text-align: center; margin-top: 24px; }
.plans-link { font-size: 12px; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.plans-link:hover { color: var(--text-input); text-decoration: underline; }
.error-message { color: #ef4444; font-size: 12px; font-weight: 500; text-align: center; margin-top: 16px; min-height: 15px; }