@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #71717a;
  --border: #e7e7ea;
  --accent: #e11d48;
  --accent-hover: #be123c;
  --accent-soft: #fff1f3;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }

/* ---- Layout ---- */
.layout { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 32px; max-width: 1080px; width: 100%; margin: 0 auto; }
@media (max-width: 992px) { .content { padding: 18px; } }

/* ---- Sidebar ---- */
.sidebar {
  width: 250px;
  --bs-offcanvas-width: 250px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
}
.brand {
  font-weight: 700;
  font-size: 1.3rem;
  padding: 6px 10px 20px;
  letter-spacing: -0.02em;
}
.brand .dot { color: var(--accent); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item i { font-size: 1.15rem; }
.sidebar-user {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.sidebar-user a { color: var(--muted); text-decoration: none; }
.sidebar-user a:hover { color: var(--accent); }

/* ---- Topbar (mobile) ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* ---- Titles ---- */
.page-title { font-size: 1.7rem; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 26px; }
.section-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 12px; }
.muted { color: var(--muted); }

/* ---- Card ---- */
.card2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
a.card2 { text-decoration: none; color: inherit; display: block; transition: 0.15s; }
a.card2:hover { border-color: #d4d4d8; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05); transform: translateY(-2px); }

/* ---- List row ---- */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}
a.list-row { transition: 0.15s; }
a.list-row:hover { border-color: #d4d4d8; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05); }
.row-list { display: flex; flex-direction: column; gap: 10px; }

/* ---- Buttons ---- */
.btn2 {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  padding: 10px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1.2;
}
.btn2-primary { background: var(--accent); color: #fff; }
.btn2-primary:hover { background: var(--accent-hover); color: #fff; }
.btn2-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn2-ghost:hover { background: var(--bg); }
.btn2-sm { padding: 7px 12px; font-size: 0.88rem; }
.btn2-block { width: 100%; }

/* ---- Inputs ---- */
.label { font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-bottom: 6px; display: block; }
.field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---- Tags / badges ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.tag-soft { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.tag-ok { background: #ecfdf5; color: #059669; }
.tag-warn { background: #fffbeb; color: #b45309; }
.tag-bad { background: #fef2f2; color: #dc2626; }
.tag-accent { background: var(--accent-soft); color: var(--accent); }

/* ---- Grid ---- */
.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 768px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---- Auth ---- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; }

/* ---- Empty state ---- */
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty i { font-size: 2.6rem; opacity: 0.35; }

/* ---- Landing publica ---- */
.landing { background: var(--bg); }
.landing-wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.landing-nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.landing-nav-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.landing-link { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.landing-link:hover { color: var(--accent); }
.landing-hero { padding: 90px 0 70px; }
.landing-hero .tag { display: inline-flex; }
.landing-title { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.03em; }
.landing-sub { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0 auto 30px; line-height: 1.6; }
.landing-section { padding: 70px 0; }
.landing-h2 { text-align: center; font-size: 1.7rem; margin: 0 0 10px; }
.landing-h3 { font-size: 1.05rem; margin: 0 0 8px; }
.landing-p { font-size: 0.92rem; line-height: 1.55; margin: 0; }
.landing-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 14px;
}
.landing-paso {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.landing-footer { border-top: 1px solid var(--border); background: var(--surface); }

/* ---- Indice de anclas ---- */
.anclas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.anclas a {
  font-size: 0.85rem; font-weight: 500; text-decoration: none;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.anclas a:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Stats / KPI ---- */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .valor { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.kpi .etiqueta { color: var(--muted); font-size: 0.85rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
