/* shell.css — Veriqo unified app shell
   Nav, module panel routing, lock tease, shared chrome.
   Depends on tokens.css being loaded first. */

/* ── Reset + base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--vq-font);
  background: var(--vq-bg);
  color: var(--vq-ink);
  -webkit-font-smoothing: antialiased;
}

/* ── App root ─────────────────────────────────────────────── */
.vq-app {
  min-height: 100vh;
  max-width: var(--shell-max-width);
  margin: 0 auto;
  background: var(--vq-bg);
  position: relative;
  padding-bottom: var(--shell-nav-height);
}

/* ── Module panels ────────────────────────────────────────── */
.module-panel {
  display: none;
  min-height: calc(100vh - var(--shell-nav-height));
}
.module-panel.active {
  display: block;
}

/* ── Toast — override inline style to sit above the nav ──── */
.toast {
  bottom: calc(var(--shell-nav-height) + 12px) !important;
}
@media (min-width: 768px) {
  .toast {
    bottom: 24px !important;
    left: calc(var(--shell-sidebar-width) + 50%) !important;
    transform: translateX(-50%) !important;
  }
}

/* ── Nav brand (sidebar only — hidden on mobile) ─────────── */
.nav-brand { display: none; }

/* ── Bottom nav (mobile) ──────────────────────────────────── */
.shell-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--shell-max-width);
  height: var(--shell-nav-height);
  background: var(--vq-surface);
  border-top: 1px solid var(--vq-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.07);
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--vq-font);
  color: var(--vq-muted);
  transition: color 0.2s;
  padding: 6px 4px 4px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
/* Active pill: sits behind icon + label */
.nav-tab::before {
  content: '';
  position: absolute;
  inset: 7px 5px;
  border-radius: 14px;
  background: transparent;
  transition: background 0.2s;
  z-index: 0;
}
.nav-tab.active::before { background: rgba(45, 122, 58, 0.18); }
.nav-tab:active { opacity: 0.7; }
.nav-tab.active { color: var(--vq-green); }
.nav-tab.active .nav-icon { color: var(--vq-green); transform: translateY(-1px); }
.nav-tab.active .nav-label { font-weight: 700; color: var(--vq-green); }

.nav-icon {
  font-size: 21px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}
.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  position: relative;
  z-index: 1;
  color: var(--color-text-secondary);
}

/* Lock badge on locked nav tabs */
.nav-lock {
  position: absolute;
  top: -3px;
  right: -6px;
  font-size: 9px;
  color: var(--vq-muted);
  line-height: 1;
}
.nav-tab.locked .nav-label { color: var(--vq-subtle); }
.nav-tab.locked .nav-icon  { color: var(--vq-subtle); }
.nav-tab.locked:active { opacity: 0.5; }

/* ── Desktop sidebar ──────────────────────────────────────── */
@media (min-width: 768px) {
  .vq-app {
    max-width: 100%;
    padding-bottom: 0;
    padding-left: var(--shell-sidebar-width);
  }

  .shell-nav {
    left: 0;
    transform: none;
    top: 0;
    bottom: 0;
    width: var(--shell-sidebar-width);
    max-width: var(--shell-sidebar-width);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    border-top: none;
    border-right: 1px solid var(--vq-border);
    box-shadow: none;
    padding: 0;
    padding-top: 24px;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 24px;
    border-bottom: 1px solid var(--vq-border);
    margin-bottom: 12px;
  }
  .nav-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--vq-ink);
    letter-spacing: -0.3px;
  }
  .nav-brand-name span { color: var(--vq-green); }

  .nav-tab {
    flex-direction: row;
    flex: none;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--vq-radius-md);
    margin: 0 8px 2px;
    width: calc(var(--shell-sidebar-width) - 16px);
  }
  .nav-tab::before { display: none; }
  .nav-tab.active {
    background: var(--vq-green-light);
  }
  .nav-tab.active .nav-icon { transform: none; }
  .nav-icon { font-size: 18px; }
  .nav-label { font-size: 14px; font-weight: 600; }

  .nav-spacer { flex: 1; }

  .module-panel {
    min-height: 100vh;
    max-width: calc(100% - var(--shell-sidebar-width));
    /* already offset by padding-left on .vq-app */
  }
}

/* ── Module greeting block ───────────────────────────────── */
.vq-module-greeting {
  padding: 16px 16px 4px;
}
.vq-module-greeting-hello {
  font-size: 18px;
  font-weight: 700;
  color: var(--vq-ink);
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.vq-module-greeting-biz {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ── Locked module tease screen ───────────────────────────── */
.module-tease {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 32px 24px;
  text-align: center;
  gap: 16px;
}
.tease-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vq-green);
  margin-bottom: 4px;
}
.tease-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--vq-ink);
  letter-spacing: -0.3px;
}
.tease-value {
  font-size: 15px;
  color: var(--vq-muted);
  max-width: 280px;
  line-height: 1.5;
}
.tease-preview {
  background: var(--vq-surface);
  border: 1px solid var(--vq-border);
  border-radius: var(--vq-radius-lg);
  padding: 16px;
  width: 100%;
  max-width: 320px;
  text-align: left;
}
.tease-preview-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--vq-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.tease-preview-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--vq-green);
  margin-bottom: 4px;
}
.tease-preview-sub {
  font-size: 12px;
  color: var(--vq-muted);
}
.tease-cta {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 14px;
  background: var(--vq-green);
  color: #fff;
  border: none;
  border-radius: var(--vq-radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--vq-font);
  text-decoration: none;
  text-align: center;
}
.tease-cta:active { opacity: 0.85; }

/* ── Inline nudge banner ──────────────────────────────────── */
.module-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--vq-green-pale);
  border: 1px solid var(--vq-green-light);
  border-radius: var(--vq-radius-md);
  padding: 10px 14px;
  margin: 8px 16px;
  font-size: 13px;
  color: var(--vq-green-dark);
}
.module-nudge a {
  color: var(--vq-green);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}
.module-nudge-dismiss {
  background: none;
  border: none;
  color: var(--vq-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
  font-family: var(--vq-font);
  line-height: 1;
}

/* ── Toast (shared) ───────────────────────────────────────── */
.vq-toast {
  position: fixed;
  bottom: calc(var(--shell-nav-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 20px;
  display: none;
  z-index: 200;
  white-space: nowrap;
  font-family: var(--vq-font);
  background: var(--vq-ink);
  color: #fff;
  box-shadow: var(--vq-shadow-md);
}
.vq-toast.show { display: block; }

@media (min-width: 768px) {
  .vq-toast {
    bottom: 24px;
    left: calc(var(--shell-sidebar-width) + 50%);
    transform: translateX(-50%);
  }
}

/* ── Trial banner ─────────────────────────────────────────── */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--vq-green-light);
  border-bottom: 1px solid var(--vq-green-light);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--vq-green-dark);
}
.trial-banner a {
  color: var(--vq-green);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

/* ── Dashboard placeholder (Phase 1) ─────────────────────── */
.placeholder-panel {
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.placeholder-header {
  font-size: 22px;
  font-weight: 700;
  color: var(--vq-ink);
  letter-spacing: -0.3px;
}
.placeholder-card {
  background: var(--vq-surface);
  border: 1px solid var(--vq-border);
  border-radius: var(--vq-radius-lg);
  padding: 20px;
  color: var(--vq-muted);
  font-size: 14px;
  line-height: 1.6;
}
