:root {
  --bg: #eef4ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(255, 255, 255, 0.62);
  --line: rgba(73, 104, 151, 0.22);
  --line-strong: rgba(48, 82, 133, 0.35);
  --text: #152236;
  --muted: #5e6f86;
  --brand: #005fcc;
  --brand-2: #00a6a8;
  --ok: #007a40;
  --warn: #996200;
  --danger: #ac1234;
  --shadow: 0 14px 44px rgba(14, 35, 69, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Sora", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 85% -10%, #c8f1f6 0%, transparent 36%),
    radial-gradient(circle at 12% -15%, #d6e4ff 0%, transparent 44%),
    linear-gradient(180deg, #f2f7ff 0%, var(--bg) 54%, #f6fbff 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 20px rgba(18, 40, 73, 0.08);
}

.brand-wrap {
  display: grid;
  gap: 4px;
}

.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3f658f;
}

.topbar h1 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.topbar nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

main {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.page {
  animation: appear 250ms ease;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.card {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 15px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 18px;
  background:
    linear-gradient(115deg, rgba(0, 95, 204, 0.08), rgba(0, 166, 168, 0.09)),
    var(--surface);
  border-color: var(--line-strong);
}

.eyebrow {
  margin: 0 0 5px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: #2d5f95;
}

.card h2,
.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
}

.auth-layout {
  align-items: start;
}

.auth-card {
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: auto -25% -65% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 95, 204, 0.12) 0%, rgba(0, 95, 204, 0) 70%);
  pointer-events: none;
}

.auth-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

.auth-card button {
  width: 100%;
}

.auth-card a.primary {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 6px;
}

a,
button {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  text-decoration: none;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

a:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(18, 43, 79, 0.14);
}

button.primary,
a.primary {
  font-weight: 700;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

button.ghost {
  background: var(--surface-2);
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(0, 95, 204, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.14);
}

label {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.small {
  font-size: 0.82rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  margin-top: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge.warn {
  color: var(--warn);
  border-color: #f1c97f;
  background: #fff8e8;
}

.badge.danger {
  color: var(--danger);
  border-color: #f8c2d0;
  background: #fff2f5;
}

.badge.ok {
  color: var(--ok);
  border-color: #addfc5;
  background: #ebfbf1;
}

.job-title {
  font-size: 1.03rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.row.compact {
  gap: 6px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

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

.stat-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-card strong {
  font-size: 1.35rem;
}

.pill {
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
}

.pill.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.card-tight {
  margin-top: 8px;
  padding: 12px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 8px;
}

.kanban {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}

.col {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 10px;
  background: rgba(243, 249, 255, 0.9);
  min-height: 120px;
}

.col h3 {
  margin: 0 0 10px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3a5170;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 18, 34, 0.48);
}

.modal.open {
  display: flex;
}

.modal-panel {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px;
  background: #fafdff;
  box-shadow: 0 20px 50px rgba(9, 25, 47, 0.3);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body.modal-open {
  overflow: hidden;
}

.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
}

.loading::after {
  content: \"Cargando...\";
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 0.74rem;
  color: var(--muted);
}

.toast-root {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1400;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 230px;
  max-width: 340px;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 28px rgba(12, 28, 52, 0.22);
  background: #fff;
  padding: 10px 12px;
  font-size: 0.86rem;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.ok {
  border-color: #b7ebce;
  background: #f3fff8;
}

.toast.danger {
  border-color: #f4c0cb;
  background: #fff3f6;
}

.toast.info {
  border-color: #c9daf3;
  background: #f3f8ff;
}

.toast.hide {
  opacity: 0;
  transform: translateY(6px);
}

@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .split-2 {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 3px;
  }

  .topbar nav a,
  .topbar nav button {
    white-space: nowrap;
  }
}
