/* components.css — reusable UI component patterns */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #008F5A; color: #fff; box-shadow: 0 8px 24px rgba(0,168,107,0.35); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-dark); }
.btn-secondary:hover { background: var(--surface-soft); color: var(--text); }
.btn-light { background: var(--surface); color: var(--text); border: 1px solid var(--border-dark); }
.btn-light:hover { background: var(--surface-soft); color: var(--text); }
.btn-ghost { color: var(--text-inverse); padding: 0.5rem 0.9rem; }
.btn-ghost:hover { color: var(--green-bright); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: var(--text-xs); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- Header (Shopify-style) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  border-bottom: 1px solid var(--border);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}
.site-header .header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  gap: var(--space-4);
}
.logo {
  display: flex; align-items: center; gap: var(--space-2);
  font-weight: 800; font-size: var(--text-lg); color: var(--text-inverse);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo img {
  height: 32px; width: auto;
  border-radius: 6px;
}
.logo-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800;
  flex-shrink: 0;
}

/* Nav with dropdowns (Workpay-style) */
.main-nav { display: none; gap: 0; align-items: center; }
.nav-item {
  position: relative;
}
.nav-item > a, .nav-item > button {
  display: flex; align-items: center; gap: 4px;
  color: var(--text);
  font-size: var(--text-sm); font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease);
  position: relative;
}
.nav-item > a::after, .nav-item > button::after {
  content: "";
  position: absolute;
  bottom: 0; left: 1rem; right: 1rem;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease);
}
.nav-item > a:hover, .nav-item > button:hover {
  color: var(--green);
}
.nav-item > a:hover::after, .nav-item > button:hover::after {
  transform: scaleX(1);
}
.nav-item > a.active, .nav-item > button.active {
  color: var(--green);
}
.nav-item > a.active::after, .nav-item > button.active::after {
  transform: scaleX(1);
}
.nav-item .nav-caret {
  font-size: 10px; transition: transform var(--dur-fast) var(--ease);
}
.nav-item:hover .nav-caret { transform: rotate(180deg); }

/* Dropdown mega menu (Workpay-style full-width) */
.nav-dropdown {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  padding: var(--space-6) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), visibility var(--dur-fast);
  z-index: 110;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.nav-item:hover .nav-dropdown, .nav-item:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .nav-dropdown-inner { grid-template-columns: repeat(3, 1fr); }
}
.dd-col-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-dark);
}
.dd-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease);
  margin-bottom: var(--space-1);
}
.dd-link:hover { background: var(--green-soft); color: var(--text); }
.dd-link .dd-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--green-soft);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.dd-link .dd-icon svg { width: 18px; height: 18px; stroke: var(--green); fill: none; }
.dd-link .dd-title { font-weight: 700; display: block; line-height: 1.3; }
.dd-link .dd-desc { font-size: var(--text-xs); color: var(--text-muted); display: block; margin-top: 2px; line-height: 1.4; }

/* Featured card inside dropdown */
.dd-feature {
  background: linear-gradient(135deg, var(--green-soft), var(--bg-soft));
  border-radius: var(--radius-md);
  padding: var(--space-5);
  border: 1px solid var(--border-dark);
}
.dd-feature .dd-feature-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}
.dd-feature h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}
.dd-feature p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}
.dd-feature .btn { font-size: var(--text-xs); padding: 0.5rem 1rem; }

.header-actions { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.menu-toggle { display: inline-flex; color: var(--text-inverse); padding: var(--space-2); align-items: center; }

.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 280px; max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
  transform: translateX(-100%);
  transition: transform var(--dur) var(--ease);
  z-index: 200;
  overflow-y: auto;
  padding-top: var(--space-3);
  padding-bottom: var(--space-6);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu a {
  display: block;
  padding: var(--space-3) var(--space-5);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-base);
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.mobile-menu a:hover { background: var(--bg-soft); color: var(--green); }
.mobile-menu a:first-child { border-top: none; }

/* Overlay for mobile menu */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
  z-index: 199;
}
.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Footer (Shopify-style) ---------- */
.site-footer {
  background: var(--bg);
  color: var(--text-inverse);
  padding-block: var(--space-8) var(--space-5);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.footer-brand .logo { margin-bottom: var(--space-3); }
.footer-brand p { color: var(--text-inverse-muted); font-size: var(--text-sm); max-width: 300px; }
.footer-col h5 {
  font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-inverse);
  margin-bottom: var(--space-3);
}
.footer-col a {
  display: block; color: var(--text-inverse-muted);
  font-size: var(--text-sm); padding: 5px 0;
  transition: color var(--dur-fast) var(--ease);
}
.footer-col a:hover { color: var(--green-bright); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-3);
  padding-top: var(--space-5);
}
.footer-status {
  font-size: var(--text-xs); color: var(--text-inverse-muted);
}
.footer-social { display: flex; gap: var(--space-3); }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.06);
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.footer-social a:hover { background: var(--green); color: #fff; }

/* Footer accordion (mobile) */
.footer-col-title {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.footer-chevron {
  width: 16px; height: 16px;
  transition: transform var(--dur) var(--ease);
  display: none;
}
.footer-col-links { overflow: hidden; }
.footer-col.open .footer-chevron { transform: rotate(180deg); }

@media (min-width: 768px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
  .footer-chevron { display: none; }
  .footer-col-links { max-height: none !important; }
}

@media (max-width: 767px) {
  .footer-chevron { display: block; }
  .footer-col-links { max-height: 0; transition: max-height var(--dur) var(--ease); }
  .footer-col.open .footer-col-links { max-height: 300px; }
  .footer-col-title { padding: var(--space-2) 0; }
}

/* ---------- Auth pages (Selar-style) ---------- */
.auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface-soft);
}
.auth-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border-dark);
}
.auth-header .logo { color: var(--text); }
.auth-header .logo-link { display: flex; align-items: center; gap: var(--space-2); font-weight: 800; font-size: var(--text-lg); color: var(--text); }
.auth-header .logo-link img { height: 32px; border-radius: 6px; }
.auth-body {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-6) var(--space-4);
}
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-7);
  width: 100%;
  max-width: 440px;
}
.auth-card h1 {
  font-size: var(--text-2xl);
  text-align: center;
  margin-bottom: var(--space-2);
}
.auth-card .auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
}
.auth-divider {
  display: flex; align-items: center; gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border-dark);
}
.auth-social {
  display: flex; flex-direction: column; gap: var(--space-3);
}
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--space-3);
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.social-btn:hover { background: var(--surface-soft); border-color: var(--text-muted); }
.social-btn .social-icon { width: 20px; height: 20px; }
.auth-footer {
  text-align: center;
  padding: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.auth-footer a { color: var(--green); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-tabs {
  display: flex; gap: 0; margin-bottom: var(--space-5);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.auth-tab {
  flex: 1; padding: 0.6rem; text-align: center;
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-soft);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.auth-tab.active { background: var(--green); color: #fff; }
.auth-otp-input {
  display: flex; gap: var(--space-2); justify-content: center;
}
.auth-otp-input input {
  width: 48px; height: 56px;
  text-align: center;
  font-size: var(--text-xl); font-weight: 800;
  border: 2px solid var(--border-dark);
  border-radius: var(--radius-sm);
}
.auth-otp-input input:focus { border-color: var(--green); outline: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card-dark {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.card.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-2); }
.card-body { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------- Status chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 600;
  background: var(--surface-soft); color: var(--text-muted);
}
.chip-green { background: var(--green-soft); color: #008F5A; }
.chip-blue { background: var(--blue-soft); color: #1d4ed8; }
.chip-amber { background: var(--amber-soft); color: #b45309; }
.chip-red { background: var(--red-soft); color: #b91c1c; }
.chip-dark { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- KPI cards ---------- */
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-card);
}
.kpi-label { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-value { font-size: var(--text-2xl); font-weight: 800; margin-top: 4px; }
.kpi-delta { font-size: var(--text-xs); font-weight: 600; margin-top: 4px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }

/* ---------- Chat bubbles ---------- */
.chat-msg {
  max-width: 80%;
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: var(--text-sm);
  line-height: 1.45;
  animation: msgIn var(--dur) var(--ease-out) both;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.agent {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-card);
}
.chat-msg .agent-tag {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--blue); margin-bottom: 2px;
}
.chat-list { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }

/* Typing indicator */
.typing-dots { display: inline-flex; gap: 4px; padding: 0.7rem 1rem; }
.typing-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted);
  animation: blink 1.4s infinite both;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }
.field label { font-size: var(--text-sm); font-weight: 600; }
.input, .textarea, .select {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,168,107,0.15);
}
.textarea { min-height: 80px; resize: vertical; }

/* Chat composer */
.composer {
  display: flex; gap: var(--space-2);
  padding: var(--space-3);
  background: var(--surface);
  border-top: 1px solid var(--border-dark);
}
.composer .input { flex: 1; }

/* ---------- Bottom dock ---------- */
.bottom-dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  background: var(--surface);
  border-top: 1px solid var(--border-dark);
  padding-bottom: calc(0.25rem + env(safe-area-inset-bottom));
  z-index: 90;
}
.dock-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-2) 0;
  color: var(--text-muted);
  font-size: 11px; font-weight: 600;
  transition: color var(--dur-fast) var(--ease);
}
.dock-item .dock-icon { font-size: 20px; line-height: 1; }
.dock-item.active { color: var(--green); }
.dock-item.active .dock-icon { transform: translateY(-2px); }

/* ---------- Tabs ---------- */
.tab-bar { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--border-dark); }
.tab-btn {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* ---------- Tables ---------- */
.table { width: 100%; font-size: var(--text-sm); }
.table th { text-align: left; padding: var(--space-3); color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-dark); }
.table td { padding: var(--space-3); border-bottom: 1px solid var(--border-dark); }
.table tr:hover td { background: var(--surface-soft); }

/* ---------- Ledger ---------- */
.ledger-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border-dark); font-size: var(--text-sm); }
.ledger-row.new { animation: highlightRow 1.6s var(--ease-out); }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; bottom: calc(var(--dock-h) + var(--space-4)); left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: var(--space-2);
  pointer-events: none;
}
.toast {
  background: var(--text); color: var(--surface);
  padding: 0.7rem 1.2rem; border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: 600;
  box-shadow: var(--shadow-lift);
  animation: toastIn var(--dur) var(--ease-out) both;
  pointer-events: auto;
}
.toast.success { background: var(--green); color: #fff; }
.toast.warn { background: var(--amber); color: #1a1206; }
.toast.exit { animation: toastOut var(--dur) var(--ease) both; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 300;
  padding: var(--space-4);
  animation: fadeIn var(--dur) var(--ease);
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 480px; width: 100%;
  padding: var(--space-6);
  box-shadow: var(--shadow-lift);
  animation: modalIn var(--dur) var(--ease-out);
  max-height: 90vh; overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); }
.modal-close { font-size: 24px; color: var(--text-muted); line-height: 1; }

/* Bottom sheet variant (mobile) */
.bottom-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--space-6);
  max-height: 85vh; overflow-y: auto;
  z-index: 300;
  animation: sheetUp var(--dur) var(--ease-out);
}

/* ---------- Stepper ---------- */
.stepper { display: flex; flex-direction: column; gap: var(--space-5); }
.step { display: flex; gap: var(--space-4); align-items: flex-start; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-soft); color: #008F5A;
  display: grid; place-items: center;
  font-weight: 800; font-size: var(--text-sm);
  flex-shrink: 0;
}
.step-content h4 { margin-bottom: 4px; }
.step-content p { font-size: var(--text-sm); color: var(--text-muted); }

/* Horizontal stepper (desktop) */
.stepper-horizontal { display: flex; gap: 0; overflow-x: auto; }
.stepper-horizontal .step { flex: 1; min-width: 160px; position: relative; }
.stepper-horizontal .step::after {
  content: ""; position: absolute; top: 18px; left: 36px; right: 0; height: 2px;
  background: var(--border-dark);
}
.stepper-horizontal .step:last-child::after { display: none; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: var(--space-4); }
.timeline-item { display: flex; gap: var(--space-3); }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); margin-top: 6px; flex-shrink: 0; }
.timeline-dot.blue { background: var(--blue); }
.timeline-dot.amber { background: var(--amber); }
.timeline-content { font-size: var(--text-sm); }
.timeline-time { font-size: var(--text-xs); color: var(--text-muted); }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center; padding: var(--space-7);
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: var(--space-3); }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-line.short { width: 60%; }

/* ---------- Channel pills ---------- */
.channel-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-xs); font-weight: 600;
  border: 1px solid var(--border-dark);
}

/* ---------- Agent card ---------- */
.agent-card {
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.agent-card:hover { transform: translateY(-4px); border-color: rgba(0,168,107,0.4); }
.agent-card .agent-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 22px;
  margin-bottom: var(--space-3);
}
.agent-card .agent-role { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.agent-card .agent-name { font-size: var(--text-lg); font-weight: 700; margin: 4px 0 var(--space-3); }
.agent-card .agent-action { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-3); }

/* ---------- Use case card ---------- */
.usecase-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur-fast) var(--ease);
  border: 2px solid transparent;
}
.usecase-card:hover, .usecase-card.active { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--green); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  color: var(--text-inverse);
  padding-block: var(--space-8) var(--space-5);
}
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-6); }
.footer-col h5 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-inverse-muted); margin-bottom: var(--space-3); }
.footer-col a { display: block; color: var(--text-inverse-muted); font-size: var(--text-sm); padding: 4px 0; }
.footer-col a:hover { color: var(--green-bright); }
.footer-status { font-size: var(--text-xs); color: var(--text-inverse-muted); border-top: 1px solid var(--border); padding-top: var(--space-4); margin-top: var(--space-5); }

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
}

/* ---------- Progress bar ---------- */
.progress-track { height: 8px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width var(--dur-slow) var(--ease); }

/* ---------- Donut / ring ---------- */
.ring {
  --p: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-soft) 0);
  display: grid; place-items: center;
  position: relative;
}
.ring::before {
  content: ""; position: absolute; inset: 8px;
  background: var(--surface); border-radius: 50%;
}
.ring span { position: relative; font-weight: 800; font-size: var(--text-sm); }

/* ---------- Sparkline ---------- */
.sparkline { width: 100%; height: 40px; }

/* ---------- Mini bar chart ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 80px; }
.bar-chart .bar { flex: 1; background: var(--green); border-radius: 4px 4px 0 0; min-height: 4px; transition: height var(--dur-slow) var(--ease); }
.bar-chart .bar.alt { background: var(--blue); }

/* ---------- Device frame ---------- */
.device-frame {
  width: 280px; margin-inline: auto;
  border-radius: 32px;
  background: var(--surface);
  padding: 12px;
  box-shadow: var(--shadow-lift);
  border: 1px solid var(--border-dark);
}
.device-screen {
  background: var(--surface-soft);
  border-radius: 22px;
  overflow: hidden;
  min-height: 480px;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs span { color: var(--text); }
