* { box-sizing: border-box; font-family: system-ui, sans-serif; }
body { margin: 0; background: #f9f5f4; color: #222; }
.container, .main-content { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

nav.navbar {
    background: #be2222; color: white; padding: 15px 30px;
    display: flex; justify-content: space-between; align-items: center;
}
nav.navbar a { color: #ecf0f1; text-decoration: none; margin: 0 12px; }
nav.navbar a:hover { color: #db7f34; }

h1 { color: #be2222; border-bottom: 3px solid #db7f34; padding-bottom: 8px; }

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 15px; margin: 20px 0; }
.stat-card {
    background: linear-gradient(135deg,#db7f34,#b96f29);
    color: white; padding: 20px; border-radius: 10px; text-align: center;
}
.stat-card h3 { font-size: 2em; margin: 0; }
.stat-card p { margin: 5px 0 0; }

.form-card {
    background: white; padding: 20px; border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08); margin-bottom: 20px;
    display: flex; flex-direction: column; gap: 12px;
}
.form-card.filtros { flex-direction: row; align-items: center; }
.form-card input, .form-card select, .form-card textarea {
    padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 1em;
}
.form-card textarea { min-height: 80px; resize: vertical; }
.form-card button, .btn {
    background: #db7f34; color: white; border: none; padding: 12px 20px;
    border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 1em;
}
.form-card button:hover { background: #b96f29; }

.tabla { width: 100%; background: white; border-collapse: collapse; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tabla th, .tabla td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; }
.tabla th { background: #be2222; color: white; }
.tabla tr:hover { background: #f9f9f9; }

.badge { padding: 4px 10px; border-radius: 12px; font-size: .85em; color: white; }
.badge.abierta { background: #e67e22; }
.badge.escala { background: #27ae60; }

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.chart-box { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.chart-box.full { grid-column: 1 / -1; }

.pregunta { padding: 15px 0; border-bottom: 1px solid #eee; }
.escala { display: flex; gap: 20px; margin-top: 8px; }
.escala label { display: flex; align-items: center; gap: 5px; cursor: pointer; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #be2222; }
.login-form { background: white; padding: 40px; border-radius: 10px; width: 350px; display: flex; flex-direction: column; gap: 15px; }
.login-form input { padding: 12px; border: 1px solid #ddd; border-radius: 6px; }
.login-form button { background: #777879; color: white; padding: 12px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }
.error { color: #e74c3c; font-size: .9em; }
.alerta {
    background: #d4edda; color: #155724; padding: 12px;
    border-left: 4px solid #28a745; border-radius: 6px; margin: 10px 0;
}

.btn-secondary {
    background: #95a5a6 !important;
}
.btn-secondary:hover { background: #7f8c8d !important; }

.btn-small {
    display: inline-block; padding: 5px 10px; background: #db7f34;
    color: white; text-decoration: none; border-radius: 4px; font-size: .9em;
    margin-right: 3px;
}
.btn-small.danger { background: #e74c3c; }
.btn-small.success { background: #27ae60; }

.progress {
    position: relative; width: 120px; height: 20px;
    background: #ecf0f1; border-radius: 10px; overflow: hidden;
}
.progress-bar {
    height: 100%; background: linear-gradient(90deg,#db7f34,#b96f29);
    transition: width .3s;
}
.progress span {
    position: absolute; width: 100%; text-align: center;
    font-size: 11px; font-weight: bold; line-height: 20px; color: #be2222;
}

.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-box.full { grid-column: 1 / -1; }
img {
  max-width: 100%;
  height: auto;
}
.tit {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #FFFFFF;
}
.prod {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #333333;
}