/* file: static/css/areas/site.css
   Page-specific static CSS extracted from base.html-derived templates
   (auth, admin, systemdocs, errors, components, subscription, misc) during the
   Decision 17 design-system sweep. Linked once from base.html so every
   base-derived page gets it. Tokens only — no color/size literals outside the
   documented allowlist. Reusable patterns belong in components.css, not here. */

/* ── subscription/upgrade.html — plan tier grid ── */
.reason-banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  background: hsl(var(--accent) / .1);
  color: hsl(var(--accent-strong));
  font-size: 13px;
  font-weight: 600;
}
.tier-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
}
.tier-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--card-border));
  border-radius: 10px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.tier-card.current { border-color: hsl(var(--primary)); border-width: 2px; }
.tier-badge {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 10px;
  border-radius: 4px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  white-space: nowrap;
}
.tier-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tier-price { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.tier-price span { font-size: 12px; font-weight: 400; color: hsl(var(--muted-foreground)); }
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  flex: 1;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.tier-features li { padding: 3px 0; }
.tier-features li::before { content: "·"; margin-right: 6px; font-weight: 700; }
.btn-upgrade {
  display: block;
  width: 100%;
  padding: 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.btn-upgrade:hover { opacity: .9; }
.btn-downgrade {
  display: block;
  width: 100%;
  padding: 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  background: transparent;
  color: hsl(var(--muted-foreground));
  border: 1px solid hsl(var(--border));
  cursor: pointer;
}
.btn-downgrade:hover { background: hsl(var(--secondary)); }
.btn-current {
  display: block;
  width: 100%;
  padding: 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: hsl(var(--primary) / .08);
  color: hsl(var(--primary));
  border: 0;
  cursor: default;
}
.btn-contact {
  display: block;
  width: 100%;
  padding: 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: hsl(var(--secondary));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  cursor: pointer;
  text-decoration: none;
}
.btn-contact:hover { background: hsl(var(--primary) / .06); text-decoration: none; }
.upgrade-flash {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

/* ── components/upload_and_detect.html — upload + detect zone ── */
.upload-zone {
  border: 2px dashed hsl(var(--border));
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: hsl(var(--card));
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: hsl(var(--accent));
  background: hsl(var(--accent) / 0.04);
}
.upload-zone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: hsl(var(--accent) / 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-zone-icon svg { width: 24px; height: 24px; stroke: hsl(var(--accent)); }
.upload-zone-title {
  font-size: 15px;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 4px;
}
.upload-zone-hint {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.upload-zone-formats {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}
.upload-zone-formats span {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.upload-detecting {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px;
  text-align: center;
}
.upload-detecting .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid hsl(var(--border));
  border-top-color: hsl(var(--accent));
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.upload-detecting-text {
  font-size: 13px;
  font-weight: 600;
  color: hsl(var(--foreground));
}
.upload-detecting-sub {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 3px;
}
.upload-hidden { display: none; }

/* ── components/app_footer.html — app-shell footer ── */
.app-footer {
  padding: 14px 24px;
  text-align: center;
  font-size: 11px;
  color: hsl(var(--muted-foreground));
  border-top: 1px solid hsl(var(--border));
}
.app-footer a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}
.app-footer-links a:hover,
.app-footer a:hover { color: hsl(var(--foreground)); }
.app-footer-sep { margin: 0 6px; opacity: .4; }

/* ── components/company_switcher.html (dark variant) ── */
.app-co-sw-dark { position: relative; margin-left: 8px; }
.app-co-sw-dark .w-co-menu-row-body { flex: 1; min-width: 0; }
.app-co-sw-dark-foot { border-top: 1px solid hsl(var(--border)); margin-top: 6px; }
.app-co-sw-dark-all { color: hsl(var(--muted-foreground)); }
.app-co-sw-ic { width: 16px; height: 16px; flex-shrink: 0; }

/* ── demo/progress.html (standalone) ── */
.demo-page {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.demo-title {
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.demo-events {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  max-width: 420px;
  width: 100%;
}
.demo-events div {
  padding: 4px 0;
  border-bottom: 1px solid hsl(var(--border));
}

/* ── notifications_stub.html (standalone) ── */
.stub-page {
  font-family: var(--font-sans);
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.stub-msg { text-align: center; }
.stub-msg h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.stub-msg p { font-size: 13px; color: hsl(var(--muted-foreground)); }

/* ── roles_explainer.html — info panel ── */
.roles-info { background: hsl(var(--muted) / 0.3); }
.roles-rule-list { list-style: decimal; padding-left: 1.25rem; }

/* ── settings_home.html — global document search ── */
.docsearch-icon {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: hsl(var(--muted-foreground));
}
.docsearch-input {
  padding: 9px 12px 9px 32px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  font-size: 13px;
}
.docsearch-results {
  left: 0;
  right: 0;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--card-border));
  border-radius: 8px;
  box-shadow: 0 8px 28px hsl(var(--foreground) / .18);
  z-index: 40;
  max-height: 420px;
  overflow-y: auto;
}
.docsearch-empty {
  padding: 14px;
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  text-align: center;
}
.docsearch-row {
  display: block;
  padding: 9px 12px;
  border-bottom: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
}
.docsearch-row-head { display: flex; align-items: baseline; gap: 8px; }
.docsearch-row-name { font-weight: 600; font-size: 13px; }
.docsearch-row-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: hsl(var(--muted-foreground));
}
.docsearch-row-snippet {
  margin-top: 3px;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
}
.settings-info { background: hsl(var(--muted) / 0.3); }

/* ── components/progress.html — failed-state title ── */
.progress-title--error { color: hsl(var(--destructive)); }
