:root {
  --bg: #f4efe7;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: rgba(148, 163, 184, 0.25);
  --orange: #f97316;
  --orange-soft: #fff1e8;
  --blue: #0f4c81;
  --green: #0f766e;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 26%),
    linear-gradient(180deg, #fff9f2 0%, var(--bg) 48%, #efe7dc 100%);
}

a { color: inherit; text-decoration: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 300px 1fr; }
.sidebar {
  padding: 28px;
  background: linear-gradient(180deg, #122033 0%, #18293f 100%);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar h1, .auth-card h1, .hero h2, .page-head h2, .panel h3, .auth-card h2 { margin: 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: #9fb4cf;
}
.sidebar .muted { color: #c7d2e1; }
.nav { display: grid; gap: 10px; }
.nav a {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.nav a.active, .nav a:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(245, 158, 11, 0.88));
  color: #111827;
  font-weight: 700;
}
.user-card {
  margin-top: auto;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.user-card p { margin: 6px 0 0; color: #dbe3ef; }
.content { padding: 32px; }
.content-auth { display: grid; place-items: center; }
.hero, .panel, .auth-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}
.hero {
  border-radius: var(--radius-xl);
  padding: 30px;
  display: grid;
  gap: 22px;
  grid-template-columns: 1.6fr 0.9fr;
  margin-bottom: 26px;
}
.hero h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.04; max-width: 12ch; }
.hero-panel {
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, #0f766e, #0f4c81);
  align-self: center;
}
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #86efac;
  margin-bottom: 14px;
  box-shadow: 0 0 0 10px rgba(134, 239, 172, 0.18);
}
.muted { color: var(--muted); }
.kpi-grid, .panel-grid, .shortcut-grid, .auth-wrapper, .form-grid { display: grid; gap: 20px; }
.task-board, .task-list, .task-meta { display: grid; gap: 20px; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 26px; }
.kpi-card {
  border-radius: 24px;
  padding: 22px;
  min-height: 160px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.kpi-card strong { font-size: 2rem; }
.accent-orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.accent-blue { background: linear-gradient(135deg, #0f4c81, #2563eb); }
.accent-green { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.accent-dark { background: linear-gradient(135deg, #111827, #374151); }
.panel-grid { grid-template-columns: 1fr 1.1fr; margin-bottom: 26px; }
.panel { border-radius: var(--radius-xl); padding: 24px; }
.board-column { align-content: start; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shortcut-card {
  border-radius: 18px;
  padding: 18px;
  background: var(--orange-soft);
  border: 1px solid rgba(249, 115, 22, 0.18);
}
.shortcut-card strong, .shortcut-card span { display: block; }
.shortcut-card span { margin-top: 8px; color: #8a5a2b; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.96rem;
}
th { color: var(--muted); font-weight: 700; }
.page-head { margin-bottom: 24px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-width { grid-column: 1 / -1; }
label { display: block; margin-bottom: 8px; font-weight: 600; }
input, select, textarea, button {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
}
input, select, textarea { background: var(--surface-strong); }
textarea { resize: vertical; }
button { cursor: pointer; }
.primary-button, .ghost-button { border: 0; font-weight: 700; }
.primary-button { color: #fff; background: linear-gradient(135deg, #f97316, #ea580c); }
.ghost-button { margin-top: 16px; color: #fff; background: rgba(255, 255, 255, 0.1); }
.secondary-button { border: 0; font-weight: 700; color: #0f4c81; background: rgba(15, 76, 129, 0.12); }
.alert { margin-bottom: 18px; padding: 15px 18px; border-radius: 14px; font-weight: 600; }
.alert.success { background: rgba(16, 185, 129, 0.14); color: #065f46; }
.alert.error { background: rgba(239, 68, 68, 0.12); color: #991b1b; }
.field-error { display: block; margin-top: 6px; color: #b42318; }
.auth-wrapper { grid-template-columns: minmax(320px, 460px) minmax(320px, 440px); align-items: stretch; }
.auth-card { border-radius: 30px; padding: 34px; }
.brand-card { background: linear-gradient(180deg, #13253b, #1d3557); color: #fff; }
.feature-list { padding-left: 18px; }
.badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}
.badge-success { background: rgba(16, 185, 129, 0.14); color: #065f46; }
.badge-muted { background: rgba(148, 163, 184, 0.18); color: #475467; }

.task-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  margin-top: 26px;
}

.task-list {
  gap: 16px;
}

.task-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(249, 250, 251, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.task-card h4,
.task-card p,
.task-meta dt,
.task-meta dd {
  margin: 0;
}

.task-card h4 {
  margin-top: 14px;
  margin-bottom: 8px;
}

.task-card p {
  color: var(--muted);
  margin-bottom: 16px;
}

.task-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.account-pill,
.priority-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.account-pill {
  background: rgba(15, 76, 129, 0.1);
  color: #0f4c81;
}

.priority-critica {
  background: rgba(220, 38, 38, 0.14);
  color: #991b1b;
}

.priority-alta {
  background: rgba(249, 115, 22, 0.14);
  color: #9a3412;
}

.priority-media {
  background: rgba(234, 179, 8, 0.16);
  color: #854d0e;
}

.priority-baja {
  background: rgba(16, 185, 129, 0.14);
  color: #065f46;
}

.task-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.task-meta dt {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.task-meta dd {
  font-weight: 700;
}

.task-action {
  display: grid;
  gap: 12px;
}

.task-card-done {
  background: linear-gradient(180deg, rgba(240, 253, 250, 0.95), rgba(236, 253, 245, 0.9));
}

.empty-state {
  color: var(--muted);
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(148, 163, 184, 0.4);
}

@media (max-width: 1100px) {
  .shell, .hero, .panel-grid, .kpi-grid, .auth-wrapper, .task-board { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .shortcut-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .content, .sidebar { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h2 { max-width: none; }
  .task-meta { grid-template-columns: 1fr; }
  .task-top { align-items: flex-start; flex-direction: column; }
}
