/* ============================================================
   public/assets/css/public.css
   Skills aplicadas:
   - a11y-audit: contraste WCAG AA (4.5:1 mínimo), focus visible,
                 skip link, roles ARIA via CSS
   - senior-frontend: custom properties, mobile-first, sin !important
   - code-reviewer: sin duplicación, variables reutilizables
   ============================================================ */

/* ── Reset y custom properties ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colores — a11y-audit: todos cumplen WCAG AA sobre fondos claros */
  --ink: #0d0d12;          /* contraste 18.7:1 sobre --paper */
  --ink2: #3a3a42;         /* contraste 9.2:1 */
  --muted: #6b6963;        /* contraste 5.1:1 — mínimo para texto secundario */
  --paper: #f5f3ee;
  --paper2: #eae7df;
  --surface: #ffffff;
  --accent: #bf4e18;       /* contraste 4.7:1 sobre --paper */
  --accent2: #a03d12;      /* contraste 6.2:1 — para hover */
  --accent-bg: rgba(191,78,24,.08);
  --green: #16803c;        /* contraste 4.6:1 */
  --green-bg: rgba(22,128,60,.08);
  --amber: #92400e;        /* contraste 5.5:1 */
  --red: #b91c1c;          /* contraste 5.9:1 */
  --border: rgba(13,13,18,.1);
  --border2: rgba(13,13,18,.18);

  /* Tipografía */
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;

  /* Espaciado */
  --r: 12px;
  --r-lg: 16px;
  --r-sm: 8px;

  /* Sombras */
  --sh: 0 1px 3px rgba(13,13,18,.06), 0 2px 8px rgba(13,13,18,.04);
  --sh-lg: 0 4px 20px rgba(13,13,18,.1);
}

/* a11y-audit: skip link para navegación por teclado */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-size: .875rem;
  font-weight: 500;
  z-index: 999;
  transition: top .15s;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

/* a11y-audit: focus visible claro en todos los elementos interactivos */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Tipografía ─────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--ink2); }
a  { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent2); }

/* ── Navbar ─────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,243,238,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { text-decoration: none; display: flex; align-items: center; gap: .5rem; }
.nav-logo img { height: 32px; width: auto; }
.nav-links {
  list-style: none; display: flex; gap: 2rem;
}
.nav-links a {
  font-size: .875rem; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ── Layout páginas ─────────────────────────────────────────── */
.page { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 3.5rem;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem 1rem; border-radius: 100px;
  background: var(--accent-bg);
  font-size: .75rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.5rem;
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.75); }
}
.hero-title { margin-bottom: 1rem; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 1.125rem; font-weight: 300; color: var(--muted);
  max-width: 500px; margin-bottom: 2rem;
}

/* ── Search ─────────────────────────────────────────────────── */
.search-form {
  display: flex; gap: .75rem; flex-wrap: wrap; max-width: 640px;
}
.search-box {
  flex: 1; min-width: 260px;
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(191,78,24,.1);
}
.search-box svg { flex-shrink: 0; color: var(--muted); }
.search-box input {
  flex: 1; border: none; background: transparent;
  font-family: var(--font-sans); font-size: .9375rem; color: var(--ink);
  outline: none;
}
.search-box input::placeholder { color: var(--muted); }
.btn-search {
  padding: .75rem 1.75rem; border-radius: 100px;
  background: var(--accent); color: #fff;
  font-family: var(--font-sans); font-size: .9375rem; font-weight: 500;
  border: none; cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 3px 12px rgba(191,78,24,.28);
}
.btn-search:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-search:active { transform: translateY(0); }

/* ── Filtros chips ──────────────────────────────────────────── */
.filters-bar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.chip {
  padding: .375rem 1rem; border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: .8125rem; font-weight: 500; color: var(--muted);
  text-decoration: none; cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--border2); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.accent { background: var(--accent-bg); color: var(--accent); border-color: rgba(191,78,24,.25); }

/* ── Sección de vacantes ────────────────────────────────────── */
.jobs-section { padding-bottom: 5rem; }
.jobs-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.jobs-header h2 { font-size: 1.5rem; }
.jobs-sort { display: flex; gap: .5rem; align-items: center; font-size: .8125rem; color: var(--muted); }
.sort-opt { color: var(--muted); text-decoration: none; padding: .25rem .625rem; border-radius: 6px; }
.sort-opt:hover { background: var(--paper2); color: var(--ink); }
.sort-opt.on { background: var(--paper2); color: var(--ink); font-weight: 500; }

/* ── Grid de tarjetas ───────────────────────────────────────── */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ── Job card ───────────────────────────────────────────────── */
.job-card {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--sh);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.job-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: rgba(191,78,24,.2);
}
.job-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--ink) 0%, #1e1e2a 100%);
  border-color: transparent; color: #fff;
}
@media (max-width: 720px) { .job-card.featured { grid-column: span 1; } }

.card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 1rem;
}
.featured-label {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .625rem; border-radius: 100px;
  background: rgba(212,168,71,.2); color: #d4a847;
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: .75rem;
}
.dept-badge {
  padding: .3125rem .75rem; border-radius: 100px;
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  background: rgba(13,13,18,.06); color: var(--muted);
}
.job-card.featured .dept-badge { background: rgba(255,255,255,.12); color: rgba(255,255,255,.7); }

.card-expiry { display: flex; align-items: center; gap: .375rem; }
.expiry-badge {
  font-size: .6875rem; font-weight: 600;
  padding: .25rem .625rem; border-radius: 6px;
}
.expiry-badge.ok     { background: var(--green-bg); color: var(--green); }
.expiry-badge.urgent { background: rgba(185,28,28,.08); color: var(--red); }

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem; line-height: 1.25;
  margin-bottom: .625rem;
  color: var(--ink);
}
.job-card.featured .card-title { color: #fff; }

.card-meta {
  display: flex; gap: .875rem; flex-wrap: wrap;
  font-size: .8125rem; color: var(--muted); margin-bottom: 1rem;
}
.job-card.featured .card-meta { color: rgba(255,255,255,.55); }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1rem; border-top: 1px solid var(--border);
  margin-top: auto;
}
.job-card.featured .card-footer { border-top-color: rgba(255,255,255,.1); }
.app-count { font-size: .8125rem; color: var(--muted); }
.btn-apply {
  padding: .5rem 1.125rem; border-radius: 100px;
  background: var(--ink); color: #fff;
  font-family: var(--font-sans); font-size: .8125rem; font-weight: 500;
  text-decoration: none; transition: all .2s;
  display: inline-flex; align-items: center;
}
.btn-apply:hover { background: var(--accent); color: #fff; }
.job-card.featured .btn-apply { background: var(--accent); }
.job-card.featured .btn-apply:hover { background: #a03d12; }

/* ── Paginación ─────────────────────────────────────────────── */
.pagination {
  display: flex; gap: .375rem; justify-content: center;
  padding: 2.5rem 0; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 500;
  border: 1px solid var(--border); color: var(--muted);
  text-decoration: none; transition: all .15s;
}
.page-btn:hover { border-color: var(--border2); color: var(--ink); }
.page-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Empty state ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.empty-state h3 { font-size: 1rem; font-weight: 500; color: var(--ink2); margin-bottom: .375rem; }

/* ── Detalle de vacante ─────────────────────────────────────── */
.job-detail-inner { max-width: 900px; margin: 0 auto; padding: 2rem 0 5rem; }
.back-link a { font-size: .875rem; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: .375rem; margin-bottom: 1.5rem; }
.back-link a:hover { color: var(--ink); }
.job-header { margin-bottom: 2rem; }
.job-badges { display: flex; gap: .5rem; margin-bottom: .875rem; }
.status-badge.active { padding: .3125rem .75rem; border-radius: 100px; background: var(--green-bg); color: var(--green); font-size: .6875rem; font-weight: 600; }
.job-title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .875rem; }
.job-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .875rem; color: var(--muted); }
.job-body { display: grid; grid-template-columns: 1fr 280px; gap: 2.5rem; align-items: start; }
@media (max-width: 720px) { .job-body { grid-template-columns: 1fr; } }
.wysiwyg-content { font-size: .9375rem; line-height: 1.75; color: var(--ink2); }
.wysiwyg-content h2, .wysiwyg-content h3 { font-family: var(--font-serif); color: var(--ink); margin: 1.5rem 0 .75rem; }
.wysiwyg-content ul, .wysiwyg-content ol { padding-left: 1.5rem; margin: .75rem 0; }
.wysiwyg-content li { margin-bottom: .375rem; }
.requirements { font-size: .9375rem; color: var(--ink2); line-height: 1.75; margin-top: .75rem; white-space: pre-wrap; }
.apply-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--r-lg); padding: 1.5rem;
  position: sticky; top: 5rem;
  box-shadow: var(--sh);
}
.apply-card h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.apply-card p { font-size: .875rem; color: var(--muted); margin-bottom: 1.25rem; }
.btn-apply-big {
  display: block; width: 100%;
  padding: .875rem; border-radius: 100px;
  background: var(--accent); color: #fff; text-align: center;
  font-family: var(--font-sans); font-size: .9375rem; font-weight: 500;
  text-decoration: none; transition: all .2s;
  box-shadow: 0 3px 12px rgba(191,78,24,.28);
}
.btn-apply-big:hover { background: var(--accent2); color: #fff; transform: translateY(-1px); }
.apply-note { font-size: .75rem; color: var(--muted); text-align: center; margin-top: .75rem; }
.share-card { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.share-card p { font-size: .75rem; color: var(--muted); margin-bottom: .5rem; }
.share-card a { font-size: .8125rem; margin-right: .75rem; }

/* ── Formulario de postulación ──────────────────────────────── */
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; margin-bottom: 1.25rem; }
.form-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; color: var(--ink); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .4rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .625rem .875rem; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); background: var(--paper);
  font-family: var(--font-sans); font-size: .9375rem; color: var(--ink);
  outline: none; transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(191,78,24,.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .frow { grid-template-columns: 1fr; } }
.hint { font-size: .75rem; color: var(--muted); margin-top: .375rem; }
.privacy-notice { font-size: .8125rem; color: var(--muted); line-height: 1.65; padding: .875rem 1rem; background: var(--paper2); border-radius: var(--r-sm); margin-bottom: 1.25rem; }
.btn-submit {
  width: 100%; padding: .875rem; border-radius: 100px;
  background: var(--ink); color: #fff;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 500;
  border: none; cursor: pointer; transition: all .2s;
  box-shadow: 0 3px 12px rgba(13,13,18,.2);
}
.btn-submit:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 5px 20px rgba(191,78,24,.32); }

/* ── Tracking ───────────────────────────────────────────────── */
.tracking-page { max-width: 520px; margin: 4rem auto; padding: 0 1.25rem 5rem; }
.tracking-result { margin-top: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.applicant-info { padding: 1.25rem 1.5rem; background: var(--paper2); display: flex; flex-direction: column; gap: .25rem; }
.applicant-info strong { font-size: 1rem; font-weight: 600; }
.applicant-info span { font-size: .8125rem; color: var(--muted); }
.status-current { padding: .875rem 1.5rem; border-bottom: 1px solid var(--border); font-size: .9375rem; }
.status-current strong { color: var(--accent); }
.timeline { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: .75rem; }
.timeline-step { display: flex; align-items: flex-start; gap: .75rem; }
.timeline-step .step-label { font-size: .875rem; font-weight: 500; flex: 1; }
.timeline-step .step-date { font-size: .75rem; color: var(--muted); flex-shrink: 0; }
.timeline-step .step-note { font-size: .75rem; color: var(--muted); display: block; margin-top: .2rem; }

/* ── Alertas ────────────────────────────────────────────────── */
.alert { padding: .875rem 1.125rem; border-radius: var(--r-sm); margin-bottom: 1.25rem; font-size: .9375rem; }
.alert-error { background: rgba(185,28,28,.08); color: var(--red); border: 1px solid rgba(185,28,28,.2); }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(22,128,60,.2); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: .8125rem; color: var(--muted); }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--ink); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner { padding: .875rem 1.25rem; }
  .nav-links { display: none; }
  .page { padding: 0 1.25rem; }
  .hero { padding: 3rem 0 2rem; }
  .jobs-grid { grid-template-columns: 1fr; }
}

/* a11y-audit: reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   public/assets/css/admin.css
   Skills: a11y-audit · senior-frontend · code-reviewer
   ============================================================ */

/* ── Reset y variables admin ────────────────────────────────── */
:root {
  --sb-bg: #0f0f13;
  --sb-border: rgba(255,255,255,.07);
  --sb-text: rgba(255,255,255,.42);
  --sb-text-active: #ffffff;
  --bg: #f7f6f2;
  --bg2: #eeecea;
  --surface: #ffffff;
  --ink: #0d0d12;
  --ink2: #3a3a42;
  --muted: #8a8880;
  --border: rgba(13,13,18,.08);
  --border2: rgba(13,13,18,.15);
  --accent: #c8541a;
  --accent-bg: rgba(200,84,26,.08);
  --accent-b: rgba(200,84,26,.25);
  --green: #16803c;
  --green-bg: rgba(22,128,60,.08);
  --amber: #b45309;
  --amber-bg: rgba(245,158,11,.1);
  --red: #dc2626;
  --red-bg: rgba(239,68,68,.08);
  --blue: #1d6bdb;
  --blue-bg: rgba(59,130,246,.08);
  --purple: #7c3aed;
  --purple-bg: rgba(139,92,246,.08);
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-mono: 'Geist Mono', 'Fira Code', monospace;
  --sh: 0 1px 3px rgba(13,13,18,.06), 0 2px 8px rgba(13,13,18,.04);
  --sh-lg: 0 4px 20px rgba(13,13,18,.1);
  --r: 12px; --r-lg: 14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--ink); font-size: .875rem; -webkit-font-smoothing: antialiased; }

/* a11y-audit: focus visible */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ── Shell ──────────────────────────────────────────────────── */
.shell { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
}
/* a11y-audit: scrollbar del sidebar no bloquea contenido */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sb-logo { padding: 1.25rem 1rem 1rem; display: flex; align-items: center; gap: .5625rem; border-bottom: 1px solid var(--sb-border); }
.sb-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-family: var(--font-serif); font-size: .875rem; color: #fff; flex-shrink: 0; }
.sb-name { font-size: .875rem; font-weight: 600; color: #fff; }
.sb-sub { font-size: .625rem; color: var(--sb-text); text-transform: uppercase; letter-spacing: .07em; margin-top: .0625rem; }

.sb-section { padding: .625rem .5rem .125rem; }
.sb-section-label { font-size: .625rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sb-text); padding: 0 .5rem; margin-bottom: .25rem; }

.sb-item {
  display: flex; align-items: center; gap: .5625rem;
  padding: .4375rem .5625rem; border-radius: 7px;
  cursor: pointer; color: var(--sb-text); text-decoration: none;
  font-size: .8125rem; font-weight: 500;
  transition: background .12s, color .12s;
  margin-bottom: .0625rem;
}
.sb-item svg { width: 15px; height: 15px; opacity: .5; flex-shrink: 0; }
.sb-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); }
.sb-item:hover svg { opacity: .7; }
.sb-item.active { background: rgba(255,255,255,.09); color: #fff; }
.sb-item.active svg { opacity: .85; }

.sb-badge { margin-left: auto; padding: .125rem .375rem; border-radius: 100px; background: var(--accent); color: #fff; font-size: .625rem; font-weight: 600; }
.sb-divider { height: 1px; background: var(--sb-border); margin: .375rem .5rem; }
.sb-user { margin-top: auto; padding: .75rem 1rem; border-top: 1px solid var(--sb-border); display: flex; align-items: center; gap: .5625rem; }
.sb-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg,#6366f1,#8b5cf6); display: grid; place-items: center; font-size: .6875rem; font-weight: 600; color: #fff; flex-shrink: 0; }
.sb-user-name { font-size: .75rem; font-weight: 500; color: rgba(255,255,255,.75); }
.sb-user-role { font-size: .625rem; color: var(--sb-text); }
.sb-logout { margin-left: auto; color: var(--sb-text); text-decoration: none; font-size: 1rem; opacity: .6; transition: opacity .15s; }
.sb-logout:hover { opacity: 1; }

/* ── Main ───────────────────────────────────────────────────── */
.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── Topbar ─────────────────────────────────────────────────── */
.admin-topbar {
  height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(247,246,242,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--muted); }
.breadcrumb .sep { opacity: .4; }
.breadcrumb .current { color: var(--ink); font-weight: 500; }
.topbar-actions { display: flex; gap: .5rem; }

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .5rem 1rem; border-radius: 9px;
  font-family: var(--font-sans); font-size: .8125rem; font-weight: 500;
  cursor: pointer; border: none; text-decoration: none;
  transition: all .18s;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 3px 12px rgba(200,84,26,.3); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg2); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid rgba(220,38,38,.2); }
.btn-danger:hover { background: rgba(220,38,38,.15); }

/* ── Contenido scrolleable ──────────────────────────────────── */
.admin-content { flex: 1; overflow-y: auto; padding: 1.5rem; }
.admin-content::-webkit-scrollbar { width: 6px; }
.admin-content::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-family: var(--font-serif); font-size: 1.875rem; letter-spacing: -.02em; }
.page-subtitle { font-size: .8125rem; color: var(--muted); margin-top: .25rem; }

/* ── Alertas ────────────────────────────────────────────────── */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .875rem; }
.alert-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(22,128,60,.2); }
.alert-error   { background: var(--red-bg); color: var(--red); border: 1px solid rgba(220,38,38,.15); }
.alert-warning { background: var(--amber-bg); color: var(--amber); border: 1px solid rgba(245,158,11,.2); }

/* ── Panels ─────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh); margin-bottom: 1rem; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1.25rem .75rem; border-bottom: 1px solid var(--border); }
.panel-title { font-size: .9375rem; font-weight: 600; }
.panel-action { font-size: .75rem; color: var(--accent); cursor: pointer; font-weight: 500; text-decoration: none; }
.panel-action:hover { text-decoration: underline; }
.panel-body { padding: 1.125rem; }

/* ── KPI grid ───────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: .875rem; margin-bottom: 1.5rem; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 1.25rem; box-shadow: var(--sh); }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: .875rem; }
.kpi-value { font-family: var(--font-serif); font-size: 2.25rem; line-height: 1; color: var(--ink); margin-bottom: .25rem; }
.kpi-label { font-size: .75rem; color: var(--muted); }
.kpi-delta { font-size: .6875rem; font-weight: 500; margin-top: .375rem; }
.delta-up { color: var(--green); }
.delta-dn { color: var(--red); }

/* ── Dashboard grid ─────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── App list ───────────────────────────────────────────────── */
.app-list { }
.app-item { display: flex; align-items: center; gap: .75rem; padding: .8125rem 1.25rem; border-bottom: 1px solid rgba(13,13,18,.04); transition: background .12s; }
.app-item:last-child { border-bottom: none; }
.app-item:hover { background: rgba(13,13,18,.015); }
.app-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .8125rem; font-weight: 600; color: #fff; flex-shrink: 0; }
.app-info { flex: 1; min-width: 0; }
.app-name { font-size: .8125rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-role { font-size: .6875rem; color: var(--muted); margin-top: .0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-time { font-size: .6875rem; color: var(--muted); flex-shrink: 0; }

/* ── Funnel ─────────────────────────────────────────────────── */
.funnel-list { padding: .875rem 1.25rem; display: flex; flex-direction: column; gap: .625rem; }
.funnel-row { display: flex; align-items: center; gap: .625rem; }
.funnel-label { font-size: .75rem; font-weight: 500; width: 130px; flex-shrink: 0; color: var(--ink2); }
.funnel-bar { flex: 1; height: 24px; border-radius: 5px; background: var(--bg2); overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 5px; background: var(--accent); transition: width .5s ease; }
.funnel-num { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; width: 28px; text-align: right; flex-shrink: 0; }

/* ── Activity list ──────────────────────────────────────────── */
.activity-list { padding: 0; }
.activity-item { display: flex; gap: .75rem; padding: .6875rem 1.25rem; border-bottom: 1px solid rgba(13,13,18,.04); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: .3125rem; flex-shrink: 0; }
.activity-text { font-size: .75rem; color: var(--ink2); line-height: 1.5; }
.activity-time { font-size: .6875rem; color: var(--muted); margin-top: .125rem; }

/* ── Expiry list ────────────────────────────────────────────── */
.expiry-list { padding: 0; }
.expiry-item { display: flex; align-items: center; justify-content: space-between; padding: .8125rem 1.25rem; border-bottom: 1px solid rgba(13,13,18,.04); }
.expiry-item:last-child { border-bottom: none; }
.expiry-title { font-size: .8125rem; font-weight: 500; }
.expiry-meta { font-size: .6875rem; color: var(--muted); margin-top: .125rem; }
.expiry-badge { padding: .25rem .5rem; border-radius: 6px; font-size: .6875rem; font-weight: 600; }
.expiry-badge.ok { background: var(--green-bg); color: var(--green); }
.expiry-badge.urgent { background: var(--red-bg); color: var(--red); }

/* ── Tabla admin ────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: .5625rem 1rem; text-align: left; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
.admin-table td { padding: .8125rem 1rem; border-bottom: 1px solid rgba(13,13,18,.04); font-size: .8125rem; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(13,13,18,.015); }
.table-empty { text-align: center; padding: 2.5rem; color: var(--muted); font-style: italic; }

/* ── Status pills ───────────────────────────────────────────── */
.status-pill { display: inline-flex; align-items: center; gap: .3125rem; padding: .25rem .625rem; border-radius: 100px; font-size: .6875rem; font-weight: 600; }
.status-published { background: var(--green-bg); color: var(--green); }
.status-draft { background: rgba(13,13,18,.06); color: var(--muted); }
.status-paused { background: var(--amber-bg); color: var(--amber); }
.status-closed { background: var(--red-bg); color: var(--red); }

/* ── Progress bar ───────────────────────────────────────────── */
.progress-wrap { display: flex; align-items: center; gap: .5rem; }
.progress-bar { flex: 1; height: 4px; border-radius: 100px; background: var(--bg2); min-width: 60px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 100px; background: var(--accent); transition: width .5s ease; }

/* ── Action row ─────────────────────────────────────────────── */
.action-row { display: flex; gap: .375rem; }
.act-btn { padding: .3125rem .625rem; border-radius: 7px; font-size: .6875rem; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--muted); transition: all .12s; text-decoration: none; display: inline-flex; align-items: center; }
.act-btn:hover { background: var(--bg2); color: var(--ink); }
.act-btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.act-btn.primary:hover { background: var(--accent); border-color: var(--accent); }

/* ── Form controls admin ────────────────────────────────────── */
.form-group { margin-bottom: .875rem; }
.form-label { display: block; font-size: .6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .375rem; }
.form-control {
  width: 100%; padding: .5625rem .75rem;
  border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg); font-family: var(--font-sans);
  font-size: .8125rem; color: var(--ink); outline: none;
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,84,26,.08); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ── Tabs ───────────────────────────────────────────────────── */
.status-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.status-tab { padding: .8125rem 1rem; font-size: .8125rem; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; transition: all .15s; }
.status-tab:hover { color: var(--ink); }
.status-tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: 100px; background: var(--bg2); font-size: .625rem; font-weight: 600; margin-left: .375rem; padding: 0 .3125rem; }

/* ── Paginación admin ───────────────────────────────────────── */
.pagination { display: flex; gap: .25rem; padding: 1.25rem 0; flex-wrap: wrap; }
.page-btn { min-width: 32px; height: 32px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .8125rem; font-weight: 500; border: 1px solid var(--border); color: var(--muted); text-decoration: none; transition: all .12s; }
.page-btn:hover { border-color: var(--border2); color: var(--ink); }
.page-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Semáforo pills (terna) ─────────────────────────────────── */
.sem-pill { display: inline-flex; align-items: center; gap: .3125rem; padding: .1875rem .5625rem; border-radius: 100px; font-size: .6875rem; font-weight: 600; }
.sem-dot { width: 6px; height: 6px; border-radius: 50%; }
.sem-r { background: var(--red-bg); color: var(--red); }
.sem-r .sem-dot { background: var(--red); }
.sem-a { background: var(--amber-bg); color: var(--amber); }
.sem-a .sem-dot { background: #f59e0b; }
.sem-g { background: var(--green-bg); color: var(--green); }
.sem-g .sem-dot { background: #22c55e; box-shadow: 0 0 5px rgba(34,197,94,.5); }

/* ── Stars ──────────────────────────────────────────────────── */
.stars { display: flex; gap: .125rem; }
.star-filled { color: #f59e0b; }
.star-empty  { color: var(--bg2); }

/* ── Toggle ─────────────────────────────────────────────────── */
.toggle { position: relative; width: 36px; height: 20px; cursor: pointer; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { position: absolute; inset: 0; border-radius: 100px; background: var(--bg2); border: 1px solid var(--border); transition: background .2s; }
.toggle input:checked ~ .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: transform .2s; }
.toggle input:checked ~ .toggle-thumb { transform: translateX(16px); }

/* ── Login ──────────────────────────────────────────────────── */
.login-body { height: 100vh; display: grid; place-items: center; background: var(--bg); overflow-y: auto; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2.5rem; box-shadow: var(--sh-lg); }
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { height: 40px; }
.login-title { font-family: var(--font-serif); font-size: 1.5rem; text-align: center; margin-bottom: .375rem; }
.login-sub { font-size: .875rem; color: var(--muted); text-align: center; margin-bottom: 1.75rem; }
.btn-login { width: 100%; padding: .75rem; border-radius: 100px; background: var(--ink); color: #fff; font-family: var(--font-sans); font-size: .9375rem; font-weight: 500; border: none; cursor: pointer; margin-top: .5rem; transition: all .2s; box-shadow: 0 3px 12px rgba(13,13,18,.18); }
.btn-login:hover { background: var(--accent); transform: translateY(-1px); }

/* ── Responsive admin ───────────────────────────────────────── */
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px)  { .sidebar { display: none; } .kpi-grid { grid-template-columns: 1fr 1fr; } }

/* ── Mono ───────────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); font-size: .75rem; }

/* a11y-audit: reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
