/* Trámite MX View — dark app-shell dashboard */
:root {
  --bg: #0b1220;
  --surface: #111827;
  --surface-2: #1a2332;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --accent-glow: rgba(34, 211, 238, 0.35);
  --danger: #f87171;
  --ok: #34d399;
  --sidebar-w: 248px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.85; }

.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 9999;
  padding: 10px 18px; background: var(--accent); color: var(--bg); border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 16px; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 200;
  background: var(--bg); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 24px 16px;
}
.sidebar__brand { margin-bottom: 32px; padding: 0 8px; }
.sidebar__name {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
}
.sidebar__tag {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin-top: 4px;
}
.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar__link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: 0.88rem;
  transition: background 0.2s, color 0.2s;
}
.sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.6; }
.sidebar__link:hover { background: var(--surface); color: var(--text); }
.sidebar__link.active {
  background: var(--accent-dim); color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar__cta {
  margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #0891b2); color: var(--bg);
  font-weight: 700; font-size: 0.9rem;
}
.sidebar__cta:hover { opacity: 1; filter: brightness(1.05); color: var(--bg); }
.sidebar__cta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.app-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  display: none; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 150;
}
.topbar__title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.menu-toggle {
  display: flex; flex-direction: column; gap: 5px; padding: 8px;
  background: none; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

.content { flex: 1; padding: 32px 28px 48px; max-width: 1120px; width: 100%; }

.page-head { margin-bottom: 28px; }
.page-head__eyebrow {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent); font-weight: 700; margin-bottom: 8px;
}
.page-head__title {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: #fff;
}
.page-head__desc { margin-top: 10px; color: var(--muted); max-width: 58ch; }

.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 32px; }
.bento__cell {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; position: relative; overflow: hidden;
}
.bento__cell--hero { grid-column: span 7; min-height: 200px; }
.bento__cell--stat { grid-column: span 2; text-align: center; padding: 20px 16px; }
.bento__cell--wide { grid-column: span 5; }
.bento__cell--cta { grid-column: span 5; background: linear-gradient(145deg, var(--surface-2), var(--surface)); }
.bento__cell::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent); opacity: 0.5;
}
.bento__label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.bento__title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: #fff; line-height: 1.25; }
.bento__text { margin-top: 10px; color: var(--muted); font-size: 0.92rem; }
.bento__actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.stat__num {
  font-family: var(--font-display); font-size: 1.8rem; font-weight: 700;
  color: var(--accent); line-height: 1;
}
.stat__label { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; font-weight: 700; font-size: 0.88rem; border-radius: 999px;
  border: none; cursor: pointer; font-family: inherit; transition: transform 0.15s, box-shadow 0.15s;
}
.btn--accent {
  background: var(--accent); color: var(--bg);
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn--accent:hover { transform: translateY(-1px); color: var(--bg); }
.btn--ghost {
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.rail-wrap { margin-bottom: 36px; }
.rail-wrap__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.rail-wrap__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: #fff; }
.process-rail {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.process-rail::-webkit-scrollbar { height: 4px; }
.process-rail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.rail-step {
  flex: 0 0 220px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px;
}
.rail-step__idx {
  font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  color: var(--accent); margin-bottom: 10px;
}
.rail-step h3 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.rail-step p { font-size: 0.84rem; color: var(--muted); }

.scope-strip {
  padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--accent-dim); border: 1px solid rgba(34, 211, 238, 0.2);
  font-size: 0.84rem; color: var(--muted); line-height: 1.6;
}

.stack-panels { display: flex; flex-direction: column; gap: 16px; }
.stack-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px 22px 28px; border-left: 4px solid var(--accent);
}
.stack-panel h2 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.stack-panel p { color: var(--muted); font-size: 0.9rem; margin-bottom: 8px; }
.stack-panel p:last-child { margin-bottom: 0; }
.stack-panel strong { color: var(--text); }

.compare-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 0.88rem; }
.compare-table th {
  padding: 14px 16px; text-align: left; font-family: var(--font-display);
  font-weight: 700; border-bottom: 2px solid var(--border);
}
.compare-table th.col-yes { color: var(--ok); }
.compare-table th.col-no { color: var(--danger); }
.compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.compare-table tr:hover td { background: rgba(255,255,255,0.02); }

.faq-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.faq-tabs__btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: 0.82rem;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.faq-tabs__btn.active, .faq-tabs__btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
}
.acc-list { display: flex; flex-direction: column; gap: 10px; }
.acc-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.acc-trigger {
  width: 100%; text-align: left; padding: 16px 18px; background: none; border: none;
  color: #fff; font-weight: 700; font-size: 0.92rem; cursor: pointer; font-family: inherit;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.acc-trigger::after { content: '+'; color: var(--accent); font-size: 1.2rem; font-weight: 400; }
.acc-item.is-open .acc-trigger::after { content: '−'; }
.acc-body { padding: 0 18px 16px; color: var(--muted); font-size: 0.88rem; display: none; }
.acc-item.is-open .acc-body { display: block; }

.form-panel {
  max-width: 520px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 0.92rem;
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim);
}
.pill-select { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-select .pill {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--muted); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.pill-select .pill.active, .pill-select .pill:hover {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
}
.form-note { font-size: 0.78rem; color: var(--muted); line-height: 1.55; margin-top: 16px; }
.contact-aside {
  margin-top: 28px; padding: 20px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.contact-aside h3 { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.contact-aside p { font-size: 0.88rem; color: var(--muted); margin-bottom: 6px; }

.wizard { max-width: 560px; }
.wizard__dots { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard__dot {
  flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background 0.3s;
}
.wizard__dot.active { background: var(--accent); }
.wizard__step[hidden] { display: none; }
.wizard__nav { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }
.wizard__prev:disabled { opacity: 0.35; cursor: not-allowed; }

.legal-panel {
  max-width: 680px; margin: 0 auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px;
}
.legal-panel h2 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: #fff; margin: 28px 0 10px;
}
.legal-panel h2:first-of-type { margin-top: 0; }
.legal-panel p, .legal-panel li { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.legal-panel ul { padding-left: 20px; margin-bottom: 12px; }
.legal-panel strong { color: var(--text); }

.app-footer {
  padding: 24px 28px; border-top: 1px solid var(--border); background: var(--surface);
  font-size: 0.78rem; color: var(--muted);
}
.app-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.app-footer h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: 10px; }
.app-footer ul { list-style: none; }
.app-footer li { margin-bottom: 6px; }
.app-footer a { color: var(--muted); }
.app-footer a:hover { color: var(--accent); }
.app-footer__scope { margin-top: 10px; font-size: 0.76rem; line-height: 1.55; opacity: 0.85; }
.app-footer__bottom { padding-top: 16px; border-top: 1px solid var(--border); }

.cookie-banner {
  position: fixed; bottom: 0; left: var(--sidebar-w); right: 0; z-index: 300;
  background: var(--surface-2); border-top: 1px solid var(--border);
  padding: 16px 24px; transform: translateY(110%); transition: transform 0.3s;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; max-width: 900px; }
.cookie-banner p { font-size: 0.82rem; color: var(--muted); flex: 1; min-width: 200px; }
.cookie-banner__actions { display: flex; gap: 8px; }
.cookie-btn {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text); font-weight: 600; font-size: 0.82rem; cursor: pointer; font-family: inherit;
}
.cookie-btn--accept { background: var(--accent); color: var(--bg); border-color: var(--accent); }

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-100%); transition: transform 0.3s;
    box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .topbar { display: flex; }
  .cookie-banner { left: 0; }
  .bento__cell--hero, .bento__cell--stat, .bento__cell--wide, .bento__cell--cta { grid-column: span 12; }
  .app-footer__grid { grid-template-columns: 1fr 1fr; }
  .legal-panel { padding: 24px 20px; }
}

@media (max-width: 560px) {
  .content { padding: 20px 16px 36px; }
  .app-footer__grid { grid-template-columns: 1fr; }
}
