/* 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
     Products "13 / 13"                 ~86px
     People   3 digits                  ~64px
     Region   "UK"                      ~70px
     Added    "6 Aug 2026"              ~104px
   Fixed floors 428px + 5 gaps (70px) + padding (44px) = 542px, comfortably inside the card. */
.og-table { --adm-cols: minmax(240px, 2.6fr) 104px 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-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-usage { display: flex; flex-direction: column; gap: 12px; }
.og-usage-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 160px) 118px; 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-btn { align-self: flex-start; }

/* 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; }
