/* Administration layouts use the shared accounting and workflow components. */
#platform .btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  text-decoration:none;
  white-space:nowrap;
}
#platform .btn:disabled {opacity:.55;cursor:wait}
#platform :is(a,summary):focus-visible {outline:3px solid #4c89a9;outline-offset:3px}
#platform .field {min-width:0}
#platform .message {margin:0;border-radius:10px;padding:10px 12px;background:#fbe8ee;color:#9d302c}
#platform [hidden] {display:none}
.platform-loading {max-width:900px}

.platform-auth {
  display:grid;
  place-items:center;
}
.platform-auth .auth-card {
  width:min(100%,430px);
  padding:clamp(22px,5vw,34px);
}
.auth-card .workflow-title {margin:26px 0 20px}
.auth-card .sub, .platform-heading .sub {color:#526778;line-height:1.55}
.auth-card form, .platform-form {display:grid;gap:14px}
.auth-card form .btn {width:100%}
.auth-card > .linkbtn {display:inline-block;margin-top:14px;font-size:14px}

.platform-topbar {flex-wrap:nowrap}
.platform-topbar .pill {white-space:nowrap}
.platform-nav {display:flex;gap:20px;margin:0 0 20px;border-bottom:1px solid #dce6ec}
.platform-nav a {padding:10px 2px;border-bottom:2px solid transparent;color:#526778;font-weight:600;text-decoration:none}
.platform-nav a:hover,.platform-nav a[aria-current] {color:#254c63;border-bottom-color:#4c89a9}
.platform-main {display:grid;gap:14px;min-width:0}
.platform-heading {
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:14px;
  margin:0 0 4px;
}
.platform-heading h1 {overflow-wrap:anywhere}
.platform-metrics .usage {align-content:start}
.platform-metrics strong {font:700 24px/1.2 Manrope,sans-serif}
.platform-metrics small {font:600 13px 'DM Sans',sans-serif;color:#526778}
.platform-metrics progress {width:100%;height:6px;accent-color:#4c89a9}
.platform-settings {margin:0}
.platform-settings summary {color:#254c63;font:700 15px Manrope,sans-serif;cursor:pointer}
.platform-settings[open] > summary {margin-bottom:14px}
.platform-form > .btn {justify-self:start}
.platform-form fieldset {min-width:0;margin:0;padding:0;border:0}
.platform-form legend {margin-bottom:8px;color:#254c63;font-weight:700}
.limit-fields {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:14px}
.platform-card-heading {margin-bottom:14px}
.platform-card-heading p {color:#526778}
.platform-main .compact {display:flex;align-items:end;flex-wrap:wrap;gap:12px}
.platform-main .compact .field {flex:1 1 150px}
.platform-main .compact .message {flex-basis:100%}
.administration-page {max-width:1120px}
.directory-toolbar {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.directory-search {width:100%;max-width:340px;padding:8px 10px;border:1px solid #cbdce6;border-radius:10px;background:#fff}
.directory-toolbar span,.directory-empty {color:#526778;font-size:13px}
.directory-toolbar span {white-space:nowrap}
.directory-table {table-layout:fixed;font-size:14px}
.directory-table thead th {color:#526778;font-size:11px}
.directory-table thead th:first-child {width:42%}
.organisation-table thead th:nth-last-child(2) {width:128px}
.organisation-table thead th:last-child {width:86px}
.directory-table thead th:last-child {text-align:right}
.directory-table th,.directory-table td {padding:12px 8px;overflow-wrap:anywhere}
.directory-table th:first-child {padding-left:0}
.directory-table th:last-child,.directory-table td:last-child {padding-right:0}
.directory-table tbody th {text-transform:none;letter-spacing:normal;font-size:inherit}
.directory-table tbody tr:is(:hover,:focus-within) {background:#f6fafc}
.directory-link {display:inline-block;color:#254c63;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.directory-link:hover {color:#285b78}
.firm-table .directory-link {display:block;padding:4px 0}
.firm-table thead th:nth-last-child(-n + 2) {width:18%}
.firm-table :is(th,td):nth-last-child(-n + 2) {text-align:right}
.organisation-firm-mobile {display:none}
.directory-number {font-variant-numeric:tabular-nums}
.directory-status {display:inline-block;border-radius:20px;padding:4px 9px;background:#e6f4ed;color:#246043;font-size:12px;font-weight:600}
.directory-status.paused {background:#f8efe1;color:#7b4e20}
.directory-empty {margin:0;padding:16px 0}
.organisation-create {margin-top:16px}
.platform-breadcrumb {display:flex;align-items:center;flex-wrap:wrap;gap:10px;color:#526778;min-width:0;overflow-wrap:anywhere}
.platform-breadcrumb a {color:#285b78;text-underline-offset:3px}
.organisation-identity {display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,210px);align-items:center;gap:18px}
.organisation-identity .workflow-title {min-width:0;margin:0}
.organisation-identity h1 {overflow-wrap:anywhere}
.organisation-identity .usage {display:grid;gap:5px;padding:12px 14px;border:1px solid #e2edf2;border-radius:11px;background:#edf6fb}
.organisation-identity .usage span {color:#526778;font-size:13px}
.organisation-profile-section .sub {margin:0 0 14px;color:#526778}
.users {list-style:none;margin:0;padding:0}
.users + .user-form {margin-top:14px}
.user-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid #e6eef2;
}
.user-row small {display:block;margin-top:3px;color:#526778;overflow-wrap:anywhere}
.user-actions {display:flex;flex-wrap:wrap;gap:6px}
#platform .user-actions .btn {min-height:36px;padding:7px 11px;font-size:13px}
.platform-invite {display:grid;gap:10px;margin:0}
.platform-invite p {margin:5px 0 0}
.platform-invite .compact .field {flex-basis:220px}

@media(max-width:640px) {
  .organisation-table .organisation-firm {display:none}
  .organisation-firm-mobile {display:block;margin-top:4px;color:#526778;font-weight:500}
  .organisation-table thead th:first-child {width:49%}
  .organisation-table thead th:nth-last-child(2) {width:30%}
  .organisation-table thead th:last-child {width:21%}
  .firm-table thead th:first-child {width:36%}
  .firm-table th,.firm-table td {padding-inline:6px}
}
@media(max-width:560px) {
  .platform-topbar .pill {display:none}
  .platform-heading {align-items:start;flex-direction:column}
  .platform-metrics {grid-template-columns:repeat(auto-fit,minmax(min(100%,125px),1fr))}
  .user-row {grid-template-columns:minmax(0,1fr) auto}
  .user-actions {grid-column:1/-1}
  .directory-toolbar {align-items:flex-start;flex-direction:column;gap:6px}
  .organisation-identity {grid-template-columns:1fr}
  .organisation-identity .usage {max-width:210px}
}

.account-editor {grid-column:1/-1}
.account-editor[open] > summary {margin-bottom:12px}
.account-edit > .full {flex-basis:100%;margin:0}
.firm-access {margin-top:14px}

.hosted-workspaces-body {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.hosted-workspaces-body ul {display:grid;gap:8px;min-width:0;margin:0;padding:0;list-style:none}
.hosted-workspaces-body strong {font:700 16px Manrope,sans-serif;overflow-wrap:anywhere}

.tenant-links {display:grid;gap:10px}
.tenant-links .sub {margin:0}
.tenant-url {display:grid;gap:3px;min-width:0}
.tenant-url span {color:#526778;font-size:13px}
.tenant-url a {color:#285b78;overflow-wrap:anywhere}

.platform-overview {display:grid;gap:10px}
.platform-overview .platform-heading {align-items:center;flex-direction:row}
.platform-overview-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.platform-overview-metrics .card {display:grid;gap:4px;padding:15px 18px}
.platform-overview-metrics span {color:#526778;font-size:13px}
.platform-overview-metrics strong {font:700 26px/1.2 Manrope,sans-serif}
@media(max-width:560px) {
  .platform-overview .platform-heading {align-items:flex-start;flex-direction:column}
  .platform-overview-metrics .card {padding:10px}
  .platform-overview-metrics span {font-size:11px}
  .platform-overview-metrics strong {font-size:21px}
}
