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

body {
    font-family: 'Segoe UI', sans-serif;
    /* background: #f0f2f5; */
    color: #333;
    height: 100%;
    background-repeat: no-repeat;
    /*background-image: linear-gradient(135deg, rgba(31,123,229,1) 0%, rgba(58,139,232,1) 47%, rgba(70,153,234,1) 92%, rgba(72,156,234,1) 100%);*/
    background: url(../../img/login-bg.jpg) no-repeat center center fixed;
    background-size: 100% 100%;
}

header {
    /*background: #2c3e50;*/
    /*background: #082B51;*/
    color: white;
    padding: 1rem 2rem;
}

.header-inner {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav { display: flex; align-items: center; gap: 1rem; }
header nav span { font-size: .9rem; }

header .btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: #34495e;
}
header .btn:hover {
    color: #fff;
    background: #3d566e;
    opacity: 1;
}

.container { max-width: 1400px; width: calc(100% - 40px); margin: 2rem auto; padding: 0 1rem; }

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Reduce table cell padding to fit more columns on wide screens (helps admin tables) */
.card table th, .card table td { padding: .45rem .6rem; }

h2 { margin-bottom: 1rem; color: #2c3e50; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color .2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #2980b9;
    outline: none;
}

.radio-group { display: flex; flex-direction: column; gap: .5rem; margin-top: .3rem; }
.radio-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 400; }

.btn {
    padding: .6rem 1.3rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: .95rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary   { background: #2980b9; color: white; }
.btn-secondary { background: #7f8c8d; color: white; }
.btn-outline   { background: white; border: 1px solid #2980b9; color: #2980b9; }
.btn-success   { background: #27ae60; color: white; }
.btn-sm        { padding: .3rem .8rem; font-size: .85rem; }

.btn:hover { opacity: .88; }

.survey-nav {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.progress-bar {
    display: flex;
    gap: .5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.progress-step {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #dfe6e9;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    color: #636e72;
}

.progress-step.active { background: #2980b9; color: white; }
.progress-step.done   { background: #27ae60; color: white; }

.alert { padding: .8rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-error   { background: #fdecea; color: #c0392b; }
.alert-success { background: #eafaf1; color: #27ae60; }

/* ── Toast de validación fijo en la parte superior del viewport ── */
.validation-toast {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: #c0392b;
    color: #fff;
    padding: .75rem 1.2rem;
    box-shadow: 0 3px 12px rgba(0,0,0,.3);
    animation: vt-slideDown .25s ease;
}
.validation-toast-content {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    max-width: 860px;
    margin: 0 auto;
}
.validation-toast-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.validation-toast-body { flex: 1; font-size: .95rem; }
.validation-toast-body strong { display: block; margin-bottom: .3rem; }
.validation-toast-list { margin: 0 0 0 1.1rem; padding: 0; font-size: .88rem; line-height: 1.6; }
.validation-toast-close {
    background: transparent;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 4px;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    padding: .1rem .45rem;
    align-self: flex-start;
}
.validation-toast-close:hover { background: rgba(255,255,255,.2); }
@keyframes vt-slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.save-msg {
    padding: .6rem 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    text-align: center;
}

.save-msg.success { background: #eafaf1; color: #27ae60; }
.save-msg.error   { background: #fdecea; color: #c0392b; }

.page-info  { color: #7f8c8d; font-size: .9rem; margin-bottom: 1.5rem; }
.form-footer { margin-top: 1rem; font-size: .9rem; }
.text-center { text-align: center; }

/* Compact horizontal grid for small input groups (months, percents) */
.input-grid { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.input-grid .grid-item { flex: 1 1 140px; min-width: 120px; max-width: 220px; }
.input-inline { display: inline-flex; align-items: center; gap: .4rem; }
.input-grid .grid-item label { display: block; margin-bottom: .3rem; }

/* Pareja de inputs en la misma fila con ancho igual */
.inline-pair { display:flex; gap:.5rem; align-items:center; }
.inline-pair > * { flex: 1 1 0; min-width: 0; }
.inline-pair select, .inline-pair input { width: 100%; }

/* Tabla compacta para pares de controles (mes/año) */
.pair-table { width: 100%; border-collapse: collapse; }
.pair-table td { padding: 0; vertical-align: top; }
.pair-table td + td { padding-left: .5rem; }
.pair-table select, .pair-table input { width: 100%; box-sizing: border-box; }

/* Input más grande para casos donde se necesita mayor visibilidad */
.input-large {
    padding: .8rem .9rem;
    font-size: 1.05rem;
    border-radius: 8px;
}
.input-large[type="number"] { text-align: right; }

/* Estética mejorada: sombras suaves, bordes redondeados y botones más visibles */
.card { transition: transform .12s ease, box-shadow .12s ease; border: 1px solid rgba(0,0,0,0.04); }
/*.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(44,62,80,0.08); }*/

.card h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.card .page-info { color: #6b7a89; margin-bottom: .75rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
    background: #fff;
    border: 1px solid #d6dde3;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    box-shadow: 0 4px 18px rgba(41,128,185,0.08);
}

.input-inline input[type="number"], .input-inline input[type="text"] { min-width: 0; flex: 1 1 auto; }

.btn { transition: box-shadow .12s ease, transform .08s ease; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg,#2d89c8 0%, #2874a6 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(41,128,185,0.12);
}
.btn-secondary { background: #95a5a6; color: #fff; }
.btn-outline { border: 1px solid #2980b9; color: #2980b9; background: transparent; }

time { font-weight:600; color:#2c3e50; }

/* Responsive rules: en pantallas grandes mostrar 3 columnas, en medianas 2 */
@media(min-width:900px) {
    .input-grid .grid-item { flex: 1 1 calc(33.333% - 1rem); max-width: none; }
}
@media(min-width:600px) and (max-width:899px) {
    .input-grid .grid-item { flex: 1 1 calc(50% - .75rem); max-width: none; }
}

@media(max-width:599px) {
    .input-grid { gap: .5rem; }
    .input-grid .grid-item { flex: 1 1 100%; min-width: 0; }
}

/* Tabla para formularios: etiqueta a la izquierda, control a la derecha */
.form-table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.form-table th { text-align: left; vertical-align: top; padding: .6rem .75rem; width: 36%; color: #42505a; font-weight:600; }
.form-table td { padding: .45rem .75rem; vertical-align: top; }
.form-table .input-group { max-width: 420px; }
.form-table .unit { margin-left: .4rem; color: #6b7a89; }
.form-table .radio-row label { margin-right: 1rem; }
.full-width { width: 100%; }