/* Reset muy simple */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f4f6;
    color: #111827;
    line-height: 1.5;
}

/* Utilidades de tipografía */
.text-sm {
    font-size: 0.9rem;
}

.text-xs {
    font-size: 0.8rem;
}

/* Contenedor base */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header simple */
.app-header {
    background-color: #111827;
    color: #f9fafb;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header__logo {
    font-weight: 600;
    letter-spacing: .05em;
}

.app-header__menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-header__user {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Contenido principal */
.app-main {
    flex: 1;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.app-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

/* Contenedor de formularios largos (cuestionarios) */
.form {
    margin-top: 0.75rem;
}

.form-wide {
    max-width: 820px;
}

/* Cards */
.card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.75rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.card--narrow {
    max-width: 420px;
    margin: 0 auto;
}

.card__title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card__subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Tablas en listados (empresas, sesiones, etc.) */
.card table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.4rem;
    margin-top: 1rem;
}

.card thead th {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    padding: 0.35rem 0.75rem;
}

.card tbody td {
    font-size: 0.95rem;
    padding: 0.6rem 0.75rem;
    background-color: #ffffff;
}

.card tbody tr {
    border-radius: 0.6rem;
}

.card tbody tr td:first-child {
    border-top-left-radius: 0.6rem;
    border-bottom-left-radius: 0.6rem;
}

.card tbody tr td:last-child {
    border-top-right-radius: 0.6rem;
    border-bottom-right-radius: 0.6rem;
}

.card tbody tr:nth-child(odd) td {
    background-color: #f9fafb;
}

/* Formularios */
/* Formularios */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #111827;
}

.form-help {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}

.form-input,
.input,
.textarea {
    width: 100%;
    padding: 0.7rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    background-color: #f9fafb;
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus,
.input:focus,
.textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
    background-color: #ffffff;
}

/* Bloques de preguntas / cuestionarios */
.question-block-header {
    margin-bottom: 1.5rem;
}

.question {
    margin-bottom: 1.5rem;
}

.question__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #111827;
}

.question__help {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.question__required {
    color: #dc2626;
    margin-left: 0.25rem;
}

.choice-group {
    margin-top: 0.35rem;
}

.choice-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    color: #111827;
}

.choice-item input[type="checkbox"],
.choice-item input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
    cursor: pointer;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.30);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #111827;
}
.btn-success {
    background-color: #16a34a; /* verde */
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.30);
}

.btn-success:hover {
    background-color: #15803d;
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.45);
    transform: translateY(-1px);
}

/* Variante de botón pequeño tipo 'chip' para acciones dentro de preguntas */
.btn-chip {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 999px;
    /* quita esta línea si la tienes */
    /* box-shadow: none; */
}
.btn-secondary:hover {
    background-color: #d1d5db;
}

/* Utils */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

/* Alertas */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Footer simple */
.app-footer {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
    padding: 0.75rem;
}

/* Estilos específicos para botones de selección dentro de cuestionarios */
.question-actions .btn-action {
    background-color: #e5e7eb;
    color: #111827;
    padding: 0.45rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.question-actions .btn-action:hover {
    background-color: #d1d5db;
    transform: translateY(-1px);
}

/* Etiquetas de estado para bloques de preguntas */
.status-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: capitalize;
}

.status-pill--completed {
    background-color: #dcfce7; /* verde suave */
    color: #166534;
}

.status-pill--progress {
    background-color: #fef9c3; /* amarillo suave */
    color: #854d0e;
}

.status-pill--notstarted {
    background-color: #dbeafe; /* azul suave */
    color: #1e40af;
}