/* Admin · Organisations — page-specific only; the shell, cards, pills and tables come from
   /shared/admin.css. */

/* Table tracks measured against the real longest values rather than the design's widths (the
   handoff's recurring defect 1). Longest name here is a full organisation name plus its uuid
   underneath, which is why that track is the flexible one and the rest are fixed:
     Stage    "At risk" pill with dot   ~104px
     Free Trial "Yes" / "No"             ~88px
     Products "13 / 13"                 ~86px
     People   3 digits                  ~64px
     Region   "UK"                      ~70px
     Added    "6 Aug 2026"              ~104px
   The organisation name remains flexible while the other six tracks have measured widths. */
.og-table { --adm-cols: minmax(240px, 2.6fr) 104px 88px 86px 64px 70px 104px; }
.og-team-table { --adm-cols: minmax(200px, 2fr) minmax(180px, 1.6fr) 132px 92px 104px; }

.og-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.og-name-copy { display: flex; flex-direction: column; gap: 2px; }
.og-trial-cell--active { color: #95530D; }
@media (max-width: 1000px) {
  .og-table .adm-thead { display: none; }
  .og-table .adm-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .og-trial-cell::before { content: "Free Trial: "; color: var(--adm-muted); }
}
.og-of { font-weight: 600; color: var(--adm-muted); }

/* Stage card beside the detail title. */
.og-stage-card {
  display: flex; align-items: center; gap: 13px;
  background: #fff; border: 1px solid var(--adm-line); border-radius: 16px; padding: 13px 16px;
  box-shadow: 0 2px 10px rgba(18, 38, 63, 0.04);
}
.og-stage-card--ok { background: var(--adm-ok-bg); border-color: var(--adm-ok-bd); }
.og-stage-card--warn { background: var(--adm-warn-bg); border-color: var(--adm-warn-bd); }
.og-stage-card--bad { background: var(--adm-bad-bg); border-color: var(--adm-bad-bd); }
.og-stage-card--idle { background: var(--adm-idle-bg); border-color: var(--adm-idle-bd); }
.og-stage-copy { display: flex; flex-direction: column; gap: 2px; }
.og-stage-title { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 15px; color: var(--adm-ink); }
.og-stage-note { font-size: 12.5px; color: var(--adm-muted); }
.og-trial-status { display: inline-flex; align-items: center; margin-left: 8px; padding: 3px 9px; border: 1px solid var(--adm-line); border-radius: 999px; color: var(--adm-muted); font-family: "Lexend", sans-serif; font-size: 11px; font-weight: 700; white-space: nowrap; }
.og-trial-status--active { color: #95530D; background: #FCF3E8; border-color: #F3D9AE; }


.og-usage { display: flex; flex-direction: column; gap: 12px; }
.og-usage-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 160px) 160px; gap: 14px; align-items: center; font-size: 14px; }

.og-empty-inline { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 26px 4px; line-height: 1.6; }
.og-empty-inline strong { font-family: "Lexend", sans-serif; font-size: 15px; color: var(--adm-ink); }

.og-invite { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.og-invite .adm-input { flex: 1; min-width: 240px; }
.og-invite .adm-select { width: 150px; }
.og-role { padding: 7px 10px; font-size: 13.5px; }
.og-caveat { line-height: 1.6; max-width: 760px; }

/* Toast for writes. */
.og-flash {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 14px);
  background: var(--adm-ink); color: #fff; border-radius: 12px; padding: 12px 20px;
  font-family: "Lexend", sans-serif; font-weight: 600; font-size: 14px;
  box-shadow: 0 14px 34px rgba(8, 16, 28, 0.3);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 90;
}
.og-flash--on { opacity: 1; transform: translate(-50%, 0); }
.og-flash--bad { background: #B03024; }

@media (max-width: 1100px) { .og-two { grid-template-columns: minmax(0, 1fr); } }

/* Detail: stats sit under the chart inside the wide column, so they should not stretch as far as the
   page-level rollup does. */
.og-detail-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Products tab: cards, matching the design's product grid rather than a table. */
.og-package { padding: 20px 24px; }
.og-package-note { margin: 6px 0 0; line-height: 1.6; max-width: 760px; }
.og-prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.og-prod-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.og-prod-card--on { border-color: #CFEDE0; background: #FBFEFC; }
.og-prod-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.og-prod-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.og-prod-name { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 15.5px; color: var(--adm-ink); }
.og-prod-desc { font-size: 13px; line-height: 1.55; color: var(--adm-muted); margin: 0; flex: 1; }
.og-prod-licence-note { font-size: 12px; line-height: 1.45; }
.og-prod-btn { align-self: flex-start; }
.og-prod-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.og-prod-actions .adm-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Activity panel on the org overview. */
.og-activity { display: flex; flex-direction: column; gap: 14px; }
.og-activity-figures { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; color: var(--adm-muted); }
.og-activity-figure strong { font-family: "Lexend", sans-serif; font-weight: 800; font-size: 20px; color: var(--adm-ink); margin-right: 5px; }
.og-spark { display: flex; align-items: flex-end; gap: 2px; height: 60px; }
.og-spark-bar { flex: 1; min-width: 2px; border-radius: 2px; background: var(--adm-info-dot); }
.og-activity-kinds { display: flex; gap: 8px; flex-wrap: wrap; }
.og-activity-note { line-height: 1.55; margin: 0; }

/* Activity chart on the org overview. */
.og-chart { height: 230px; }
/* The second series is dashed in the chart, so its legend swatch says so too. */
.og-legend-dash { background: repeating-linear-gradient(90deg, #14795A 0 5px, transparent 5px 9px) !important; }

/* Create-organisation modal (reuses shared .adm-modal-* chrome) */
.og-create-error { color: #C0392B; font-size: 13.5px; margin: 10px 0 0; }
.og-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.og-prod-check, .og-addme { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #16273F; cursor: pointer; }
.og-prod-check input, .og-addme input { flex: 0 0 auto; width: 16px; height: 16px; }
.og-addme { margin-top: 20px; font-weight: 600; }
.og-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* Add-organisation standards wizard (standards-wizard.js) — wider than the shared .adm-modal,
   because six question sections plus a review screen need the room the old two-field modal
   never did. */
.ogw-modal { width: 860px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; padding: 0; }
.ogw-head { flex: 0 0 auto; padding: 26px 30px 0; }
.ogw-head .adm-modal-head h2 { font-size: 23px; }
.ogw-eyebrow { font-family: "Lexend", sans-serif; font-weight: 800; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--adm-muted); margin-bottom: 5px; }
.ogw-blurb { font-size: 14.5px; color: var(--adm-muted); margin: 0 0 18px; line-height: 1.55; }
.ogw-stepper { display: flex; gap: 7px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--adm-line-soft); }
.ogw-step {
  display: flex; align-items: center; gap: 7px; background: #FBFCFE; border: 1.5px solid var(--adm-line-soft);
  color: var(--adm-muted); border-radius: 999px; padding: 7px 13px; cursor: pointer;
  font-family: "Lexend", sans-serif; font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.ogw-step.done { background: #fff; border-color: var(--adm-field); color: #3B4757; }
.ogw-step.active { background: var(--adm-ink); border-color: var(--adm-ink); color: #fff; font-weight: 700; }
.ogw-step.disabled { cursor: default; opacity: 0.6; }
.ogw-step-num {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 10px;
  color: inherit; opacity: 0.75; display: inline-flex; align-items: center; justify-content: center;
}
.ogw-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 30px; }
.ogw-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 16px 30px; border-top: 1px solid var(--adm-line-soft); }
.ogw-hint { flex: 1; min-width: 0; font-size: 12.5px; color: var(--adm-muted); }
.ogw-foot #ogwNext[aria-disabled="true"] { opacity: 0.55; cursor: default; }

.ogw-questions { display: flex; flex-direction: column; gap: 24px; }
.ogw-q--sub { padding-left: 18px; border-left: 2px solid var(--adm-info-bg); }
.ogw-q-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.ogw-q-code {
  flex: 0 0 auto; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 11px;
  color: var(--adm-muted); background: #F1F4FA; border: 1px solid var(--adm-line-soft); border-radius: 6px; padding: 2px 7px;
}
.ogw-q--sub .ogw-q-code { color: var(--adm-info-fg); background: var(--adm-info-bg); border-color: var(--adm-info-bd); }
.ogw-q-label { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 16px; color: var(--adm-ink); }
.ogw-q--sub .ogw-q-label { font-size: 14.5px; }
.ogw-q-note { font-size: 11.5px; color: var(--adm-muted); }
.ogw-q-hint { font-size: 12.5px; color: var(--adm-muted); margin: 0 0 10px; line-height: 1.5; }

.ogw-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ogw-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--adm-field);
  color: #5B6675; border-radius: 999px; padding: 8px 14px; cursor: pointer;
  font-family: "Lexend", sans-serif; font-weight: 600; font-size: 13px; text-align: left;
}
.ogw-chip.on { background: var(--adm-ink); border-color: var(--adm-ink); color: #fff; }
.ogw-chip.on.unsure { background: var(--adm-warn-bg); border-color: var(--adm-warn-bd); color: var(--adm-warn-fg); }
.ogw-chip--sm { padding: 6px 11px; font-size: 12px; }
.ogw-chip--sm.on { background: var(--adm-info-bg); border-color: var(--adm-info-bd); color: var(--adm-info-fg); }

.ogw-signals { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.ogw-signal-mkt { background: #FBFCFE; border: 1px solid var(--adm-line-soft); border-radius: 13px; padding: 13px 15px; }
.ogw-signal-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; font-family: "Lexend", sans-serif; font-weight: 700; font-size: 13.5px; color: var(--adm-ink); }
.ogw-signal-tag { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 10.5px; color: var(--adm-ok-fg); background: var(--adm-ok-bg); border: 1px solid var(--adm-ok-bd); border-radius: 999px; padding: 2px 8px; }
.ogw-signal-tag.none { color: var(--adm-warn-fg); background: var(--adm-warn-bg); border-color: var(--adm-warn-bd); }
.ogw-signal-opts { display: flex; gap: 7px; flex-wrap: wrap; }
.ogw-signals-empty { padding: 16px; text-align: center; font-size: 13px; color: var(--adm-muted); border: 1.5px dashed var(--adm-field); border-radius: 12px; margin-top: 10px; }

.ogw-owner { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 8px; }
.ogw-owner-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ogw-owner-field > span { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--adm-muted); }

.ogw-review { display: flex; flex-direction: column; gap: 18px; }
.ogw-org-card { background: #fff; border: 1px solid var(--adm-line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.ogw-org-card h3 { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 16px; color: var(--adm-ink); margin: 0 0 8px; }
.ogw-org-card .og-prod-grid { margin-top: 4px; }
.ogw-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; }
.ogw-notice { background: var(--adm-warn-bg); border: 1px solid var(--adm-warn-bd); border-radius: 14px; padding: 18px 20px; }
.ogw-notice strong { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 15px; color: var(--adm-warn-fg); display: block; margin-bottom: 4px; }
.ogw-notice p { font-size: 13.5px; color: var(--adm-body); line-height: 1.55; margin: 0; }

.ogw-std-list { display: flex; flex-direction: column; gap: 10px; }
.ogw-std-card { background: #fff; border: 1px solid var(--adm-line); border-radius: 16px; padding: 15px 17px; }
.ogw-std-card.removed { background: #FBFCFE; border-color: var(--adm-line-soft); opacity: 0.72; }
.ogw-std-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ogw-std-name { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ogw-std-title { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 15px; color: var(--adm-ink); }
.ogw-std-actions { flex: 0 0 auto; display: flex; gap: 7px; flex-wrap: wrap; }
.ogw-act {
  background: #fff; border: 1.5px solid var(--adm-field); color: #5B6675; border-radius: 9px; padding: 7px 12px;
  cursor: pointer; font-family: "Lexend", sans-serif; font-weight: 600; font-size: 12px;
}
.ogw-act.on { background: var(--adm-ink); border-color: var(--adm-ink); color: #fff; }
.ogw-std-reason { font-size: 13px; color: var(--adm-muted); line-height: 1.5; margin: 8px 0 2px; }
.ogw-std-src { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10.5px; color: var(--adm-muted); }

.ogw-out { background: #FBFCFE; border: 1px solid var(--adm-line-soft); border-radius: 14px; overflow: hidden; }
.ogw-out-toggle { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; padding: 14px 18px; cursor: pointer; text-align: left; }
.ogw-out-chevron { display: inline-block; transition: transform .2s ease; color: var(--adm-muted); }
.ogw-out-chevron.open { transform: rotate(90deg); }
.ogw-out-title { flex: 1; min-width: 0; font-family: "Lexend", sans-serif; font-weight: 700; font-size: 13.5px; color: var(--adm-ink); }
.ogw-out-count { font-family: "Lexend", sans-serif; font-weight: 700; font-size: 12px; color: var(--adm-muted); }
.ogw-out-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--adm-line-soft); }
.ogw-out-copy { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ogw-out-copy strong { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 13.5px; color: #33404F; }
.ogw-out-copy span { font-size: 12.5px; color: var(--adm-muted); line-height: 1.45; }
