/* ============================================================
   Pangea Insights — site.css
   Sistema de diseño: mantener variables, no reinventar.
   ============================================================ */

:root {
  --bg: #f6f7fb;
  --ink: #111827;
  --muted: #667085;
  --card: #fff;
  --line: #e5e7eb;
  --dark: #0b1220;
  --brand: #2563eb;
  --brand2: #7c3aed;
  --ok: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 24px;
  --shadow: 0 20px 50px rgba(15,23,42,.08);
}

/* ---- Reset & base ---- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
.wrap { width: min(1180px, 92vw); margin: auto; }

/* ---- Header & Nav ---- */
header {
  position: sticky; top: 0;
  background: rgba(246,247,251,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
.nav {
  height: 72px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 12px;
  font-weight: 900; letter-spacing: -.04em; font-size: 24px;
}
/* Placeholder mark — se sustituye cuando llega logo real */
.mark {
  width: 40px; height: 40px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  display: grid; place-items: center; color: white;
  font-size: 20px; font-weight: 900; flex-shrink: 0;
}
/* Logo img real (cuando exista) */
.logo-img { width: 40px; height: 40px; flex-shrink: 0; }
.navlinks { display: flex; gap: 18px; color: #475467; font-size: 14px; }
.adminlink {
  border: 1px solid var(--line); padding: 10px 14px;
  border-radius: 999px; background: white;
}

/* ---- Hero ---- */
.hero { padding: 82px 0 48px; }
.grid2 {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 34px; align-items: center;
}
.eyebrow {
  display: inline-flex; gap: 8px; align-items: center;
  background: white; border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 999px;
  color: #475467; font-size: 14px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: .95; margin: 22px 0; letter-spacing: -.07em;
}
.hero p { font-size: 20px; color: var(--muted); max-width: 650px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  border: 0; border-radius: 999px; padding: 13px 18px;
  background: var(--dark); color: #fff; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.btn.alt { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn.blue { background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px;
}
.statgrid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.stat {
  background: #f8fafc; border: 1px solid var(--line);
  border-radius: 18px; padding: 18px;
}
.stat b { font-size: 28px; }
.stat span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---- Secciones genéricas ---- */
.section { padding: 34px 0; }
.section h2 { font-size: 36px; letter-spacing: -.05em; margin: 0 0 16px; }

/* ---- Cards de artículos ---- */
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.card {
  background: white; border: 1px solid var(--line);
  border-radius: 22px; padding: 22px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(15,23,42,.1); }
.tag {
  display: inline-block; background: #eef2ff; color: #3730a3;
  border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800;
}
.card h3 { font-size: 22px; margin: 16px 0 8px; letter-spacing: -.03em; }
.card p, .small { color: var(--muted); }
.card-link {
  margin-top: auto; padding-top: 14px;
  font-size: 14px; font-weight: 700; color: var(--brand);
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---- Herramientas ---- */
.tools { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.tool {
  background: linear-gradient(180deg,#fff,#f8fafc);
  border: 1px solid var(--line); border-radius: 20px; padding: 20px;
}
.tool-logo {
  width: 44px; height: 44px; margin-bottom: 12px;
}
.tool strong { display: block; font-size: 18px; }
.tool span { color: var(--muted); font-size: 14px; }

/* ---- Footer ---- */
.footer { margin-top: 50px; background: var(--dark); color: white; padding: 42px 0; }
.footer p { color: #cbd5e1; }

/* ---- Admin panel ---- */
#admin { min-height: 100vh; background: #0f172a; color: white; }
.adminShell {
  display: grid; grid-template-columns: 260px 1fr; min-height: 100vh;
}
.side {
  background: #020617;
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 24px; position: sticky; top: 0; height: 100vh;
}
.side .logo { font-size: 22px; }
.side button {
  width: 100%; margin-top: 10px; text-align: left;
  background: transparent; color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 12px; cursor: pointer;
}
.side button.active, .side button:hover {
  background: rgba(255,255,255,.08); color: white;
}
.main { padding: 28px; }
.adminTop {
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px; margin-bottom: 22px;
}
.adminTop h1 { margin: 0; font-size: 34px; letter-spacing: -.05em; }
.adminCard {
  background: white; color: #101828; border-radius: 22px;
  border: 1px solid #e5e7eb; padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.18); margin-bottom: 18px;
}
.adminGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.field label { font-size: 13px; color: #475467; font-weight: 800; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid #d0d5dd; border-radius: 14px; background: #fff;
}
.field textarea { min-height: 116px; resize: vertical; }
.outputs { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.out {
  background: #f8fafc; border: 1px solid #e5e7eb;
  border-radius: 18px; padding: 16px; white-space: pre-wrap;
  color: #101828; font-size: 14px; line-height: 1.7;
}
.calendar { display: grid; grid-template-columns: repeat(7,1fr); gap: 10px; }
.day {
  background: #f8fafc; border: 1px solid #e5e7eb;
  border-radius: 18px; min-height: 150px; padding: 12px;
}
.day b { display: flex; justify-content: space-between; font-size: 13px; }
.pill {
  display: block; margin-top: 8px; border-radius: 12px;
  padding: 8px; background: #eef2ff; color: #3730a3;
  font-size: 12px; font-weight: 700;
}
.pill.k { background: #ecfdf3; color: #047857; }
.pill.a { background: #fff7ed; color: #c2410c; }
.pill.r { background: #eff6ff; color: #1d4ed8; }
.shareRow {
  display: grid; grid-template-columns: 1.2fr .8fr .8fr 1.2fr;
  gap: 10px; align-items: center;
  border-bottom: 1px solid #e5e7eb; padding: 12px 0;
}
.shareButtons { display: flex; gap: 8px; flex-wrap: wrap; }
.sbtn {
  border: 0; border-radius: 999px; padding: 8px 11px;
  color: white; font-size: 12px; font-weight: 800; cursor: pointer;
}
.ln { background: #0a66c2; } .fb { background: #1877f2; }
.x  { background: #111; }    .wa { background: #22c55e; }
.mail { background: #7c3aed; } .ig { background: #e11d48; }

/* ---- Login ---- */
.login {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, #020617, #1e1b4b);
}
.loginBox {
  width: min(420px, 92vw); background: white;
  border-radius: 28px; padding: 28px; color: #111827;
  box-shadow: var(--shadow);
}
.login-error {
  background: #fef2f2; color: var(--danger);
  border: 1px solid #fecaca; border-radius: 12px;
  padding: 10px 14px; font-size: 14px; margin-top: 10px;
  display: none;
}
.hidden { display: none !important; }

/* ---- Páginas de artículo ---- */
.article-header { padding: 60px 0 32px; }
.article-header .tag { margin-bottom: 18px; }
.article-header h1 {
  font-size: clamp(28px, 5vw, 52px); line-height: 1.05;
  letter-spacing: -.05em; max-width: 820px; margin: 0 0 14px;
}
.article-meta { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.article-body {
  max-width: 720px; padding-bottom: 72px; line-height: 1.75;
}
.article-body p { font-size: 18px; margin: 0 0 22px; color: #374151; }
.article-body h2 {
  font-size: 26px; letter-spacing: -.03em;
  margin: 40px 0 14px; color: var(--ink);
}
.article-body ul { padding-left: 24px; margin: 0 0 22px; }
.article-body ul li { font-size: 18px; margin-bottom: 10px; color: #374151; }
.article-cta {
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: white; border-radius: var(--radius);
  padding: 36px; margin: 40px 0; text-align: center;
}
.article-cta h3 { margin: 0 0 10px; font-size: 24px; }
.article-cta p { color: rgba(255,255,255,.8); margin: 0 0 20px; }
.breadcrumb {
  font-size: 13px; color: var(--muted);
  margin-bottom: 22px; display: flex; gap: 6px; align-items: center;
}
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span { color: var(--line); }

/* ---- Pill Fresh Control ---- */
.pill.f { background: #fef9c3; color: #a16207; }

/* ---- Calendario mensual ---- */
.cal-nav {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.cal-nav h3 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.cal-nav .nav-btn {
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 8px 16px;
  cursor: pointer; font-weight: 700; font-size: 14px;
}
.cal-nav .nav-btn:hover { background: #e2e8f0; }
.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head {
  text-align: center; font-size: 11px; font-weight: 800;
  color: #667085; padding: 6px 0;
}
.cal-day {
  background: #f8fafc; border: 1px solid #e5e7eb;
  border-radius: 12px; min-height: 120px; padding: 8px;
  display: flex; flex-direction: column;
}
.cal-day.today { border-color: var(--brand); background: #eff6ff; }
.cal-day.other-month { opacity: 0.3; background: #f8fafc; min-height: 40px; }
.day-num {
  font-size: 12px; font-weight: 800; color: #374151; margin-bottom: 5px;
}
.cal-day.today .day-num { color: var(--brand); }
.day-pill {
  display: inline-block; border-radius: 6px;
  padding: 2px 6px; font-size: 9px; font-weight: 800; margin-bottom: 4px;
}
.day-content { font-size: 10px; color: #374151; line-height: 1.4; flex: 1; }
.day-hour { font-size: 9px; color: #667085; margin-top: 4px; }
.day-status {
  display: inline-block; border-radius: 20px;
  padding: 3px 8px; font-size: 9px; font-weight: 800;
  cursor: pointer; margin-top: 6px; border: none;
  width: 100%; text-align: center;
}
.status-pending   { background: #f1f5f9; color: #64748b; }
.status-programmed{ background: #fef3c7; color: #d97706; }
.status-published { background: #dcfce7; color: #16a34a; }

/* ---- Tabla de horarios ---- */
.hours-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.hours-table th { background: #f8fafc; padding: 10px 14px; text-align: left; font-size: 12px; color: #667085; font-weight: 800; border-bottom: 1px solid #e5e7eb; }
.hours-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
.hours-table tr:last-child td { border-bottom: none; }
.net-badge { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; color: white; }

/* ---- Plan diario tabla ---- */
.plan-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.plan-table th { background: #f8fafc; padding: 10px 12px; text-align: left; font-size: 12px; color: #667085; font-weight: 800; border-bottom: 2px solid #e5e7eb; }
.plan-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.plan-table tr:hover td { background: #f8fafc; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .grid2, .cards, .tools, .adminShell, .adminGrid, .outputs {
    grid-template-columns: 1fr;
  }
  .navlinks { display: none; }
  .side { position: relative; height: auto; }
  .calendar { grid-template-columns: 1fr; }
  .shareRow { grid-template-columns: 1fr; }
  .hero { padding-top: 46px; }
}
