/* Quality Board portal — clean landing page */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #0d5c46;
  --green-light: #0d5c4614;
  --text: #1d2b26;
  --muted: #6b7d76;
  --line: #e3ece8;
  --card-shadow: 0 2px 10px rgba(13, 92, 70, .08);
  --card-shadow-hover: 0 6px 22px rgba(13, 92, 70, .16);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #f6faf8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, #0e6a50 0%, #0d5c46 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.brand-name { font-weight: 700; font-size: 1.15rem; letter-spacing: .2px; color: #fff; }
.lang-btn {
  border: 1px solid rgba(255, 255, 255, .4);
  background: transparent;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .9rem;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
}
.lang-btn:hover { background: rgba(255, 255, 255, .15); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Shared sign-in (one Quality Board account for all apps) */
[hidden] { display: none !important; }
.signin-btn { background: rgba(255,255,255,.12); }
.qb-user-wrap { position: relative; display: inline-flex; }
.qb-user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff;
  padding: 5px 12px 5px 6px; font-family: inherit; font-size: .9rem;
  font-weight: 600; cursor: pointer; max-width: 200px;
}
.qb-user-chip:hover { background: rgba(255,255,255,.22); }
.qb-user-chip #qb-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.qb-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(13,92,70,.14); padding: 6px; min-width: 140px;
}
.qb-menu button, .qb-menu a {
  display: block; width: 100%; text-align: left; border: none; background: none;
  font-family: inherit; font-size: .9rem; padding: 8px 12px; border-radius: 7px;
  cursor: pointer; color: var(--text); text-decoration: none; box-sizing: border-box;
}
.qb-menu button:hover, .qb-menu a:hover { background: var(--green-light); }
.qb-menu-agent-stats {
  font-size: .76rem !important; color: var(--muted) !important;
  padding-top: 0 !important; white-space: normal; line-height: 1.4;
}

.auth-card { max-width: 420px; padding-bottom: 20px; }
.auth-title { font-size: 1.25rem; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: .88rem; margin: 8px 0 16px; }
#auth-form [data-view] { display: flex; flex-direction: column; gap: 10px; text-align: left; }
#auth-form input {
  font-family: inherit; font-size: .95rem; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; width: 100%;
}
#auth-form input:focus { outline: 2px solid #0d5c4655; border-color: var(--green); }
.auth-btn { align-self: stretch; margin-top: 4px; padding: 10px; animation: none; }
.auth-btn:disabled { opacity: .6; cursor: default; }
.auth-links { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 12px; }
.auth-links a { color: var(--green); font-weight: 600; }
.auth-msg { min-height: 1.2em; font-size: .85rem; margin-top: 10px; text-align: center; }
.auth-msg.err { color: #b3261e; }
.auth-msg.ok { color: var(--green); }
.demo-chip {
  margin-top: 14px; align-self: center; font-family: inherit; font-size: .8rem;
  font-weight: 600; color: var(--green); background: var(--green-light);
  border: 1px dashed var(--green); border-radius: 999px; padding: 6px 16px;
  cursor: pointer;
}
.demo-chip:hover { background: #d4ebe0; }

/* Hero */
.hero { text-align: center; padding: 52px 20px 40px; animation: fadeUp .6s ease-out both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 700; color: #134e3f; letter-spacing: -.02em; }
.hero h1 .accent {
  background: linear-gradient(120deg, #0d5c46 20%, #1aa478 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { margin-top: 6px; color: var(--muted); font-size: 1.05rem; }
/* App search */
.svc-list-wrap { position: relative; max-width: 540px; margin: 22px auto 0; }
/* category filter chips + section headers */
.svc-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.svc-chips::-webkit-scrollbar { display: none; }
.svc-chip {
  flex-shrink: 0; border: 1.5px solid #c9dcd2; background: #fff; color: var(--muted);
  border-radius: 999px; padding: 6px 16px; font: inherit; font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.svc-chip:hover { border-color: var(--green); color: var(--green); }
.svc-chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.svc-cat {
  padding: 10px 16px 4px; font-size: .72rem; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: #7d968b; background: #fff;
}
.svc-cat:first-child { padding-top: 12px; }
.search-hits {
  margin-top: 10px;
  /* scroll shadows: a soft shadow appears at whichever edge still has
     hidden content — pure CSS (white covers scroll with the content) */
  background:
    linear-gradient(#fff 30%, rgba(255,255,255,0)) center top / 100% 34px no-repeat local,
    linear-gradient(rgba(255,255,255,0), #fff 70%) center bottom / 100% 34px no-repeat local,
    radial-gradient(farthest-side at 50% 0, rgba(13,92,70,.18), rgba(13,92,70,0)) center top / 100% 12px no-repeat scroll,
    radial-gradient(farthest-side at 50% 100%, rgba(13,92,70,.18), rgba(13,92,70,0)) center bottom / 100% 12px no-repeat scroll,
    #fff;
  border: 1.5px solid #a8cbbd;
  border-top: 0;
  border-radius: 16px;
  box-shadow: var(--card-shadow-hover);
  /* ~5 rows visible; the 6th half-peeks at the bottom edge as a scroll cue */
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 30;
  scrollbar-width: thin;
  scrollbar-color: #b9d2c8 transparent;
}
.search-hits::-webkit-scrollbar { width: 6px; }
.search-hits::-webkit-scrollbar-thumb { background: #b9d2c8; border-radius: 3px; }
.search-hits::-webkit-scrollbar-track { background: transparent; }
.search-hits::before {
  content: ""; display: block; height: 5px;
  background: linear-gradient(90deg, #0d5c46 0%, #1aa478 45%, #d99a2b 100%);
}
/* edge fades — appear only when content is hidden in that direction (JS) */
.svc-fade {
  position: absolute; left: 2px; right: 2px; z-index: 5; pointer-events: none;
  height: 34px; opacity: 0; transition: opacity .3s ease;
}
.svc-fade.up {
  top: 5px; border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, #fff 15%, rgba(255,255,255,0));
}
.svc-fade.down {
  bottom: 0; border-radius: 0 0 14px 14px;
  background: linear-gradient(0deg, #fff 15%, rgba(255,255,255,0));
}
.svc-fade:not(.off) { opacity: 1; }
.search-hits button {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 12px 16px;
  border: 0; border-bottom: 1px solid #e7efeb;
  background: #fff;
  font: inherit; font-size: .95rem; font-weight: 700;
  text-align: left; cursor: pointer; color: var(--text);
  transition: background .12s ease;
}
.search-hits button:last-of-type { border-bottom: 0; }
.search-hits .hit-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.search-hits .hit-main { flex: 1; min-width: 0; color: var(--acc, var(--text)); }
.search-hits .hit-go {
  margin-left: auto; flex-shrink: 0; align-self: center;
  font-size: 1.35rem; font-weight: 400; line-height: 1;
  color: #b6cec4; transition: color .12s ease, transform .12s ease;
}
.search-hits button:hover, .search-hits button.active {
  background: #eaf5ef;
}
.search-hits button:hover .hit-go, .search-hits button.active .hit-go {
  color: var(--acc, var(--green)); transform: translateX(2px);
}
.info-hint {
  margin: 10px 0 14px; text-align: center;
  font-size: .85rem; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.info-hint-ic {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #d4e4dc; background: #fff;
  color: #7ba696; font-weight: 800; font-size: .72rem; font-style: italic;
  font-family: Georgia, serif;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
/* hybrid rows: main button opens the service directly, ⓘ opens the info modal */
.search-hits .hit-row {
  display: flex; align-items: center;
  border-bottom: 1px solid #e7efeb;
  background: #fff;
  transition: background .12s ease;
}
.search-hits .hit-row:hover { background: #eaf5ef; }
.search-hits .hit-row:last-of-type { border-bottom: 0; }
.search-hits .hit-open {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 13px;
  padding: 12px 4px 12px 16px;
  border: 0 !important; background: none !important;
  font: inherit; font-size: .95rem; font-weight: 700;
  text-align: left; cursor: pointer; color: var(--text);
  width: auto !important;
}
.search-hits .hit-info {
  flex-shrink: 0;
  width: 30px !important; height: 30px;
  margin-right: 10px; padding: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--acc, var(--green)) 55%, #fff) !important;
  background: color-mix(in srgb, var(--acc, var(--green)) 10%, #fff) !important;
  color: var(--acc, var(--green)); font-weight: 800; font-size: .82rem; font-style: italic;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: Georgia, serif;
}
.search-hits .hit-info:hover { background: color-mix(in srgb, var(--acc, var(--green)) 22%, #fff) !important; border-color: var(--acc, var(--green)) !important; }
.search-hits .hit-open.cat-tile { padding-top: 15px; padding-bottom: 15px; }
.search-hits .hit-open.cat-tile .hit-main { color: var(--green); font-size: 1.02rem; }
.search-hits .hit-back {
  display: block; width: 100%; padding: 8px 16px;
  border: 0; border-bottom: 1px solid #e7efeb; background: #f4faf7;
  color: var(--green); font-size: .8rem; font-weight: 700; text-align: left; cursor: pointer;
}
.search-hits .hit-back:hover { background: #e7f3ec; }
.search-hits .hit-joined { color: var(--green); font-size: .74rem; font-weight: 700; margin-left: 4px; }
.search-hits .hit-desc { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.search-hits .hit-nosvc {
  display: block; border-top: 1px dashed #e8d9b8; color: #8a6518; font-style: italic; font-weight: 600;
  background: #fffaf0; padding: 10px 16px; font-size: .85rem;
}
.search-hits .hit-nosvc:hover, .search-hits .hit-nosvc.active { background: #fff3da; color: #9a6517; box-shadow: none; }
.fb-msg.ok { color: var(--green); }
.fb-msg.err { color: #b71c1c; }

/* App cards */
.apps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 300px));
  justify-content: center;
  padding: 20px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.app-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: linear-gradient(165deg, #ffffff 40%, #ddf0e7 100%);
  border: 2px solid #9fc4b4;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--card-shadow);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.app-card:not(.soon) { cursor: pointer; }
.app-card:not(.soon):hover { box-shadow: var(--card-shadow-hover); transform: translateY(-3px); border-color: var(--green); }
.app-card:not(.soon):focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.app-icon {
  flex: 0 0 auto;
  width: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-icon svg { width: 24px; height: 24px; }
.app-icon.tena { background: linear-gradient(180deg, #0e6a50 0%, #0d5c46 100%); }
.app-icon.soon-i { background: #9db8b0; }
.app-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px; flex: 1; }
.app-name { font-weight: 700; font-size: 1rem; }
.app-name-am { font-weight: 500; font-size: .82rem; color: var(--muted); }
.app-desc { color: var(--muted); font-size: .84rem; line-height: 1.32; }
.app-ctas { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.joined-chip {
  align-self: flex-start;
  font-size: .72rem;
  font-weight: 700;
  color: var(--green);
  background: #e6f4ef;
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 1px 9px;
}
.cta {
  padding: 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--green);
}
.cta.ghost { background: #fff; color: var(--green); }
.cta.ghost:hover { background: #e6f4ef; }
.cta.solid {
  background: var(--green);
  color: #fff;
  animation: cta-pulse 2.4s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 92, 70, .35); }
  50% { box-shadow: 0 0 0 7px rgba(13, 92, 70, 0); }
}
.cta.solid:hover { background: #0a4a38; }
.app-card.soon {
  opacity: .7;
  cursor: default;
  background: linear-gradient(165deg, #ffffff 55%, #f4f6f5 100%);
  border-style: dashed;
  border-color: #9db8b0;
  box-shadow: none;
}
.apps { animation: fadeUp .6s .12s ease-out both; }

/* Modal */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 40, 32, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 26px 26px 0;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(13, 60, 45, .25);
  text-align: center;
  border-top: 4px solid var(--green);
}
/* smart service modal — big visuals, 3 micro-steps, no paragraphs */
.svcm-head { text-align: center; }
.svcm-icon {
  width: 64px !important; height: 64px !important; border-radius: 18px !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.22);
  margin: 4px auto 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.svcm-icon svg { width: 34px; height: 34px; }
.svcm-desc { color: var(--muted); font-size: .92rem; margin: 0 0 4px; }
.svc-steps {
  list-style: none; margin: 20px 0 6px; padding: 0;
  display: flex; flex-direction: column; gap: 13px;
  text-align: left;
}
.svc-steps li {
  display: flex; align-items: center; gap: 14px;
  font-size: 1.08rem; font-weight: 600; color: var(--text);
  line-height: 1.35;
}
.svc-steps .n {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: color-mix(in srgb, var(--acc, var(--green)) 13%, #fff);
  color: var(--acc, var(--green));
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem;
  border: 1.5px solid color-mix(in srgb, var(--acc, var(--green)) 35%, #fff);
}
.svcm-note {
  margin: 16px 0 0; text-align: center;
  font-size: .84rem; color: var(--green); font-weight: 700;
}
.svcm-provider {
  margin: 12px 0 0; padding-top: 11px; text-align: center;
  border-top: 1px dashed #d4e4dc;
  font-size: .88rem; font-weight: 700; color: #b7791f;
}
#modal-svc .modal-card { max-width: 440px; }
#modal-svc .open-btn { margin-top: 6px; font-size: 1.05rem; padding: 13px 40px; }

.modal-scroll { overflow-y: auto; min-height: 0; }
.modal-actions { padding: 14px 0 18px; flex: 0 0 auto; display: flex; gap: 10px; justify-content: center; align-items: center; }
.modal-x {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-x:hover { background: var(--green-light); color: var(--text); }
.modal-lang {
  position: absolute;
  top: 12px;
  left: 14px;
  border: none;
  background: none;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-lang:hover { background: var(--green-light); color: var(--text); }
#modal-auth .modal-card { border-top-color: var(--green); }
.modal-head { display: flex; align-items: center; justify-content: center; gap: 12px; }
.modal-head h2 { font-size: 1.4rem; }
.modal-desc { color: var(--muted); margin-top: 10px; font-size: .98rem; }
/* Animated flow diagram (SMIL — no JS) */
.open-btn {
  display: inline-block;
  margin-top: 24px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  padding: 11px 26px;
  border-radius: 10px;
  text-decoration: none;
}
.open-btn:hover { background: #0a4a39; }

/* Announcement banner (QB_BANNER in config.js) — floating pill only,
   fades in after load; ✕ dismiss remembers per banner id */
#qb-banner-mini-wrap {
  position: fixed; right: 18px; bottom: 18px; z-index: 25;
  display: flex; align-items: center; gap: 6px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
#qb-banner-mini-wrap.show { opacity: 1; transform: none; }
.qb-banner-mini {
  background: linear-gradient(90deg, #b7791f, #d99a2b); color: #fff;
  font-weight: 700; font-size: .85rem; text-decoration: none;
  padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  animation: qbMiniPulse 20s ease-in-out infinite;
  max-width: min(70vw, 420px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qb-banner-mini:hover { transform: scale(1.06); }
@keyframes qbMiniPulse {
  0%, 88%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,.25); }
  94% { box-shadow: 0 4px 14px rgba(0,0,0,.25), 0 0 0 9px rgba(217,154,43,.35); }
}
#qb-banner-mini-x {
  background: rgba(0,0,0,.45); border: 0; color: #fff; opacity: .85;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  font-size: .75rem; line-height: 1; cursor: pointer; padding: 0;
}
#qb-banner-mini-x:hover { opacity: 1; background: rgba(0,0,0,.65); }
@media (prefers-reduced-motion: reduce) { .qb-banner-mini { animation: none; } #qb-banner-mini-wrap { transition: none; } }

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: .85rem;
  border-top: 3px solid var(--green);
  background: #ecf5f1;
}
footer a { color: var(--green); text-decoration: none; }
.qb-social { display: flex; gap: 16px; justify-content: center; margin-bottom: 6px; }
.qb-social a { color: var(--muted); display: inline-flex; }
.qb-social a:hover { color: var(--green); }
footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .apps { grid-template-columns: 1fr; }
}

:root {
  --purple: #4a3b8c;
  --purple-light: #ece8f8;
  --purple-hover: #3d3177;
}

.app-icon.adera { background: linear-gradient(180deg, #5a4bb5 0%, #4a3b8c 100%); }

/* Adera card — purple accents (scoped, TenaLink keeps green) */
.app-card.adera-card { border-color: #b9aee0; background: linear-gradient(165deg, #ffffff 40%, #e8e2f7 100%); }
.app-card.adera-card:hover { border-color: var(--purple); }
.adera-card .cta { border-color: var(--purple); }
.adera-card .cta.ghost { color: var(--purple); }
.adera-card .cta.ghost:hover { background: var(--purple-light); }
.adera-card .cta.solid { background: var(--purple); animation-name: cta-pulse-a; }
@keyframes cta-pulse-a {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 59, 140, .35); }
  50% { box-shadow: 0 0 0 7px rgba(74, 59, 140, 0); }
}
.adera-card .cta.solid:hover { background: var(--purple-hover); }
.adera-card .cl-label::before { background: var(--purple); }
.adera-card .cl-line b { color: var(--purple); }
.adera-card .cl-line b.c-clm { color: #b7791f; }

.app-icon.appt { background: linear-gradient(180deg, #c97b1f 0%, #a8640f 100%); }

/* Appointment card — amber accents (scoped, TenaLink keeps green) */
.app-card.appt-card { border-color: #e8c48f; background: linear-gradient(165deg, #ffffff 40%, #fbeee0 100%); }
.app-card.appt-card:hover { border-color: #b7791f; }
.appt-card .cta { border-color: #b7791f; }
.appt-card .cta.ghost { color: #b7791f; }
.appt-card .cta.ghost:hover { background: #fbeee0; }
.appt-card .cta.solid { background: #b7791f; animation-name: cta-pulse-appt; }
@keyframes cta-pulse-appt {
  0%, 100% { box-shadow: 0 0 0 0 rgba(183, 121, 31, .35); }
  50% { box-shadow: 0 0 0 7px rgba(183, 121, 31, 0); }
}
.appt-card .cta.solid:hover { background: #9c6514; }

.app-icon.logi { background: linear-gradient(180deg, #2f6db5 0%, #1f4f8c 100%); }

/* Logistics card — steel blue accents (scoped) */
.app-card.logi-card { border-color: #a9c4e4; background: linear-gradient(165deg, #ffffff 40%, #e3edf9 100%); }
.app-card.logi-card:hover { border-color: #2f6db5; }
.logi-card .cta { border-color: #2f6db5; }
.logi-card .cta.ghost { color: #2f6db5; }
.logi-card .cta.ghost:hover { background: #e3edf9; }
.logi-card .cta.solid { background: #2f6db5; animation-name: cta-pulse-logi; }
@keyframes cta-pulse-logi {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 109, 181, .35); }
  50% { box-shadow: 0 0 0 7px rgba(47, 109, 181, 0); }
}
.logi-card .cta.solid:hover { background: #1f4f8c; }

.app-icon.jobl { background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%); }

/* JobLink card — green accents (scoped; matches the app's --accent) */
.app-card.jobl-card { border-color: #a9d4ae; background: linear-gradient(165deg, #ffffff 40%, #e6f2e7 100%); }
.app-card.jobl-card:hover { border-color: #2e7d32; }
.jobl-card .cta { border-color: #2e7d32; }
.jobl-card .cta.ghost { color: #2e7d32; }
.jobl-card .cta.ghost:hover { background: #e6f2e7; }
.jobl-card .cta.solid { background: #2e7d32; animation-name: cta-pulse-jobl; }
@keyframes cta-pulse-jobl {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 125, 50, .35); }
  50% { box-shadow: 0 0 0 7px rgba(46, 125, 50, 0); }
}
.jobl-card .cta.solid:hover { background: #1b5e20; }

.app-icon.farm { background: linear-gradient(180deg, #ef6c00 0%, #e65100 100%); }

/* FarmLink card — harvest orange accents (scoped; matches the app's --accent) */
.app-card.farm-card { border-color: #f0c79f; background: linear-gradient(165deg, #ffffff 40%, #fbe9d8 100%); }
.app-card.farm-card:hover { border-color: #ef6c00; }
.farm-card .cta { border-color: #ef6c00; }
.farm-card .cta.ghost { color: #ef6c00; }
.farm-card .cta.ghost:hover { background: #fbe9d8; }
.farm-card .cta.solid { background: #ef6c00; animation-name: cta-pulse-farm; }
@keyframes cta-pulse-farm {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 108, 0, .35); }
  50% { box-shadow: 0 0 0 7px rgba(239, 108, 0, 0); }
}
.farm-card .cta.solid:hover { background: #e65100; }

.app-icon.dayl { background: linear-gradient(180deg, #b26a00 0%, #8f5300 100%); }

/* DayLink card — dawn amber accents (scoped; matches the app's --accent) */
.app-card.dayl-card { border-color: #eed9b8; background: linear-gradient(165deg, #ffffff 40%, #fdf0dc 100%); }
.app-card.dayl-card:hover { border-color: #b26a00; }
.dayl-card .cta { border-color: #b26a00; }
.dayl-card .cta.ghost { color: #b26a00; }
.dayl-card .cta.ghost:hover { background: #fdf0dc; }
.dayl-card .cta.solid { background: #b26a00; animation-name: cta-pulse-dayl; }
@keyframes cta-pulse-dayl {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178, 106, 0, .35); }
  50% { box-shadow: 0 0 0 7px rgba(178, 106, 0, 0); }
}
.dayl-card .cta.solid:hover { background: #8f5300; }

.app-icon.rentl { background: linear-gradient(180deg, #b7432c 0%, #93311f 100%); }

/* RentLink card — brick red accents (scoped; matches the app's --accent) */
.app-card.rentl-card { border-color: #ecc8bd; background: linear-gradient(165deg, #ffffff 40%, #f7e3dd 100%); }
.app-card.rentl-card:hover { border-color: #b7432c; }
.rentl-card .cta { border-color: #b7432c; }
.rentl-card .cta.ghost { color: #b7432c; }
.rentl-card .cta.ghost:hover { background: #f7e3dd; }
.rentl-card .cta.solid { background: #b7432c; animation-name: cta-pulse-rentl; }
@keyframes cta-pulse-rentl {
  0%, 100% { box-shadow: 0 0 0 0 rgba(183, 67, 44, .35); }
  50% { box-shadow: 0 0 0 7px rgba(183, 67, 44, 0); }
}
.rentl-card .cta.solid:hover { background: #93311f; }

.app-icon.carl { background: linear-gradient(180deg, #37474f 0%, #263238 100%); }

/* CarLink card — asphalt grey accents (scoped; matches the app's --accent) */
.app-card.carl-card { border-color: #cfd8dc; background: linear-gradient(165deg, #ffffff 40%, #eceff1 100%); }
.app-card.carl-card:hover { border-color: #37474f; }
.carl-card .cta { border-color: #37474f; }
.carl-card .cta.ghost { color: #37474f; }
.carl-card .cta.ghost:hover { background: #eceff1; }
.carl-card .cta.solid { background: #37474f; animation-name: cta-pulse-carl; }
@keyframes cta-pulse-carl {
  0%, 100% { box-shadow: 0 0 0 0 rgba(55, 71, 79, .35); }
  50% { box-shadow: 0 0 0 7px rgba(55, 71, 79, 0); }
}
.carl-card .cta.solid:hover { background: #263238; }

.app-icon.miki { background: linear-gradient(180deg, #5e35b1 0%, #4527a0 100%); }

/* MikirLink card — indigo accents (scoped; matches the app's --accent) */
.app-card.miki-card { border-color: #d9cdec; background: linear-gradient(165deg, #ffffff 40%, #ede7f6 100%); }
.app-card.miki-card:hover { border-color: #5e35b1; }
.miki-card .cta { border-color: #5e35b1; }
.miki-card .cta.ghost { color: #5e35b1; }
.miki-card .cta.ghost:hover { background: #ede7f6; }
.miki-card .cta.solid { background: #5e35b1; animation-name: cta-pulse-miki; }
@keyframes cta-pulse-miki {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 53, 177, .35); }
  50% { box-shadow: 0 0 0 7px rgba(94, 53, 177, 0); }
}
.miki-card .cta.solid:hover { background: #4527a0; }

/* Adera flow (purple theme, scoped) */
.adera-flow .albl { font-size: 12px; text-anchor: middle; fill: #4a5568; font-weight: 600; }
.aflow-word { font-size: 12px; font-weight: 700; fill: #6b54d8; text-anchor: middle; }
.abadge { display: none; }
.abadge circle { fill: var(--purple-light); stroke: var(--purple); stroke-width: 2; }
.abadge text { fill: var(--purple-hover); font-size: 13px; font-weight: bold; text-anchor: middle; }

/* Demo accounts reference card */
.demo-cols { max-height: 50vh; overflow-y: auto; }
.demo-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.demo-col b { display: block; margin-bottom: 4px; }
.demo-col .muted { font-size: .78rem; display: block; margin-bottom: 6px; }
.demo-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.demo-table td { padding: 3px 4px; border-top: 1px solid #eee; vertical-align: top; }
.demo-table code { font-size: .76rem; }

/* Full-screen loading overlay shown while bouncing to a subdomain */
#boot-load {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  background: #f6faf8;
}
.bl-ring {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--green);
  animation: spin .8s linear infinite;
}

/* Join-button busy spinner */
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.cta.dim { opacity: .55; }

.hero-stats { margin: 10px auto 0; font-size: .92rem; font-weight: 600; color: var(--green); }

/* ---- shared collapsible-list standards (all portal/admin pages) ---- */
/* Section-nav dropdown: pick one section, "Select…" placeholder by default */
.secnav { width: 100%; max-width: 340px; margin: 16px 0 4px; padding: 10px 12px;
  border: 1.5px solid var(--green); border-radius: 10px; font: inherit; font-weight: 700;
  font-size: 1rem; color: var(--green); background: #fff; cursor: pointer; }
.sec-h { font-size: 1.05rem; font-weight: 700; margin: 0 0 12px; color: var(--green); }
.qb-sec > .sec-h { display: none; } /* dropdown already names the section */

/* Accordion row: collapsed = name ▸ status/suggested; open = edit + save.
   Wire single-open with qbAccRows(container) after each render. */
details.acc-row { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
details.acc-row > summary { cursor: pointer; padding: 10px 14px; list-style: none;
  display: flex; align-items: baseline; gap: 8px;
  font-size: .92rem; border-radius: 9px; transition: background .15s, border-radius .15s; }
details.acc-row > summary::-webkit-details-marker { display: none; }
details.acc-row > summary::before { content: "+"; color: var(--green);
  font-weight: 800; font-size: 1.1rem; margin-right: 2px; }
details.acc-row > summary:hover { background: rgba(13,92,70,.07); }
details.acc-row:hover:not([open]) { border-color: rgba(13,92,70,.45); }
details.acc-row[open] { border-color: var(--green); border-left: 4px solid var(--green);
  box-shadow: 0 2px 10px rgba(13,92,70,.08); }
details.acc-row[open] > summary { background: rgba(13,92,70,.05);
  border-radius: 9px 9px 0 0; border-bottom: 1px solid var(--line); }
details.acc-row[open] > summary::before { content: "−"; }
details.acc-row .acc-meta { font-size: .78rem; color: var(--muted); font-weight: 400;
  margin-left: auto; }
details.acc-row .acc-body { padding: 0 14px 12px; }
details.acc-row .acc-body .adm-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
