:root {
  --bg-void: #0B0D12;
  --bg-void-soft: #12151C;
  --bg-canvas: #F1F2ED;
  --card: #FFFFFF;
  --accent-lime: #CFFF5C;
  --accent-lime-dim: #A9D94A;
  --accent-teal: #43D9C8;
  --ink: #14161C;
  --ink-muted: #6D7280;
  --line: #E4E6E0;
  --line-dark: #262A33;
  --radius: 18px;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden; /* single-view: no scroll de página en desktop */
}

button { font-family: inherit; cursor: pointer; }

/* ---------- APP SHELL ---------- */
.app-shell {
  display: grid;
  grid-template-columns: 264px 1fr;
  height: 100dvh;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  background: var(--bg-void);
  color: #EDEFE7;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 24px 10px;
}
.brand-mark {
  color: var(--accent-lime);
  font-size: 20px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #C7CAC0;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: var(--bg-void-soft); color: #fff; }
.nav-item.active {
  background: var(--accent-lime);
  color: #10130B;
  font-weight: 600;
}
.nav-icon { width: 18px; text-align: center; opacity: .9; font-size: 15px; }

.hablemos-btn {
  margin-top: 12px;
  background: var(--bg-void-soft);
  border: 1px solid var(--line-dark);
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14.5px;
}
.hablemos-btn:hover { border-color: var(--accent-teal); }
.hablemos-dots { display: flex; gap: 4px; }
.hablemos-dots .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-teal);
}
.hablemos-dots .dot:nth-child(2) { opacity: .6; }
.hablemos-dots .dot:nth-child(3) { opacity: .3; }

/* ---------- MAIN ---------- */
.main {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.main-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 6px 0;
}
.main-header h1 {
  font-family: var(--font-display);
  font-size: 34px;
  margin: 0;
  letter-spacing: -0.02em;
}
.tagline { color: var(--ink-muted); margin: 6px 0 0 0; font-size: 15px; }

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(67,217,200,.18);
}
.mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); letter-spacing: .04em; }

/* ---------- GRID (bento) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, 1fr);
  gap: 16px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(10,12,18,.08);
  border-color: var(--accent-lime-dim);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--bg-void);
  color: var(--accent-lime);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.card-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 14px 0 4px 0;
}
.card p {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Feature card (Hablemos) spans wider */
.card.feature { grid-column: span 2; background: var(--bg-void); color: #fff; border: none; }
.card.feature .card-icon { background: var(--accent-lime); color: #10130B; }
.card.feature h3 { color: #fff; }
.card.feature p { color: #A9ADA0; }
.card.feature .card-count { border-color: var(--line-dark); color: #A9ADA0; }

/* ---------- MOBILE NAV (hidden on desktop) ---------- */
.mobile-nav { display: none; }

/* ---------- SLIDE-OVER PANEL ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(11,13,18,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.panel {
  position: fixed;
  top: 0; right: 0;
  width: min(440px, 92vw);
  height: 100dvh;
  background: var(--card);
  z-index: 50;
  transform: translateX(100%);
  transition: transform .25s ease;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 40px rgba(0,0,0,.15);
}
.panel.open { transform: translateX(0); }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.panel-head h2 { font-family: var(--font-display); margin: 0; font-size: 24px; }
.close-btn {
  background: var(--bg-canvas);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 14px;
}
.panel-desc { color: var(--ink-muted); font-size: 14px; margin: 8px 0 20px 0; }
.panel-items { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }

.item-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
}
.item-row:hover { border-color: var(--accent-lime-dim); }
.item-row-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-row h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.item-row p { margin: 0; font-size: 13px; color: var(--ink-muted); }
.item-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  background: var(--accent-lime);
  color: #10130B;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.empty-state { color: var(--ink-muted); font-size: 14px; padding: 20px 0; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card.feature { grid-column: span 2; }
}

@media (max-width: 640px) {
  html, body { overflow: auto; }
  .app-shell { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  .sidebar { display: none; }
  .main { padding: 20px 16px 96px 16px; }
  .main-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .grid { grid-template-columns: 1fr; overflow: visible; }
  .card.feature { grid-column: span 1; }

  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-void);
    padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
    z-index: 30;
  }
  .mobile-nav-item {
    background: none; border: none; color: #9AA093;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 9.5px; padding: 4px 6px;
  }
  .mobile-nav-item.active { color: var(--accent-lime); }
  .mobile-nav-item .mn-icon { font-size: 16px; }
}
