:root {
  color-scheme: dark;
  --bg: #090b0f;
  --bg-soft: #10131a;
  --panel: #151922;
  --panel-2: #1b202b;
  --line: #2b313d;
  --line-soft: #242a35;
  --ink: #f3f4f6;
  --muted: #9ca3af;
  --subtle: #6b7280;
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.16);
  --orange: #f97316;
  --orange-soft: rgba(249, 115, 22, 0.16);
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.15);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.12), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(220, 38, 38, 0.10), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid rgba(249, 115, 22, 0.45);
  border-radius: 7px;
  padding: 0 16px;
  background: linear-gradient(180deg, #f97316, #c2410c);
  color: #fff7ed;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.18);
}

button:hover {
  filter: brightness(1.06);
}

button.ghost {
  min-height: 32px;
  border-color: rgba(220, 38, 38, 0.45);
  background: var(--red-soft);
  color: #fecaca;
  box-shadow: none;
}

label {
  display: grid;
  gap: 7px;
  color: #d1d5db;
  font-weight: 750;
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #0d1117;
  color: var(--ink);
  font-weight: 450;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: min(430px, 100%);
  background: rgba(21, 25, 34, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.login-box h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 0;
}

.login-box p {
  margin: 8px 0 22px;
  color: var(--muted);
}

.login-box form {
  display: grid;
  gap: 16px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  background: linear-gradient(180deg, #0b0e13, #11151d);
  color: white;
  padding: 24px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  border-right: 1px solid var(--line-soft);
}

.sidebar strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
}

.sidebar strong::before {
  content: "";
  width: 10px;
  height: 32px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--orange), var(--red));
}

.sidebar nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.sidebar a {
  text-decoration: none;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 12px;
}

.sidebar a:hover {
  background: rgba(249, 115, 22, 0.10);
  border-color: rgba(249, 115, 22, 0.24);
  color: white;
}

.logout {
  border-color: var(--line) !important;
  color: #fca5a5 !important;
}

.workspace {
  margin-left: 258px;
  padding: 28px;
  display: grid;
  gap: 22px;
}

header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 0 4px;
}

header h1 {
  margin: 0;
  font-size: 31px;
  letter-spacing: 0;
}

header p,
.section-title p,
.muted {
  color: var(--muted);
}

.alert {
  border-radius: 7px;
  padding: 12px 14px;
  border: 1px solid;
}

.alert.success {
  background: var(--green-soft);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.36);
}

.alert.error {
  background: var(--red-soft);
  color: #fecaca;
  border-color: rgba(220, 38, 38, 0.36);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats div,
.panel,
.box,
.card {
  background: linear-gradient(180deg, rgba(27, 32, 43, 0.98), rgba(21, 25, 34, 0.98));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats div {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.stats div::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent);
}

.stats span {
  display: block;
  font-size: 33px;
  font-weight: 850;
}

.stats small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

.panel {
  padding: 20px;
  display: grid;
  gap: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.section-title h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0;
}

.section-title p {
  margin: 0;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.box {
  padding: 16px;
  display: grid;
  gap: 14px;
  background: rgba(13, 17, 23, 0.55);
}

.campaign-form,
.settings,
.suppression {
  max-width: 920px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1117;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

th {
  color: #cbd5e1;
  font-size: 12px;
  background: #111827;
  text-transform: uppercase;
  letter-spacing: .06em;
}

td {
  color: #e5e7eb;
}

tr:hover td {
  background: rgba(249, 115, 22, 0.035);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--orange-soft);
  color: #fed7aa;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.pill.sent,
.pill.activo {
  background: var(--green-soft);
  color: #bbf7d0;
}

.pill.failed,
.pill.inactivo {
  background: var(--red-soft);
  color: #fecaca;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.card h3,
.card p {
  margin: 0;
}

.card small {
  color: var(--muted);
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    grid-template-rows: auto;
  }

  .sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    margin-left: 0;
    padding: 18px;
  }

  header,
  .grid.two {
    grid-template-columns: 1fr;
    display: grid;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
