* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    background: #f4f6fb;
    color: #1f2937;
}
.topbar {
    background: #111827;
    color: white;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.topbar span { color: #cbd5e1; font-size: .9rem; }
.link { color: white; text-decoration: none; }
.container {
    width: min(920px, 100%);
    margin: 0 auto;
    padding: 18px;
}
.card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
h1 { margin-top: 0; font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: 1.2rem; }
.form { display: grid; gap: 10px; }
.form label { font-weight: 700; }
input {
    width: 100%;
    font-size: 1.1rem;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}
button, .boton {
    display: inline-block;
    text-align: center;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    background: #2563eb;
    color: white;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    margin-top: 8px;
}
.secundario { background: #475569; }
.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #e0f2fe;
}
.alert.danger { background: #fee2e2; }
.alert.warning { background: #fef3c7; }
.alert.success { background: #dcfce7; }
.alert.info { background: #dbeafe; }
.nota { color: #64748b; font-size: .9rem; }
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 18px 0;
}
.stats div {
    background: #f1f5f9;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}
.stats strong { display: block; font-size: 2rem; }
.tabla-responsive { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 650px; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 10px; text-align: left; }
th { background: #f8fafc; }
.lista { line-height: 2; }
@media (max-width: 600px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .card { padding: 18px; border-radius: 16px; }
    .stats { grid-template-columns: 1fr; }
}

select, textarea {
    width: 100%;
    font-size: 1.05rem;
    padding: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: white;
}
textarea { min-height: 110px; resize: vertical; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.filtros { grid-template-columns: 1fr 1fr auto; align-items: end; margin: 16px 0; }
.acciones-tabla { white-space: nowrap; }
.acciones-tabla a { margin-right: 10px; font-weight: 700; color: #2563eb; }
.checkline { display: flex; gap: 10px; align-items: center; }
.checkline input { width: auto; }
.pregunta-admin { background: #f8fafc; padding: 14px; border-radius: 12px; font-weight: 700; }
.respuesta-admin { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: center; }
.respuesta-admin input[type="radio"] { width: 24px; height: 24px; }
@media (max-width: 700px) {
    .filtros { grid-template-columns: 1fr; }
}
.filtros-preguntas {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    margin-top: 18px;
    margin-bottom: 18px;
}

.campo-filtro {
    display: flex;
    flex-direction: column;
}

.campo-filtro label {
    font-weight: 700;
    margin-bottom: 6px;
}

.campo-filtro select {
    width: 100%;
}

.boton-filtro button {
    min-width: 160px;
}

@media (max-width: 700px) {
    .filtros-preguntas {
        grid-template-columns: 1fr;
    }

    .boton-filtro button {
        width: 100%;
    }
}