/* ==========================================
   VARIABLES DE COLOR Y DISEÑO (MODIFICABLE)
   ================================---------- */
:root {
    --primary-color: #a30000;
    --primary-hover: #da0000;
    --success-color: #28a745;
    --success-hover: #218838;
    --danger-color: #dc3545;
    --danger-hover: #bd2130;
    --bg-body: #000000;
    --bg-card: #bdbdbd;
    --text-main: #111111;
    --text-muted: #3d3d3d;
    --border-color: #cccccc;
    --border-radius: 8px;
}

/* ==========================================
   ESTILOS GENERALES Y RESPONSIVE
   ================================---------- */
* { 
    box-sizing: border-box; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: var(--bg-body); 
    margin: 0; 
    padding: 15px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh; 
    color: var(--text-main);
}

.container { 
    background: var(--bg-card); 
    padding: 30px 25px; 
    border-radius: var(--border-radius); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    width: 100%; 
    max-width: 450px; 
}

.container-dashboard {
    max-width: 650px;
}

h2 { 
    text-align: center; 
    color: var(--text-main); 
    font-size: 22px; 
    margin-top: 0; 
    margin-bottom: 20px; 
}

/* ==========================================
   FORMULARIOS Y CAMPOS
   ================================---------- */
.form-group { 
    margin-bottom: 18px; 
}

label { 
    display: block; 
    margin-bottom: 6px; 
    color: var(--text-muted); 
    font-size: 21px; /* Aumentado un 50% (de 14px a 21px) */
    font-weight: 600; 
}

input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="tel"], 
select, 
textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    font-size: 16px; 
    background: #fff; 
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s; 
}

input:focus, select:focus, textarea:focus { 
    border-color: var(--primary-color); 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15); 
}

textarea { 
    resize: vertical; 
    height: 100px; 
}

/* ==========================================
   BOTONES
   ================================---------- */
button[type="submit"], .btn { 
    width: 100%; 
    padding: 12px; 
    background: var(--primary-color); 
    border: none; 
    color: white; 
    border-radius: var(--border-radius); 
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: background 0.2s; 
    margin-top: 10px;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

button[type="submit"]:hover { 
    background: var(--primary-hover); 
}

.btn-success {
    background: var(--success-color);
}
.btn-success:hover {
    background: var(--success-hover);
}

/* ==========================================
   COMPONENTES ESPECÍFICOS (Dashboard / Login)
   ================================---------- */
.header-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #eaeaea; 
    padding-bottom: 15px; 
    margin-bottom: 25px; 
    flex-wrap: wrap;
    gap: 10px;
}

.user-info { 
    font-size: 14px; 
    color: var(--text-muted); 
}

.user-info strong { 
    color: var(--text-main); 
}

.logout { 
    color: var(--danger-color); 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 14px; 
    padding: 6px 12px; 
    border: 1px solid var(--danger-color); 
    border-radius: var(--border-radius); 
    transition: all 0.2s; 
    white-space: nowrap;
}

.logout:hover { 
    background: var(--danger-color); 
    color: white; 
}

.toggle-link { 
    text-align: center; 
    margin-top: 20px; 
    font-size: 14px; 
}

.toggle-link a { 
    color: var(--primary-color); 
    text-decoration: none; 
    cursor: pointer; 
    font-weight: 600; 
}

.toggle-link a:hover { 
    text-decoration: underline; 
}

.error { 
    color: #721c24; 
    background: #f8d7da; 
    padding: 10px; 
    border-radius: var(--border-radius); 
    font-size: 13px; 
    text-align: center; 
    margin-bottom: 15px; 
    border: 1px solid #f5c6cb;
}

.form-section { display: none; }
.form-section.active { display: block; }

.dynamic-group {
    background: #fafafa; 
    padding: 12px; 
    border-radius: var(--border-radius); 
    border: 1px solid #eee; 
    margin-bottom: 15px;
}

/* ==========================================
   BADGES DE ESTADO
   ================================---------- */
.badge { 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: bold; 
    display: inline-block; 
}
.badge-espera { 
    background: #ffc107; 
    color: #333; 
}
.badge-proceso { 
    background: #17a2b8; 
    color: #fff; 
}
.badge-terminado { 
    background: #28a745; 
    color: #fff; 
}
.badge-cancelado { 
    background: var(--danger-color); 
    color: #fff; 
}

/* ==========================================
   ESTILOS PARA CHECKBOXES Y TEXTOS ASOCIADOS
   ================================---------- */
input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#formulario_dinamico label:has(input[type="checkbox"]) {
    font-size: 21px; /* 50% más grande que el tamaño base (14px) */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--text-main);
    cursor: pointer;
}

/* ==========================================
   MEDIA QUERIES (DISPOSITIVOS MÓVILES)
   ================================---------- */
@media (max-width: 480px) {
    body { 
        padding: 10px; 
    }
    .container { 
        padding: 20px 15px; 
    }
    h2 { 
        font-size: 20px; 
    }
}