:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #152033;
  --muted: #667085;
  --line: #e6eaf2;
  --primary: #1155cc;
  --primary-dark: #0d3f99;
  --accent: #fff8dc;
  --success: #198754;
  --warning: #b7791f;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; background: #0e1726; color: white; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand strong { font-size: 20px; }
.brand span { color: #c8d3ea; font-size: 13px; }
nav { display: flex; gap: 8px; flex-wrap: wrap; }
nav a { color: #dce6fb; padding: 9px 12px; border-radius: 10px; }
nav a.active, nav a:hover { background: rgba(255,255,255,.12); color: white; }
.container { max-width: 1220px; margin: 0 auto; padding: 26px; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
h1 { margin: 0 0 8px; font-size: 30px; }
h2 { margin: 0 0 14px; font-size: 20px; }
p { line-height: 1.5; }
.hero p, .muted { color: var(--muted); margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 12px 30px rgba(16,24,40,.04); margin-bottom: 20px; }
.card.accent { background: var(--accent); }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric strong { display: block; font-size: 34px; margin: 6px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: white; color: var(--text); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 650; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn.primary:hover { background: var(--primary-dark); color: white; }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.success { background: var(--success); border-color: var(--success); color: white; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 750; }
tr:last-child td { border-bottom: 0; }
.toolbar, .inline-form { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: white; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(17,85,204,.18); border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.compact { grid-template-columns: 1fr 1fr; margin-top: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 650; color: #344054; }
label.check { flex-direction: row; align-items: center; font-weight: 500; }
label.check input { width: auto; }
.wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 10px; align-items: center; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eef2ff; color: var(--primary); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.badge.activo { background: #ecfdf3; color: #027a48; }
.badge.pendiente { background: #fffaeb; color: #b54708; }
.badge.pausado, .badge.inactivo { background: #f2f4f7; color: #475467; }
.list { padding-left: 18px; }
.list li { margin-bottom: 10px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mt { margin-top: 16px; }
.footer { padding: 24px; text-align: center; color: var(--muted); }
@media (max-width: 860px) {
  .topbar, .hero { align-items: flex-start; flex-direction: column; }
  .grid.two, .metrics, .form-grid { grid-template-columns: 1fr; }
  .container { padding: 16px; }
}
.note { background:#f8fafc; border:1px dashed var(--line); border-radius:12px; padding:12px; color:var(--muted); }
.notice { border-radius:14px; padding:12px 14px; margin-bottom:16px; border:1px solid var(--line); background:white; }
.notice.success { border-color:#abefc6; background:#ecfdf3; color:#027a48; }
.notice.danger { border-color:#fecdca; background:#fef3f2; color:#b42318; }
.badge.danger { background:#fef3f2; color:#b42318; }
.badge.warning { background:#fffaeb; color:#b54708; }
.small-metrics.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom:20px; }
.small-metrics .metric strong { font-size:26px; }
td .actions { flex-wrap: wrap; }
@media (max-width: 980px) { .small-metrics.metrics { grid-template-columns: repeat(2, minmax(0,1fr)); } }
