*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1a1a2e;
  background: #f8f9fa;
}

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 1rem 1.5rem; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

/* Navigation */
header {
  background: #1a1a2e;
  color: #fff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 1.5rem;
  height: 56px;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-right: 2rem;
  white-space: nowrap;
}

.nav-brand span { color: #e94560; }

.nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover, .nav-link.active {
  background: rgba(233,69,96,0.15);
  color: #fff;
}

/* Main content */
main.container { padding-top: 2rem; padding-bottom: 3rem; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.page-header h2 { font-size: 1.4rem; color: #1a1a2e; }

/* Cards */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a2e;
}

.card-body { padding: 1.25rem; }

/* Stat cards */
.stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid #e94560;
}

.stat-card:nth-child(2) { border-left-color: #2980b9; }
.stat-card:nth-child(3) { border-left-color: #27ae60; }
.stat-card:nth-child(4) { border-left-color: #f39c12; }

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Tables */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  border-bottom: 2px solid #f0f0f0;
  white-space: nowrap;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f7f7f7;
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-activa   { background: #d4edda; color: #155724; }
.badge-pausada  { background: #fff3cd; color: #856404; }
.badge-borrador { background: #e2e3e5; color: #383d41; }
.badge-completada { background: #cce5ff; color: #004085; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  line-height: 1.4;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: #e94560; color: #fff; }
.btn-secondary { background: #1a1a2e; color: #fff; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-outline {
  background: transparent;
  color: #1a1a2e;
  border: 1.5px solid #ddd;
}
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #1a1a2e;
  background: #fff;
  transition: border-color 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: #e94560;
  box-shadow: 0 0 0 3px rgba(233,69,96,0.1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Alert / flash */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #27ae60; }
.alert-error   { background: #f8d7da; color: #721c24; border-left: 4px solid #c0392b; }

/* Progress bar */
.progress-bar {
  background: #f0f0f0;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-fill {
  height: 100%;
  background: #e94560;
  border-radius: 20px;
  transition: width 0.3s;
}

/* Campaign detail */
.campaign-hero {
  background: #1a1a2e;
  color: #fff;
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.campaign-hero h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.meta-list {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

.meta-list li strong { opacity: 1; color: #fff; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  transition: color 0.15s;
}

.back-link:hover { color: #e94560; }

/* Action row */
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Section title */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a1a2e;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #aaa;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .campaign-hero { flex-direction: column; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .nav-brand { font-size: 1rem; }
  .stat-value { font-size: 1.4rem; }
}
