/* Phase 4.5.6 Administration UI Density and Polish
   Loaded after every feature stylesheet so the entire administration area
   shares one compact, professional visual system without changing workflows. */

.admin-body {
  --admin-shell: 1400px;
  --admin-bg: #f3f6f8;
  --admin-panel: #ffffff;
  --admin-panel-muted: #f8fafb;
  --admin-border: #d9e3e9;
  --admin-border-strong: #c7d5de;
  --admin-text: #1b3b52;
  --admin-muted: #617789;
  --admin-accent: #0875bb;
  --admin-accent-dark: #0b416f;
  --admin-success: #4c9720;
  --admin-radius-sm: 8px;
  --admin-radius-md: 12px;
  --admin-radius-lg: 16px;
  --admin-shadow-sm: 0 4px 14px rgba(6, 47, 86, 0.045);
  --admin-shadow-md: 0 10px 28px rgba(6, 47, 86, 0.07);
  overflow-x: hidden;
  color: var(--admin-text);
  background:
    linear-gradient(180deg, rgba(232, 241, 246, 0.72), rgba(243, 246, 248, 0) 260px),
    var(--admin-bg);
  font-size: 15px;
  line-height: 1.45;
}

.admin-body :where(.admin-app, .admin-container, .admin-panel, .panel-heading, .settings-card, .settings-card__heading, .admin-navigation, .admin-groups, .admin-tabs, .table-card) {
  min-width: 0;
}

.admin-body :where(h1, h2, h3) {
  color: #12344d;
  letter-spacing: -0.025em;
}

.admin-body .eyebrow {
  margin-bottom: 7px;
  color: var(--admin-accent);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

/* Compact, aligned administration header. */
.admin-body .admin-header {
  min-height: 64px;
  gap: 16px;
  padding: 7px max(20px, calc((100vw - var(--admin-shell)) / 2));
  background: rgba(255, 255, 255, 0.975);
  border-bottom-color: var(--admin-border);
  box-shadow: 0 3px 16px rgba(6, 47, 86, 0.055);
  backdrop-filter: blur(12px);
}

.admin-body .admin-header__brand {
  min-width: 0;
  gap: 11px;
}

.admin-body .admin-header__brand a {
  width: 154px;
  flex: 0 0 154px;
  padding: 4px;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-sm);
}

.admin-body .admin-header__brand span {
  font-size: 0.65rem;
  letter-spacing: 0.095em;
}

.admin-body .admin-header__brand strong {
  max-width: 280px;
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-body .admin-header__actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-body .admin-link-button {
  min-height: 36px;
  padding: 7px 12px;
  color: #34566e;
  background: #ffffff;
  border: 1px solid var(--admin-border-strong);
  border-radius: var(--admin-radius-sm);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.15;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.admin-body .admin-link-button:hover {
  color: var(--admin-accent-dark);
  background: #f4f9fc;
  border-color: #a9c4d5;
  box-shadow: 0 2px 7px rgba(6, 47, 86, 0.06);
}

.admin-body .admin-link-button--danger {
  color: #a12821;
  border-color: #e4c3c0;
}

.admin-body .admin-link-button--danger:hover {
  color: #8f1f19;
  background: #fff7f6;
  border-color: #dba7a3;
}

/* More useful content density and a stronger page hierarchy. */
.admin-body .admin-container {
  width: min(calc(100% - 32px), var(--admin-shell));
  padding: 24px 0 60px;
}

.admin-body .admin-page-heading {
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
}

.admin-body .admin-page-heading h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.16;
}

.admin-body .admin-page-heading > p {
  margin: 0;
  padding: 7px 10px;
  color: var(--admin-muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-radius-sm);
  font-size: 0.76rem;
  white-space: nowrap;
}

.admin-body .credential-warning {
  padding: 11px 14px;
  margin-bottom: 16px;
  border-radius: var(--admin-radius-sm);
  font-size: 0.8rem;
}

.admin-body .stat-grid,
.admin-body .resource-admin-stats,
.admin-body .conversion-stat-grid {
  gap: 11px;
  margin-bottom: 14px;
}

.admin-body .stat-grid article,
.admin-body .resource-admin-stats article,
.admin-body .conversion-stat-grid article {
  min-height: 78px;
  padding: 13px 16px;
  background: var(--admin-panel);
  border: 1px solid var(--admin-border);
  border-top-width: 1px;
  border-radius: var(--admin-radius-md);
  box-shadow: var(--admin-shadow-sm);
}

.admin-body .stat-grid article:nth-child(1) {
  box-shadow: inset 0 3px 0 #0b416f, var(--admin-shadow-sm);
}

.admin-body .stat-grid article:nth-child(2) {
  box-shadow: inset 0 3px 0 #0875bb, var(--admin-shadow-sm);
}

.admin-body .stat-grid article:nth-child(3) {
  box-shadow: inset 0 3px 0 #d39a22, var(--admin-shadow-sm);
}

.admin-body .stat-grid article:nth-child(4) {
  box-shadow: inset 0 3px 0 #62ad2c, var(--admin-shadow-sm);
}

.admin-body .stat-grid span,
.admin-body .resource-admin-stats span,
.admin-body .conversion-stat-grid span {
  margin-bottom: 4px;
  color: var(--admin-muted);
  font-size: 0.69rem;
  letter-spacing: 0.065em;
}

.admin-body .stat-grid strong,
.admin-body .resource-admin-stats strong,
.admin-body .conversion-stat-grid strong {
  margin-top: 0;
  color: #0b416f;
  font-size: clamp(1.55rem, 2.1vw, 1.85rem);
  line-height: 1;
}

/* Two-level navigation with clear hierarchy and less vertical space. */
.admin-body .admin-navigation {
  padding: 4px;
  margin-bottom: 14px;
  background: #e8eff3;
  border: 1px solid #d4e1e8;
  border-radius: var(--admin-radius-md);
  box-shadow: none;
}

.admin-body .admin-groups {
  gap: 2px;
  padding: 1px;
}

.admin-body .admin-group {
  min-height: 37px;
  padding: 7px 11px;
  border-radius: var(--admin-radius-sm);
  font-size: 0.76rem;
  font-weight: 790;
}

.admin-body .admin-group:hover,
.admin-body .admin-group:focus-visible {
  background: rgba(255, 255, 255, 0.72);
}

.admin-body .admin-group.is-active {
  color: #ffffff;
  background: var(--admin-accent-dark);
  box-shadow: 0 3px 9px rgba(6, 47, 86, 0.15);
}

.admin-body .admin-tabs {
  gap: 2px;
  padding: 5px 3px 2px;
  border-top-color: rgba(11, 65, 111, 0.09);
}

.admin-body .admin-tab {
  position: relative;
  min-height: 33px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 740;
}

.admin-body .admin-tab:hover,
.admin-body .admin-tab:focus-visible {
  background: rgba(255, 255, 255, 0.78);
}

.admin-body .admin-tab.is-active {
  color: var(--admin-accent-dark);
  background: #ffffff;
  border-color: #d3e0e7;
  box-shadow: 0 2px 6px rgba(6, 47, 86, 0.06);
}

.admin-body .admin-tab.is-active::after {
  position: absolute;
  right: 9px;
  bottom: -1px;
  left: 9px;
  height: 2px;
  background: var(--admin-accent);
  border-radius: 2px 2px 0 0;
  content: "";
}

/* Panels, cards, headings, and action bars. */
.admin-body .admin-panel {
  padding: 24px;
  background: var(--admin-panel);
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-md);
}

.admin-body .panel-heading {
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom-color: var(--admin-border);
}

.admin-body .panel-heading > div {
  min-width: 0;
}

.admin-body .panel-heading > div:last-child:not(:first-child),
.admin-body .crm-heading-actions,
.admin-body .analytics-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.admin-body .panel-heading h2 {
  margin: 0 0 3px;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  line-height: 1.14;
}

.admin-body .panel-heading p:not(.eyebrow) {
  max-width: 780px;
  color: var(--admin-muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.admin-body .settings-card {
  padding: 19px;
  background: var(--admin-panel-muted);
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
  box-shadow: none;
}

.admin-body .settings-card--featured {
  background: linear-gradient(145deg, #f4f9fc, #f8fbf6);
  border-color: #cbdfe9;
}

.admin-body .settings-card__heading {
  align-items: center;
  gap: 14px;
  padding-bottom: 13px;
  margin-bottom: 14px;
  border-bottom-color: var(--admin-border);
}

.admin-body .settings-card__heading > div:first-child {
  min-width: 0;
  gap: 11px;
}

.admin-body .settings-card__heading h3 {
  font-size: 1.02rem;
  line-height: 1.2;
}

.admin-body .settings-card__heading p {
  color: var(--admin-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.admin-body .settings-icon {
  width: 39px;
  height: 39px;
  flex-basis: 39px;
  border-radius: 10px;
  font-size: 0.64rem;
}

.admin-body .settings-grid,
.admin-body .form-grid {
  gap: 11px 13px;
}

.admin-body .settings-actions,
.admin-body .dialog-actions {
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 13px;
}

.admin-body .navigation-publish-actions {
  bottom: 9px;
  padding: 9px;
  margin-top: 16px;
  border-radius: var(--admin-radius-md);
  box-shadow: 0 8px 22px rgba(6, 47, 86, 0.11);
}

/* Consistent, compact actions. */
.admin-body .button {
  min-height: 40px;
  gap: 6px;
  padding: 8px 15px;
  border-width: 1px;
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.15;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.admin-body .button:hover {
  box-shadow: 0 3px 10px rgba(6, 47, 86, 0.1);
  transform: none;
}

.admin-body .button--primary {
  background: #0875bb;
  border-color: #0875bb;
}

.admin-body .button--primary:hover {
  background: #086aa8;
  border-color: #086aa8;
}

.admin-body .button--green {
  background: #539f25;
  border-color: #539f25;
}

.admin-body .button--green:hover {
  background: #478c1f;
  border-color: #478c1f;
}

.admin-body .button--outline,
.admin-body .button--outline-dark {
  color: var(--admin-accent-dark);
  background: #ffffff;
  border-color: #b8ccd8;
}

.admin-body .button--outline:hover,
.admin-body .button--outline-dark:hover {
  background: #f3f8fb;
  border-color: #90b2c7;
}

.admin-body .button--danger {
  color: #9c2821;
  background: #fff8f7;
  border-color: #dfbbb7;
}

/* Uniform form controls, including the native upload control. */
.admin-body .field label,
.admin-body label:has(> input):not(.toggle-control):not(.phase24-check):not(.phase32-check),
.admin-body label:has(> select),
.admin-body label:has(> textarea) {
  color: #294b63;
  font-size: 0.77rem;
  font-weight: 750;
}

.admin-body :where(
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  select,
  textarea
) {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: #17384f;
  background: #ffffff;
  border: 1px solid #bccbd5;
  border-radius: var(--admin-radius-sm);
  box-shadow: 0 1px 2px rgba(6, 47, 86, 0.025);
  font-size: 0.86rem;
  line-height: 1.3;
}

.admin-body textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-body :where(
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  select,
  textarea
):hover {
  border-color: #94abba;
}

.admin-body :where(
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="password"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  select,
  textarea
):focus {
  border-color: var(--admin-accent);
  outline: 3px solid rgba(8, 117, 187, 0.12);
  outline-offset: 0;
}

.admin-body input[type="checkbox"],
.admin-body input[type="radio"] {
  accent-color: var(--admin-accent);
}

.admin-body input[type="file"] {
  width: 100%;
  min-height: 42px;
  padding: 5px;
  color: var(--admin-muted);
  background: #ffffff;
  border: 1px dashed #afc3cf;
  border-radius: var(--admin-radius-sm);
  font-size: 0.78rem;
}

.admin-body input[type="file"]::file-selector-button {
  min-height: 30px;
  padding: 6px 10px;
  margin-right: 9px;
  color: var(--admin-accent-dark);
  background: #edf6fb;
  border: 1px solid #c5dbe7;
  border-radius: 6px;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.admin-body input[type="file"]::file-selector-button:hover {
  background: #e3f1f8;
  border-color: #9fc3d7;
}

.admin-body .field-hint,
.admin-body .admin-message {
  color: var(--admin-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.admin-body .toggle-track {
  width: 43px;
  height: 25px;
}

.admin-body .toggle-track span {
  width: 19px;
  height: 19px;
}

.admin-body .toggle-control input:checked + .toggle-track span {
  transform: translateX(18px);
}

/* Tables and record lists use compact rows while preserving legibility. */
.admin-body .table-card {
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
}

.admin-body .admin-table {
  width: 100%;
}

.admin-body .admin-table thead th {
  padding: 10px 12px;
  color: #557083;
  background: #f1f5f7;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.66rem;
  letter-spacing: 0.055em;
}

.admin-body .admin-table tbody th,
.admin-body .admin-table tbody td {
  padding: 11px 12px;
  font-size: 0.79rem;
  line-height: 1.4;
}

.admin-body .admin-table tbody tr:hover {
  background: #f8fbfc;
}

.admin-body .status-select,
.admin-body .row-action {
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
  border-radius: 7px;
  font-size: 0.72rem;
}

.admin-body .lead-filters {
  gap: 9px;
  padding: 13px;
  margin-bottom: 14px;
  background: #f4f8fa;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
}

.admin-body .lead-filters .button {
  min-height: 42px;
}

.admin-body .empty-state {
  min-height: 180px;
  padding: 24px;
}

/* Resource Center is the densest dashboard workspace and receives targeted cleanup. */
.admin-body .resource-admin-panel .panel-heading > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-body .resource-admin-stats article {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: var(--admin-radius-md);
}

.admin-body .resource-admin-stats strong {
  font-size: 1.55rem;
}

.admin-body .resource-admin-layout,
.admin-body .resource-library-workspace {
  gap: 13px;
  margin-bottom: 13px;
}

.admin-body .resource-checkbox-row {
  gap: 11px 15px;
  margin-bottom: 12px;
}

.admin-body .resource-checkbox-row label {
  color: #294b63;
  font-size: 0.78rem;
  font-weight: 720;
}

.admin-body .resource-upload-row {
  gap: 9px;
}

.admin-body .resource-list-filters {
  gap: 8px;
  margin-bottom: 9px;
}

.admin-body .resource-document-list {
  gap: 6px;
}

.admin-body .resource-document-row {
  gap: 3px;
  padding: 10px 11px;
  border-color: var(--admin-border);
  border-radius: 9px;
}

.admin-body .resource-document-row strong {
  font-size: 0.86rem;
}

.admin-body .resource-document-editor-card {
  top: 76px;
}

/* Dialogs, alerts, and transient feedback. */
.admin-body .lead-dialog,
.admin-body .session-timeout-dialog {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--admin-radius-lg);
  box-shadow: 0 28px 80px rgba(3, 42, 77, 0.3);
}

.admin-body .lead-dialog {
  padding: 27px;
}

.admin-body .lead-dialog__heading {
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.admin-body .lead-dialog__heading h2 {
  font-size: 1.65rem;
}

.admin-body .admin-toast {
  right: 16px;
  bottom: 16px;
  padding: 11px 14px;
  border-radius: var(--admin-radius-sm);
  font-size: 0.8rem;
}

/* Login follows the same restrained administration design. */
.admin-body .admin-login {
  padding: 24px 16px;
}

.admin-body .login-card {
  width: min(100%, 440px);
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 25, 47, 0.3);
}

.admin-body .login-brand {
  width: 215px;
  padding: 6px;
  margin-bottom: 22px;
  border-radius: var(--admin-radius-sm);
}

.admin-body .login-card h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 5vw, 2.05rem);
}

.admin-body .login-intro {
  margin-bottom: 20px;
  color: #607789;
  font-size: 0.84rem;
}

.admin-body .login-form {
  gap: 6px;
}

.admin-body .login-back {
  margin-top: 18px;
  font-size: 0.78rem;
}

/* Standalone administration modules share the compact shell and surface rhythm. */
.admin-body :where(.phase31-toolbar, .phase32-toolbar, .phase33-toolbar, .phase44-toolbar, .phase45-toolbar) {
  gap: 7px;
  margin-bottom: 13px;
}

.admin-body :where(.phase31-form, .phase32-form, .phase33-form, .phase44-form, .phase45-form) {
  gap: 13px;
}

.admin-body :where(.phase31-field-grid, .phase32-field-grid, .phase33-field-grid, .phase44-field-grid, .phase45-field-grid) {
  gap: 10px 12px;
}

/* Standalone Scheduling and Representative Workbench modules use the same density. */
.admin-body.cs23-admin,
.admin-body.p44-admin {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(232, 241, 246, 0.68), rgba(243, 246, 248, 0) 260px),
    var(--admin-bg);
}

.admin-body.cs23-admin .cs23-admin-header {
  gap: 18px;
  padding: 15px max(18px, calc((100vw - var(--admin-shell)) / 2));
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: var(--admin-border);
  box-shadow: 0 3px 16px rgba(6, 47, 86, 0.05);
}

.admin-body.cs23-admin .cs23-admin-header h1 {
  margin: 2px 0 3px;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.15;
}

.admin-body.cs23-admin .cs23-admin-header p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 0.8rem;
}

.admin-body.cs23-admin .cs23-admin-header > div > a {
  color: var(--admin-accent-dark);
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
}

.admin-body.cs23-admin .cs23-admin-shell {
  width: min(calc(100% - 32px), var(--admin-shell));
  margin: 18px auto 52px;
}

.admin-body.cs23-admin .cs23-status {
  margin-bottom: 8px;
  font-size: 0.78rem;
}

.admin-body.cs23-admin .cs23-metrics {
  gap: 9px;
}

.admin-body.cs23-admin .cs23-metrics article {
  min-height: 72px;
  padding: 11px 13px;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
  box-shadow: inset 0 3px 0 var(--admin-accent), var(--admin-shadow-sm);
}

.admin-body.cs23-admin .cs23-metrics span {
  color: var(--admin-muted);
  font-size: 0.7rem;
  font-weight: 740;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.admin-body.cs23-admin .cs23-metrics strong {
  color: var(--admin-accent-dark);
  font-size: 1.45rem;
  line-height: 1.05;
}

.admin-body.cs23-admin .cs23-admin-tabs {
  gap: 5px;
  padding: 5px;
  margin: 14px 0;
  background: #e8eff3;
  border: 1px solid #d4e1e8;
  border-radius: var(--admin-radius-md);
}

.admin-body.cs23-admin .cs23-admin-tabs button,
.admin-body.cs23-admin .cs23-primary,
.admin-body.cs23-admin .cs23-button {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: var(--admin-radius-sm);
  font-size: 0.78rem;
  font-weight: 760;
}

.admin-body.cs23-admin .cs23-admin-tabs button {
  color: #34566e;
  background: transparent;
}

.admin-body.cs23-admin .cs23-admin-tabs button:hover,
.admin-body.cs23-admin .cs23-admin-tabs button:focus-visible {
  color: var(--admin-accent-dark);
  background: rgba(255, 255, 255, 0.78);
}

.admin-body.cs23-admin .cs23-admin-tabs button[aria-selected="true"] {
  color: #ffffff;
  background: var(--admin-accent-dark);
  box-shadow: 0 3px 9px rgba(6, 47, 86, 0.14);
}

.admin-body.cs23-admin .cs23-toolbar {
  gap: 8px;
  margin-bottom: 10px;
}

.admin-body.cs23-admin .cs23-toolbar input,
.admin-body.cs23-admin .cs23-toolbar select,
.admin-body.cs23-admin .cs23-table-wrap input,
.admin-body.cs23-admin .cs23-table-wrap select {
  min-height: 40px;
  padding: 8px 10px;
  border-color: #bccbd5;
  border-radius: var(--admin-radius-sm);
  font-size: 0.82rem;
}

.admin-body.cs23-admin .cs23-table-wrap {
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
  box-shadow: var(--admin-shadow-sm);
}

.admin-body.cs23-admin .cs23-table-wrap th {
  padding: 9px 10px;
  color: #557083;
  background: #f1f5f7;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-body.cs23-admin .cs23-table-wrap td {
  padding: 10px;
  font-size: 0.78rem;
}

.admin-body.cs23-admin .cs23-card {
  padding: 18px;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
  box-shadow: var(--admin-shadow-sm);
}

.admin-body.cs23-admin .cs23-note {
  padding: 12px 14px;
  margin: 13px 0;
  border-radius: 0 var(--admin-radius-sm) var(--admin-radius-sm) 0;
  font-size: 0.78rem;
}

.admin-body.cs23-admin .cs23-hours-row {
  gap: 9px;
  padding: 9px;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-sm);
}

.admin-body.p44-admin .p44-header {
  align-items: center;
  gap: 20px;
  padding: 18px max(18px, calc((100vw - var(--admin-shell)) / 2));
  background: linear-gradient(135deg, #0d3554, #15577f);
  box-shadow: 0 5px 20px rgba(6, 47, 86, 0.14);
}

.admin-body.p44-admin .p44-header :where(h1, p, a, span) {
  color: #ffffff;
}

.admin-body.p44-admin .p44-header h1 {
  margin: 2px 0 4px;
  font-size: clamp(1.55rem, 2.25vw, 2rem);
  line-height: 1.14;
}

.admin-body.p44-admin .p44-header p {
  margin: 2px 0;
  font-size: 0.8rem;
}

.admin-body.p44-admin .p44-breadcrumb,
.admin-body.p44-admin .p44-eyebrow {
  font-size: 0.69rem;
}

.admin-body.p44-admin .p44-header-actions {
  gap: 7px;
}

.admin-body.p44-admin .p44-shell {
  max-width: var(--admin-shell);
  padding: 18px 16px 52px;
}

.admin-body.p44-admin .p44-button {
  min-height: 38px;
  padding: 7px 12px;
  border-radius: var(--admin-radius-sm);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 760;
}

.admin-body.p44-admin .p44-metrics {
  grid-template-columns: repeat(9, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.admin-body.p44-admin .p44-metric {
  min-height: 70px;
  padding: 10px 12px;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
  box-shadow: inset 0 3px 0 var(--admin-accent), var(--admin-shadow-sm);
}

.admin-body.p44-admin .p44-metric strong {
  color: var(--admin-accent-dark);
  font-size: 1.4rem;
  line-height: 1.05;
}

.admin-body.p44-admin .p44-metric span {
  color: var(--admin-muted);
  font-size: 0.69rem;
}

.admin-body.p44-admin .p44-card,
.admin-body.p44-admin .p44-case {
  padding: 16px;
  margin-bottom: 12px;
  border-color: var(--admin-border);
  border-radius: var(--admin-radius-md);
  box-shadow: var(--admin-shadow-sm);
}

.admin-body.p44-admin .p44-case {
  padding: 0;
}

.admin-body.p44-admin .p44-card-heading {
  gap: 12px;
}

.admin-body.p44-admin .p44-card h2,
.admin-body.p44-admin .p44-card-heading h2 {
  margin: 1px 0 8px;
  font-size: 1.25rem;
}

.admin-body.p44-admin .p44-filters,
.admin-body.p44-admin .p44-form-grid,
.admin-body.p44-admin .p44-settings-grid {
  gap: 9px;
}

.admin-body.p44-admin :where(.p44-form, .p44-filters, .p44-settings-grid, .p44-inline-form) :where(input, select, textarea) {
  min-height: 40px;
  padding: 8px 10px;
  border-color: #bccbd5;
  border-radius: var(--admin-radius-sm);
  font-size: 0.82rem;
}

.admin-body.p44-admin .p44-case-summary {
  gap: 12px;
  padding: 13px 14px;
}

.admin-body.p44-admin .p44-case-person h2 {
  font-size: 1.08rem;
}

.admin-body.p44-admin .p44-avatar {
  width: 40px;
  height: 40px;
}

.admin-body.p44-admin .p44-badge {
  padding: 3px 7px;
  font-size: 0.68rem;
}

.admin-body.p44-admin .p44-case-grid {
  gap: 10px;
  padding: 0 14px 13px;
}

.admin-body.p44-admin .p44-case-grid section,
.admin-body.p44-admin .p44-subcard {
  padding: 12px;
  border-radius: var(--admin-radius-sm);
}

.admin-body.p44-admin .p44-workspace {
  gap: 10px;
  padding: 12px;
}

.admin-body.p44-admin .p44-table-wrap th,
.admin-body.p44-admin .p44-table-wrap td {
  padding: 9px 10px;
  font-size: 0.76rem;
}

.admin-body.p44-admin .p44-table-wrap th {
  color: #557083;
  background: #f1f5f7;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Responsive tightening without horizontal page scrolling. */
@media (max-width: 1050px) {
  .admin-body .admin-header {
    padding-inline: 16px;
  }

  .admin-body .admin-container {
    width: min(calc(100% - 24px), var(--admin-shell));
  }

  .admin-body .admin-page-heading {
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .admin-body .admin-navigation {
    padding: 7px;
  }

  .admin-body .admin-navigation__mobile {
    gap: 4px;
  }

  .admin-body .admin-navigation__mobile select {
    min-height: 42px;
    padding: 8px 10px;
    border-radius: var(--admin-radius-sm);
    font-size: 0.82rem;
  }

  .admin-body .admin-panel {
    padding: 19px;
  }

  .admin-body .resource-document-editor-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .admin-body .admin-header {
    min-height: 58px;
    padding: 6px 10px;
  }

  .admin-body .admin-header__brand a {
    width: 132px;
    flex-basis: 132px;
  }

  .admin-body .admin-header__actions {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .admin-body .admin-header__actions .admin-link-button {
    flex: 0 0 auto;
  }

  .admin-body .admin-container {
    width: min(calc(100% - 18px), var(--admin-shell));
    padding-top: 16px;
  }

  .admin-body .admin-page-heading {
    gap: 9px;
    margin-bottom: 12px;
  }

  .admin-body .admin-page-heading h1 {
    font-size: 1.42rem;
  }

  .admin-body .admin-page-heading > p {
    white-space: normal;
  }

  .admin-body .stat-grid,
  .admin-body .resource-admin-stats {
    gap: 8px;
  }

  .admin-body .stat-grid article,
  .admin-body .resource-admin-stats article {
    min-height: 68px;
    padding: 11px 12px;
  }

  .admin-body .admin-panel {
    padding: 15px;
    border-radius: 13px;
  }

  .admin-body .panel-heading {
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .admin-body .panel-heading h2 {
    font-size: 1.35rem;
  }

  .admin-body .settings-card {
    padding: 14px;
  }

  .admin-body .settings-card__heading {
    gap: 9px;
    padding-bottom: 10px;
    margin-bottom: 11px;
  }

  .admin-body .button,
  .admin-body .admin-link-button {
    min-height: 38px;
  }

  .admin-body .login-card {
    padding: 25px 20px;
  }
}

@media (max-width: 430px) {
  .admin-body .admin-header__brand a {
    width: 120px;
    flex-basis: 120px;
  }

  .admin-body .stat-grid,
  .admin-body .resource-admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .admin-body .panel-heading > div:last-child:not(:first-child),
  .admin-body .resource-admin-panel .panel-heading > div:last-child {
    width: 100%;
    justify-content: stretch;
  }

  .admin-body .panel-heading > div:last-child .button,
  .admin-body .resource-admin-panel .panel-heading > div:last-child .button {
    flex: 1 1 100%;
  }
}


/* Keep the Representative Workbench data grids inside their cards on narrow screens. */
.admin-body.p44-admin .p44-bottom-grid,
.admin-body.p44-admin .p44-bottom-grid > *,
.admin-body.p44-admin .p44-card,
.admin-body.p44-admin .p44-table-wrap {
  min-width: 0;
}

.admin-body.p44-admin .p44-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.admin-body.p44-admin .p44-table-wrap table {
  min-width: 560px;
}

@media (max-width: 1200px) {
  .admin-body.p44-admin .p44-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .admin-body.p44-admin .p44-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-body.p44-admin .p44-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body.cs23-admin .cs23-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .admin-body.cs23-admin .cs23-admin-header,
  .admin-body.p44-admin .p44-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-body.cs23-admin .cs23-admin-header {
    padding: 13px 14px;
  }

  .admin-body.p44-admin .p44-header {
    padding: 15px 14px;
  }

  .admin-body.p44-admin .p44-header-actions {
    justify-content: flex-start;
  }

  .admin-body.p44-admin .p44-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-body.p44-admin :where(.p44-filters, .p44-case-grid, .p44-workspace, .p44-bottom-grid, .p44-form-grid, .p44-settings-grid) {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-body.p44-admin .p44-span-2 {
    grid-column: auto;
  }

  .admin-body.p44-admin .p44-case-summary {
    flex-direction: column;
  }

  .admin-body.p44-admin .p44-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .admin-body.cs23-admin .cs23-admin-shell,
  .admin-body.p44-admin .p44-shell {
    width: min(calc(100% - 18px), var(--admin-shell));
    padding-right: 0;
    padding-left: 0;
  }

  .admin-body.cs23-admin .cs23-metrics,
  .admin-body.p44-admin .p44-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body.cs23-admin .cs23-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-body.cs23-admin .cs23-toolbar input {
    min-width: 0;
  }

  .admin-body.cs23-admin .cs23-grid.three,
  .admin-body.cs23-admin .cs23-grid.two {
    grid-template-columns: 1fr;
  }

  .admin-body.cs23-admin .cs23-admin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-body.p44-admin .p44-header-actions,
  .admin-body.p44-admin .p44-button {
    width: 100%;
  }

  .admin-body.p44-admin .p44-inline-form {
    display: block;
  }

  .admin-body.p44-admin .p44-inline-form > * {
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-body *::before,
  .admin-body *::after {
    scroll-behavior: auto;
    transition-duration: 0.001ms;
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
  }
}

/* Phase 4.5.7 - unified administration workspace shell */
.admin-route-body {
  min-width: 0;
  overflow-x: hidden;
}

.admin-route-app {
  min-height: 100vh;
}

.admin-route-container {
  min-width: 0;
  padding-top: 14px;
  padding-bottom: 0;
}

.admin-route-session {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-height: 30px;
  margin: 0 0 10px;
  color: #64798a;
  font-size: 0.76rem;
}

.admin-route-session span {
  font-weight: 650;
}

.admin-route-session strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #143c59;
  background: #eef5f8;
  border: 1px solid #d8e6ed;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-route-main,
.admin-route-main.phase31-shell,
.admin-route-main.phase32-shell,
.admin-route-main.phase33-shell,
.admin-route-main.phase41-admin-shell,
.admin-route-main.cs23-admin-shell,
.admin-route-main.p44-shell,
.admin-route-main.phase24-shell,
.admin-route-main.phase45-shell {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding-top: 0;
  padding-right: 0;
  padding-left: 0;
}

.admin-route-main {
  padding-bottom: 60px;
}

.admin-route-main > .admin-page-heading,
.admin-route-main > .phase24-heading,
.admin-route-main > .phase45-heading {
  margin-top: 0;
}

.admin-route-page-heading {
  align-items: flex-start;
}

.admin-route-page-heading > div:first-child {
  min-width: 0;
}

.admin-route-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-route-version {
  display: grid;
  gap: 1px;
  min-width: 142px;
  padding: 8px 11px;
  color: #123e5e;
  background: #eef6fa;
  border: 1px solid #d4e5ed;
  border-radius: 11px;
}

.admin-route-version small {
  color: #607687;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-route-version strong {
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.admin-route-navigation {
  width: 100%;
  margin: 0 0 17px;
}

.admin-route-navigation .admin-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-600);
  text-decoration: none;
  font-family: inherit;
  font-weight: 750;
  cursor: pointer;
}

.admin-route-navigation .admin-tab:visited {
  color: var(--ink-600);
}

.admin-route-navigation .admin-tab.is-active,
.admin-route-navigation .admin-tab.is-active:visited {
  color: var(--navy-900);
}

.admin-route-quicklinks {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: -5px 0 17px;
}

.admin-route-quicklinks .admin-link-button {
  text-decoration: none;
}

.admin-route-main .phase24-heading,
.admin-route-main .phase45-heading {
  margin-bottom: 14px;
}

.admin-route-main.p44-shell .p44-metrics,
.admin-route-main.cs23-admin-shell .cs23-metrics {
  margin-top: 0;
}

.admin-route-main.p44-shell .p44-card,
.admin-route-main.p44-shell .p44-case,
.admin-route-main.cs23-admin-shell .cs23-card,
.admin-route-main.cs23-admin-shell .cs23-table-wrap {
  max-width: 100%;
  min-width: 0;
}

.admin-route-main.p44-shell .p44-table-wrap,
.admin-route-main.cs23-admin-shell .cs23-table-wrap,
.admin-route-main.phase41-admin-shell .phase41-table-wrap,
.admin-route-main.phase24-shell .phase24-table-wrap,
.admin-route-main.phase45-shell .phase45-table-wrap {
  max-width: 100%;
  min-width: 0;
  overscroll-behavior-inline: contain;
}

.admin-route-main .phase32-tabs,
.admin-route-main .phase33-tabs,
.admin-route-main .phase41-admin-tabs,
.admin-route-main .cs23-admin-tabs,
.admin-route-main .phase24-tabs,
.admin-route-main .phase45-tabs {
  scrollbar-width: thin;
}

.admin-route-main .phase32-heading,
.admin-route-main .phase33-heading,
.admin-route-main .phase24-heading,
.admin-route-main .phase45-heading {
  min-width: 0;
}

.admin-route-main .phase32-heading > div:first-child,
.admin-route-main .phase33-heading > div:first-child,
.admin-route-main .phase24-heading > div:first-child,
.admin-route-main .phase45-heading > div:first-child {
  min-width: 0;
}

@media (max-width: 820px) {
  .admin-route-container {
    padding-top: 12px;
  }

  .admin-route-session {
    justify-content: flex-start;
    margin-bottom: 8px;
  }

  .admin-route-quicklinks {
    justify-content: flex-start;
    margin-top: -4px;
  }

  .admin-route-page-heading,
  .admin-route-main .phase33-heading,
  .admin-route-main .phase24-heading,
  .admin-route-main .phase45-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-route-heading-actions {
    justify-content: flex-start;
  }

  .admin-route-main.p44-shell .p44-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-route-container {
    width: min(calc(100% - 18px), var(--admin-shell));
    padding-top: 10px;
  }

  .admin-route-session {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .admin-route-session strong {
    max-width: 100%;
  }

  .admin-route-main {
    padding-bottom: 42px;
  }

  .admin-route-quicklinks {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-route-quicklinks .admin-link-button,
  .admin-route-heading-actions .admin-link-button {
    width: 100%;
  }

  .admin-route-heading-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-route-version {
    width: 100%;
    min-width: 0;
  }

  .admin-route-main .phase32-tabs,
  .admin-route-main .phase33-tabs,
  .admin-route-main .phase41-admin-tabs,
  .admin-route-main .phase24-tabs,
  .admin-route-main .phase45-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .admin-route-main.p44-shell .p44-metrics,
  .admin-route-main.cs23-admin-shell .cs23-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .admin-route-main.p44-shell .p44-metrics,
  .admin-route-main.cs23-admin-shell .cs23-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* Phase 4.5.10 — dashboard traffic summary and account access link. */
.admin-body .admin-account-link{display:inline-flex;align-items:center;margin-left:7px;padding-left:8px;color:#0b6fae;border-left:1px solid #d4e1e8;font-size:.72rem;font-weight:800;text-decoration:none}.admin-body .admin-account-link:hover{text-decoration:underline}.admin-body .site-statistics-summary{display:grid;gap:11px;padding:14px 16px;margin-bottom:14px;background:linear-gradient(135deg,#fff,#f6fbfe);border:1px solid var(--admin-border);border-radius:var(--admin-radius-md);box-shadow:var(--admin-shadow-sm)}.admin-body .site-statistics-summary[hidden]{display:none}.admin-body .site-statistics-summary__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.admin-body .site-statistics-summary__heading h2{margin:0;font-size:1.12rem}.admin-body .site-statistics-summary__heading p:not(.eyebrow){margin:3px 0 0;color:var(--admin-muted);font-size:.82rem}.admin-body .site-statistics-summary__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.admin-body .site-statistics-summary__grid article{min-width:0;padding:11px 12px;background:#fff;border:1px solid #dde7ed;border-radius:10px}.admin-body .site-statistics-summary__grid article:nth-child(1){box-shadow:inset 0 3px 0 #0875bb}.admin-body .site-statistics-summary__grid article:nth-child(2){box-shadow:inset 0 3px 0 #5c9fcb}.admin-body .site-statistics-summary__grid article:nth-child(3){box-shadow:inset 0 3px 0 #4c9720}.admin-body .site-statistics-summary__grid article:nth-child(4){box-shadow:inset 0 3px 0 #7dab52}.admin-body .site-statistics-summary__grid span,.admin-body .site-statistics-summary__grid strong,.admin-body .site-statistics-summary__grid small{display:block}.admin-body .site-statistics-summary__grid span{color:#627889;font-size:.66rem;font-weight:830;letter-spacing:.055em;text-transform:uppercase}.admin-body .site-statistics-summary__grid strong{margin:4px 0 2px;color:#0b416f;font-size:1.55rem;line-height:1}.admin-body .site-statistics-summary__grid small{color:#748796;font-size:.7rem}.admin-body .site-statistics-summary__status{margin:0;color:#607687;font-size:.74rem}.admin-body .site-statistics-summary.is-tracking-disabled{background:#fffaf0;border-color:#ead8ae}.admin-body .site-statistics-summary.is-tracking-disabled .site-statistics-summary__status{color:#8a641c}@media(max-width:820px){.admin-body .site-statistics-summary__heading{align-items:stretch;flex-direction:column}.admin-body .site-statistics-summary__heading .admin-link-button{width:100%}.admin-body .site-statistics-summary__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:430px){.admin-body .admin-page-heading>p{white-space:normal}.admin-body .admin-account-link{margin-left:4px}.admin-body .site-statistics-summary{padding:12px}.admin-body .site-statistics-summary__grid{gap:7px}.admin-body .site-statistics-summary__grid article{padding:9px}.admin-body .site-statistics-summary__grid strong{font-size:1.35rem}}
.admin-body .analytics-readonly-note{margin:0 0 12px;padding:11px 12px;color:#526b7d;background:#f3f7f9;border:1px solid #dbe5ea;border-radius:9px;font-size:.8rem}.admin-body .analytics-readonly-note[hidden]{display:none}
