:root {
  --blue-600: #1f54c6;
  --blue-500: #338dff;
  --teal-400: #2fd0c4;
  --slate-900: #13204a;
  --slate-700: #334155;
  --slate-600: #64748b;
  --slate-100: #f3f6ff;
  --white: #ffffff;
  --danger: #a32121;
  --success: #116648;
  --radius-md: 14px;
  --radius-xl: 24px;
  --shadow-light: 0 18px 48px rgba(19, 32, 74, 0.1);
  --shadow-card: 0 26px 70px rgba(19, 32, 74, 0.18);
  --admin-navy: #071a38;
  --admin-navy-light: #0d2348;
  --admin-primary: #1659d8;
  --admin-primary-hover: #104bc0;
  --admin-background: #f4f7fb;
  --admin-surface: #ffffff;
  --admin-border: #e3e9f2;
  --admin-text: #0d1939;
  --admin-muted: #6d7b97;
  --admin-danger: #e64b4b;
  --admin-danger-soft: #fff3f3;
  --admin-success: #18a66a;
  --admin-success-soft: #ecfaf4;
  --admin-warning: #ef9a32;
  --admin-warning-soft: #fff6e9;
  --admin-sidebar-width: 224px;
  --admin-topbar-height: 68px;
  --admin-card-radius: 12px;
  --admin-card-shadow: 0 3px 12px rgba(13, 25, 57, 0.04);
  --admin-ui-font-size: 13px;
  --admin-standard-row-height: 48px;
  --admin-dense-row-height: 44px;
  --admin-control-height: 40px;
  --admin-button-height: 38px;
  --admin-icon-button-size: 36px;
  --admin-avatar-size: 32px;
  --admin-badge-height: 24px;
}

/* ================================================================
   PHASE 3A: JOBS DIRECTORY + OPERATIONAL QUEUE
   ================================================================ */
@media screen {
  .admin-main:has(.job-list-page) {
    padding-top: 18px;
  }

  .job-list-page {
    display: grid;
    gap: 14px;
    color: var(--admin-text);
  }

  .job-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .job-summary-strip--queue {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .job-summary-item {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    border-right: 1px solid var(--admin-border);
  }

  .job-summary-item:last-child {
    border-right: 0;
  }

  .job-summary-item > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .job-summary-item small {
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 600;
  }

  .job-summary-item strong {
    color: var(--admin-text);
    font-size: 21px;
    line-height: 1.05;
  }

  .job-summary-item em {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-summary-item__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .job-summary-item__icon .admin-icon {
    width: 18px;
    height: 18px;
  }

  .job-summary-item__icon--violet {
    background: #f2eaff;
    color: #7b45d8;
  }

  .job-summary-item__icon--blue {
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .job-summary-item__icon--green {
    background: var(--admin-success-soft);
    color: #0b8f5d;
  }

  .job-summary-item__icon--amber {
    background: var(--admin-warning-soft);
    color: #c77709;
  }

  .job-summary-item__icon--danger {
    background: var(--admin-danger-soft);
    color: #d43a3a;
  }

  .job-summary-item__icon--cyan {
    background: #e4f7fb;
    color: #1785a0;
  }

  .job-directory,
  .job-queue-controls,
  .job-queue-group,
  .job-empty-state--page {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .job-directory,
  .job-queue-controls {
    overflow: visible;
  }

  .job-directory__header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
  }

  .job-directory__header h2 {
    margin: 0;
    color: var(--admin-text);
    font-size: 15px;
    line-height: 1.2;
  }

  .job-directory__header p {
    margin: 3px 0 0;
    color: var(--admin-muted);
    font-size: 11px;
  }

  .job-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--admin-primary);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  .job-filter-clear .admin-icon {
    width: 13px;
    height: 13px;
  }

  .job-filter-grid {
    display: grid;
    gap: 10px;
    padding: 13px 16px 15px;
    border-bottom: 1px solid var(--admin-border);
    background: #fbfcfe;
  }

  .job-filter-grid--registry {
    grid-template-columns: minmax(220px, 1.8fr) repeat(5, minmax(110px, 1fr));
  }

  .job-filter-grid--registry .job-filter-advanced {
    display: block;
    grid-column: 1 / -1;
  }

  .job-filter-grid--registry .job-filter-advanced__fields {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(5, minmax(110px, 1fr));
    gap: 10px;
  }

  .job-filter-grid--registry .job-filter-advanced:not([open]) .job-filter-advanced__fields {
    display: none;
  }

  .job-filter-grid--registry .job-filter-advanced__summary {
    display: none;
  }

  .job-filter-grid--queue {
    grid-template-columns: minmax(240px, 2fr) repeat(4, minmax(116px, 1fr)) auto;
  }

  .job-filter-grid--registry .job-filter-field--search {
    grid-column: span 2;
  }

  .job-filter-field {
    min-width: 0;
    display: grid;
    align-content: end;
    gap: 5px;
  }

  .job-filter-field > span:first-child {
    color: var(--admin-text);
    font-size: 11px;
    font-weight: 600;
  }

  .job-filter-field input,
  .job-filter-field select,
  .job-filter-search-control {
    width: 100%;
    height: 38px;
    min-width: 0;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    color: var(--admin-text);
    font-family: inherit;
    font-size: 12px;
  }

  .job-filter-field input,
  .job-filter-field select {
    padding: 0 10px;
  }

  .job-filter-field input:focus,
  .job-filter-field select:focus,
  .job-filter-search-control:focus-within {
    border-color: #8eb4f4;
    outline: 3px solid rgba(37, 99, 235, 0.1);
  }

  .job-filter-search-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
  }

  .job-filter-search-control .admin-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: var(--admin-muted);
  }

  .job-filter-search-control input {
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .job-filter-search-control input:focus {
    outline: 0;
  }

  .job-filter-actions {
    display: flex;
    align-items: end;
    gap: 8px;
  }

  .job-filter-actions .btn {
    min-height: 38px;
    padding-inline: 14px;
    white-space: nowrap;
  }

  .job-list-table-shell {
    overflow: visible;
  }

  .job-list-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .job-list-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border);
    background: #fbfcfe;
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.055em;
    text-align: left;
    text-transform: uppercase;
  }

  .job-list-table td {
    height: 64px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    font-size: 12px;
    vertical-align: middle;
  }

  .job-list-table tr:last-child td {
    border-bottom: 0;
  }

  .job-list-table tbody tr {
    transition: background 140ms ease;
  }

  .job-list-table tbody tr:hover {
    background: #fbfdff;
  }

  .job-list-table tbody tr.is-overdue {
    background: linear-gradient(90deg, rgba(227, 54, 54, 0.045), rgba(227, 54, 54, 0) 40%);
  }

  .job-list-table th:nth-child(1),
  .job-list-table td:nth-child(1) {
    width: 8.5%;
  }

  .job-list-table th:nth-child(2),
  .job-list-table td:nth-child(2) {
    width: 20%;
  }

  .job-list-table th:nth-child(3),
  .job-list-table td:nth-child(3) {
    width: 14%;
  }

  .job-list-table th:nth-child(4),
  .job-list-table td:nth-child(4) {
    width: 15%;
  }

  .job-list-table th:nth-child(5),
  .job-list-table td:nth-child(5) {
    width: 13%;
  }

  .job-list-table th:nth-child(6),
  .job-list-table td:nth-child(6) {
    width: 13%;
  }

  .job-list-table th:nth-child(7),
  .job-list-table td:nth-child(7) {
    width: 7%;
    text-align: right;
  }

  .job-list-table th:nth-child(8),
  .job-list-table td:nth-child(8) {
    width: 9.5%;
    text-align: right;
  }

  .job-list-table td strong,
  .job-list-table td > a {
    color: var(--admin-text);
    font-size: 12.5px;
    font-weight: 600;
  }

  .job-list-table td small,
  .job-list-table td > span:not(.admin-badge):not(.job-type-cue):not(.job-attention-cue) {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-reference,
  .job-client-link {
    display: block;
    overflow: hidden;
    color: var(--admin-primary) !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-client-link:hover,
  .job-reference:hover {
    text-decoration: underline;
  }

  .job-type-cue {
    display: inline-flex;
    margin-top: 4px;
    padding: 2px 5px;
    border-radius: 5px;
    background: #f2eaff;
    color: #7040bd;
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.2;
  }

  .job-list-table__schedule strong,
  .job-list-table__technician strong {
    display: block;
  }

  .job-attention-text {
    color: #c72f2f !important;
  }

  .job-attention-cue,
  .job-unassigned {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
  }

  .job-attention-cue--danger {
    background: var(--admin-danger-soft);
    color: #c72f2f;
  }

  .job-attention-cue--today {
    background: var(--admin-warning-soft);
    color: #b86609;
  }

  .job-unassigned {
    margin-top: 0;
    background: #f0f2f6;
    color: #667085;
  }

  .job-state-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .job-list-page .admin-badge {
    min-height: 22px;
    padding: 0 7px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 600;
  }

  .job-list-page .admin-badge--unpaid,
  .job-list-page .admin-badge--pending {
    background: var(--admin-warning-soft);
    color: #b86609;
  }

  .job-list-page .admin-badge--included,
  .job-list-page .admin-badge--waived,
  .job-list-page .admin-badge--new,
  .job-list-page .admin-badge--quoted {
    background: #f0f2f6;
    color: #647084;
  }

  .job-list-table__total strong {
    white-space: nowrap;
  }

  .job-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  .job-open-button {
    min-width: 52px;
    min-height: 34px;
    justify-content: center;
    padding-inline: 10px;
  }

  .job-actions-menu[open] {
    z-index: 40;
  }

  .job-actions-menu__panel {
    width: 205px;
  }

  .job-queue-groups {
    display: grid;
    gap: 12px;
  }

  .job-queue-group {
    overflow: visible;
  }

  .job-queue-group__header {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--admin-border);
  }

  .job-queue-group__indicator {
    width: 8px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #8eb4f4;
  }

  .job-queue-group--overdue .job-queue-group__indicator {
    background: #e34a4a;
  }

  .job-queue-group--today .job-queue-group__indicator {
    background: #e9a23b;
  }

  .job-queue-group--unscheduled .job-queue-group__indicator {
    background: #8b96a8;
  }

  .job-queue-group__header h2 {
    margin: 0;
    color: var(--admin-text);
    font-size: 14px;
  }

  .job-queue-group__header h2 span {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    margin-left: 5px;
    border-radius: 999px;
    background: #edf2fb;
    color: var(--admin-primary);
    font-size: 10px;
  }

  .job-queue-group__header p {
    margin: 2px 0 0;
    color: var(--admin-muted);
    font-size: 10.5px;
  }

  .job-empty-state {
    min-height: 260px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 28px;
    color: var(--admin-muted);
    text-align: center;
  }

  .job-empty-state > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .job-empty-state .admin-icon {
    width: 19px;
    height: 19px;
  }

  .job-empty-state h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 14px;
  }

  .job-empty-state p {
    margin: 0 0 5px;
    font-size: 11px;
  }
}

@media screen and (max-width: 1100px) {
  .job-filter-grid--registry,
  .job-filter-grid--queue {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .job-filter-grid--registry .job-filter-field--search,
  .job-filter-grid--queue .job-filter-field--search {
    grid-column: span 2;
  }

  .job-filter-grid--registry .job-filter-advanced__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (min-width: 761px) and (max-width: 1320px) {

  .job-list-table th,
  .job-list-table td {
    padding-inline: 9px;
  }

  .job-list-table th:nth-child(2),
  .job-list-table td:nth-child(2) {
    width: 18%;
  }

  .job-list-table th:nth-child(3),
  .job-list-table td:nth-child(3) {
    width: 13%;
  }

  .job-list-table th:nth-child(5),
  .job-list-table td:nth-child(5) {
    width: 12%;
  }

  .job-list-table th:nth-child(6),
  .job-list-table td:nth-child(6) {
    width: 15%;
  }

  .job-list-table th:nth-child(8),
  .job-list-table td:nth-child(8) {
    width: 11.5%;
  }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.job-list-page) {
    padding-top: 12px;
  }

  .job-list-page {
    gap: 12px;
  }

  .job-summary-strip,
  .job-summary-strip--queue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-summary-strip--queue .job-summary-item:last-child {
    grid-column: span 2;
  }

  .job-summary-item {
    min-height: 76px;
    gap: 10px;
    padding: 12px;
    border-right: 1px solid var(--admin-border);
    border-bottom: 1px solid var(--admin-border);
  }

  .job-summary-item:nth-child(2n) {
    border-right: 0;
  }

  .job-summary-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .job-summary-strip--queue .job-summary-item:last-child {
    border-right: 0;
    border-bottom: 0;
  }

  .job-summary-item__icon {
    width: 34px;
    height: 34px;
  }

  .job-summary-item strong {
    font-size: 19px;
  }

  .job-summary-item em {
    white-space: normal;
  }

  .job-directory__header {
    align-items: flex-start;
    padding: 12px;
  }

  .job-filter-clear {
    margin-top: 1px;
  }

  .job-filter-grid--registry,
  .job-filter-grid--queue {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .job-filter-grid--registry .job-filter-field--search,
  .job-filter-grid--queue .job-filter-field--search {
    grid-column: auto;
  }

  .job-filter-grid--registry .job-filter-advanced {
    display: block;
    grid-column: 1 / -1;
    margin: -2px 0 0;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: #fff;
  }

  .job-filter-grid--registry .job-filter-advanced__summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 600;
  }

  .job-filter-grid--registry .job-filter-advanced__summary::-webkit-details-marker {
    display: none;
  }

  .job-filter-grid--registry .job-filter-advanced__summary::after {
    content: "⌄";
    margin-left: auto;
    color: var(--admin-muted);
    font-size: 16px;
    line-height: 1;
    transform: translateY(-1px);
  }

  .job-filter-grid--registry .job-filter-advanced[open] .job-filter-advanced__summary {
    border-bottom: 1px solid var(--admin-border);
  }

  .job-filter-grid--registry .job-filter-advanced[open] .job-filter-advanced__summary::after {
    content: "⌃";
  }

  .job-filter-grid--registry .job-filter-advanced__summary strong {
    color: var(--admin-primary);
    font-size: 11px;
  }

  .job-filter-grid--registry .job-filter-advanced__hint {
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 500;
  }

  .job-filter-grid--registry .job-filter-advanced__fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .job-filter-grid--registry .job-filter-advanced__summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.12);
    outline-offset: -3px;
  }

  .job-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .job-filter-actions .btn:only-child {
    grid-column: 1 / -1;
  }

  .job-list-table-shell {
    padding: 10px;
  }

  .job-list-table,
  .job-list-table tbody,
  .job-list-table tr,
  .job-list-table td {
    display: block;
    width: 100%;
  }

  .job-list-table thead {
    display: none;
  }

  .job-list-table tbody {
    display: grid;
    gap: 10px;
  }

  .job-list-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "job state"
      "service service"
      "client client"
      "schedule technician"
      "total actions";
    gap: 10px 14px;
    padding: 13px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: #fff;
  }

  .job-list-table tbody tr.is-overdue {
    border-color: #f0caca;
    background: linear-gradient(135deg, rgba(227, 54, 54, 0.055), #fff 52%);
  }

  .job-list-table td,
  .job-list-table tr:last-child td {
    width: auto !important;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    text-align: left !important;
  }

  .job-list-table__job {
    grid-area: job;
  }

  .job-list-table__client {
    grid-area: client;
    padding-top: 9px !important;
    border-top: 1px solid var(--admin-border) !important;
  }

  .job-list-table__service {
    grid-area: service;
  }

  .job-list-table__schedule {
    grid-area: schedule;
  }

  .job-list-table__technician {
    grid-area: technician;
  }

  .job-list-table__state {
    grid-area: state;
  }

  .job-list-table__total {
    grid-area: total;
    align-self: center;
  }

  .job-list-table__actions {
    grid-area: actions;
    align-self: center;
  }

  .job-list-table__schedule::before,
  .job-list-table__technician::before,
  .job-list-table__total::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .job-state-stack {
    justify-content: flex-end;
  }

  .job-list-table__client small,
  .job-list-table__client > span {
    max-width: 100%;
  }

  .job-actions-menu__panel {
    width: min(205px, calc(100vw - 48px));
  }

  .job-queue-group__header {
    padding-inline: 12px;
  }
}

@media screen and (max-width: 420px) {
  .job-summary-item {
    gap: 8px;
    padding: 11px 10px;
  }

  .job-summary-item small,
  .job-summary-item em {
    font-size: 9.5px;
  }

  .job-list-table tbody tr {
    grid-template-areas:
      "job state"
      "service service"
      "client client"
      "schedule schedule"
      "technician technician"
      "total actions";
  }
}

/* Phase 6A-5: Day and Month use the same operational workspace as Week. */
@media screen {
  .schedule-job-card__footer { justify-content: space-between; gap: 8px; }
  .schedule-job-card__footer > a { color: var(--admin-primary); font-size: 10.5px; font-weight: 750; white-space: nowrap; }
  .schedule-week-grid .schedule-job-card__footer > a,
  .schedule-mobile-agenda .schedule-job-card__footer > a { display: none; }
  .schedule-day-workspace .schedule-day-agenda { display: grid; gap: 12px; padding: 14px; background: #f7f9fc; }
  .schedule-day-agenda__availability { display: grid; grid-template-columns: auto repeat(auto-fit, minmax(210px, 1fr)); gap: 7px; align-items: center; padding: 10px 11px; border: 1px solid #f0d8ae; border-radius: 9px; color: #855016; background: #fff9ed; font-size: 11px; }
  .schedule-day-agenda__availability strong { color: #6d4619; font-size: 11px; }
  .schedule-day-agenda__availability span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-day-agenda__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; gap: 10px; }
  .schedule-day-workspace .schedule-job-card { min-height: 168px; padding: 12px; }
  .schedule-day-workspace .schedule-job-card__client { font-size: 13px; }
  .schedule-month-grid { min-width: 0; }
  .schedule-month-weekdays, .schedule-month-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .schedule-month-weekdays { border-bottom: 1px solid var(--admin-border); background: #f7f9fc; }
  .schedule-month-weekdays strong { padding: 9px 10px; color: var(--admin-muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
  .schedule-month-week + .schedule-month-week { border-top: 1px solid var(--admin-border); }
  .schedule-month-day { min-width: 0; min-height: 142px; padding: 8px; border-right: 1px solid var(--admin-border); background: #fff; }
  .schedule-month-day:last-child { border-right: 0; }
  .schedule-month-day.is-outside { background: #fafbfc; }
  .schedule-month-day.is-today { box-shadow: inset 0 3px 0 var(--admin-primary); background: #f7faff; }
  .schedule-month-day > header { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-bottom: 6px; }
  .schedule-month-day > header strong { color: var(--admin-text); font-size: 12px; }
  .schedule-month-day.is-outside > header strong { color: #a9b3c2; }
  .schedule-month-day > header span, .schedule-month-agenda__day > header span { padding: 2px 5px; border-radius: 999px; color: var(--admin-primary); background: #eaf1ff; font-size: 9px; font-weight: 750; }
  .schedule-month-availability { display: grid; max-width: 100%; gap: 2px; margin-bottom: 5px; padding: 4px 6px; overflow: hidden; border-radius: 4px; color: #8b4b00; background: #fff4df; font-size: 10.5px; font-weight: 700; line-height: 1.2; }
  .schedule-month-availability span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-month-jobs { display: grid; gap: 4px; }
  .schedule-month-job { min-width: 0; display: flex; align-items: baseline; gap: 5px; padding: 5px 6px; border-left: 2px solid #86aef0; border-radius: 4px; color: var(--admin-text); background: #f4f8ff; font-size: 12px; line-height: 1.25; }
  .schedule-month-job:hover { color: var(--admin-primary); background: #eaf2ff; }
  .schedule-month-job b { flex: 0 0 auto; color: #526885; font-size: 10.5px; }
  .schedule-month-job span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-month-job.is-overdue { border-left-color: #de7979; background: #fff4f4; }
  .schedule-month-job.is-muted { opacity: .62; }
  .schedule-month-more { padding: 2px 0 0 6px; color: var(--admin-primary); font-size: 11px; font-weight: 750; }
  .schedule-month-agenda { display: none; }
}

@media screen and (max-width: 760px) {
  .schedule-day-workspace .schedule-day-agenda { padding: 9px; }
  .schedule-day-agenda__availability { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .schedule-day-agenda__cards { grid-template-columns: minmax(0, 1fr); }
  .schedule-month-grid { display: none; }
  .schedule-month-agenda { display: grid; gap: 9px; padding: 9px; background: #f7f9fc; }
  .schedule-month-agenda__day { overflow: hidden; border: 1px solid var(--admin-border); border-radius: 9px; background: #fff; }
  .schedule-month-agenda__day.is-today { box-shadow: inset 3px 0 0 var(--admin-primary); }
  .schedule-month-agenda__day > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-bottom: 1px solid var(--admin-border); }
  .schedule-month-agenda__day > header strong { font-size: 12px; }
  .schedule-month-agenda__day .schedule-day__availability { padding: 8px 10px 0; }
  .schedule-month-agenda__day .schedule-day-agenda__cards { padding: 9px; }
}

/* ================================================================
   PHASE 5B: PRODUCTS & INVENTORY + JOB CHEMICAL SALES
   ================================================================ */
@media screen {
  .admin-main:has(.inventory-page),
  .admin-main:has(.job-chemicals-page) {
    padding-top: 18px;
  }

  .inventory-page,
  .job-chemicals-page {
    display: grid;
    gap: 14px;
    width: 100%;
    color: var(--admin-text);
  }

  .inventory-page-header,
  .job-chemicals-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
  }

  .inventory-page-header h1,
  .job-chemicals-header h1 {
    margin: 2px 0 3px;
    font-size: clamp(25px, 2vw, 32px);
    line-height: 1.05;
  }

  .inventory-page-header p:last-child,
  .job-chemicals-header p:last-child {
    margin: 0;
    color: var(--admin-muted);
    font-size: 12px;
  }

  .inventory-view-tabs,
  .job-chemicals-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .inventory-view-tab {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border: 1px solid var(--admin-border);
    border-radius: 9px;
    background: var(--admin-surface);
    color: #53617a;
    font-size: 11.5px;
    font-weight: 800;
    text-decoration: none;
  }

  .inventory-view-tab.is-active {
    border-color: var(--admin-primary);
    background: var(--admin-primary);
    color: #fff;
  }

  .inventory-summary-strip,
  .job-chemicals-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .inventory-summary-strip article,
  .job-chemicals-summary article {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 18px;
    border-right: 1px solid var(--admin-border);
  }

  .inventory-summary-strip article:last-child,
  .job-chemicals-summary article:last-child { border-right: 0; }

  .inventory-summary-strip article > span:last-child,
  .job-chemicals-summary article > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .inventory-summary-strip small,
  .job-chemicals-summary small {
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 700;
  }

  .inventory-summary-strip strong,
  .job-chemicals-summary strong {
    color: var(--admin-text);
    font-size: 21px;
    line-height: 1.05;
  }

  .inventory-summary-strip em,
  .job-chemicals-summary em {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .inventory-summary-strip__icon,
  .job-chemicals-summary__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .inventory-summary-strip__icon .admin-icon,
  .job-chemicals-summary__icon .admin-icon { width: 18px; height: 18px; }
  .inventory-summary-strip__icon--green,
  .job-chemicals-summary__icon--green { background: var(--admin-success-soft); color: var(--admin-success); }
  .inventory-summary-strip__icon--red { background: var(--admin-danger-soft); color: var(--admin-danger); }
  .inventory-summary-strip__icon--violet { background: #f2eaff; color: #7b45d8; }
  .job-chemicals-summary__icon--amber { background: var(--admin-warning-soft); color: #d77a0c; }

  .inventory-directory,
  .inventory-sales-workspace,
  .job-chemicals-context,
  .job-chemicals-entry,
  .job-chemicals-ledger {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .inventory-directory,
  .inventory-sales-workspace,
  .job-chemicals-ledger { overflow: hidden; }

  .inventory-directory__header,
  .job-chemicals-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--admin-border);
  }

  .inventory-directory__header h2,
  .job-chemicals-section-heading h2,
  .job-chemicals-section-heading h3,
  .inventory-section-heading h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 15px;
    line-height: 1.2;
  }

  .inventory-directory__header p,
  .job-chemicals-section-heading p,
  .inventory-section-heading p {
    margin: 3px 0 0;
    color: var(--admin-muted);
    font-size: 10.5px;
    line-height: 1.45;
  }

  .inventory-create-details { margin-left: auto; }
  .inventory-create-details[open] { width: 100%; }
  .inventory-create-details > summary,
  .inventory-sales-create > summary {
    cursor: pointer;
    list-style: none;
  }
  .inventory-create-details > summary::-webkit-details-marker,
  .inventory-sales-create > summary::-webkit-details-marker { display: none; }
  .inventory-create-details > summary .admin-icon,
  .inventory-sales-create > summary .admin-icon { width: 15px; height: 15px; }

  .inventory-create-details__panel,
  .inventory-sales-create__panel {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid #dce7fa;
    border-radius: 10px;
    background: #f8faff;
  }

  .inventory-section-heading { margin-bottom: 13px; }

  .inventory-form-grid,
  .job-chemicals-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
  }

  .inventory-form-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-field--wide,
  .job-chemicals-field--wide { grid-column: span 2; }
  .inventory-field--full,
  .job-chemicals-field--full { grid-column: 1 / -1; }
  .inventory-form-grid .form-field small,
  .job-chemicals-form-grid .form-field small { margin-top: 3px; color: var(--admin-muted); font-size: 9.5px; line-height: 1.4; }
  .inventory-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }

  .inventory-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--admin-border);
    background: #fbfcfe;
  }

  .inventory-filter-field { min-width: 0; display: grid; align-content: start; gap: 5px; }
  .inventory-filter-field > span:first-child { color: #53617a; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
  .inventory-filter-field input,
  .inventory-filter-field select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 11px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    color: var(--admin-text);
    font: inherit;
    font-size: 11px;
  }

  .inventory-filter-search-control { position: relative; display: block; }
  .inventory-filter-search-control .admin-icon { position: absolute; top: 11px; left: 11px; width: 15px; height: 15px; color: #8a97ae; }
  .inventory-filter-search-control input { padding-left: 34px; }
  .inventory-filter-advanced > summary { display: none; }
  .inventory-filter-advanced__fields { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)) auto; gap: 10px; align-items: end; }
  .inventory-filter-actions { display: flex; gap: 7px; }

  .inventory-table-shell,
  .inventory-sales-table-shell,
  .job-chemicals-table-shell { overflow-x: auto; }

  .inventory-table,
  .inventory-sales-table,
  .job-chemicals-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
    table-layout: fixed;
  }

  .inventory-sales-table { min-width: 940px; }
  .job-chemicals-table { min-width: 1040px; }

  .inventory-table th,
  .inventory-sales-table th,
  .job-chemicals-table th {
    height: 40px;
    padding: 0 14px;
    border-bottom: 1px solid var(--admin-border);
    color: #65738e;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
  }

  .inventory-table td,
  .inventory-sales-table td,
  .job-chemicals-table td {
    height: 58px;
    padding: 9px 14px;
    border-bottom: 1px solid #edf1f7;
    color: #42506a;
    font-size: 10.5px;
    vertical-align: middle;
  }

  .inventory-table tr:last-child td,
  .inventory-sales-table tr:last-child td,
  .job-chemicals-table tr:last-child td { border-bottom: 0; }
  .inventory-table td strong,
  .inventory-sales-table td strong,
  .job-chemicals-table td strong { display: block; color: var(--admin-text); font-size: 11.5px; }
  .inventory-table td small,
  .inventory-sales-table td small,
  .job-chemicals-table td small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 9.5px; }
  .inventory-table th {
    height: 42px;
    font-size: 10.5px;
    line-height: 1.2;
  }
  .inventory-table td {
    height: 64px;
    font-size: 12px;
    line-height: 1.35;
  }
  .inventory-table td strong {
    font-size: 12.5px;
    line-height: 1.3;
  }
  .inventory-table td small {
    margin-top: 3px;
    font-size: 10.5px;
    line-height: 1.35;
  }
  .page-admin-crm .inventory-table .btn--small {
    font-size: 11.5px;
    white-space: nowrap;
  }
  .inventory-table a,
  .inventory-sales-table a { color: var(--admin-primary); font-weight: 800; text-decoration: none; }
  .inventory-table th:nth-child(1) { width: 25%; }
  .inventory-table th:nth-child(2) { width: 17%; }
  .inventory-table th:nth-child(3),
  .inventory-table th:nth-child(4) { width: 18%; }
  .inventory-table th:nth-child(5) { width: 11%; }
  .inventory-table th:nth-child(6) { width: 11%; }
  .inventory-table__actions { text-align: right; }
  .inventory-stock-note { color: #b46c11; font-weight: 800; }
  .inventory-stock-note--out { color: var(--admin-danger); }

  .inventory-mobile-list,
  .inventory-sales-mobile-list,
  .job-chemicals-mobile-list { display: none; }

  .inventory-empty-state,
  .job-chemicals-empty {
    min-height: 250px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 28px;
    color: var(--admin-muted);
    text-align: center;
  }
  .inventory-empty-state > span,
  .job-chemicals-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #eaf1ff; color: var(--admin-primary); }
  .inventory-empty-state .admin-icon,
  .job-chemicals-empty .admin-icon { width: 20px; height: 20px; }
  .inventory-empty-state h3,
  .job-chemicals-empty h3 { margin: 2px 0 0; color: var(--admin-text); font-size: 13px; }
  .inventory-empty-state p,
  .job-chemicals-empty p { margin: 0 0 5px; font-size: 10.5px; }

  .inventory-dialog {
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    background: #f4f7fb;
    color: var(--admin-text);
    box-shadow: 0 26px 80px rgba(7, 26, 56, .28);
  }
  .inventory-dialog::backdrop { background: rgba(7, 26, 56, .58); }
  .inventory-dialog__header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--admin-border); background: #fff; }
  .inventory-dialog__header h2 { margin: 2px 0 3px; font-size: 21px; }
  .inventory-dialog__header p:last-child { margin: 0; color: var(--admin-muted); font-size: 10.5px; }
  .inventory-dialog__close { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; color: #53617a; cursor: pointer; }
  .inventory-dialog__close .admin-icon { width: 17px; height: 17px; }
  .inventory-product-overview,
  .inventory-sale-snapshot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 14px; overflow: hidden; border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-border); }
  .inventory-product-overview > div,
  .inventory-sale-snapshot > div { min-height: 72px; display: grid; align-content: center; gap: 2px; padding: 12px 14px; background: #fff; }
  .inventory-product-overview small { color: var(--admin-muted); font-size: 10.5px; font-weight: 700; }
  .inventory-sale-snapshot small { color: var(--admin-muted); font-size: 9.5px; font-weight: 700; }
  .inventory-product-overview strong,
  .inventory-sale-snapshot strong { font-size: 16px; }
  .inventory-product-overview em { color: var(--admin-muted); font-size: 10.5px; font-style: normal; }
  .inventory-dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 14px 14px; }
  .inventory-operation-card { min-width: 0; padding: 16px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .inventory-operation-card--wide { grid-column: 1 / -1; }
  .inventory-operation-card--danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #f2cccc; background: #fff8f8; }
  .inventory-operation-card--danger h3 { margin: 0 0 4px; font-size: 13px; }
  .inventory-operation-card--danger p { margin: 0; color: #7a6470; font-size: 10.5px; }
  .inventory-recent-sales { display: grid; max-height: 220px; overflow: auto; }
  .inventory-recent-sales a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf1f7; color: inherit; text-decoration: none; }
  .inventory-recent-sales a:last-child { border-bottom: 0; }
  .inventory-recent-sales a > span { min-width: 0; display: grid; gap: 2px; }
  .inventory-recent-sales a > span:last-child { text-align: right; }
  .inventory-recent-sales strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
  .inventory-recent-sales small,
  .inventory-empty-copy { margin: 0; color: var(--admin-muted); font-size: 10.5px; }
  .inventory-sale-dialog { width: min(680px, calc(100vw - 32px)); }
  .inventory-sale-dialog > form { margin: 14px; padding: 16px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .inventory-sale-dialog .inventory-sale-snapshot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inventory-dialog-danger { display: flex; justify-content: flex-end; border-color: #f2cccc !important; background: #fff8f8 !important; }

  .inventory-period-filter { display: grid; grid-template-columns: 150px 150px max-content; justify-content: start; gap: 10px; align-items: end; padding: 13px 18px; border-bottom: 1px solid var(--admin-border); background: #fbfcfe; }
  .inventory-sales-create { padding: 14px 18px; border-bottom: 1px solid var(--admin-border); }
  .inventory-sales-create[open] > summary { margin-bottom: 0; }

  .job-chemicals-context { display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; }
  .job-chemicals-context__reference { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-right: 1px solid var(--admin-border); background: #f8faff; }
  .job-chemicals-context__reference > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #eaf1ff; color: var(--admin-primary); }
  .job-chemicals-context__reference .admin-icon { width: 18px; height: 18px; }
  .job-chemicals-context__reference div { min-width: 0; display: grid; gap: 1px; }
  .job-chemicals-context__reference small,
  .job-chemicals-context dt { color: var(--admin-muted); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .job-chemicals-context__reference strong { font-size: 15px; }
  .job-chemicals-context__reference em { overflow: hidden; color: var(--admin-muted); font-size: 9.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
  .job-chemicals-context dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
  .job-chemicals-context dl > div { min-width: 0; display: grid; align-content: center; gap: 4px; padding: 13px 16px; border-right: 1px solid var(--admin-border); }
  .job-chemicals-context dl > div:last-child { border-right: 0; }
  .job-chemicals-context dt,
  .job-chemicals-context dd { margin: 0; }
  .job-chemicals-context dd { overflow-wrap: anywhere; color: var(--admin-text); font-size: 10.5px; font-weight: 700; }
  .job-chemicals-context a { color: var(--admin-primary); text-decoration: none; }
  .job-chemicals-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .job-chemicals-entry { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); overflow: hidden; }
  .job-chemicals-entry__form { padding: 18px; }
  .job-chemicals-entry__form .job-chemicals-section-heading { padding: 0 0 14px; border: 0; }
  .job-chemicals-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-chemicals-entry__note { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border-left: 1px solid var(--admin-border); background: #f8faff; }
  .job-chemicals-entry__note > span { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--admin-warning-soft); color: #d77a0c; }
  .job-chemicals-entry__note .admin-icon { width: 18px; height: 18px; }
  .job-chemicals-entry__note h2 { margin: 2px 0 8px; font-size: 14px; }
  .job-chemicals-entry__note p { margin: 0 0 9px; color: #53617a; font-size: 10px; line-height: 1.55; }
  .job-chemicals-table__notes { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
}

@media screen and (max-width: 1180px) {
  .inventory-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-field--wide { grid-column: auto; }
  .inventory-field--full { grid-column: 1 / -1; }
  .job-chemicals-context { grid-template-columns: 220px minmax(0, 1fr); }
  .job-chemicals-context dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .job-chemicals-context dl > div:nth-child(2) { border-right: 0; }
  .job-chemicals-context dl > div:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .job-chemicals-entry { grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); }
}

@media screen and (max-width: 900px) {
  .inventory-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-summary-strip article:nth-child(2) { border-right: 0; }
  .inventory-summary-strip article:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .inventory-summary-strip article:nth-child(3) { border-right: 1px solid var(--admin-border); }
  .inventory-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .inventory-filter-advanced__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-filter-actions { grid-column: 1 / -1; }
  .inventory-dialog-grid { grid-template-columns: minmax(0, 1fr); }
  .inventory-operation-card--wide { grid-column: auto; }
  .job-chemicals-context { grid-template-columns: minmax(0, 1fr); }
  .job-chemicals-context__reference { border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .job-chemicals-entry { grid-template-columns: minmax(0, 1fr); }
  .job-chemicals-entry__note { border-top: 1px solid var(--admin-border); border-left: 0; }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.inventory-page),
  .admin-main:has(.job-chemicals-page) { padding-top: 12px; }
  .inventory-page,
  .job-chemicals-page { gap: 11px; }
  .inventory-page-header,
  .job-chemicals-header { align-items: flex-start; flex-direction: column; gap: 11px; }
  .inventory-view-tabs,
  .job-chemicals-header__actions { width: 100%; }
  .inventory-view-tab,
  .job-chemicals-header__actions .btn { flex: 1; justify-content: center; }
  .inventory-summary-strip,
  .job-chemicals-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-summary-strip article,
  .job-chemicals-summary article { min-height: 82px; padding: 11px; }
  .inventory-summary-strip article:nth-child(2),
  .job-chemicals-summary article:nth-child(2) { border-right: 0; }
  .inventory-summary-strip article:nth-child(-n + 2),
  .job-chemicals-summary article:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .inventory-summary-strip article:nth-child(3),
  .job-chemicals-summary article:nth-child(3) { border-right: 1px solid var(--admin-border); }
  .inventory-summary-strip article:last-child { border-right: 0; }
  .job-chemicals-summary article:last-child { grid-column: 1 / -1; border-right: 0; }
  .inventory-summary-strip__icon,
  .job-chemicals-summary__icon { width: 34px; height: 34px; }
  .inventory-summary-strip strong,
  .job-chemicals-summary strong { font-size: 17px; }
  .inventory-directory__header { align-items: flex-start; flex-direction: column; }
  .inventory-create-details,
  .inventory-create-details > summary,
  .inventory-sales-create > summary { width: 100%; }
  .inventory-create-details > summary,
  .inventory-sales-create > summary { justify-content: center; }
  .inventory-create-details__panel,
  .inventory-sales-create__panel { padding: 13px; }
  .inventory-form-grid,
  .inventory-form-grid--compact,
  .job-chemicals-form-grid { grid-template-columns: minmax(0, 1fr); }
  .inventory-field--wide,
  .inventory-field--full,
  .job-chemicals-field--wide,
  .job-chemicals-field--full { grid-column: auto; }
  .inventory-filter-grid { padding: 11px; }
  .inventory-filter-advanced > summary { min-height: 42px; display: flex; align-items: center; gap: 5px; padding: 0 12px; border: 1px solid var(--admin-border); border-radius: 9px; background: #fff; color: var(--admin-text); cursor: pointer; list-style: none; font-weight: 800; }
  .inventory-filter-advanced > summary::-webkit-details-marker { display: none; }
  .inventory-filter-advanced__summary strong { color: var(--admin-primary); }
  .inventory-filter-advanced__hint { margin-left: auto; color: var(--admin-muted); font-size: 10px; font-weight: 500; }
  .inventory-filter-advanced__fields { grid-template-columns: minmax(0, 1fr); padding-top: 9px; }
  .inventory-filter-actions { grid-column: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-filter-actions .btn { justify-content: center; }
  .inventory-table-shell,
  .inventory-sales-table-shell,
  .job-chemicals-table-shell { display: none; }
  .inventory-mobile-list,
  .inventory-sales-mobile-list,
  .job-chemicals-mobile-list { display: grid; gap: 10px; padding: 11px; }
  .inventory-mobile-card,
  .inventory-sale-card,
  .job-chemical-card { min-width: 0; display: grid; gap: 11px; padding: 14px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .inventory-mobile-card header,
  .inventory-sale-card header,
  .job-chemical-card header { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .inventory-mobile-card header > div,
  .inventory-sale-card header > div,
  .job-chemical-card header > div { min-width: 0; display: grid; gap: 3px; }
  .inventory-mobile-card header strong,
  .inventory-sale-card header strong,
  .job-chemical-card header strong { overflow-wrap: anywhere; color: var(--admin-text); font-size: 13px; }
  .inventory-mobile-card header small,
  .inventory-sale-card header small,
  .job-chemical-card header small { color: var(--admin-muted); font-size: 9.5px; }
  .inventory-mobile-card dl,
  .inventory-sale-card dl,
  .job-chemical-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
  .inventory-mobile-card dl > div,
  .inventory-sale-card dl > div,
  .job-chemical-card dl > div { min-width: 0; display: grid; gap: 2px; padding: 9px; border-radius: 8px; background: #f7f9fc; }
  .inventory-mobile-card dt,
  .inventory-sale-card dt,
  .job-chemical-card dt { color: var(--admin-muted); font-size: 8.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
  .inventory-mobile-card dd,
  .inventory-sale-card dd,
  .job-chemical-card dd { margin: 0; overflow-wrap: anywhere; color: var(--admin-text); font-size: 10.5px; font-weight: 800; }
  .inventory-mobile-card__alert { margin: 0; padding: 7px 9px; border-radius: 7px; background: var(--admin-warning-soft); color: #a7600a; font-size: 9.5px; font-weight: 800; }
  .inventory-mobile-card__alert--out { background: var(--admin-danger-soft); color: var(--admin-danger); }
  .inventory-mobile-card header small { font-size: 10.5px; line-height: 1.35; }
  .inventory-mobile-card dt { font-size: 10px; }
  .inventory-mobile-card dd { font-size: 11.5px; line-height: 1.35; }
  .inventory-mobile-card__alert { font-size: 10.5px; line-height: 1.35; }
  .inventory-sale-card > p,
  .job-chemical-card > p { margin: 0; overflow-wrap: anywhere; color: #53617a; font-size: 10px; }
  .inventory-sale-card a { color: var(--admin-primary); font-weight: 800; text-decoration: none; }
  .inventory-period-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px; }
  .inventory-period-filter .btn { grid-column: 1 / -1; justify-content: center; }
  .inventory-sales-create { padding: 11px; }
  .inventory-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .inventory-dialog__header { padding: 14px; }
  .inventory-product-overview,
  .inventory-sale-snapshot,
  .inventory-sale-dialog .inventory-sale-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px; }
  .inventory-dialog-grid { padding: 0 10px 10px; }
  .inventory-operation-card { padding: 13px; }
  .inventory-operation-card--danger { align-items: stretch; flex-direction: column; }
  .inventory-operation-card--danger .btn { width: 100%; justify-content: center; }
  .inventory-sale-dialog > form { margin: 10px; padding: 13px; }
  .job-chemicals-context dl { grid-template-columns: minmax(0, 1fr); }
  .job-chemicals-context dl > div { border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .job-chemicals-context dl > div:last-child { border-bottom: 0; }
  .job-chemicals-entry__form { padding: 14px; }
  .job-chemicals-entry__note { padding: 14px; }
}

@media screen and (max-width: 420px) {
  .inventory-summary-strip article,
  .job-chemicals-summary article { padding: 10px; }
  .inventory-summary-strip article { align-items: flex-start; flex-direction: column; gap: 7px; }
  .inventory-summary-strip em { white-space: normal; }
  .inventory-mobile-card dl,
  .inventory-sale-card dl,
  .job-chemical-card dl { grid-template-columns: minmax(0, 1fr); }
  .inventory-product-overview,
  .inventory-sale-snapshot,
  .inventory-sale-dialog .inventory-sale-snapshot { grid-template-columns: minmax(0, 1fr); }
}

* {
  box-sizing: border-box;
}

html {
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--slate-900);
  background: var(--slate-100);
}

body {
  margin: 0;
}

a {
  color: var(--blue-600);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

small {
  color: var(--slate-600);
}

code {
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: rgba(19, 32, 74, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.3rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--teal-400));
  color: var(--white);
}

.btn--muted {
  border: 1px solid rgba(51, 141, 255, 0.28);
  background: rgba(51, 141, 255, 0.08);
  color: var(--blue-600);
}

.btn--danger {
  border: 1px solid rgba(163, 33, 33, 0.22);
  background: rgba(163, 33, 33, 0.08);
  color: var(--danger);
}

.btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: var(--white);
}

.btn--small {
  padding: 0.58rem 0.95rem;
  font-size: 0.86rem;
}

.btn--wide {
  width: 100%;
}

.admin-actions form {
  margin: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-label {
  color: var(--slate-900);
  font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(19, 32, 74, 0.14);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--slate-900);
  font: inherit;
}

.form-textarea {
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(51, 141, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(51, 141, 255, 0.12);
}

.form-error {
  color: var(--danger);
  font-size: 0.84rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.photo-upload-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 10px;
}

.photo-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.chemical-sale-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 10px;
}

.chemical-sale-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(120px, 0.7fr) minmax(130px, 0.75fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.alert {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.alert--success {
  background: rgba(38, 190, 129, 0.16);
  color: var(--success);
}

.alert--danger {
  background: rgba(224, 56, 56, 0.16);
  color: var(--danger);
}

.alert--info {
  background: rgba(79, 144, 255, 0.16);
  color: var(--blue-600);
}

.page-admin {
  min-height: 100vh;
  background: var(--slate-100);
}

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth__card {
  width: min(440px, 100%);
  padding: 42px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.auth__subtitle,
.auth__hint,
.admin-muted {
  color: var(--slate-600);
}

.auth form {
  display: grid;
  gap: 16px;
  text-align: left;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  overflow-y: auto;
  background: linear-gradient(180deg, #07152f 0%, #0c2149 100%);
  color: var(--white);
}

.admin-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 26px;
  color: var(--white);
  font-weight: 800;
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
  font-weight: 500;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.admin-nav-group summary {
  cursor: pointer;
  padding: 12px;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  list-style: none;
}

.admin-nav-group summary::-webkit-details-marker {
  display: none;
}

.admin-nav-group summary::after {
  content: "▾";
  float: right;
  color: rgba(255, 255, 255, 0.62);
  transition: transform 0.2s ease;
}

.admin-nav-group:not([open]) summary::after {
  transform: rotate(-90deg);
}

.admin-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.admin-nav-group a {
  margin: 0 8px 8px;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.admin-logout {
  margin-top: 28px;
}

.admin-main {
  width: min(1440px, 100%);
  padding: 36px;
}

.admin-history-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-history-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(51, 141, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--navy);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(19, 32, 74, 0.08);
}

.admin-history-button:hover {
  border-color: rgba(51, 141, 255, 0.75);
  background: var(--white);
}

.admin-flashes {
  margin-bottom: 22px;
}

.admin-page-header,
.admin-panel__header,
.admin-job-card__top,
.admin-tech-card__title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.admin-page-header {
  margin-bottom: 28px;
}

.admin-page-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.admin-page-header p {
  color: var(--slate-600);
}

.admin-kicker {
  margin: 0;
  color: var(--blue-600);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-actions--stack {
  align-items: stretch;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-stat,
.admin-panel,
.admin-job-card,
.admin-tech-card,
.admin-table-wrap,
.admin-form,
.admin-filter-bar {
  background: var(--white);
  border: 1px solid rgba(19, 32, 74, 0.08);
  border-radius: 22px;
  box-shadow: var(--shadow-light);
}

.admin-stat {
  padding: 20px;
}

.admin-stat span {
  display: block;
  color: var(--slate-600);
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--slate-900);
  font-size: 2rem;
}

.admin-stat--warn strong {
  color: var(--danger);
}

.admin-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

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

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

.admin-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.admin-panel__header {
  margin-bottom: 18px;
}

.admin-panel__header h2,
.admin-panel h2 {
  margin: 0 0 14px;
}

.admin-panel__header span,
.admin-meta,
.admin-list span,
.admin-tech-card span,
.admin-details dd {
  color: var(--slate-600);
}

.admin-card-list,
.admin-tech-list,
.admin-history {
  display: grid;
  gap: 12px;
}

.admin-tech-list--editable {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-job-card,
.admin-tech-card {
  padding: 16px;
}

.admin-job-card p {
  margin: 8px 0;
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.88rem;
}

.admin-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.admin-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(19, 32, 74, 0.08);
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(19, 32, 74, 0.08);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--slate-600);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-empty-cell {
  text-align: center;
  color: var(--slate-600);
}

.empty-state {
  padding: 42px;
  border-radius: 22px;
  background: var(--white);
  color: var(--slate-600);
  text-align: center;
  box-shadow: var(--shadow-light);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(51, 141, 255, 0.12);
  color: var(--blue-600);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-badge--completed,
.admin-badge--active,
.admin-badge--paid {
  background: rgba(38, 190, 129, 0.16);
  color: var(--success);
}

.admin-badge--queued,
.admin-badge--scheduled,
.admin-badge--approved {
  background: rgba(51, 141, 255, 0.14);
  color: var(--blue-600);
}

.admin-badge--needs-follow-up,
.admin-badge--priority-emergency,
.admin-badge--priority-high {
  background: rgba(224, 56, 56, 0.14);
  color: var(--danger);
}

.admin-badge--cancelled,
.admin-badge--disabled {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.admin-badge--priority-normal {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.admin-badge--priority-low {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.admin-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
}

.admin-filter-bar--wrap {
  flex-wrap: wrap;
}

.admin-filter-bar .form-input,
.admin-filter-bar .form-select {
  min-width: 170px;
}

.admin-form {
  padding: 28px;
}

.admin-form--narrow {
  max-width: 560px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-select[multiple] {
  min-height: 150px;
}

.admin-check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  font-weight: 700;
}

.admin-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-check--box {
  min-height: auto;
  padding: 12px;
  border: 1px solid rgba(19, 32, 74, 0.12);
  border-radius: 14px;
  background: rgba(51, 141, 255, 0.05);
}

.admin-check--box input {
  width: 18px;
  height: 18px;
}

.admin-details {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
}

.admin-details dt {
  color: var(--slate-900);
  font-weight: 800;
}

.admin-details dd {
  margin: 0;
}

.admin-note {
  padding: 14px 0;
  border-bottom: 1px solid rgba(19, 32, 74, 0.08);
}

.admin-note:last-child {
  border-bottom: none;
}

.admin-note p {
  margin: 6px 0 0;
  color: var(--slate-600);
}

.admin-rotation-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.admin-rotation-counts div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(51, 141, 255, 0.08);
}

.admin-rotation-counts span {
  display: block;
  margin-top: 4px;
  color: var(--blue-600);
  font-weight: 800;
}

.admin-inline-form,
.rotation-rows {
  display: grid;
  gap: 12px;
}

.rotation-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.rotation-row__index {
  color: var(--slate-900);
  font-weight: 800;
}

.admin-history article {
  padding: 14px;
  border-radius: 16px;
  background: rgba(19, 32, 74, 0.05);
}

.admin-history ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.admin-history li {
  display: flex;
  justify-content: space-between;
}

.admin-calendar {
  display: grid;
  gap: 18px;
}

.admin-calendar-day {
  padding: 20px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: var(--shadow-light);
}

.admin-calendar-day h2 {
  margin-bottom: 14px;
}

.admin-report-list {
  display: grid;
  gap: 14px;
}

.admin-report-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(340px, 1.4fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(19, 32, 74, 0.08);
  border-radius: 18px;
  background: rgba(51, 141, 255, 0.04);
}

.admin-report-card span {
  display: block;
  margin-top: 4px;
  color: var(--slate-600);
}

.admin-report-bar {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 32, 74, 0.1);
}

.admin-report-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-400));
}

.admin-report-card dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.admin-report-card dt {
  color: var(--slate-600);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-report-card dd {
  margin: 0;
  color: var(--slate-900);
  font-size: 1.2rem;
  font-weight: 800;
}

.admin-table--accounting {
  min-width: 1720px;
}

.admin-table--accounting .form-input,
.admin-table--accounting .form-select,
.admin-table--accounting .form-textarea {
  min-width: 105px;
  padding: 0.62rem 0.72rem;
  font-size: 0.86rem;
}

.admin-stat-grid--accounting {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.warehouse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.warehouse-card {
  padding: 20px;
  border: 1px solid rgba(19, 32, 74, 0.08);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-light);
}

.warehouse-card--low {
  border-color: rgba(224, 56, 56, 0.3);
}

.warehouse-card--inactive {
  opacity: 0.68;
}

.warehouse-card__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.warehouse-card__top h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.warehouse-card__top > strong {
  color: var(--blue-600);
  font-size: 1.5rem;
  white-space: nowrap;
}

.warehouse-card .admin-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.86rem;
}

.warehouse-card .admin-details > div {
  min-width: 0;
}

.warehouse-card .admin-details dt,
.warehouse-card .admin-details dd {
  margin: 0;
}

.warehouse-card .admin-details dt {
  color: var(--slate-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warehouse-card .admin-details dd {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.warehouse-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  background: var(--slate-100);
  color: var(--slate-900);
  box-shadow: 0 28px 90px rgba(19, 32, 74, 0.28);
}

.warehouse-dialog::backdrop {
  background: rgba(19, 32, 74, 0.5);
}

.warehouse-dialog__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-photo-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  border: 1px solid rgba(19, 32, 74, 0.08);
  box-shadow: var(--shadow-light);
}

.admin-photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(19, 32, 74, 0.08);
}

.admin-photo-card div {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.admin-photo-card span {
  color: var(--slate-600);
  font-size: 0.86rem;
}

.admin-month-grid {
  display: grid;
  gap: 8px;
}

.admin-month-weekdays,
.admin-month-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.admin-month-weekdays {
  color: var(--slate-600);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-month-day {
  min-height: 138px;
  padding: 10px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid rgba(19, 32, 74, 0.1);
  box-shadow: 0 8px 24px rgba(19, 32, 74, 0.06);
}

.admin-month-day--muted {
  opacity: 0.45;
}

.admin-month-day__date {
  margin-bottom: 8px;
  color: var(--slate-700);
  font-weight: 800;
}

.admin-calendar-chip {
  display: block;
  overflow: hidden;
  width: 100%;
  margin-bottom: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--slate-900);
  background: rgba(51, 141, 255, 0.13);
  font-size: 0.76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-calendar-chip--high,
.admin-calendar-chip--emergency {
  background: rgba(224, 56, 56, 0.14);
  color: var(--danger);
}

.admin-calendar-chip--unavailable,
.admin-unavailability-note {
  color: #8b4b00;
  background: rgba(255, 184, 77, 0.2);
}

.admin-unavailability-note {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-unavailability-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 184, 77, 0.12);
}

.admin-unavailability-card div {
  display: grid;
}

.admin-unavailability-card span,
.admin-catch-up {
  color: var(--slate-600);
  font-size: 0.84rem;
}

.admin-calendar-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.admin-mini-bars {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.admin-mini-bars div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.admin-mini-bars span,
.admin-mini-bars em {
  color: var(--slate-600);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.admin-mini-bars div::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(19, 32, 74, 0.1);
}

.admin-mini-bars strong {
  grid-column: 2;
  grid-row: 1;
  display: block;
  height: 8px;
  max-width: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-400));
}

.visit-meter {
  display: grid;
  gap: 7px;
}

.visit-meter em {
  color: var(--blue-600);
  font-style: normal;
  font-weight: 800;
}

.visit-meter::before,
.visit-meter b {
  grid-column: 1;
  grid-row: 2;
  display: block;
  height: 10px;
  border-radius: 999px;
}

.visit-meter::before {
  content: "";
  background: rgba(19, 32, 74, 0.1);
}

.visit-meter b {
  max-width: 100%;
  background: linear-gradient(135deg, var(--blue-500), var(--teal-400));
}

.admin-form-grid--compact {
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.admin-stack {
  display: grid;
  gap: 1rem;
}

.task-branch-list,
.task-template-list,
.report-task-preview {
  display: grid;
  gap: 0.85rem;
}

.task-branch-card,
.task-template-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(19, 32, 74, 0.08);
  border-radius: var(--radius-md);
  background: rgba(51, 141, 255, 0.05);
}

.task-template-card {
  justify-content: flex-start;
}

.task-template-card > div:nth-child(2) {
  flex: 1 1 auto;
}

.task-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-left: auto;
}

.task-branch-card p,
.task-template-card p,
.report-task-preview p {
  margin-bottom: 0.2rem;
  color: var(--slate-600);
}

.task-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(51, 141, 255, 0.14);
  color: var(--blue-600);
  font-weight: 800;
}

.work-wizard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 1.2rem;
  align-items: start;
}

.wizard-task-list,
.wizard-task-detail {
  display: grid;
  gap: 1rem;
}

.wizard-task-list {
  padding: 0;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

.wizard-task-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(19, 32, 74, 0.08);
}

.wizard-task-list__header h2 {
  margin: 0;
}

.wizard-task-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(19, 32, 74, 0.08);
}

.wizard-task-item__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(19, 32, 74, 0.1);
  color: var(--slate-700);
  font-weight: 900;
}

.wizard-task-item--completed .wizard-task-item__icon {
  background: rgba(17, 102, 72, 0.14);
  color: var(--success);
}

.wizard-task-item--skipped .wizard-task-item__icon {
  background: rgba(163, 33, 33, 0.1);
  color: var(--danger);
}

.wizard-task-item__body {
  display: grid;
  gap: 0.8rem;
}

.wizard-task-item__body p {
  margin: 0;
  color: var(--slate-600);
}

.report-style-preview,
.work-report {
  --report-primary: var(--slate-900);
  --report-accent: var(--blue-500);
}

.report-style-preview {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid rgba(19, 32, 74, 0.08);
}

.report-style-preview__bar,
.work-report__section h2 {
  padding: 0.42rem 0.55rem;
  margin: 0;
  background: var(--report-primary);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.report-style-preview__task,
.work-report__task,
.work-report__box {
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(19, 32, 74, 0.06);
}

.report-toolbar {
  margin-bottom: 1rem;
}

.work-report {
  width: min(900px, 100%);
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--white);
  color: #00173a;
  box-shadow: var(--shadow-card);
}

.work-report__header {
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 86px;
  margin-bottom: 1rem;
}

.work-report__logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(19, 32, 74, 0.28);
}

.work-report__logo--fallback {
  display: grid;
  place-items: center;
  background: var(--report-accent);
  color: var(--white);
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
}

.work-report__meta {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  gap: 0.2rem;
  text-align: right;
  font-size: 0.85rem;
}

.work-report__section {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.work-report__box p,
.work-report__task p,
.work-report__footer {
  margin: 0.2rem 0 0;
}

.work-report__task {
  break-inside: avoid;
}

.work-report__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.work-report__photos figure {
  margin: 0;
  break-inside: avoid;
}

.work-report__photos img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.work-report__photos figcaption {
  padding: 0.35rem 0.5rem;
  background: rgba(19, 32, 74, 0.06);
  color: var(--slate-600);
  font-size: 0.82rem;
}

.work-report__footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(19, 32, 74, 0.12);
  color: var(--slate-600);
  font-size: 0.9rem;
}

.report-email-panel {
  display: flex;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-email-panel .form-field {
  flex: 1 1 320px;
}

.service-report-page {
  width: min(980px, 100%);
  margin: 28px auto;
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  color: #172033;
  box-shadow: 0 20px 60px rgba(31, 53, 86, 0.15);
  font-family: Inter, Poppins, Arial, sans-serif;
}

.service-report-accent {
  height: 10px;
  background: linear-gradient(90deg, #1f3556, #1fa9e5, #5ed4f6);
}

.service-report-content {
  padding: 32px;
}

.service-report-header {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid #d9e6ef;
}

.service-report-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.service-report-logo {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(31, 169, 229, 0.3);
}

.service-report-logo--fallback {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, #9cebff, #1fa9e5);
  color: var(--white);
  font-weight: 800;
}

.service-report-brand h1 {
  margin: 0;
  color: #1f3556;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.service-report-brand p {
  margin: 2px 0 8px;
  color: #64748b;
  font-weight: 600;
}

.service-report-contact,
.service-report-meta span,
.service-info-list span {
  color: #64748b;
  font-size: 0.9rem;
}

.service-report-meta,
.service-report-card,
.service-report-summary,
.service-treatment,
.service-task {
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: #f4f8fb;
}

.service-report-meta {
  display: grid;
  gap: 0.35rem;
  justify-self: end;
  min-width: 280px;
  padding: 16px;
}

.service-report-meta div,
.service-info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.service-report-summary {
  margin-top: 26px;
  padding: 18px;
}

.service-report-summary p {
  margin-bottom: 16px;
}

.service-report-kpis,
.service-report-two-col,
.service-treatment-grid,
.service-task-grid {
  display: grid;
  gap: 14px;
}

.service-report-kpis {
  grid-template-columns: repeat(4, 1fr);
}

.service-report-kpis div {
  padding: 14px;
  border: 1px solid #d9e6ef;
  border-radius: 16px;
  background: var(--white);
}

.service-report-kpis span {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.service-report-kpis strong {
  display: block;
  margin-top: 0.35rem;
  color: #1f3556;
}

.service-report-two-col {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 26px;
}

.service-report-card {
  padding: 18px;
}

.service-report-card h3 {
  margin-bottom: 0.8rem;
  color: #1f3556;
}

.service-info-list {
  display: grid;
  gap: 0.55rem;
}

.service-report-section {
  margin-top: 26px;
}

.service-report-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1fa9e5;
}

.service-report-section-title h2 {
  margin: 0;
  color: #1f3556;
  font-size: 1.2rem;
}

.service-report-section-title span {
  color: #64748b;
  font-weight: 700;
}

.service-table-wrap {
  overflow-x: auto;
  border: 1px solid #d9e6ef;
  border-radius: 18px;
}

.service-water-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.service-water-table th,
.service-water-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #d9e6ef;
  text-align: left;
}

.service-water-table th {
  background: #f4f8fb;
  color: #1f3556;
}

.service-status {
  display: inline-flex;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.service-status--ok {
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
}

.service-status--low,
.service-status--high {
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
}

.service-status--not-tested {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.service-status--present {
  color: #8b4b00;
  background: rgba(255, 184, 77, 0.22);
}

.service-notice {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #fff7ed;
  color: #7c2d12;
}

.service-choice-panel {
  margin-bottom: 16px;
  padding: 14px;
  border: 2px solid #f59e0b;
  border-radius: 18px;
  background: #fffbeb;
}

.service-choice-panel__header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  color: #92400e;
  text-align: center;
}

.service-choice-panel__header strong {
  font-size: 1.15rem;
  text-transform: uppercase;
}

.service-choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.service-choice-or {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 900;
}

.service-treatment--choice {
  border: 2px solid #f59e0b;
  background: #ffffff;
  cursor: pointer;
}

.service-treatment--choice.is-selected { border-color: #1976b9; box-shadow: 0 0 0 3px rgba(25, 118, 185, 0.14); background: #f5faff; }

.service-choice-label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.service-choice-label input { accent-color: var(--admin-primary); }

.service-treatment-grid {
  grid-template-columns: repeat(3, 1fr);
}

.service-treatment {
  padding: 16px;
}

.service-treatment h3 {
  margin-bottom: 8px;
  color: #1f3556;
}

.service-dose {
  color: #1fa9e5;
  font-size: 1.55rem;
  font-weight: 900;
}

.service-treatment p,
.service-task p,
.service-report-note {
  color: #64748b;
}

.service-task-grid {
  grid-template-columns: repeat(2, 1fr);
}

.service-task {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 14px;
}

.service-check {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: var(--white);
  font-weight: 900;
}

.service-recommendations {
  display: grid;
  gap: 0.55rem;
  padding-left: 1.1rem;
}

.service-photo-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.service-photo-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid #d9e6ef;
  border-radius: 18px;
  background: #f4f8fb;
}

.service-photo-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-photo-gallery figcaption {
  padding: 0.5rem 0.75rem;
  color: #64748b;
  font-size: 0.85rem;
}

.service-report-footer {
  display: block;
  padding: 22px 32px;
  background: #1f3556;
  color: var(--white);
}

.service-report-footer p {
  margin: 0.25rem 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.water-test-table {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
}

.water-test-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(160px, 1fr) minmax(170px, 0.8fr) 80px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(19, 32, 74, 0.03);
}

.water-test-row--head {
  background: transparent;
  color: var(--slate-900);
}

.water-test-row--low,
.water-test-row--high {
  background: rgba(245, 158, 11, 0.12);
}

.water-test-row--ok {
  background: rgba(17, 102, 72, 0.08);
}

.water-test-row small {
  display: block;
  color: var(--slate-600);
  font-size: 0.75rem;
}

.water-condition-panel {
  margin: 22px 0;
  padding: 18px;
  border-radius: 18px;
  background: rgba(51, 141, 255, 0.05);
}

.water-condition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.water-condition-switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(19, 32, 74, 0.1);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
}

.water-condition-switch span,
.water-condition-switch small {
  display: block;
}

.water-condition-switch small {
  margin-top: 3px;
  color: var(--slate-600);
}

.water-condition-switch input {
  position: absolute;
  opacity: 0;
}

.water-condition-switch i {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(19, 32, 74, 0.16);
  transition: 0.2s ease;
}

.water-condition-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(19, 32, 74, 0.2);
  transition: 0.2s ease;
}

.water-condition-switch input:checked + i {
  background: linear-gradient(135deg, var(--blue-500), var(--teal-400));
}

.water-condition-switch input:checked + i::after {
  transform: translateX(20px);
}

.service-condition-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.water-range {
  color: var(--slate-600);
  font-weight: 700;
}

.treatment-profile-grid,
.treatment-editor-list {
  display: grid;
  gap: 1rem;
}

.treatment-profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.treatment-profile-card,
.treatment-editor-card {
  padding: 1rem;
  border: 1px solid rgba(19, 32, 74, 0.1);
  border-radius: var(--radius-md);
  background: rgba(51, 141, 255, 0.05);
}

.treatment-profile-card .dose {
  margin: 0.4rem 0;
  color: var(--blue-600);
  font-size: 1.4rem;
  font-weight: 900;
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  .admin-sidebar,
  .admin-topbar,
  .admin-sidebar-overlay,
  .admin-flashes,
  .admin-history-controls,
  .report-toolbar,
  .report-email-panel {
    display: none !important;
  }

  .admin-shell {
    display: block;
  }

  .admin-main {
    padding: 0;
  }

  .work-report {
    width: 100%;
    margin: 0;
    padding: 0.35in;
    box-shadow: none;
  }

  .service-report-page {
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .service-report-content,
  .service-report-footer {
    padding: 0.25in;
  }

  .avoid-break,
  .service-treatment,
  .service-task,
  .service-report-card,
  .service-photo-gallery figure {
    break-inside: avoid;
  }
}

@media (max-width: 1024px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

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

  .admin-main {
    padding: 24px;
  }

  .admin-stat-grid,
  .admin-grid--three,
  .warehouse-grid,
  .admin-tech-list--editable,
  .admin-photo-grid,
  .admin-calendar-tiles,
  .admin-checkbox-grid,
  .work-wizard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-report-card {
    grid-template-columns: 1fr;
  }

  .admin-grid--two,
  .service-report-header,
  .service-report-two-col,
  .service-report-kpis,
  .service-treatment-grid,
  .service-task-grid,
  .treatment-profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-page-header,
  .admin-panel__header,
  .admin-job-card__top,
  .admin-tech-card__title,
  .admin-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-stat-grid,
  .admin-tech-list--editable,
  .admin-form-grid,
  .photo-upload-row,
  .chemical-sale-row,
  .admin-rotation-counts,
  .admin-photo-grid,
  .admin-calendar-tiles,
  .admin-checkbox-grid,
  .work-wizard,
  .work-report__photos {
    grid-template-columns: 1fr;
  }

  .rotation-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .rotation-row .btn {
    grid-column: 2;
  }

  .admin-report-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-email-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .service-report-content {
    padding: 20px;
  }

  .service-report-footer,
  .service-photo-gallery,
  .service-choice-grid,
  .water-test-row {
    grid-template-columns: 1fr;
  }

  .service-choice-or {
    margin: 0 auto;
  }

  .admin-month-weekdays,
  .admin-month-week {
    grid-template-columns: 1fr;
  }

  .admin-month-weekdays {
    display: none;
  }

  .admin-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-filter-bar .form-input,
  .admin-filter-bar .form-select {
    width: 100%;
    min-width: 0;
  }

  .admin-details {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .auth__card,
  .admin-form,
  .admin-panel {
    padding: 24px;
  }
}

@page {
  size: A4 portrait;
  margin: 0.12in;
}

@media print {
  html,
  body {
    background: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .service-report-page {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    zoom: 0.78;
  }

  .service-report-content {
    padding: 0.2in;
  }

  .service-report-footer {
    padding: 0.16in 0.2in;
  }

  .service-report-header {
    grid-template-columns: 1.4fr 1fr;
    padding-bottom: 14px;
  }

  .service-report-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .service-report-two-col,
  .service-task-grid,
  .service-photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-treatment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-choice-grid {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .service-choice-or {
    margin: 0;
  }

  .service-report-summary,
  .service-report-two-col,
  .service-report-section {
    margin-top: 12px;
  }

  .service-report-summary,
  .service-report-card,
  .service-treatment {
    padding: 11px;
  }

  .service-report-summary p,
  .service-treatment p,
  .service-report-note,
  .service-report-footer p {
    margin: 3px 0;
  }

  .service-report-section-title {
    margin-bottom: 8px;
    padding-bottom: 5px;
    break-after: avoid;
  }

  .service-water-table th,
  .service-water-table td {
    padding: 0.55rem 0.7rem;
  }

  .service-report-section.avoid-break,
  .service-table-wrap,
  .service-water-table {
    break-inside: auto;
  }

  .service-water-table tr,
  .service-choice-panel,
  .service-treatment {
    break-inside: avoid;
  }
}

/* ================================================================
   ADMIN CRM REDESIGN: DESIGN SYSTEM, SHELL, SIDEBAR, TOPBAR
   ================================================================ */
@media screen {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .admin-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
  }

  .page-admin-crm {
    min-width: 320px;
    color: var(--admin-text);
    background: var(--admin-background);
    font-size: var(--admin-ui-font-size);
  }

  .page-admin-crm .btn {
    min-height: var(--admin-button-height);
    padding: 0.55rem 0.9rem;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
  }

  .page-admin-crm .btn--primary {
    background: var(--admin-primary);
    color: var(--admin-surface);
  }

  .page-admin-crm .btn--primary:hover {
    background: var(--admin-primary-hover);
  }

  .page-admin-crm .btn--muted {
    border-color: var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
  }

  .page-admin-crm .btn--muted:hover {
    border-color: #c8d6eb;
    background: #f8faff;
  }

  .page-admin-crm .form-input,
  .page-admin-crm .form-select,
  .page-admin-crm .form-textarea {
    padding: 0.72rem 0.82rem;
    border-color: var(--admin-border);
    border-radius: 9px;
    color: var(--admin-text);
    font-size: 13px;
  }

  .page-admin-crm .form-input,
  .page-admin-crm .form-select:not([multiple]) {
    min-height: var(--admin-control-height);
  }

  .page-admin-crm :focus-visible {
    outline: 3px solid rgba(22, 89, 216, 0.2);
    outline-offset: 2px;
  }

  .admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
    background: var(--admin-background);
  }

  .admin-workspace {
    min-width: 0;
    min-height: 100vh;
  }

  .admin-main {
    width: 100%;
    max-width: none;
    padding: 16px 18px 20px;
  }

  .admin-flashes {
    margin-bottom: 14px;
  }

  .admin-sidebar {
    position: sticky;
    z-index: 50;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 14px 10px 12px;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, var(--admin-navy) 0%, #081d3e 100%);
    color: var(--admin-surface);
    width: var(--admin-sidebar-width);
    min-width: var(--admin-sidebar-width);
    max-width: var(--admin-sidebar-width);
  }

  .admin-sidebar__header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .admin-brand {
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--admin-surface);
  }

  .admin-brand__mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: linear-gradient(145deg, #2467ed, #1042b2);
    box-shadow: 0 8px 20px rgba(0, 55, 175, 0.32);
  }

  .admin-brand__mark .admin-icon {
    width: 20px;
    height: 20px;
  }

  .admin-brand__mark img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
    object-fit: contain;
  }

  .admin-brand__copy {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .admin-brand__copy strong {
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-brand__copy small {
    color: #8fa2c2;
    font-size: 11px;
    font-weight: 500;
  }

  .admin-sidebar__close {
    width: 34px;
    height: 34px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--admin-surface);
    cursor: pointer;
  }

  .admin-nav {
    min-height: 0;
    display: block;
    flex: 1;
    padding: 7px 0 6px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
  }

  .admin-nav::-webkit-scrollbar {
    width: 0;
  }

  .admin-nav-section,
  .admin-nav-group {
    margin: 0 0 2px;
  }

  .admin-nav-label,
  .admin-nav-group summary {
    min-height: 18px;
    margin: 0;
    padding: 3px 9px 2px;
    color: #7185a8;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .admin-nav-group {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .admin-nav-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    user-select: none;
  }

  .admin-nav-group summary::-webkit-details-marker {
    display: none;
  }

  .admin-nav-group summary::after {
    content: none;
  }

  .admin-nav-group summary .admin-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.18s ease;
  }

  .admin-nav-group[open] summary .admin-icon {
    transform: rotate(180deg);
  }

  .admin-nav-group.has-active summary {
    color: #9ab1d8;
  }

  .admin-nav-group__links {
    display: grid;
    gap: 2px;
  }

  .admin-nav .admin-nav-link {
    min-height: 35px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 6px 12px;
    border-radius: 8px;
    color: #b6c3d8;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.25;
    transition: background 0.16s ease, color 0.16s ease;
  }

  .admin-nav-link .admin-icon {
    width: 18px;
    height: 18px;
    color: #90a4c5;
  }

  .admin-nav .admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--admin-surface);
  }

  .admin-nav-link:hover .admin-icon {
    color: currentColor;
  }

  .admin-nav .admin-nav-link.is-active {
    background: linear-gradient(135deg, #1d5ae0, #194ec4);
    color: var(--admin-surface);
    box-shadow: 0 5px 14px rgba(12, 71, 201, 0.28);
  }

  .admin-nav-link.is-active .admin-icon {
    color: var(--admin-surface);
  }

  .admin-sidebar__account {
    min-height: 68px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 36px;
    gap: 10px;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 -10px -12px;
    padding: 12px 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(2, 15, 36, 0.22);
  }

  .admin-avatar,
  .admin-topbar__avatar {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #2867e8, #143fa9);
    color: var(--admin-surface);
    font-weight: 700;
  }

  .admin-avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .admin-topbar__notification {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #687791;
    position: relative;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
  }

  .admin-topbar__notification:hover {
    background: #f3f6fb;
    color: var(--admin-text);
  }

  .admin-topbar__notification .admin-icon {
    width: 18px;
    height: 18px;
  }

  .admin-notification-menu { position: relative; flex: 0 0 auto; }
  .admin-notification-menu > summary { list-style: none; }
  .admin-notification-menu > summary::-webkit-details-marker { display: none; }
  .admin-notification-menu[open] > .admin-topbar__notification { background: #f3f6fb; color: var(--admin-text); }
  .admin-notification-badge { position: absolute; top: -4px; right: -6px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; border-radius: 999px; background: #d84a4a; color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }
  .admin-notification-panel { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: min(370px, calc(100vw - 24px)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-surface); box-shadow: 0 16px 35px rgba(19, 39, 72, 0.18); }
  .admin-notification-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--admin-border); }
  .admin-notification-panel__header > div { display: grid; gap: 2px; min-width: 0; }
  .admin-notification-panel__header strong { color: var(--admin-text); font-size: 13px; }
  .admin-notification-panel__header small { color: var(--admin-muted); font-size: 11px; }
  .admin-notification-panel button { border: 0; background: transparent; color: var(--admin-primary); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
  .admin-notification-panel button:hover, .admin-notification-panel button:focus-visible { text-decoration: underline; }
  .admin-notification-preview { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #edf1f6; }
  .admin-notification-preview.is-unread { background: #f3f7ff; box-shadow: inset 3px 0 0 var(--admin-primary); }
  .admin-notification-preview > div { min-width: 0; flex: 1; }
  .admin-notification-preview strong, .admin-notification-preview p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-notification-preview strong { color: var(--admin-text); font-size: 11.5px; }
  .admin-notification-preview p { margin: 2px 0; color: var(--admin-muted); font-size: 10.5px; }
  .admin-notification-preview time { color: #8795aa; font-size: 10px; }
  .admin-notification-preview form { flex: 0 0 auto; padding-top: 2px; }
  .admin-notification-empty { display: grid; min-height: 112px; place-items: center; align-content: center; gap: 6px; color: var(--admin-muted); font-size: 11px; text-align: center; }
  .admin-notification-empty span { color: var(--admin-success); }
  .admin-notification-empty .admin-icon { width: 20px; height: 20px; }
  .admin-notification-empty p { margin: 0; }
  .admin-notification-panel__all { display: block; padding: 12px 14px; color: var(--admin-primary); font-size: 11px; font-weight: 700; text-align: center; }
  .admin-notification-panel__all:hover { background: #f7f9fc; }

  .admin-sidebar__account-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .admin-sidebar__account-copy strong {
    font-size: 13px;
    font-weight: 600;
  }

  .admin-sidebar__account-copy small {
    color: #8398ba;
    font-size: 11px;
  }

  .admin-account-logout {
    width: var(--admin-icon-button-size);
    height: var(--admin-icon-button-size);
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #8fa2c2;
  }

  .admin-account-logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--admin-surface);
  }

  .admin-sidebar-overlay {
    display: none;
  }

  .admin-topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    height: var(--admin-topbar-height);
    min-height: var(--admin-topbar-height);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    border-bottom: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .admin-topbar__title-area {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 114px;
  }

  .admin-topbar__title {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  @media screen and (min-width: 1280px) {
    .admin-topbar__title-area {
      min-width: max-content;
      flex: 0 0 auto;
    }

    .admin-topbar__title {
      min-width: max-content;
      flex: 0 0 auto;
      overflow: visible;
      text-overflow: clip;
    }
  }

  /* Saved standalone tests include the client name in the topbar title.
     Allow that title to wrap instead of pushing actions past the viewport. */
  @media screen and (min-width: 1280px) {
    .page-client-water-test .admin-topbar {
      height: auto;
      padding-block: 10px;
    }

    .page-client-water-test .admin-topbar__title-area {
      min-width: 0;
      flex: 0 1 auto;
    }

    .page-client-water-test .admin-topbar__title {
      min-width: 0;
      flex: 0 1 auto;
      white-space: normal;
      overflow-wrap: anywhere;
    }
  }

  .admin-menu-button {
    width: var(--admin-icon-button-size);
    height: var(--admin-icon-button-size);
    display: none;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-text);
    cursor: pointer;
  }

  .admin-history-controls {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
    margin: 0;
  }

  .admin-history-button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 7px;
    background: var(--admin-surface);
    color: var(--admin-muted);
    cursor: pointer;
    box-shadow: none;
  }

  .admin-history-button:hover {
    border-color: #cbd7e8;
    color: var(--admin-primary);
    background: #f8faff;
  }

  .admin-history-button:focus-visible {
    outline: 3px solid rgba(22, 89, 216, 0.18);
    outline-offset: 2px;
    border-color: #9bb9ea;
    color: var(--admin-primary);
  }

  .admin-history-button .admin-icon {
    width: 15px;
    height: 15px;
  }

  .admin-global-search {
    width: min(320px, 32vw);
    min-width: 220px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: #f8faff;
    color: #8a98b1;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  }

  .admin-global-search:focus-within {
    border-color: #afc6ee;
    background: var(--admin-surface);
    box-shadow: 0 0 0 3px rgba(22, 89, 216, 0.09);
  }

  .admin-global-search .admin-icon {
    width: 16px;
    height: 16px;
  }

  .admin-global-search__submit {
    width: 30px;
    height: 30px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .admin-global-search__submit:hover {
    background: #edf3fd;
    color: var(--admin-primary);
  }

  .admin-global-search__submit:focus-visible {
    outline: 3px solid rgba(22, 89, 216, 0.18);
    outline-offset: 1px;
  }

  .admin-global-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--admin-text);
    font: inherit;
    font-size: 13px;
  }

  .admin-global-search input::placeholder {
    color: #8795ad;
  }

  .admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  .admin-topbar .admin-topbar__quick-action {
    width: auto;
    min-height: 40px;
    padding-inline: 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .admin-topbar__quick-action .admin-icon {
    width: 14px;
    height: 14px;
  }

  .admin-topbar__avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    margin-left: 2px;
    font-size: 11px;
  }

  .admin-page-header,
  .admin-panel__header,
  .admin-job-card__top,
  .admin-tech-card__title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
  }

  .admin-page-header {
    margin-bottom: 18px;
  }

  .admin-page-header h1 {
    margin: 3px 0 5px;
    color: var(--admin-text);
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    line-height: 1.15;
  }

  .admin-page-header p {
    margin-bottom: 0;
    color: var(--admin-muted);
    font-size: 0.84rem;
  }

  .admin-kicker {
    margin: 0;
    color: var(--admin-primary);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
  }

  .admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .admin-actions--stack {
    align-items: stretch;
  }

  .admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
  }

  .admin-stat,
  .admin-panel,
  .admin-job-card,
  .admin-tech-card,
  .admin-table-wrap,
  .admin-form,
  .admin-filter-bar {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .admin-stat {
    min-width: 0;
    padding: 15px 16px;
  }

  .admin-stat span {
    display: block;
    color: var(--admin-muted);
    font-size: 0.72rem;
    font-weight: 600;
  }

  .admin-stat strong {
    display: block;
    margin-top: 5px;
    overflow-wrap: anywhere;
    color: var(--admin-text);
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .admin-stat--warn strong {
    color: var(--admin-danger);
  }

  .admin-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
  }

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

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

  .admin-panel {
    padding: 18px;
    margin-bottom: 16px;
  }

  .admin-form {
    padding: 20px;
  }

  .admin-panel__header {
    margin-bottom: 14px;
  }

  .admin-panel__header h2,
  .admin-panel h2 {
    margin: 0 0 10px;
    color: var(--admin-text);
    font-size: 1rem;
    line-height: 1.25;
  }

  .admin-panel__header h2 {
    margin-bottom: 0;
  }

  .admin-panel__header span,
  .admin-meta,
  .admin-list span,
  .admin-tech-card span,
  .admin-details dd {
    color: var(--admin-muted);
  }

  .admin-card-list,
  .admin-tech-list,
  .admin-history {
    display: grid;
    gap: 10px;
  }

  .admin-tech-list--editable {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-job-card,
  .admin-tech-card {
    padding: 14px;
  }

  .admin-job-card p {
    margin: 7px 0;
  }

  .admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
    font-size: 0.78rem;
  }

  .admin-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .admin-list li {
    min-height: var(--admin-standard-row-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--admin-border);
    font-size: 13px;
  }

  .admin-table-wrap {
    width: 100%;
    overflow-x: auto;
  }

  .admin-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
  }

  .admin-table th,
  .admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--admin-border);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
  }

  .admin-table tbody tr {
    height: var(--admin-standard-row-height);
  }

  .admin-table th {
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .admin-table tr:last-child td {
    border-bottom: none;
  }

  .admin-empty-cell {
    text-align: center;
    color: var(--admin-muted);
  }

  .empty-state {
    padding: 28px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    color: var(--admin-muted);
    text-align: center;
    box-shadow: var(--admin-card-shadow);
  }

  .admin-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: var(--admin-badge-height);
    padding: 0 8px;
    border-radius: 7px;
    background: #eaf1ff;
    color: var(--admin-primary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .admin-badge--completed,
  .admin-badge--active,
  .admin-badge--paid {
    background: var(--admin-success-soft);
    color: #08734a;
  }

  .admin-badge--queued,
  .admin-badge--scheduled,
  .admin-badge--approved {
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .admin-badge--in-progress,
  .admin-badge--pending,
  .admin-badge--priority-high {
    background: var(--admin-warning-soft);
    color: #b86609;
  }

  .admin-badge--needs-follow-up,
  .admin-badge--priority-emergency {
    background: var(--admin-danger-soft);
    color: #cc3030;
  }

  .admin-badge--cancelled,
  .admin-badge--disabled {
    background: #f0f2f6;
    color: #647084;
  }

  .admin-badge--priority-normal {
    background: #edf2ff;
    color: #2857c4;
  }

  .admin-badge--priority-low {
    background: #f0f2f6;
    color: #647084;
  }
}

/* ================================================================
   ADMIN DASHBOARD
   ================================================================ */
@media screen {
  .dashboard-page {
    display: grid;
    gap: 10px;
  }

  .admin-main:has(.dashboard-page) {
    padding-top: 18px;
    padding-bottom: 2px;
  }

  .dashboard-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 286px;
    gap: 14px;
    align-items: stretch;
  }

  .dashboard-kpi-strip,
  .dashboard-date-card,
  .dashboard-card {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .dashboard-kpi-strip {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
  }

  .dashboard-kpi {
    min-width: 0;
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
  }

  .dashboard-kpi + .dashboard-kpi {
    border-left: 1px solid var(--admin-border);
  }

  .dashboard-kpi__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
  }

  .dashboard-kpi__icon--blue {
    background: #edf3ff;
    color: var(--admin-primary);
  }

  .dashboard-kpi__icon--danger {
    background: #ffeded;
    color: var(--admin-danger);
  }

  .dashboard-kpi__icon .admin-icon {
    width: 19px;
    height: 19px;
  }

  .dashboard-kpi__copy {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 1px;
  }

  .dashboard-kpi__copy small,
  .dashboard-kpi__copy em {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-kpi__copy small {
    color: #52617a;
    font-size: 12px;
    font-weight: 600;
  }

  .dashboard-kpi__copy strong {
    color: var(--admin-text);
    font-size: 26px;
    line-height: 1.18;
  }

  .dashboard-kpi__support-compact {
    display: none;
  }

  .dashboard-kpi--danger .dashboard-kpi__copy strong {
    color: #bc2d36;
  }

  .dashboard-date-card {
    display: grid;
    grid-template-rows: 42px 50px;
    height: 92px;
    min-height: 92px;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #fbfdff 100%);
  }

  .dashboard-date-card__top {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border-bottom: 1px solid var(--admin-border);
    background: rgba(248, 250, 254, 0.72);
  }

  .dashboard-date-card__date {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .dashboard-date-card__date > span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid #e2e9f4;
    border-radius: 6px;
    background: #f2f6fc;
    color: #62728c;
  }

  .dashboard-date-card__date .admin-icon {
    width: 12px;
    height: 12px;
  }

  .dashboard-date-card__date strong {
    overflow: hidden;
    color: var(--admin-text);
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-date-card__date-short {
    display: none;
  }

  .dashboard-weather {
    min-width: 0;
    display: grid;
    grid-template-columns: 24px auto;
    align-items: center;
    gap: 5px;
    padding-left: 9px;
    border-left: 1px solid #e5ebf4;
    color: #d78916;
  }

  .dashboard-weather__icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
  }

  .dashboard-weather__icon .admin-icon {
    width: 23px;
    height: 23px;
    stroke-width: 1.8;
  }

  .dashboard-weather__copy {
    min-width: 0;
    display: grid;
    gap: 0;
  }

  .dashboard-weather__copy strong {
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.05;
    white-space: nowrap;
  }

  .dashboard-weather__copy small {
    max-width: 82px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10.75px;
    font-weight: 500;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-weather--night { color: #5267bd; }
  .dashboard-weather--cloudy,
  .dashboard-weather--muted { color: #8391a8; }
  .dashboard-weather--rain { color: #2774bf; }
  .dashboard-weather--snow { color: #49a9c9; }
  .dashboard-weather--storm { color: #7651b5; }

  .dashboard-weather--muted {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .dashboard-weather--muted .dashboard-weather__icon {
    width: 24px;
    height: 24px;
  }

  .dashboard-weather--muted .dashboard-weather__copy small {
    max-width: 86px;
    font-size: 11px;
  }

  .dashboard-date-card__revenue {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 13px;
  }

  .dashboard-date-card__money {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--admin-success-soft);
    color: var(--admin-success);
    box-shadow: inset 0 0 0 1px rgba(24, 166, 106, 0.08);
  }

  .dashboard-date-card__money .admin-icon {
    width: 17px;
    height: 17px;
  }

  .dashboard-date-card__value {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 2px;
  }

  .dashboard-date-card__revenue strong {
    overflow: hidden;
    color: var(--admin-text);
    font-size: 25px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-date-card__support {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 11.25px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: 1.03fr 1fr 1.1fr;
    gap: 14px;
    align-items: stretch;
  }

  .dashboard-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .dashboard-grid--primary > .dashboard-card {
    min-height: 282px;
  }

  .dashboard-grid--secondary > .dashboard-card {
    min-height: 270px;
  }

  .dashboard-card--activity {
    min-height: 118px;
  }

  .dashboard-card__header {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
  }

  .dashboard-card__header h2 {
    margin: 0;
    color: var(--admin-text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
  }

  .dashboard-card__header a,
  .dashboard-card__footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--admin-primary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  .dashboard-card__footer {
    min-height: 34px;
    display: flex;
    align-items: center;
    margin-top: auto;
    padding: 6px 16px;
    border-top: 1px solid var(--admin-border);
  }

  .dashboard-card__footer .admin-icon {
    width: 12px;
    height: 12px;
  }

  .dashboard-filter-chip {
    padding: 5px 9px;
    border: 1px solid var(--admin-border);
    border-radius: 7px;
    color: var(--admin-muted);
    background: #fbfcfe;
    font-size: 12px;
    font-weight: 600;
  }

  .dashboard-timeline {
    flex: 1;
    padding: 0 14px;
  }

  .dashboard-timeline__row {
    min-height: 52px;
    display: grid;
    grid-template-columns: 32px 9px minmax(0, 1.35fr) minmax(0, 0.85fr) auto;
    gap: 5px;
    gap: 7px;
    align-items: center;
    padding: 4px 2px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    transition: background 0.16s ease;
  }

  .dashboard-timeline__row:hover {
    background: #f8faff;
  }

  .dashboard-timeline__row:last-child {
    border-bottom: 0;
  }

  .dashboard-timeline__row > time {
    color: #53627b;
    font-size: 11.5px;
    font-weight: 600;
    text-align: right;
  }

  .dashboard-timeline__row > time.is-unset {
    color: #9aa6b8;
  }

  .dashboard-timeline__rail {
    position: relative;
    align-self: stretch;
    display: grid;
    place-items: center;
  }

  .dashboard-timeline__rail::before {
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: 50%;
    width: 1px;
    content: "";
    background: #d5e0f1;
  }

  .dashboard-timeline__row:first-child .dashboard-timeline__rail::before {
    top: 50%;
  }

  .dashboard-timeline__row:last-child .dashboard-timeline__rail::before {
    bottom: 50%;
  }

  .dashboard-timeline__rail i {
    position: relative;
    z-index: 1;
    width: 7px;
    height: 7px;
    border: 2px solid var(--admin-surface);
    border-radius: 50%;
    background: var(--admin-primary);
    box-shadow: 0 0 0 1px #bcd0ee;
  }

  .dashboard-timeline__identity {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .dashboard-timeline__location {
    min-width: 0;
    overflow: hidden;
    color: #5e6d86;
    font-size: 11.5px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-timeline__identity strong,
  .dashboard-overdue-row__main strong,
  .dashboard-compact-list strong,
  .dashboard-workload-row__copy strong,
  .dashboard-activity strong {
    overflow: hidden;
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-job-ref {
    overflow: hidden;
    color: #5c76a2;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-timeline__identity strong {
    font-size: 12.5px;
    font-weight: 600;
  }

  .dashboard-timeline__row .admin-badge {
    font-size: 10.5px;
  }

  .dashboard-overdue-list {
    display: grid;
    flex: 1;
    gap: 6px;
    align-content: start;
    padding: 8px 12px;
  }

  .dashboard-overdue-row {
    min-height: 80px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 12px;
    border: 1px solid #f4d8da;
    border-radius: 9px;
    background: #fffafa;
    color: var(--admin-text);
  }

  .dashboard-overdue-row:hover {
    border-color: #efbabc;
    background: #fff7f7;
  }

  .dashboard-overdue-row__main {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 1px;
  }

  .dashboard-overdue-row__main small,
  .dashboard-overdue-row__main em,
  .dashboard-overdue-row__main b {
    overflow: hidden;
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
  }

  .dashboard-overdue-row__main small {
    color: #52617c;
  }

  .dashboard-overdue-row__main .dashboard-job-ref {
    color: #dd3d43;
  }

  .dashboard-overdue-row__main em {
    color: var(--admin-muted);
  }

  .dashboard-overdue-row__main b {
    margin-top: 2px;
    color: var(--admin-danger);
  }

  .dashboard-overdue-row__side {
    display: grid;
    justify-items: end;
    align-content: center;
    gap: 5px;
    flex: 0 0 auto;
  }

  .dashboard-overdue-row__side strong {
    font-size: 12px;
  }

  .dashboard-overdue-row__side small {
    max-width: 116px;
    overflow: hidden;
    min-height: 22px;
    display: flex;
    align-items: center;
    padding: 0 7px;
    border-radius: 6px;
    background: #eaf1ff;
    color: var(--admin-primary);
    font-size: 10.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-revenue-main {
    display: grid;
    grid-template-columns: minmax(150px, 29fr) minmax(0, 71fr);
    gap: 18px;
    align-items: center;
    flex: 1;
    min-height: 180px;
    padding: 11px 17px 7px;
  }

  .dashboard-revenue-total {
    display: grid;
    align-content: center;
    gap: 4px;
    padding-left: 2px;
  }

  .dashboard-revenue-total small,
  .dashboard-revenue-total em {
    color: var(--admin-muted);
    font-size: 11px;
    font-style: normal;
  }

  .dashboard-revenue-total strong {
    overflow-wrap: anywhere;
    color: var(--admin-text);
    font-size: 1.58rem;
    line-height: 1.15;
  }

  .dashboard-revenue-total span {
    width: fit-content;
    margin-top: 3px;
    padding: 3px 6px;
    border-radius: 999px;
    background: var(--admin-success-soft);
    font-size: 11px;
    font-weight: 700;
  }

  .dashboard-revenue-chart {
    position: relative;
    min-width: 0;
    padding: 5px 0 1px;
    border-radius: 10px;
    background: transparent;
  }

  .dashboard-revenue-chart__context {
    position: absolute;
    z-index: 2;
    top: 3px;
    right: 5px;
    color: #8a97aa;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
    pointer-events: none;
  }

  .dashboard-revenue-chart svg {
    width: 100%;
    height: 154px;
    display: block;
    overflow: hidden;
  }

  .dashboard-chart-sparse {
    position: relative;
    min-height: 154px;
  }

  .dashboard-chart-sparse__message {
    position: absolute;
    right: 14px;
    bottom: 30px;
    min-width: 0;
    display: grid;
    justify-items: end;
    gap: 1px;
    padding: 7px 10px;
    border: 1px solid rgba(211, 222, 238, 0.82);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 5px 16px rgba(13, 25, 57, 0.05);
    text-align: right;
  }

  .dashboard-chart-sparse__message strong {
    color: var(--admin-text);
    font-size: 13px;
  }

  .dashboard-chart-sparse__message em {
    color: #53627b;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
  }

  .dashboard-chart-sparse__message small {
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.4;
  }

  .dashboard-chart-marker-line {
    stroke: #bdcff0;
    stroke-width: 1;
    stroke-dasharray: 3 4;
    vector-effect: non-scaling-stroke;
  }

  .dashboard-chart-marker {
    fill: var(--admin-primary);
    stroke: var(--admin-surface);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
  }

  .dashboard-chart-hit {
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
    pointer-events: all;
  }

  .dashboard-chart-hit:focus-visible {
    fill: rgba(22, 89, 216, 0.12);
    outline: none;
  }

  .dashboard-chart-tooltip {
    position: absolute;
    z-index: 4;
    min-width: 108px;
    display: grid;
    gap: 2px;
    padding: 7px 9px;
    border: 1px solid #dbe4f1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--admin-text);
    box-shadow: 0 8px 24px rgba(13, 25, 57, 0.12);
    pointer-events: none;
    transform: translate(-50%, -100%);
    white-space: nowrap;
  }

  .dashboard-chart-tooltip[hidden] {
    display: none;
  }

  .dashboard-chart-tooltip strong {
    font-size: 12px;
  }

  .dashboard-chart-tooltip small,
  .dashboard-chart-tooltip em {
    color: var(--admin-muted);
    font-size: 11px;
    font-style: normal;
  }

  .dashboard-chart-tooltip small {
    order: -1;
  }

  .dashboard-chart-tooltip em {
    padding-top: 2px;
    border-top: 1px solid #edf1f6;
  }

  .dashboard-chart-grid line {
    stroke: #edf2f7;
    stroke-width: 0.8;
    vector-effect: non-scaling-stroke;
  }

  .dashboard-chart-labels text,
  .dashboard-chart-y-labels text {
    fill: #96a2b5;
    font-family: Poppins, sans-serif;
    font-size: 13px;
  }

  .dashboard-chart-empty {
    min-height: 154px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: #9aa6b9;
    font-size: 11px;
    text-align: center;
  }

  .dashboard-chart-empty .admin-icon {
    width: 24px;
    height: 24px;
  }

  .dashboard-revenue-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--admin-border);
  }

  .dashboard-revenue-breakdown > div {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 12px 16px 13px;
  }

  .dashboard-revenue-breakdown > div + div {
    border-left: 1px solid var(--admin-border);
  }

  .dashboard-revenue-breakdown small {
    color: var(--admin-muted);
    font-size: 11px;
  }

  .dashboard-revenue-breakdown strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-compact-list,
  .dashboard-workload-list {
    flex: 1;
    padding: 0 12px;
  }

  .dashboard-subscription-row,
  .dashboard-waiting-row,
  .dashboard-workload-row {
    min-height: 48px;
    display: grid;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    transition: background 0.16s ease;
  }

  .dashboard-subscription-row:hover,
  .dashboard-waiting-row:hover,
  .dashboard-workload-row:hover,
  .dashboard-activity:hover {
    background: #f8faff;
  }

  .dashboard-subscription-row:last-child,
  .dashboard-waiting-row:last-child,
  .dashboard-workload-row:last-child {
    border-bottom: 0;
  }

  .dashboard-subscription-row {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  .dashboard-subscription-row time {
    color: var(--admin-text);
    font-size: 11px;
    font-weight: 600;
  }

  .dashboard-subscription-row > span,
  .dashboard-waiting-row__service {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .dashboard-compact-list small,
  .dashboard-workload-row__copy small,
  .dashboard-activity small,
  .dashboard-activity em {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 11px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-subscription-row > em {
    padding: 5px 8px;
    border-radius: 6px;
    background: #eaf1ff;
    color: var(--admin-primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    white-space: nowrap;
  }

  .dashboard-waiting-row {
    min-height: 56px;
    grid-template-columns: 48px minmax(0, 1.12fr) minmax(0, 0.8fr) minmax(112px, auto);
    gap: 5px;
  }

  .dashboard-waiting-row > .dashboard-job-ref {
    color: #5c76a2;
  }

  .dashboard-waiting-row__location {
    min-width: 0;
    overflow: hidden;
    color: #5e6d86;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-waiting-row__meta {
    min-width: 112px;
    display: grid;
    grid-template-columns: minmax(52px, auto) max-content;
    align-items: center;
    justify-content: end;
    column-gap: 12px;
  }

  .dashboard-waiting-row__meta time {
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.35;
  }

  .dashboard-waiting-row__meta b {
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
  }

  .dashboard-workload-row {
    min-height: 56px;
    grid-template-columns: 36px minmax(0, 1fr) minmax(130px, 160px) 38px;
    gap: 11px;
  }

  .dashboard-workload-row__avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #efe7ff;
    color: #7840bd;
    font-size: 11px;
    font-weight: 700;
  }

  .dashboard-workload-row:nth-child(3n + 2) .dashboard-workload-row__avatar {
    background: #e9f2ff;
    color: #2764be;
  }

  .dashboard-workload-row:nth-child(3n) .dashboard-workload-row__avatar {
    background: #e7f8f0;
    color: #18835a;
  }

  .dashboard-workload-row__copy {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .dashboard-workload-row__copy strong {
    font-size: 13px;
    font-weight: 600;
  }

  .dashboard-workload-row__copy small {
    line-height: 1.45;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .dashboard-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf4;
    box-shadow: inset 0 0 0 1px rgba(13, 25, 57, 0.025);
  }

  .dashboard-progress i {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: linear-gradient(90deg, #3a78e3, #1f5dcc);
  }

  .dashboard-workload-row > b {
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
  }

  .dashboard-card--activity .dashboard-card__header {
    border-bottom-color: #edf1f6;
  }

  .dashboard-activity-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    flex: 1;
    padding: 0 16px 5px;
  }

  .dashboard-activity {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 5px 14px;
    color: var(--admin-text);
    transition: background 0.16s ease;
  }

  .dashboard-activity + .dashboard-activity {
    border-left: 1px solid #edf1f6;
  }

  .dashboard-activity__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .dashboard-activity__icon .admin-icon {
    width: 18px;
    height: 18px;
  }

  .dashboard-activity__icon--client {
    background: var(--admin-success-soft);
    color: var(--admin-success);
  }

  .dashboard-activity__icon--completed {
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .dashboard-activity__icon--report {
    background: #f3eaff;
    color: #8748cf;
  }

  .dashboard-activity > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .dashboard-activity strong {
    font-size: 13px;
    font-weight: 600;
  }

  .dashboard-activity small {
    color: #697791;
    font-size: 11px;
  }

  .dashboard-activity em {
    margin-top: 3px;
    color: #8d98aa;
    font-size: 11px;
  }

  .dashboard-empty {
    min-height: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: var(--admin-muted);
    text-align: center;
  }

  .dashboard-empty__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #edf3ff;
    color: var(--admin-primary);
    box-shadow: inset 0 0 0 1px rgba(22, 89, 216, 0.04);
  }

  .dashboard-empty__icon .admin-icon {
    width: 19px;
    height: 19px;
  }

  .dashboard-empty > span:last-child {
    display: grid;
    justify-items: center;
    gap: 4px;
  }

  .dashboard-empty strong {
    color: var(--admin-text);
    font-size: 13px;
  }

  .dashboard-empty small {
    max-width: 240px;
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.55;
  }

  .dashboard-card--activity .dashboard-empty {
    min-height: 0;
  }

  .dashboard-card--overdue .dashboard-empty__icon {
    background: var(--admin-success-soft);
    color: var(--admin-success);
  }

  .dashboard-card--subscriptions .dashboard-empty__icon {
    background: #eef3ff;
    color: #466fc8;
  }

  .dashboard-card--waiting .dashboard-empty__icon {
    background: var(--admin-warning-soft);
    color: #c1761c;
  }

  .is-positive {
    color: var(--admin-success) !important;
  }

  .is-negative {
    color: var(--admin-danger) !important;
  }

  .is-warning {
    color: #cf770f !important;
  }
}

/* ================================================================
   ADMIN RESPONSIVE
   ================================================================ */
@media screen and (max-width: 1279px) {
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-date-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: none;
    height: 92px;
  }

  .dashboard-date-card__top {
    padding: 0 16px;
    border-right: 1px solid var(--admin-border);
    border-bottom: 0;
  }

  .dashboard-date-card__revenue {
    padding: 10px 16px;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-card--revenue,
  .dashboard-grid--secondary > .dashboard-card:last-child {
    grid-column: 1 / -1;
  }

  .dashboard-revenue-main {
    grid-template-columns: minmax(150px, 3fr) minmax(0, 7fr);
  }
}

@media screen and (min-width: 1280px) and (max-width: 1439px) {
  .admin-main {
    padding-inline: 14px;
  }

  .dashboard-page,
  .dashboard-summary-grid,
  .dashboard-grid {
    gap: 12px;
  }

  .dashboard-summary-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .dashboard-date-card__date-full {
    display: none;
  }

  .dashboard-date-card__date-short {
    display: inline;
  }

  .dashboard-kpi {
    gap: 10px;
    padding-inline: 13px;
  }

  .dashboard-timeline__row {
    grid-template-columns: 38px 10px minmax(90px, 1fr) minmax(58px, 0.78fr) auto;
    gap: 6px;
  }

  .dashboard-waiting-row {
    grid-template-columns: 44px minmax(0, 1.1fr) minmax(0, 0.65fr) minmax(108px, auto);
    gap: 4px;
  }

  .dashboard-workload-row {
    grid-template-columns: 34px minmax(118px, 1fr) minmax(70px, 120px) 32px;
    gap: 8px;
  }

  .dashboard-workload-row__copy small {
    line-height: 1.35;
  }
}

@media screen and (min-width: 1280px) and (max-width: 1439px) {
  .dashboard-kpi__support-full {
    display: none;
  }

  .dashboard-kpi__support-compact {
    display: inline;
  }

  .dashboard-timeline__row {
    min-height: 58px;
    grid-template-columns: 32px 9px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 1px 5px;
  }

  .dashboard-timeline__row > time {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .dashboard-timeline__rail {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .dashboard-timeline__identity {
    grid-column: 3;
    grid-row: 1;
  }

  .dashboard-timeline__location {
    grid-column: 3;
    grid-row: 2;
  }

  .dashboard-timeline__row .admin-badge {
    grid-column: 4;
    grid-row: 1 / 3;
  }

  .dashboard-waiting-row {
    min-height: 68px;
    grid-template-columns: 42px minmax(0, 1fr) minmax(108px, auto);
    grid-template-rows: auto auto;
    gap: 1px 4px;
  }

  .dashboard-waiting-row > .dashboard-job-ref {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    padding-top: 2px;
  }

  .dashboard-waiting-row__service {
    grid-column: 2;
    grid-row: 1;
  }

  .dashboard-waiting-row__service small {
    overflow: visible;
    line-height: 1.2;
    text-overflow: clip;
    white-space: normal;
  }

  .dashboard-waiting-row__location {
    grid-column: 2;
    grid-row: 2;
  }

  .dashboard-waiting-row__meta {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media screen and (max-width: 1024px) {
  .admin-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    min-width: min(280px, 86vw);
    max-width: min(280px, 86vw);
    height: 100vh;
    transform: translateX(-102%);
    box-shadow: 20px 0 50px rgba(2, 14, 35, 0.24);
    transition: transform 0.22s ease;
  }

  .admin-sidebar-open {
    overflow: hidden;
  }

  .admin-sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar__close,
  .admin-menu-button {
    display: grid;
  }

  .admin-sidebar-overlay {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(2, 14, 35, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .admin-sidebar-open .admin-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-topbar__title-area {
    flex-basis: 260px;
  }

  .admin-main {
    padding: 14px 16px 22px;
  }

  .admin-grid--three,
  .admin-tech-list--editable {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .admin-topbar {
    gap: 10px;
    padding-inline: 12px;
  }

  .admin-topbar__title-area {
    flex-basis: 205px;
  }

  .admin-global-search {
    width: min(320px, 31vw);
    min-width: 175px;
  }

  .admin-topbar__avatar {
    display: none;
  }

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

@media screen and (max-width: 700px) {
  .admin-topbar {
    height: auto;
    min-height: 106px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    padding: 8px 11px;
  }

  .admin-topbar__title-area {
    grid-column: 1;
    grid-row: 1;
    flex-basis: auto;
  }

  .admin-topbar__actions {
    grid-column: 2;
    grid-row: 1;
  }

  .admin-global-search {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .admin-main {
    padding: 12px;
  }

  .dashboard-page,
  .dashboard-summary-grid,
  .dashboard-grid {
    gap: 12px;
  }

  .dashboard-grid--primary > .dashboard-card,
  .dashboard-grid--secondary > .dashboard-card {
    min-height: 240px;
  }

  .admin-page-header,
  .admin-panel__header,
  .admin-job-card__top,
  .admin-tech-card__title,
  .admin-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-tech-list--editable {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpi {
    border-bottom: 1px solid var(--admin-border);
  }

  .dashboard-kpi + .dashboard-kpi {
    border-left: 0;
  }

  .dashboard-kpi:nth-child(odd) {
    border-right: 1px solid var(--admin-border);
  }

  .dashboard-kpi:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card--revenue,
  .dashboard-grid--secondary > .dashboard-card:last-child {
    grid-column: auto;
  }

  .dashboard-activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-activity:nth-child(odd) {
    border-left: 0;
  }

  .dashboard-activity:nth-child(n + 3) {
    border-top: 1px solid var(--admin-border);
  }
}

@media screen and (max-width: 540px) {
  .admin-topbar__quick-action--secondary {
    display: none;
  }

  .admin-topbar__title {
    font-size: 0.92rem;
  }

  .admin-history-button {
    width: 32px;
    height: 32px;
  }

  .admin-page-header {
    margin-bottom: 14px;
  }

  .admin-page-header h1 {
    font-size: 1.45rem;
  }

  .dashboard-date-card {
    grid-template-columns: 1fr;
    grid-template-rows: 42px 50px;
    height: 92px;
    gap: 0;
  }

  .dashboard-date-card__top {
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
  }

  .dashboard-date-card__revenue {
    padding: 6px 12px;
  }

  .dashboard-timeline__row {
    grid-template-columns: 38px 10px minmax(0, 1fr) auto;
  }

  .dashboard-timeline__location {
    display: none;
  }

  .dashboard-waiting-row {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .dashboard-waiting-row__location,
  .dashboard-waiting-row__meta time {
    display: none;
  }

  .dashboard-waiting-row__meta {
    min-width: 0;
    grid-template-columns: max-content;
  }

  .dashboard-revenue-main {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dashboard-revenue-total {
    grid-template-columns: auto auto;
    align-items: end;
    gap: 2px 8px;
  }

  .dashboard-revenue-total small,
  .dashboard-revenue-total strong {
    grid-column: 1;
  }

  .dashboard-revenue-total span,
  .dashboard-revenue-total em {
    grid-column: 2;
  }

  .dashboard-revenue-total span {
    grid-row: 1;
  }

  .dashboard-revenue-total em {
    grid-row: 2;
  }

  .dashboard-chart-sparse__message {
    max-width: 160px;
    min-width: 0;
  }

  .dashboard-workload-row {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .dashboard-progress {
    display: none;
  }

  .dashboard-activity-list {
    grid-template-columns: 1fr;
  }

  .dashboard-activity + .dashboard-activity {
    border-top: 1px solid var(--admin-border);
    border-left: 0;
  }
}

/* Phase 13A.4: customer-safe Quote preview.  The document intentionally
   carries no Quote Detail/audit chrome and remains legible as a mobile card. */
.customer-quote-preview { display: grid; gap: 18px; width: 100%; color: #12213d; }
.public-quote-page { min-height: 100vh; margin: 0; padding: 28px 16px; background: #f2f6fb; color: #12213d; }.public-quote-shell { display: grid; width: min(100%, 8.5in); margin: 0 auto; gap: 16px; }.public-quote-shell .customer-quote-document { width: 100%; margin: 0; }.public-quote-actions, .public-quote-state { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid #dce7f4; border-radius: 12px; background: #fff; box-shadow: 0 10px 24px rgba(13, 25, 57, .08); }.public-quote-actions h2 { margin: 2px 0 4px; font-size: 18px; }.public-quote-actions p:not(.customer-quote-eyebrow), .public-quote-state p { margin: 0; color: #53637b; font-size: 13px; }.public-quote-actions__buttons { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 9px; }.public-quote-dialog .client-unsaved-dialog__panel { grid-template-columns: minmax(0, 1fr); }.public-quote-dialog .client-unsaved-dialog__actions { justify-content: flex-end; }.public-quote-noscript { padding: 12px; border-radius: 8px; background: #fff3cd; color: #755300; }.public-quote-state { display: block; border-color: #c9edda; background: #effbf5; }.public-quote-state strong { color: #176844; font-size: 18px; }.public-quote-unavailable { width: min(100%, 550px); margin: 15vh auto; padding: 38px 28px; border: 1px solid #dce7f4; border-radius: 14px; background: #fff; box-shadow: 0 14px 35px rgba(13, 25, 57, .1); text-align: center; }.public-quote-unavailable img { width: 60px; height: 60px; object-fit: contain; }.public-quote-unavailable h1 { margin: 5px 0 10px; color: #071a38; font-size: 26px; }.public-quote-unavailable p:last-child { margin: 0; color: #53637b; }
@media screen and (max-width: 720px) { .public-quote-page { padding: 12px; }.public-quote-actions { align-items: stretch; flex-direction: column; padding: 16px; }.public-quote-actions__buttons { display: grid; grid-template-columns: 1fr; }.public-quote-actions__buttons .btn { justify-content: center; min-height: 44px; }.public-quote-unavailable { margin: 12vh auto; padding: 30px 20px; } }
.quote-public-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; margin-top: 14px; padding: 14px; border: 1px solid #b9d9eb; border-radius: 10px; background: #f1f9fd; }.quote-public-link strong, .quote-public-link p { grid-column: 1 / -1; margin: 0; }.quote-public-link p { color: var(--admin-muted); font-size: 13px; }.quote-public-link input { min-width: 0; width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--admin-border); border-radius: 7px; background: #fff; color: var(--admin-text); font: inherit; }.quote-public-link span { color: var(--admin-muted); font-size: 13px; } @media screen and (max-width: 720px) { .quote-public-link { grid-template-columns: 1fr; }.quote-public-link input { font-size: 16px; }.quote-public-link .btn { justify-content: center; min-height: 42px; } }
.customer-quote-preview__toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 4px 2px 0; }.customer-quote-preview__toolbar h1 { margin: 2px 0 4px; font-size: 28px; }.customer-quote-preview__toolbar p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 12px; }
.customer-quote-document { box-sizing: border-box; width: min(100%, 8.5in); min-height: 10.25in; margin: 0 auto; padding: .52in; border: 1px solid #dce5f0; background: #fff; box-shadow: 0 14px 35px rgba(13, 25, 57, .1); font-family: Poppins, system-ui, sans-serif; color: #17253e; }.customer-quote-draft { margin: 0 0 14px; padding: 8px 10px; border: 1px solid #d99c12; background: #fff3cd; color: #875f00; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: center; }.customer-quote-document__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 19px; border-bottom: 3px solid #071a38; }.customer-quote-brand { display: flex; min-width: 0; gap: 12px; }.customer-quote-brand img { width: 50px; height: 50px; object-fit: contain; }.customer-quote-brand strong { display: block; color: #071a38; font-size: 18px; font-weight: 700; letter-spacing: -.025em; }.customer-quote-brand p { margin: 1px 0 3px; color: #55657c; font-size: 9px; line-height: 1.45; }.customer-quote-brand small { color: #607089; font-size: 8px; line-height: 1.35; }.customer-quote-title { flex: 0 0 auto; text-align: right; }.customer-quote-title h1 { margin: -2px 0 1px; color: #071a38; font-size: 29px; letter-spacing: .035em; line-height: 1; }.customer-quote-title p { margin: 3px 0 2px; color: #3d506e; font-size: 10px; font-weight: 600; }.customer-quote-title span { color: #718198; font-size: 8px; }
.customer-quote-overview { display: grid; grid-template-columns: 1.18fr .94fr 1fr; gap: 10px; margin-top: 17px; }.customer-quote-panel { min-width: 0; padding: 14px; border: 1px solid #dce7f4; border-radius: 10px; background: #f9fbfe; }.customer-quote-eyebrow { margin: 0 0 7px; color: #64748b; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.customer-quote-overview .customer-quote-panel { display: grid; align-content: start; gap: 2px; }.customer-quote-overview .customer-quote-panel strong { color: #14233c; font-size: 11px; font-weight: 600; }.customer-quote-overview .customer-quote-panel span { color: #53637b; font-size: 9px; line-height: 1.35; }.customer-quote-details dl { display: grid; gap: 6px; margin: 0; }.customer-quote-details dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }.customer-quote-details dt { color: #64748b; }.customer-quote-details dd { margin: 0; color: #1d2b44; font-weight: 600; text-align: right; }.customer-quote-total { display: grid; align-content: center; min-width: 0; padding: 14px; border-radius: 10px; background: #071a38; color: #fff; }.customer-quote-total p { margin: 0 0 3px; color: #bfcde1; font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }.customer-quote-total strong { font-size: 22px; line-height: 1.18; letter-spacing: -.035em; }.customer-quote-total span { margin-top: 5px; color: #bfcde1; font-size: 8px; }
.customer-quote-lines-section { margin-top: 20px; }.customer-quote-lines-section h2, .customer-quote-notes h2 { margin: 0 0 8px; color: #132544; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.customer-quote-table-shell { overflow-x: auto; }.customer-quote-lines { width: 100%; min-width: 590px; border-collapse: collapse; }.customer-quote-lines th { padding: 9px 11px; background: #071a38; color: #fff; font-size: 8px; font-weight: 600; letter-spacing: .07em; text-align: left; text-transform: uppercase; }.customer-quote-lines th:not(:first-child), .customer-quote-lines td:not(:first-child) { text-align: right; }.customer-quote-lines td { padding: 10px 11px; border-bottom: 1px solid #e6edf5; color: #4d5d74; font-size: 9px; vertical-align: top; }.customer-quote-lines td strong { color: #1c2b44; font-weight: 600; }.customer-quote-lines td small { display: block; margin-top: 2px; color: #718198; font-size: 8px; line-height: 1.4; }.customer-quote-lines tr { break-inside: avoid; page-break-inside: avoid; }
.customer-quote-closing { display: flex; justify-content: flex-end; margin-top: 14px; }.customer-quote-totals { width: min(100%, 265px); display: grid; gap: 5px; }.customer-quote-totals div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 20px; padding-inline: 9px; color: #5a6a81; font-size: 9px; }.customer-quote-totals div > strong { min-width: 0; text-align: right; white-space: nowrap; }.customer-quote-totals strong { color: #1a2a43; font-weight: 600; }.customer-quote-totals__total { margin-top: 2px; padding: 8px 9px; border-top: 1px solid #cbd8e6; background: #edf4fc; color: #12294b !important; font-size: 11px !important; }.customer-quote-totals__total strong { color: #12294b; font-size: 11px; }.customer-quote-notes { margin-top: 14px; }.customer-quote-notes p { margin: 0; color: #4f6078; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }.customer-quote-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 23px; padding-top: 12px; border-top: 1px solid #dce5ef; color: #66778e; font-size: 8px; line-height: 1.45; }.customer-quote-footer div { display: grid; gap: 2px; }.customer-quote-footer strong { color: #3c4d66; font-weight: 600; }.customer-quote-footer div:last-child { text-align: right; }
@media screen and (max-width: 720px) { .customer-quote-preview { gap: 12px; }.customer-quote-preview__toolbar { align-items: stretch; flex-direction: column; gap: 10px; }.customer-quote-preview__toolbar .btn { width: 100%; justify-content: center; }.customer-quote-document { min-height: 0; padding: 21px 16px; }.customer-quote-document__header { gap: 12px; }.customer-quote-brand { gap: 8px; }.customer-quote-brand img { width: 38px; height: 38px; }.customer-quote-brand strong { font-size: 14px; }.customer-quote-brand p, .customer-quote-brand small { font-size: 7px; }.customer-quote-title h1 { font-size: 20px; }.customer-quote-overview { grid-template-columns: 1fr; }.customer-quote-total { min-height: 88px; }.customer-quote-lines { min-width: 0; }.customer-quote-lines thead { display: none; }.customer-quote-lines, .customer-quote-lines tbody, .customer-quote-lines tr, .customer-quote-lines td { display: block; width: 100%; box-sizing: border-box; }.customer-quote-lines tr { padding: 8px 0; border-bottom: 1px solid #e6edf5; }.customer-quote-lines td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }.customer-quote-lines td::before { content: attr(data-label); color: #718198; font-size: 8px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }.customer-quote-lines td:first-child { display: block; text-align: left; }.customer-quote-lines td:first-child::before { display: none; }.customer-quote-closing { justify-content: stretch; }.customer-quote-totals { width: 100%; }.customer-quote-footer { align-items: flex-start; flex-direction: column; }.customer-quote-footer div:last-child { text-align: left; } }
@media print { .customer-quote-preview__toolbar { display: none !important; }.customer-quote-preview { display: block !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }.customer-quote-document { width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }.customer-quote-lines thead { display: table-header-group; }.customer-quote-lines tr, .customer-quote-overview, .customer-quote-notes, .customer-quote-footer { break-inside: avoid; page-break-inside: avoid; }.customer-quote-panel, .customer-quote-total { background: #fff !important; }.customer-quote-total { color: #071a38 !important; border: 1px solid #dce7f4; }.customer-quote-total p, .customer-quote-total span { color: #64748b !important; } }

/* Phase 12B: CRM invoice workflow. */
.invoice-workspace { display: grid; gap: 18px; width: 100%; min-width: 0; color: var(--admin-text); }
.invoice-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 4px 2px 0; }
.invoice-page-header h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 3px 0 5px; font-size: clamp(25px, 2.3vw, 34px); line-height: 1.08; }
.invoice-page-header p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 12px; }
.invoice-page-header__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.invoice-page-header__actions form { margin: 0; }
.invoice-page-header__note { max-width: 230px; padding: 8px 10px; border: 1px solid #dce7f6; border-radius: 9px; background: #f4f8ff; color: #527096; font-size: 10.5px; line-height: 1.35; text-align: right; }
.invoice-status { display: inline-flex; align-items: center; width: max-content; padding: 3px 7px; border-radius: 999px; background: #edf1f6; color: #64748b; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.invoice-status--draft { background: #fff4d6; color: #9a6500; }.invoice-status--ready { background: #e6f0ff; color: #1d5eb6; }.invoice-status--partially_paid { background: #f0e9ff; color: #6c45a7; }.invoice-status--paid { background: #ddf7ed; color: #137a50; }.invoice-status--canceled, .invoice-status--voided { background: #f2f3f5; color: #717982; }.invoice-status--overdue { background: #ffebe9; color: #b53e35; }
.invoice-card { min-width: 0; padding: 18px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.invoice-card h2 { margin: 2px 0; font-size: 17px; }.invoice-card p { color: var(--admin-muted); font-size: 11.5px; line-height: 1.5; }
.invoice-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }.invoice-section-heading p { margin: 0; }.invoice-section-heading .admin-kicker { margin-bottom: 2px; }
.invoice-filter-bar { display: grid; grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(130px, .7fr)) auto auto; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.invoice-filter-bar label, .invoice-form-grid label, .invoice-tax-controls label, .invoice-adjustment-form label, .invoice-payment-form label { display: grid; gap: 5px; min-width: 0; color: #64748b; font-size: 10px; font-weight: 700; }.invoice-filter-bar input, .invoice-filter-bar select, .invoice-form-grid input, .invoice-form-grid textarea, .invoice-tax-controls input, .invoice-tax-controls select, .invoice-lines input, .invoice-adjustment-form input, .invoice-adjustment-form select, .invoice-payment-form input, .invoice-payment-form select, .invoice-payment-form textarea { width: 100%; min-width: 0; min-height: 36px; padding: 7px 9px; border: 1px solid #d9e2ee; border-radius: 7px; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; }.invoice-form-grid textarea, .invoice-payment-form textarea { min-height: auto; resize: vertical; }
.invoice-filter-bar .btn { min-height: 36px; justify-content: center; white-space: nowrap; }
.invoice-table-card { padding: 0; overflow: hidden; }.invoice-table-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px 14px; border-bottom: 1px solid #e7edf4; }.invoice-table-card > header h2 { margin: 0; }.invoice-table-card > header p, .invoice-table-card > header small { margin: 3px 0 0; color: var(--admin-muted); font-size: 10.5px; }.invoice-table-card > header small { max-width: 290px; text-align: right; line-height: 1.35; }
.invoice-table-shell { width: 100%; overflow-x: auto; }.invoice-table { width: 100%; min-width: 780px; border-collapse: collapse; }.invoice-table th { padding: 10px 14px; background: #f8fafc; color: #738197; font-size: 9px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }.invoice-table td { padding: 12px 14px; border-top: 1px solid #edf1f5; color: #536176; font-size: 11.5px; vertical-align: middle; }.invoice-table td strong { color: var(--admin-text); }.invoice-table td small { display: block; margin-top: 2px; color: #8794a6; font-size: 10px; line-height: 1.35; }.invoice-table a, .invoice-number-link { color: var(--admin-primary); font-weight: 750; }.invoice-empty { padding: 38px !important; text-align: center; }.invoice-empty strong, .invoice-empty span { display: block; }.invoice-empty span { margin-top: 5px; color: var(--admin-muted); }
.invoice-alert { padding: 13px 15px; border-radius: 10px; font-size: 12px; }.invoice-alert p { margin: 3px 0 0; line-height: 1.45; }.invoice-alert--warning { border: 1px solid #f1d189; background: #fff8e8; color: #7d5900; }.invoice-alert--warning p { color: #876820; }
.invoice-draft-layout, .invoice-detail-layout, .invoice-payment-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); gap: 18px; align-items: start; }.invoice-draft-form { display: grid; gap: 23px; }.invoice-draft-form > section + section { padding-top: 21px; border-top: 1px solid #e8edf3; }.invoice-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }.invoice-form-grid__wide { grid-column: 1 / -1; }.invoice-lines { display: grid; gap: 9px; }.invoice-line-editor { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 13px; align-items: end; padding: 11px; border: 1px solid #e6ebf1; border-radius: 9px; background: #fbfcfe; }.invoice-line-editor__fields { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(180px, 1.3fr); gap: 9px; }.invoice-line-editor__fields label { display: grid; gap: 4px; color: #69778a; font-size: 9px; font-weight: 750; text-transform: uppercase; }.invoice-line-editor__amount { display: grid; gap: 2px; padding-bottom: 3px; text-align: right; }.invoice-line-editor__amount strong { font-size: 14px; }.invoice-line-editor__amount small { color: #79889b; font-size: 10px; }
.invoice-tax-controls { display: flex; gap: 11px; }.invoice-tax-controls label:first-child { flex: 1.4; }.invoice-tax-controls label:last-child { flex: .6; }.invoice-form-actions { display: flex; align-items: center; gap: 11px; padding-top: 2px; }.invoice-form-actions span { color: var(--admin-muted); font-size: 10.5px; }.invoice-side-stack { display: grid; gap: 18px; }.invoice-totals { display: grid; gap: 8px; margin: 0; }.invoice-totals div { display: flex; justify-content: space-between; gap: 15px; color: #657386; font-size: 12px; }.invoice-totals dd, .invoice-totals dt { margin: 0; }.invoice-totals dd { color: var(--admin-text); font-weight: 700; }.invoice-totals__grand { margin-top: 4px; padding-top: 10px; border-top: 1px solid #e5eaf0; font-size: 14px !important; }.invoice-totals__balance { color: #176844 !important; font-size: 14px !important; }.invoice-totals__balance dd { color: #176844; }.invoice-blocker-list { display: grid; gap: 7px; margin: 0 0 10px; padding-left: 17px; color: #8c5c09; font-size: 11px; line-height: 1.4; }.invoice-ready-cue { margin: 0; color: #16714b !important; font-weight: 750; }
.invoice-adjustments { display: grid; gap: 11px; }.invoice-adjustment-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #ebeff4; }.invoice-adjustment-row strong { font-size: 12px; }.invoice-adjustment-row small { display: block; margin-top: 2px; color: #7d8ba0; font-size: 10px; }.invoice-adjustment-form { display: grid; grid-template-columns: 1fr 1.3fr 120px 110px auto; align-items: end; gap: 9px; padding-top: 13px; border-top: 1px solid #e6ebf1; }.invoice-adjustment-form .btn { min-height: 36px; justify-content: center; white-space: nowrap; }
.invoice-fact-list { display: grid; gap: 9px; margin: 0; }.invoice-fact-list div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; font-size: 11.5px; }.invoice-fact-list dt { color: #768499; }.invoice-fact-list dd { margin: 0; color: var(--admin-text); }.invoice-memo { margin-top: 16px; padding-top: 13px; border-top: 1px solid #e8edf3; }.invoice-memo strong { font-size: 11px; }.invoice-memo p { margin: 4px 0 0; white-space: pre-wrap; }
.invoice-detail-readiness { display: grid; gap: 7px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e6ebf1; font-size: 11px; }.invoice-detail-readiness small { color: var(--admin-muted); }.invoice-payment-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }.invoice-payment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.invoice-payment-form__wide { grid-column: 1 / -1; }.invoice-payment-form .btn { width: max-content; min-height: 37px; }.invoice-audit { padding-block: 14px; }.invoice-audit .admin-kicker { margin: 0 0 8px; }

@media screen and (max-width: 900px) { .invoice-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.invoice-draft-layout, .invoice-detail-layout { grid-template-columns: 1fr; }.invoice-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }.invoice-adjustment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }.invoice-adjustment-form .btn { width: max-content; }.invoice-payment-layout { grid-template-columns: 1fr; } }
@media screen and (max-width: 620px) { .invoice-workspace { gap: 12px; }.invoice-page-header { flex-direction: column; gap: 10px; }.invoice-page-header__actions, .invoice-page-header__actions form, .invoice-page-header__actions .btn { width: 100%; }.invoice-page-header__actions .btn { justify-content: center; }.invoice-page-header__note { max-width: none; text-align: left; }.invoice-card { padding: 14px; }.invoice-table-card { padding: 0; }.invoice-table-card > header { align-items: flex-start; flex-direction: column; padding: 14px; }.invoice-table-card > header small { max-width: none; text-align: left; }.invoice-filter-bar, .invoice-form-grid, .invoice-line-editor__fields, .invoice-tax-controls, .invoice-side-stack, .invoice-payment-form { grid-template-columns: 1fr; }.invoice-filter-bar { display: grid; }.invoice-filter-bar .btn { width: 100%; }.invoice-form-grid__wide { grid-column: auto; }.invoice-line-editor { grid-template-columns: 1fr; }.invoice-line-editor__amount { text-align: left; }.invoice-form-actions { align-items: stretch; flex-direction: column; }.invoice-form-actions .btn { width: 100%; justify-content: center; }.invoice-adjustment-row { grid-template-columns: 1fr auto; }.invoice-adjustment-row form { grid-column: 1 / -1; }.invoice-adjustment-row form .btn { width: 100%; justify-content: center; }.invoice-adjustment-form { grid-template-columns: 1fr; }.invoice-adjustment-form .btn, .invoice-payment-form .btn { width: 100%; justify-content: center; }.invoice-table { min-width: 0; }.invoice-table thead { display: none; }.invoice-table, .invoice-table tbody, .invoice-table tr, .invoice-table td { display: block; width: 100%; }.invoice-table tr { padding: 10px 14px; border-top: 1px solid #e8edf3; }.invoice-table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }.invoice-table td::before { content: attr(data-label); color: #7b899c; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; }.invoice-table td.invoice-empty { display: block; padding: 28px 8px !important; text-align: center; }.invoice-table td.invoice-empty::before { display: none; }.invoice-fact-list div { grid-template-columns: 92px minmax(0, 1fr); }.invoice-detail-layout { gap: 12px; } }

/* Phase 13A.2: internal Business Quote registry and active-Draft editor. */
.quote-workspace { display: grid; gap: 18px; width: 100%; min-width: 0; color: var(--admin-text); }
.quote-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 4px 2px 0; }
.quote-page-header h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 3px 0 5px; font-size: clamp(25px, 2.3vw, 34px); line-height: 1.08; }
.quote-page-header p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 12px; }
.quote-status { display: inline-flex; align-items: center; width: max-content; padding: 4px 8px; border-radius: 999px; background: #edf1f6; color: #64748b; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.quote-status--draft { background: #fff4d6; color: #946200; }.quote-status--sent { background: #e6f0ff; color: #1d5eb6; }.quote-status--accepted { background: #ddf7ed; color: #137a50; }.quote-status--declined { background: #ffebe9; color: #b53e35; }.quote-status--expired, .quote-status--cancelled { background: #f0f2f5; color: #667085; }
.quote-card { min-width: 0; padding: 18px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.quote-card h2 { margin: 2px 0; font-size: 17px; }.quote-card p { color: var(--admin-muted); font-size: 11.5px; line-height: 1.5; }
.quote-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 15px; }.quote-section-heading p { margin: 0; }.quote-section-heading .admin-kicker { margin-bottom: 2px; }
.quote-filter-bar { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(160px, .7fr) auto auto; align-items: end; gap: 10px; padding: 13px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.quote-filter-bar label, .quote-field { display: grid; gap: 5px; min-width: 0; color: #64748b; font-size: 10px; font-weight: 700; }
.quote-filter-bar input, .quote-filter-bar select, .quote-field input, .quote-field select, .quote-field textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; border: 1px solid #d9e2ee; border-radius: 8px; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; }
.quote-field textarea { resize: vertical; }.quote-field small { color: #8b5e0a; font-size: 9.5px; font-weight: 600; }.quote-filter-bar .btn { min-height: 38px; justify-content: center; white-space: nowrap; }
.quote-table-card { padding: 0; overflow: hidden; }.quote-table-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px 14px; border-bottom: 1px solid #e7edf4; }.quote-table-card > header h2 { margin: 0; }.quote-table-card > header p, .quote-table-card > header small { margin: 3px 0 0; color: var(--admin-muted); font-size: 10.5px; }.quote-table-card > header small { max-width: 300px; text-align: right; line-height: 1.35; }
.quote-table-shell { width: 100%; overflow-x: auto; }.quote-table { width: 100%; min-width: 720px; border-collapse: collapse; }.quote-registry-table { min-width: 980px; }.quote-lines-table { min-width: 920px; }.quote-table th { padding: 10px 14px; background: #f8fafc; color: #738197; font-size: 9px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }.quote-table td { padding: 12px 14px; border-top: 1px solid #edf1f5; color: #536176; font-size: 11.5px; vertical-align: middle; }.quote-table td strong { color: var(--admin-text); }.quote-table td small { display: block; margin-top: 2px; color: #8794a6; font-size: 10px; line-height: 1.35; }.quote-table a, .quote-number-link { color: var(--admin-primary); font-weight: 750; }.quote-empty { padding: 38px !important; text-align: center; }.quote-empty strong, .quote-empty span { display: block; }.quote-empty span { margin-top: 5px; color: var(--admin-muted); }
.quote-summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }.quote-summary-strip article { display: grid; align-content: center; min-width: 0; min-height: 96px; padding: 15px 17px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.quote-summary-strip small { color: #78879a; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }.quote-summary-strip strong { overflow-wrap: anywhere; margin-top: 5px; color: #172842; font-size: clamp(16px, 1.6vw, 22px); letter-spacing: -.02em; }.quote-summary-strip span { margin-top: 3px; color: #8895a7; font-size: 9.5px; }.quote-summary-strip__total { border-color: #173e72 !important; background: #0d2b55 !important; }.quote-summary-strip__total small, .quote-summary-strip__total span { color: #b7cae4; }.quote-summary-strip__total strong { color: #fff; }
.quote-detail-grid, .quote-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }.quote-history-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); }
.quote-fact-list { display: grid; gap: 9px; margin: 0; }.quote-fact-list div { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px; font-size: 11.5px; }.quote-fact-list dt { color: #768499; }.quote-fact-list dd { margin: 0; color: var(--admin-text); overflow-wrap: anywhere; }
.quote-copy-block + .quote-copy-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e8edf3; }.quote-copy-block strong { font-size: 11px; }.quote-copy-block p, .quote-internal-card > p { margin: 4px 0 0; white-space: pre-wrap; }
.quote-internal-card { border-color: #ead9ad; background: #fffcf5; }.quote-internal-card .quote-section-heading { margin-bottom: 8px; }
.quote-lifecycle-actions { border-color: #cddbed; background: #f8fbff; }.quote-lifecycle-actions .quote-section-heading { margin-bottom: 12px; }.quote-lifecycle-actions__buttons { display: flex; flex-wrap: wrap; gap: 9px; }.quote-lifecycle-actions__buttons form { margin: 0; }.quote-lifecycle-actions__notice { margin: 12px 0 0; color: #556c88 !important; font-size: 10.5px !important; }
.quote-audit ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }.quote-audit li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 8px; padding: 0 0 15px; }.quote-audit li > span { position: relative; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: var(--admin-primary); }.quote-audit li > span::after { content: ""; position: absolute; top: 10px; bottom: -18px; left: 3px; width: 1px; background: #dfe6ef; }.quote-audit li:last-child > span::after { display: none; }.quote-audit li strong { font-size: 11.5px; }.quote-audit li p { margin: 2px 0; font-size: 10px; }.quote-audit time { color: #8a97a8; font-size: 9.5px; }.quote-audit__empty { display: block !important; color: var(--admin-muted); font-size: 11px; }
.quote-editor { display: grid; gap: 16px; }.quote-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 320px); gap: 18px; align-items: start; }.quote-editor-main, .quote-editor-side { display: grid; gap: 18px; min-width: 0; }.quote-editor-side { position: sticky; top: 82px; }.quote-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }.quote-form-grid__wide { grid-column: 1 / -1; }.quote-field--internal { padding: 11px; border: 1px solid #eddcab; border-radius: 9px; background: #fffcf4; }
.quote-lines-heading { align-items: center; }.quote-line-list { display: grid; gap: 12px; }.quote-line-editor { overflow: hidden; border: 1px solid #dfe7f0; border-radius: 10px; background: #fbfcfe; }.quote-line-editor > header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid #e4eaf1; background: #f5f8fc; }.quote-line-editor > header strong { color: #53647a; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }.quote-line-editor > header span { color: #173e72; font-size: 13px; font-weight: 800; }.quote-line-editor > header button { padding: 2px 0; border: 0; background: transparent; color: #a1423a; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }.quote-line-editor > header button:disabled { color: #a8b1bd; cursor: not-allowed; }.quote-line-grid { display: grid; grid-template-columns: 1.5fr .8fr .85fr; gap: 10px; padding: 12px; }.quote-line-grid__title, .quote-line-grid__description { grid-column: 1 / -1; }.quote-line-grid__description textarea { min-height: 38px; }
.quote-preview-card { border-color: #cddbed; }.quote-preview-totals { display: grid; gap: 9px; margin: 0; }.quote-preview-totals div { display: flex; justify-content: space-between; gap: 14px; color: #657386; font-size: 12px; }.quote-preview-totals dt, .quote-preview-totals dd { margin: 0; }.quote-preview-totals dd { color: var(--admin-text); font-weight: 750; }.quote-preview-totals__grand { margin-top: 4px; padding-top: 11px; border-top: 1px solid #e1e8f0; font-size: 16px !important; }.quote-preview-totals__grand dd { color: #123967; }.quote-preview-card > p { margin: 11px 0 0; color: #657b97; font-size: 10px; text-align: right; }.quote-editor-note { border-color: #d5e2f0; background: #f6f9fd; }.quote-editor-note strong { font-size: 11px; }.quote-editor-note p { margin: 4px 0 0; }
.quote-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 15px 18px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.quote-form-actions span { color: var(--admin-muted); font-size: 10.5px; }

@media screen and (max-width: 1100px) { .quote-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }.quote-editor-layout, .quote-history-grid { grid-template-columns: 1fr; }.quote-editor-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 760px) { .quote-detail-grid { grid-template-columns: 1fr; }.quote-line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.quote-line-grid__title, .quote-line-grid__description { grid-column: 1 / -1; } }
@media screen and (max-width: 620px) { .quote-workspace { gap: 12px; }.quote-page-header { flex-direction: column; gap: 10px; }.quote-page-header > .btn, .quote-page-header > .quote-status { width: 100%; justify-content: center; }.quote-card { padding: 14px; }.quote-table-card { padding: 0; }.quote-table-card > header { align-items: flex-start; flex-direction: column; padding: 14px; }.quote-table-card > header small { max-width: none; text-align: left; }.quote-filter-bar, .quote-form-grid, .quote-line-grid, .quote-editor-side, .quote-summary-strip { grid-template-columns: 1fr; }.quote-filter-bar .btn { width: 100%; }.quote-form-grid__wide, .quote-line-grid__title, .quote-line-grid__description { grid-column: auto; }.quote-lines-heading { align-items: stretch; flex-direction: column; }.quote-lines-heading .btn { width: 100%; justify-content: center; }.quote-line-editor > header { grid-template-columns: minmax(0, 1fr) auto; }.quote-line-editor > header button { grid-column: 1 / -1; justify-self: end; }.quote-form-actions { align-items: stretch; flex-direction: column; }.quote-form-actions .btn, .quote-lifecycle-actions__buttons .btn { width: 100%; justify-content: center; }.quote-form-actions span { text-align: center; }.quote-lifecycle-actions__buttons { align-items: stretch; flex-direction: column; }.quote-lifecycle-actions__buttons form { display: grid; }.quote-table { min-width: 0; }.quote-table thead { display: none; }.quote-table, .quote-table tbody, .quote-table tr, .quote-table td { display: block; width: 100%; }.quote-table tr { padding: 10px 14px; border-top: 1px solid #e8edf3; }.quote-table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; overflow-wrap: anywhere; }.quote-table td::before { content: attr(data-label); color: #7b899c; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; }.quote-table td.quote-empty { display: block; padding: 28px 8px !important; text-align: center; }.quote-table td.quote-empty::before { display: none; }.quote-fact-list div { grid-template-columns: 92px minmax(0, 1fr); } }

/* Phase 13B.2 owner-review polish: confined to Service Confirmation controls. */
.service-confirmation-form .service-confirmation-taxable-field { display: inline-flex; align-items: center; align-self: end; gap: 8px; min-height: 38px; color: #64748b; font-size: 11px; font-weight: 700; }
.service-confirmation-form .service-confirmation-taxable-field input[type="checkbox"] { box-sizing: border-box; flex: 0 0 18px; width: 18px; min-width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--admin-primary); cursor: pointer; }
.service-confirmation-form .service-confirmation-taxable-field input[type="checkbox"]:focus-visible { outline: 2px solid #4c88df; outline-offset: 2px; }
.service-confirmation-copy-status { display: block; min-height: 18px; margin-top: 10px; color: #3d6f5a; font-family: inherit; font-size: 12.5px; font-weight: 650; line-height: 1.45; }
.service-confirmation-filter-bar { grid-template-columns: minmax(360px, 460px) minmax(220px, 250px) minmax(150px, 165px) max-content max-content; justify-content: start; }
@media screen and (max-width: 620px) { .service-confirmation-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.service-confirmation-filter-bar label { grid-column: 1 / -1; }.service-confirmation-filter-bar .btn { width: 100%; } }

/* Phase 14A owner review: Contract-specific editor and registry controls. */
.contract-editor .contract-form-grid { align-items: start; }
.contract-editor .contract-template-control { align-content: start; min-height: 38px; }
.contract-editor .contract-template-control > strong { display: flex; align-items: center; box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #d9e2ee; border-radius: 8px; background: #f8fafc; color: #263a56; font-size: 12px; }
.contract-editor .contract-taxability-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; min-height: 38px; padding: 2px 0; }
.contract-editor .contract-taxability-control { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; color: #64748b; font-size: 11px; font-weight: 700; cursor: pointer; }
.contract-editor .contract-taxability-control input[type="checkbox"] { box-sizing: border-box; flex: 0 0 19px; width: 19px; min-width: 19px; min-height: 19px; height: 19px; margin: 0; padding: 0; accent-color: var(--admin-primary); cursor: pointer; }
.contract-editor .contract-taxability-control input[type="checkbox"]:focus-visible { outline: 2px solid #4c88df; outline-offset: 2px; }
.contracts-registry-page .contract-filter-bar { display: grid; grid-template-columns: minmax(210px, 1.45fr) minmax(130px, .72fr) minmax(140px, .72fr) minmax(170px, .9fr) max-content; align-items: end; gap: 10px; }
.contracts-registry-page .quote-filter-card { padding: 14px 16px; }
.contracts-registry-page .contract-filter-bar .quote-filter-actions { display: flex; align-items: end; gap: 8px; min-height: 38px; }
.contracts-registry-page .contract-filter-bar .btn { min-height: 38px; white-space: nowrap; }
.contracts-registry-page .quote-table td:nth-child(5), .contracts-registry-page .quote-table td:nth-child(7), .contracts-registry-page .quote-table td:nth-child(8), .contracts-registry-page .quote-table td:nth-child(9) { white-space: nowrap; }
@media screen and (max-width: 920px) { .contracts-registry-page .contract-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }.contracts-registry-page .contract-filter-bar__search { grid-column: 1 / -1; }.contracts-registry-page .contract-filter-bar .quote-filter-actions { justify-content: flex-start; } }
@media screen and (max-width: 620px) { .contract-editor .contract-taxability-controls { align-items: flex-start; flex-direction: column; gap: 8px; }.contracts-registry-page .contract-filter-bar { grid-template-columns: 1fr; }.contracts-registry-page .contract-filter-bar__search { grid-column: auto; }.contracts-registry-page .contract-filter-bar .quote-filter-actions { display: grid; }.contracts-registry-page .contract-filter-bar .btn { width: 100%; justify-content: center; } }

/* Phase 12B.1: canonical customer Invoice preview and print document. */
.customer-invoice-preview { display: grid; gap: 18px; width: 100%; color: #12213d; }
.customer-invoice-preview__toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 4px 2px 0; }.customer-invoice-preview__toolbar h1 { margin: 2px 0 4px; font-size: 28px; }.customer-invoice-preview__toolbar p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 12px; }
.customer-invoice-document { box-sizing: border-box; width: min(100%, 8.5in); min-height: 10.25in; margin: 0 auto; padding: .52in; border: 1px solid #dce5f0; background: #fff; box-shadow: 0 14px 35px rgba(13, 25, 57, .1); font-family: Poppins, system-ui, sans-serif; color: #17253e; }
.customer-invoice-document__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 19px; border-bottom: 3px solid #071a38; }.customer-invoice-brand { display: flex; min-width: 0; gap: 12px; }.customer-invoice-brand img { width: 50px; height: 50px; object-fit: contain; }.customer-invoice-brand strong { display: block; color: #071a38; font-size: 18px; font-weight: 700; letter-spacing: -.025em; }.customer-invoice-brand p { margin: 1px 0 3px; color: #55657c; font-size: 9px; line-height: 1.45; }.customer-invoice-brand small { color: #607089; font-size: 8px; line-height: 1.35; }.customer-invoice-title { flex: 0 0 auto; text-align: right; }.customer-invoice-title h1 { margin: -2px 0 1px; color: #071a38; font-size: 29px; letter-spacing: .035em; line-height: 1; }.customer-invoice-title p { margin: 3px 0 7px; color: #3d506e; font-size: 10px; font-weight: 600; }
.customer-invoice-status { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 999px; background: #edf1f6; color: #546477; font-size: 8px; font-weight: 700; letter-spacing: .05em; line-height: 1; }.customer-invoice-status--paid { background: #dcf5e9; color: #116744; }.customer-invoice-status--partially-paid { background: #f0eaff; color: #6541a1; }.customer-invoice-status--overdue { background: #fff0e9; color: #aa4c25; }.customer-invoice-status--ready, .customer-invoice-status--sent { background: #e7f0ff; color: #195bb1; }.customer-invoice-status--draft { background: #fff5dc; color: #8b6205; }.customer-invoice-status--canceled, .customer-invoice-status--voided { background: #edf0f3; color: #667085; }
.customer-invoice-overview { display: grid; grid-template-columns: 1.18fr .94fr 1fr; gap: 10px; margin-top: 17px; }.customer-invoice-panel { min-width: 0; padding: 14px; border: 1px solid #dce7f4; border-radius: 10px; background: #f9fbfe; }.customer-invoice-eyebrow { margin: 0 0 7px; color: #64748b; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.customer-invoice-bill-to { display: grid; align-content: start; gap: 2px; }.customer-invoice-bill-to strong { color: #14233c; font-size: 11px; font-weight: 600; }.customer-invoice-bill-to span { color: #53637b; font-size: 9px; line-height: 1.35; }.customer-invoice-dates dl { display: grid; gap: 6px; margin: 0; }.customer-invoice-dates dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }.customer-invoice-dates dt { color: #64748b; }.customer-invoice-dates dd { margin: 0; color: #1d2b44; font-weight: 600; text-align: right; }.customer-invoice-financial-card { display: grid; align-content: center; min-width: 0; padding: 14px; border-radius: 10px; background: #071a38; color: #fff; }.customer-invoice-financial-card p { margin: 0 0 3px; color: #bfcde1; font-size: 8px; font-weight: 700; letter-spacing: .07em; }.customer-invoice-financial-card strong { font-size: 22px; line-height: 1.18; letter-spacing: -.035em; }.customer-invoice-financial-card span { margin-top: 5px; color: #bfcde1; font-size: 8px; }
.customer-invoice-lines-section { margin-top: 20px; }.customer-invoice-lines-section h2, .customer-invoice-payment h2, .customer-invoice-confirmation h2, .customer-invoice-notes h2 { margin: 0 0 8px; color: #132544; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.customer-invoice-table-shell { overflow-x: auto; }.customer-invoice-lines { width: 100%; min-width: 590px; border-collapse: collapse; }.customer-invoice-lines th { padding: 9px 11px; background: #071a38; color: #fff; font-size: 8px; font-weight: 600; letter-spacing: .07em; text-align: left; text-transform: uppercase; }.customer-invoice-lines th:not(:first-child), .customer-invoice-lines td:not(:first-child) { text-align: right; }.customer-invoice-lines td { padding: 10px 11px; border-bottom: 1px solid #e6edf5; color: #4d5d74; font-size: 9px; vertical-align: top; }.customer-invoice-lines td strong { color: #1c2b44; font-weight: 600; }.customer-invoice-lines td small { display: block; margin-top: 2px; color: #718198; font-size: 8px; line-height: 1.4; }.customer-invoice-lines tr { break-inside: avoid; page-break-inside: avoid; }
.customer-invoice-closing { display: flex; justify-content: flex-end; margin-top: 14px; }.customer-invoice-totals { width: min(100%, 265px); display: grid; gap: 5px; }.customer-invoice-totals div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 20px; padding-inline: 9px; color: #5a6a81; font-size: 9px; }.customer-invoice-totals div > span { min-width: 0; text-align: left; }.customer-invoice-totals div > strong { min-width: 0; text-align: right; white-space: nowrap; }.customer-invoice-totals strong { color: #1a2a43; font-weight: 600; }.customer-invoice-totals__total { margin-top: 2px; padding: 8px 9px; border-top: 1px solid #cbd8e6; background: #edf4fc; color: #12294b !important; font-size: 11px !important; }.customer-invoice-totals__total strong { color: #12294b; font-size: 11px; }.customer-invoice-totals__balance { padding-top: 2px; color: #176844 !important; font-size: 10px !important; }.customer-invoice-totals__balance strong { color: #176844; }
.customer-invoice-payment { margin-top: 18px; }.customer-invoice-payment > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px; padding: 5px 0; color: #506078; font-size: 9px; }.customer-invoice-payment > div > span { display: grid; min-width: 0; gap: 1px; text-align: left; }.customer-invoice-payment > div > strong { min-width: 0; text-align: right; white-space: nowrap; }.customer-invoice-payment > div strong { color: #1d2c45; font-weight: 600; }.customer-invoice-payment small { color: #77879b; font-size: 8px; }.customer-invoice-payment__total { margin-top: 3px; padding-top: 8px !important; border-top: 1px solid #dbe6f1; }.customer-invoice-payment--due { background: #fffaf1; border-color: #f1e3bd; }.customer-invoice-confirmation { margin-top: 14px; padding: 13px 14px; border: 1px solid #c9edda; border-radius: 10px; background: #effbf5; }.customer-invoice-confirmation h2 { color: #176844; }.customer-invoice-confirmation p { margin: 0; color: #28634c; font-size: 9px; line-height: 1.5; }.customer-invoice-notes { margin-top: 14px; }.customer-invoice-notes p { margin: 0; color: #4f6078; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }.customer-invoice-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 23px; padding-top: 12px; border-top: 1px solid #dce5ef; color: #66778e; font-size: 8px; line-height: 1.45; }.customer-invoice-footer div { display: grid; gap: 2px; }.customer-invoice-footer strong { color: #3c4d66; font-weight: 600; }.customer-invoice-footer div:last-child { text-align: right; }

@media screen and (max-width: 720px) { .customer-invoice-preview { gap: 12px; }.customer-invoice-preview__toolbar { align-items: stretch; flex-direction: column; gap: 10px; }.customer-invoice-preview__toolbar .btn { width: 100%; justify-content: center; }.customer-invoice-document { min-height: 0; padding: 21px 16px; }.customer-invoice-document__header { gap: 12px; }.customer-invoice-brand { gap: 8px; }.customer-invoice-brand img { width: 38px; height: 38px; }.customer-invoice-brand strong { font-size: 14px; }.customer-invoice-brand p, .customer-invoice-brand small { font-size: 7px; }.customer-invoice-title h1 { font-size: 20px; }.customer-invoice-overview { grid-template-columns: 1fr; }.customer-invoice-financial-card { min-height: 88px; }.customer-invoice-table-shell { margin-inline: -1px; }.customer-invoice-lines { min-width: 0; }.customer-invoice-lines thead { display: none; }.customer-invoice-lines, .customer-invoice-lines tbody, .customer-invoice-lines tr, .customer-invoice-lines td { display: block; width: 100%; box-sizing: border-box; }.customer-invoice-lines tr { padding: 8px 0; border-bottom: 1px solid #e6edf5; }.customer-invoice-lines td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }.customer-invoice-lines td::before { content: attr(data-label); color: #718198; font-size: 8px; font-weight: 700; letter-spacing: .06em; text-align: left; text-transform: uppercase; }.customer-invoice-lines td:first-child { display: block; text-align: left; }.customer-invoice-lines td:first-child::before { display: none; }.customer-invoice-closing { justify-content: stretch; }.customer-invoice-totals { width: 100%; }.customer-invoice-footer { align-items: flex-start; flex-direction: column; }.customer-invoice-footer div:last-child { text-align: left; } }

@media print { @page { size: letter; margin: .45in; } body.page-admin-crm { background: #fff !important; }.admin-sidebar, .admin-topbar, .customer-invoice-preview__toolbar, .admin-flashes { display: none !important; }.admin-shell, .admin-content, .admin-main, .customer-invoice-preview { display: block !important; width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }.customer-invoice-document { width: auto !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; }.customer-invoice-lines thead { display: table-header-group; }.customer-invoice-lines tr, .customer-invoice-overview, .customer-invoice-payment, .customer-invoice-confirmation, .customer-invoice-notes, .customer-invoice-footer { break-inside: avoid; page-break-inside: avoid; }.customer-invoice-panel, .customer-invoice-financial-card { background: #fff !important; }.customer-invoice-financial-card { color: #071a38 !important; border: 1px solid #dce7f4; }.customer-invoice-financial-card p, .customer-invoice-financial-card span { color: #64748b !important; } }

/* Phase 11 completion: reuse the established workspaces while keeping the
   completion-specific photo privacy and final-review hierarchy responsive. */
.completion-photo-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.completion-photo-category-grid .photo-upload-panel { min-width: 0; }
.completion-photo-category--internal { border-color: #d7c7f4; background: #faf8ff; }
.completion-photo-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.completion-photo-card { overflow: hidden; border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-surface); }
.completion-photo-card a { display: block; aspect-ratio: 4 / 3; background: #edf2f7; }
.completion-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.completion-photo-card form { padding: 7px; }
.completion-photo-card .btn { width: 100%; justify-content: center; }
.completion-review-workspace { display: grid; gap: 18px; width: 100%; min-width: 0; }
.completion-review-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px solid #b9d9eb; border-radius: var(--admin-card-radius); background: linear-gradient(135deg, #f1f9fd, #fff); box-shadow: var(--admin-card-shadow); }
.completion-review-intro h2, .completion-review-intro p { margin: 0; }
.completion-review-intro h2 { margin-bottom: 5px; color: var(--admin-text); }
.completion-review-intro p { max-width: 680px; color: var(--admin-muted); }
.completion-review-intro > strong { flex: 0 0 auto; color: var(--admin-primary); font-size: clamp(27px, 3vw, 40px); }
.completion-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.completion-review-card { min-width: 0; padding: 18px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.completion-review-card--wide { grid-column: span 2; }
.completion-review-card > header { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 14px; }
.completion-review-card > header > span { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #e8f5fc; color: var(--admin-primary); }
.completion-review-card h2, .completion-review-card p { margin: 0; }
.completion-review-card h2 { font-size: 16px; }
.completion-review-card small { display: block; margin-top: 8px; color: var(--admin-muted); }
.completion-review-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.completion-review-metrics div { padding: 10px; border-radius: 9px; background: #f5f8fb; }
.completion-review-metrics strong, .completion-review-metrics span { display: block; }
.completion-review-metrics strong { color: var(--admin-text); font-size: 20px; }
.completion-review-metrics span { color: var(--admin-muted); font-size: 11px; }
.completion-review-ledger { display: grid; gap: 7px; margin: 0; }
.completion-review-ledger div { display: flex; justify-content: space-between; gap: 16px; }
.completion-review-ledger dt { color: var(--admin-muted); }
.completion-review-ledger dd { margin: 0; }
.completion-review-report-state { display: flex; flex-wrap: wrap; gap: 8px; }
.completion-review-report-state span { padding: 6px 9px; border-radius: 999px; background: #f1f4f8; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.completion-review-report-state .is-ready { background: #e5f6ed; color: #197542; }
.completion-review-card--customer-preview { border-color: #b9d9eb; background: linear-gradient(135deg, #f8fcff, #fff 55%); }
.completion-review-customer-preview { display: grid; gap: 14px; }
.completion-review-customer-preview__notice { padding: 10px 12px; border: 1px solid #d2e7f3; border-radius: 9px; color: #315978; background: #eef8fd; font-size: 12px; line-height: 1.45; }
.completion-review-customer-preview__facts, .completion-review-customer-preview__narrative { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.completion-review-customer-preview__facts > div, .completion-review-customer-preview__narrative > div { min-width: 0; padding: 11px; border: 1px solid #e2ebf3; border-radius: 9px; background: #fff; }
.completion-review-customer-preview__facts dt { color: var(--admin-muted); font-size: 10px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.completion-review-customer-preview__facts dd { margin: 4px 0 0; color: var(--admin-text); font-size: 13px; font-weight: 700; }
.completion-review-customer-preview > section:not(.completion-review-customer-preview__narrative) { display: grid; gap: 7px; padding-top: 14px; border-top: 1px solid #e2ebf3; }
.completion-review-customer-preview h3, .completion-review-customer-preview h4, .completion-review-customer-preview p { margin: 0; }
.completion-review-customer-preview h3 { color: var(--admin-text); font-size: 13px; }
.completion-review-customer-preview h4 { color: var(--admin-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.completion-review-customer-preview__tasks { display: grid; gap: 7px; }
.completion-review-customer-preview__tasks article { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; padding: 10px 11px; border: 1px solid #e5edf4; border-radius: 8px; background: #fff; }
.completion-review-customer-preview__tasks article > span { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #17683f; background: #e3f5eb; font-size: 12px; font-weight: 800; }
.completion-review-customer-preview__tasks strong { color: var(--admin-text); font-size: 12px; }
.completion-review-customer-preview__tasks p, .completion-review-customer-preview__list { color: #43536a; font-size: 12px; line-height: 1.5; }
.completion-review-customer-preview__tasks p { margin-top: 3px; }
.completion-review-customer-preview__list { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.completion-review-customer-preview__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.completion-review-customer-preview__photos figure { display: grid; gap: 5px; margin: 0; padding: 6px; border: 1px solid #e5edf4; border-radius: 8px; background: #fff; }
.completion-review-customer-preview__photos img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 5px; object-fit: cover; background: #e9eff5; }
.completion-review-customer-preview__photos figcaption { color: var(--admin-muted); font-size: 10.5px; font-weight: 700; text-transform: capitalize; }
.completion-review-customer-preview__narrative { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.completion-review-customer-preview__narrative h3 { margin-bottom: 5px; }
.completion-review-customer-preview__narrative p { color: #43536a; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.completion-review-customer-preview p.completion-review-customer-preview__empty { color: var(--admin-muted); font-style: italic; }
.completion-review-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 4px 0; }

@media screen and (max-width: 720px) {
  .completion-photo-category-grid, .completion-review-grid { grid-template-columns: 1fr; }
  .completion-review-card--wide { grid-column: auto; }
  .completion-review-intro { align-items: flex-start; flex-direction: column; gap: 10px; padding: 18px; }
  .completion-review-intro > strong { font-size: 30px; }
  .completion-review-customer-preview__facts, .completion-review-customer-preview__narrative { grid-template-columns: 1fr; }
}

@media screen and (max-width: 540px) {
  .completion-photo-card-list { grid-template-columns: 1fr; }
  .completion-review-actions .btn, .completion-review-actions a { width: 100%; justify-content: center; }
}

/* Phase 11F: completed-work Completion Hub. */
.completion-hub { display: grid; width: 100%; min-width: 0; gap: 16px; color: var(--admin-text); }
.completion-hub__header, .completion-hub__panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.completion-hub__header { padding: 3px 1px 1px; }
.completion-hub__header h1 { margin: 3px 0 5px; font-size: clamp(25px, 2vw, 32px); line-height: 1.05; }
.completion-hub__header p:not(.admin-kicker), .completion-hub__panel-header p { margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
.completion-hub__header-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.completion-hub__staff-cue { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border: 1px solid #e1d6bc; border-radius: 999px; background: #fff9e9; color: #79612b; font-size: 10px; font-weight: 700; }
.completion-hub__tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.completion-hub__tabs a { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 35px; padding: 0 13px; border-radius: 7px; color: var(--admin-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.completion-hub__tabs a:hover, .completion-hub__tabs a:focus-visible { color: var(--admin-primary); background: #f0f5ff; }
.completion-hub__tabs a.is-active { color: var(--admin-primary); background: #eaf1ff; }
.completion-hub__panel { display: grid; gap: 18px; padding: 20px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.completion-hub__panel-header h2 { margin: 2px 0 5px; font-size: 19px; }
.completion-hub__grand-total { color: var(--admin-primary); font-size: 24px; white-space: nowrap; }
.completion-hub__report-summary, .completion-hub__subcard, .completion-hub__charge-grid > section, .completion-hub__estimate-list > article, .completion-hub__billing-grid > section { border: 1px solid #e6ecf3; border-radius: 10px; background: #fbfcfe; }
.completion-hub__report-summary, .completion-hub__subcard { padding: 15px; }
.completion-hub__report-summary h3, .completion-hub__subcard h3, .completion-hub__section h3, .completion-hub__charge-grid h3 { margin: 0 0 7px; font-size: 13px; }
.completion-hub__report-summary p, .completion-hub__subcard p { margin: 0; color: #43536a; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.completion-hub__facts, .completion-hub__totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; }
.completion-hub__facts > div, .completion-hub__totals > div { display: grid; gap: 3px; padding: 11px 12px; border: 1px solid #e8edf4; border-radius: 9px; background: #fff; }
.completion-hub__facts span, .completion-hub__facts dt, .completion-hub__totals dt, .completion-hub__billing-grid span, .completion-hub__estimate-list dt { color: var(--admin-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.completion-hub__facts strong, .completion-hub__facts dd, .completion-hub__totals dd, .completion-hub__estimate-list dd { margin: 0; color: var(--admin-text); font-size: 12px; }
.completion-hub__card-grid, .completion-hub__charge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.completion-hub__section { display: grid; gap: 9px; }
.completion-hub-line-list { display: grid; gap: 7px; }
.completion-hub-line-list > p { margin: 0; padding: 8px 0; font-size: 11px; }
.completion-hub-line-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 9px 11px; border: 1px solid #e8edf4; border-radius: 8px; background: #fff; }
.completion-hub-line-item > div { display: grid; min-width: 0; gap: 2px; }
.completion-hub-line-item strong { font-size: 12px; }
.completion-hub-line-item small, .completion-hub-line-item span { color: var(--admin-muted); font-size: 10.5px; }
.completion-hub-line-item > strong { flex: 0 0 auto; color: var(--admin-text); }
.completion-hub__charge-grid > section { padding: 14px; }
.completion-hub__charge-grid > section > p { margin: -2px 0 8px; font-size: 10.5px; }
.completion-hub__totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.completion-hub__totals > div:last-child { border-color: #bed0ef; background: #eff5ff; }
.completion-hub__totals > div:last-child dd { color: var(--admin-primary); font-weight: 800; }
.completion-hub__photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.completion-hub__photo-grid figure { display: grid; gap: 6px; margin: 0; padding: 7px; border: 1px solid #e8edf4; border-radius: 9px; background: #fff; }
.completion-hub__photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #f0f3f8; }
.completion-hub__photo-grid figcaption { color: var(--admin-muted); font-size: 10.5px; font-weight: 700; text-transform: capitalize; }
.completion-hub__notice { margin: 0; padding: 11px 13px; border-left: 3px solid var(--admin-primary); border-radius: 5px; background: #f2f6fd; color: #43536a; font-size: 11.5px; line-height: 1.5; }
.completion-hub__estimate-list { display: grid; gap: 10px; }
.completion-hub__estimate-list > article { padding: 13px; }
.completion-hub__estimate-list header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.completion-hub__estimate-list header strong { font-size: 13px; }
.completion-hub__estimate-list header span { color: var(--admin-muted); font-size: 10.5px; text-align: right; }
.completion-hub__estimate-list dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; }
.completion-hub__estimate-list dl > div { display: grid; gap: 3px; }
.completion-hub__billing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.completion-hub__billing-grid > section { display: grid; gap: 5px; padding: 13px; }
.completion-hub__billing-grid strong { font-size: 14px; }
.completion-hub__empty { display: grid; justify-items: start; gap: 9px; min-height: 160px; align-content: center; padding: 20px; border: 1px dashed #cfd9e8; border-radius: 10px; background: #fbfcfe; }
.completion-hub__empty h2, .completion-hub__empty h3, .completion-hub__empty p { margin: 0; }
.completion-hub__empty h2, .completion-hub__empty h3 { color: var(--admin-text); font-size: 15px; }
.completion-hub__empty p { color: var(--admin-muted); font-size: 12px; line-height: 1.5; }

@media print {
  .completion-hub__header-actions, .completion-hub__tabs, .completion-hub__panel-header .btn, .report-back-link, .admin-sidebar, .admin-topbar { display: none !important; }
  .completion-hub__panel { border: 0; box-shadow: none; padding: 0; }
}

@media screen and (max-width: 700px) {
  .completion-hub { gap: 12px; }
  .completion-hub__header, .completion-hub__panel-header { flex-direction: column; gap: 10px; }
  .completion-hub__header-actions { justify-content: flex-start; }
  .completion-hub__panel { padding: 14px; gap: 14px; }
  .completion-hub__tabs { margin-inline: -1px; }
  .completion-hub__tabs a { min-height: 42px; padding-inline: 12px; }
  .completion-hub__panel-header .btn { width: 100%; min-height: 42px; justify-content: center; }
  .completion-hub__facts, .completion-hub__totals, .completion-hub__card-grid, .completion-hub__charge-grid, .completion-hub__billing-grid { grid-template-columns: 1fr; }
  .completion-hub__estimate-list dl { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 11px; }
  .completion-hub__estimate-list dl > div:last-child { grid-column: 1 / -1; }
  .completion-hub-line-item { align-items: flex-start; }
}

/* Phase 8D: My Account identity and security workspace. */
.admin-sidebar__account-link { display: contents; color: inherit; }.admin-sidebar__account-link:hover .admin-avatar, .admin-sidebar__account-link:focus-visible .admin-avatar { box-shadow: 0 0 0 3px rgba(126, 172, 255, .25); }.admin-topbar__avatar { border: 0; text-decoration: none; }
.my-account-page { display: grid; width: 100%; max-width: 1120px; min-width: 0; gap: 14px; color: var(--admin-text); }.my-account-page__header { padding: 3px 2px; }.my-account-page__header h1 { margin: 2px 0 5px; font-size: clamp(25px, 2vw, 34px); line-height: 1.08; }.my-account-page__header p:last-child { margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.5; }
.my-account-identity { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.my-account-identity__avatar { display: grid; width: 48px; height: 48px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: linear-gradient(145deg, #2867e8, #143fa9); color: #fff; font-size: 16px; font-weight: 800; }.my-account-identity h2, .my-account-identity p { margin: 0; }.my-account-identity h2 { font-size: 15px; }.my-account-identity p { margin-bottom: 5px; color: var(--admin-muted); font-size: 11px; }.my-account-identity .btn { margin-left: auto; }
.my-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }.my-account-card { min-width: 0; overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.my-account-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; min-height: 68px; padding: 14px 16px; border-bottom: 1px solid var(--admin-border); }.my-account-card > header > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--admin-primary); background: #eaf1ff; }.my-account-card > header .admin-icon { width: 17px; height: 17px; }.my-account-card h2, .my-account-card p { margin: 0; }.my-account-card h2 { font-size: 13px; }.my-account-card p { margin-top: 2px; color: var(--admin-muted); font-size: 10.2px; line-height: 1.4; }.my-account-form { display: grid; gap: 13px; padding: 16px; }.my-account-form .form-field { display: grid; gap: 6px; }.my-account-form .form-label { font-size: 11.5px; font-weight: 750; }.my-account-form .form-input { min-height: 42px; border-color: #dbe3ef; border-radius: 9px; font-size: 12px; }.my-account-form .btn { width: fit-content; min-height: 40px; margin-top: 2px; }.my-account-card--details { grid-column: 1 / -1; }.my-account-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; }.my-account-details > div { display: grid; min-width: 0; gap: 4px; min-height: 76px; padding: 13px 16px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }.my-account-details > div:nth-child(3n) { border-right: 0; }.my-account-details > div:nth-last-child(-n + 3) { border-bottom: 0; }.my-account-details dt { color: var(--admin-muted); font-size: 10px; font-weight: 750; }.my-account-details dd { min-width: 0; margin: 0; color: var(--admin-text); font-size: 11.5px; font-weight: 750; overflow-wrap: anywhere; }.my-account-details em { display: inline-flex; min-height: 21px; align-items: center; margin: 0 3px 3px 0; padding: 2px 7px; border-radius: 999px; background: #eaf1ff; color: #235cc3; font-size: 9.5px; font-style: normal; font-weight: 800; }.my-account-details em:nth-child(2) { background: #e2f5ea; color: #087848; }
@media screen and (max-width: 760px) { .admin-main:has(.my-account-page) { padding-top: 12px; }.my-account-page { gap: 11px; }.my-account-identity { align-items: flex-start; flex-wrap: wrap; padding: 13px; }.my-account-identity .btn { width: 100%; min-height: 42px; margin-left: 0; justify-content: center; }.my-account-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }.my-account-card--details { grid-column: auto; }.my-account-card > header { min-height: 64px; padding: 12px; }.my-account-form { padding: 13px; }.my-account-form .form-input { min-height: 44px; font-size: 13px; }.my-account-form .btn { width: 100%; min-height: 44px; justify-content: center; }.my-account-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }.my-account-details > div, .my-account-details > div:nth-child(3n) { border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }.my-account-details > div:nth-child(2n) { border-right: 0; }.my-account-details > div:nth-last-child(-n + 2) { border-bottom: 0; } }
@media screen and (max-width: 420px) { .my-account-details { grid-template-columns: minmax(0, 1fr); }.my-account-details > div, .my-account-details > div:nth-child(2n), .my-account-details > div:nth-child(3n), .my-account-details > div:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--admin-border); }.my-account-details > div:last-child { border-bottom: 0; } }

/* Phase 8: Users, invitations, and access management. */
.access-page { display: grid; width: 100%; min-width: 0; gap: 14px; color: var(--admin-text); }
.access-page__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 3px 2px; }.access-page__header h1 { margin: 2px 0 5px; font-size: clamp(25px, 2vw, 34px); line-height: 1.08; }.access-page__header p:last-child { max-width: 680px; margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.5; }.access-page__header .btn { min-height: 40px; white-space: nowrap; }
.access-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.access-summary article { display: grid; gap: 3px; min-width: 0; padding: 14px 16px; border-right: 1px solid var(--admin-border); }.access-summary article:last-child { border-right: 0; }.access-summary small { color: var(--admin-muted); font-size: 10px; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }.access-summary strong { font-size: 24px; line-height: 1.1; }.access-summary span { color: var(--admin-muted); font-size: 10.5px; }
.access-panel, .access-form-card, .access-person-card, .access-invite-result { overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.access-panel__header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 70px; padding: 14px 16px; border-bottom: 1px solid var(--admin-border); }.access-panel__header h2, .access-form-card h2 { margin: 0; font-size: 14px; }.access-panel__header p, .access-form-card p { margin: 3px 0 0; color: var(--admin-muted); font-size: 10.7px; line-height: 1.45; }
.access-table-shell { overflow-x: auto; }.access-table { width: 100%; min-width: 850px; border-collapse: collapse; }.access-table th { padding: 10px 13px; color: var(--admin-muted); font-size: 10px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; }.access-table td { padding: 13px; border-top: 1px solid var(--admin-border); color: var(--admin-text); font-size: 11.5px; vertical-align: middle; }.access-table td strong, .access-table td small { display: block; }.access-table td strong { font-size: 12px; }.access-table td small, .access-muted { margin-top: 3px; color: var(--admin-muted); font-size: 10px; }.access-table td a { color: var(--admin-primary); font-weight: 750; }.access-table td:last-child { width: 1%; white-space: nowrap; }.access-table form { margin: 0; }
.access-role-list { display: flex; flex-wrap: wrap; gap: 4px; }.access-role-list em, .access-mobile-card dd em { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 7px; border-radius: 999px; background: #eaf1ff; color: #235cc3; font-size: 9.5px; font-style: normal; font-weight: 800; }.access-role-list em:nth-child(2), .access-mobile-card dd em:nth-child(2) { background: #e2f5ea; color: #087848; }
.access-status { display: inline-flex; min-height: 21px; align-items: center; padding: 2px 8px; border-radius: 999px; background: #eef2f6; color: #607087; font-size: 9.5px; font-weight: 800; line-height: 1.25; }.access-status--active, .access-status--accepted { background: #e1f5e9; color: #087848; }.access-status--pending { background: #fff0df; color: #9c5a10; }.access-status--inactive, .access-status--revoked, .access-status--expired { background: #f7e7e7; color: #aa4545; }
.access-mobile-list { display: none; }.access-empty { display: grid; min-height: 184px; place-items: center; align-content: center; gap: 6px; padding: 28px; text-align: center; }.access-empty > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #eaf1ff; }.access-empty .admin-icon { width: 19px; height: 19px; }.access-empty h3, .access-empty p { margin: 0; }.access-empty h3 { font-size: 13px; }.access-empty p { max-width: 360px; color: var(--admin-muted); font-size: 11px; line-height: 1.45; }
.access-page--form { max-width: 960px; }.access-form-card { padding: 18px; }.access-form { display: grid; gap: 17px; }.access-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }.access-form .form-field { display: grid; gap: 6px; }.access-form .form-label { font-size: 11.5px; font-weight: 750; }.access-form .form-input { min-height: 42px; border-color: #dbe3ef; border-radius: 9px; font-size: 12px; }.access-form .form-field small { color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }.access-role-picker { display: grid; gap: 9px; margin: 0; padding: 14px; border: 1px solid var(--admin-border); border-radius: 10px; }.access-role-picker legend { padding: 0 4px; font-size: 12px; font-weight: 800; }.access-role-picker > p { margin: -3px 0 2px; color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }.access-role-picker label { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid #e7ebf2; border-radius: 9px; cursor: pointer; }.access-role-picker input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--admin-primary); }.access-role-picker label span { display: grid; gap: 2px; }.access-role-picker label strong { font-size: 11.5px; }.access-role-picker label small { color: var(--admin-muted); font-size: 10.2px; line-height: 1.4; }.access-technician-select { max-width: 540px; }.access-form__actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }.access-form__actions .btn { min-height: 40px; }
.access-invite-result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: flex-start; padding: 16px; border-color: #cde4d5; background: #f5fbf7; }.access-invite-result > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #087848; background: #e1f5e9; }.access-invite-result .admin-icon { width: 18px; height: 18px; }.access-invite-result h2, .access-invite-result p { margin: 0; }.access-invite-result h2 { font-size: 13px; }.access-invite-result p { margin-top: 3px; color: #4e6f5c; font-size: 10.8px; line-height: 1.45; }.access-invite-result label { display: block; margin: 12px 0 5px; color: #3f6250; font-size: 10px; font-weight: 800; }.access-invite-result div > div { display: flex; gap: 7px; }.access-invite-result input { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #cde4d5; border-radius: 8px; background: #fff; color: #365146; font-size: 11px; }.access-invite-result .btn { min-height: 38px; }
.access-person-card { display: flex; align-items: center; gap: 12px; padding: 16px; }.access-person-card__avatar { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 50%; background: #eaf1ff; color: var(--admin-primary); font-size: 15px; font-weight: 800; }.access-person-card h2, .access-person-card p { margin: 0; }.access-person-card h2 { font-size: 14px; }.access-person-card p { margin-bottom: 5px; color: var(--admin-muted); font-size: 11px; }.access-person-card > small { margin-left: auto; color: var(--admin-muted); font-size: 10px; line-height: 1.5; text-align: right; }.access-person-card > small strong { color: var(--admin-text); font-size: 10.5px; }.access-form-card--status { display: flex; align-items: center; justify-content: space-between; gap: 15px; }.access-form-card--status > div { min-width: 0; }.access-form-card--status form { flex: 0 0 auto; }
.invite-auth-card { max-width: 460px; }.invite-auth-summary { display: grid; gap: 3px; margin: -4px 0 18px; padding: 12px; border: 1px solid #dbe7fb; border-radius: 10px; background: #f6f9ff; }.invite-auth-summary strong { font-size: 12px; }.invite-auth-summary span { color: var(--admin-muted); font-size: 10.5px; }.invite-auth-summary small { color: #2862c4; font-size: 10px; font-weight: 800; }

@media screen and (max-width: 760px) { .admin-main:has(.access-page) { padding-top: 12px; }.access-page { gap: 11px; }.access-page__header { align-items: flex-start; flex-direction: column; gap: 11px; }.access-page__header .btn { width: 100%; justify-content: center; min-height: 44px; }.access-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }.access-summary article { padding: 12px; }.access-summary strong { font-size: 20px; }.access-panel__header { align-items: flex-start; flex-direction: column; min-height: 0; padding: 13px; }.access-panel__header .btn { width: 100%; justify-content: center; min-height: 40px; }.access-table-shell { display: none; }.access-mobile-list { display: grid; gap: 9px; padding: 11px; }.access-mobile-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 10px; }.access-mobile-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }.access-mobile-card header strong, .access-mobile-card header small { display: block; }.access-mobile-card header strong { font-size: 12.5px; }.access-mobile-card header small { margin-top: 2px; color: var(--admin-muted); font-size: 10.5px; }.access-mobile-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }.access-mobile-card dl > div { display: grid; gap: 4px; min-width: 0; padding: 8px; border: 1px solid #e9edf3; border-radius: 8px; }.access-mobile-card dt { color: var(--admin-muted); font-size: 9.5px; }.access-mobile-card dd { min-width: 0; margin: 0; color: var(--admin-text); font-size: 10.5px; font-weight: 750; overflow-wrap: anywhere; }.access-mobile-card dd em { margin: 0 3px 3px 0; }.access-mobile-card .btn { min-height: 42px; justify-content: center; }.access-form-card { padding: 13px; }.access-form__grid { grid-template-columns: minmax(0, 1fr); }.access-form .form-input { min-height: 44px; font-size: 13px; }.access-form__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }.access-form__actions .btn { min-height: 44px; justify-content: center; }.access-invite-result { grid-template-columns: minmax(0, 1fr); padding: 13px; }.access-invite-result > span { display: none; }.access-invite-result div > div { align-items: stretch; flex-direction: column; }.access-invite-result .btn { min-height: 42px; justify-content: center; }.access-person-card { align-items: flex-start; flex-wrap: wrap; padding: 13px; }.access-person-card > small { width: 100%; margin-left: 0; padding-top: 9px; border-top: 1px solid var(--admin-border); text-align: left; }.access-form-card--status { align-items: stretch; flex-direction: column; }.access-form-card--status .btn { width: 100%; min-height: 44px; justify-content: center; } }
@media screen and (max-width: 420px) { .access-summary { grid-template-columns: minmax(0, 1fr); }.access-summary article { border-right: 0; border-bottom: 1px solid var(--admin-border); }.access-summary article:last-child { border-bottom: 0; }.access-mobile-card dl { grid-template-columns: minmax(0, 1fr); } }

/* =========================================================
   PHASE 2B — CLIENT 360 WORKSPACE
   ========================================================= */

.client-workspace-page {
  display: grid;
  gap: 14px;
  color: var(--admin-text);
}

.client-workspace-card {
  min-width: 0;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-card-shadow);
}

.client-profile-hero {
  display: grid;
  grid-template-columns: minmax(270px, 0.92fr) minmax(420px, 1.35fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
}

.client-profile-hero__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.client-profile-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 750;
}

.client-profile-hero__identity > div {
  min-width: 0;
}

.client-profile-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: var(--admin-muted);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-profile-eyebrow span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  display: inline-block;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: #9aa8bd;
}

.client-profile-hero h2 {
  overflow: hidden;
  margin: 0;
  color: var(--admin-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-profile-hero__identity p {
  margin: 3px 0 0;
  color: var(--admin-muted);
  font-size: 10.5px;
}

.client-profile-hero__contact {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.78fr) minmax(180px, 1.15fr) minmax(190px, 1.3fr);
  gap: 8px;
}

.client-profile-hero__contact > a,
.client-profile-hero__contact > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-left: 1px solid var(--admin-border);
  color: #4f607b;
}

.client-profile-hero__contact > a:hover {
  color: var(--admin-primary);
}

.client-profile-hero__contact .admin-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #7d8da6;
}

.client-profile-hero__contact span span,
.client-profile-hero__contact a span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.client-profile-hero__contact small {
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-profile-hero__contact strong {
  overflow: hidden;
  color: inherit;
  font-size: 10.75px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-profile-contact--missing {
  color: #9aa7ba !important;
}

.client-profile-hero__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.client-profile-hero__actions .btn {
  min-height: 35px;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 10.5px;
  white-space: nowrap;
}

.client-profile-hero__actions .btn .admin-icon {
  width: 13px;
  height: 13px;
}

.client-profile-more summary {
  width: 35px;
  height: 35px;
}

.client-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.client-metric-strip article {
  min-width: 0;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px;
}

.client-metric-strip article + article {
  border-left: 1px solid var(--admin-border);
}

.client-metric-strip__icon,
.client-card-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #edf3ff;
  color: var(--admin-primary);
}

.client-metric-strip__icon--danger {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.client-metric-strip__icon--cyan,
.client-card-icon--cyan {
  background: #e8f7fa;
  color: #138799;
}

.client-metric-strip__icon--green,
.client-card-icon--green {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.client-card-icon--violet {
  background: #f3ebff;
  color: #7754c8;
}

.client-card-icon--amber {
  background: var(--admin-warning-soft);
  color: #bf751d;
}

.client-metric-strip__icon .admin-icon,
.client-card-icon .admin-icon {
  width: 18px;
  height: 18px;
}

.client-metric-strip article > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 7px;
}

.client-metric-strip small {
  grid-column: 1 / -1;
  color: var(--admin-muted);
  font-size: 9.5px;
  font-weight: 600;
}

.client-metric-strip strong {
  overflow: hidden;
  color: var(--admin-text);
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-metric-strip p {
  overflow: hidden;
  margin: 0;
  color: var(--admin-muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-section-nav {
  position: sticky;
  z-index: 15;
  top: 68px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px;
}

.client-section-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 7px;
  color: #64728a;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.client-section-nav a:hover,
.client-section-nav a:focus-visible {
  background: #edf3ff;
  color: var(--admin-primary);
}

.client-section-nav a span {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--admin-primary);
  font-size: 9px;
  text-align: center;
}

.client-workspace-section {
  min-width: 0;
  scroll-margin-top: 116px;
}

.client-section-heading,
.client-table-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.client-section-heading {
  min-height: 47px;
  padding: 0 3px;
}

.client-section-heading > div,
.client-table-card__header > div {
  min-width: 0;
}

.client-section-heading span,
.client-table-card__header > div > span,
.client-monthly-history header span {
  color: var(--admin-primary);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-section-heading h2,
.client-table-card__header h2 {
  margin: 1px 0 0;
  color: var(--admin-text);
  font-size: 17px;
  line-height: 1.25;
}

.client-section-heading p,
.client-table-card__header p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 10.5px;
}

.client-section-heading .btn,
.client-table-card__header .btn {
  border-radius: 8px;
}

.client-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-info-card {
  min-height: 248px;
  padding: 16px;
}

.client-info-card > header,
.client-report-card > header,
.client-monthly-history > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.client-info-card > header > div,
.client-report-card > header > div,
.client-monthly-history > header > div {
  min-width: 0;
}

.client-info-card h3,
.client-report-card h3,
.client-monthly-history h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 700;
}

.client-info-card header p,
.client-report-card header p {
  margin: 1px 0 0;
  color: var(--admin-muted);
  font-size: 9.75px;
}

.client-status-pill {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f0f2f6;
  color: #69768b;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.client-status-pill--active,
.client-status-pill--sent {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.client-info-card > header > .client-status-pill {
  margin-left: auto;
}

.client-data-list {
  margin: 0;
}

.client-data-list > div {
  min-height: 31px;
  display: grid;
  grid-template-columns: minmax(95px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--admin-border);
}

.client-data-list dt {
  color: var(--admin-muted);
  font-size: 10px;
}

.client-data-list dd {
  min-width: 0;
  margin: 0;
  color: var(--admin-text);
  font-size: 10.75px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.client-data-list dd small {
  display: block;
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 500;
}

.client-data-list--compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

.client-data-list--compact > div {
  grid-template-columns: 1fr;
  align-content: center;
  gap: 1px;
}

.client-data-list--compact dd {
  text-align: left;
}

.client-subscription-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  margin-bottom: 6px;
  padding: 10px 12px;
  border: 1px solid #dbe6f7;
  border-radius: 9px;
  background: #f6f9fe;
}

.client-subscription-next small {
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-subscription-next strong {
  grid-column: 1;
  color: var(--admin-text);
  font-size: 13px;
}

.client-subscription-next a {
  grid-column: 2;
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--admin-primary);
  font-size: 9.5px;
  font-weight: 600;
}

.client-subscription-next .admin-icon {
  width: 11px;
  height: 11px;
}

.client-note-list {
  display: grid;
  gap: 7px;
}

.client-note-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fbfcfe;
}

.client-note-row--access {
  border-color: #d5e2f6;
  background: #f5f8fd;
}

.client-note-row span {
  color: var(--admin-text);
  font-size: 10px;
  font-weight: 650;
}

.client-note-row p {
  margin: 0;
  color: #596a83;
  font-size: 10.25px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.client-next-tech {
  min-width: 76px;
  display: grid;
  margin-left: auto;
  text-align: right;
}

.client-next-tech small {
  color: var(--admin-muted);
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
}

.client-next-tech strong {
  color: var(--admin-primary);
  font-size: 12px;
}

.client-rotation-sequence {
  min-height: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f9fc;
}

.client-rotation-sequence span {
  color: #53647d;
  font-size: 10px;
  font-weight: 600;
}

.client-rotation-sequence > .admin-icon {
  width: 10px;
  height: 10px;
  color: #a1adbf;
}

.client-rotation-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.client-rotation-progress > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

.client-rotation-progress span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.client-rotation-progress strong,
.client-rotation-progress em {
  overflow: hidden;
  font-size: 9.5px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-rotation-progress em {
  color: var(--admin-primary);
  font-weight: 650;
}

.client-rotation-progress b {
  height: 4px;
  display: block;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6ebf3;
}

.client-rotation-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--admin-primary);
}

.client-rotation-manager {
  margin-top: 10px;
  border-top: 1px solid var(--admin-border);
}

.client-rotation-manager > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 1px 0;
  color: var(--admin-primary);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.client-rotation-manager > summary::-webkit-details-marker {
  display: none;
}

.client-rotation-manager > summary .admin-icon {
  width: 13px;
  height: 13px;
  transition: transform 0.16s ease;
}

.client-rotation-manager[open] > summary .admin-icon {
  transform: rotate(180deg);
}

.client-rotation-manager form {
  display: grid;
  gap: 9px;
  padding-top: 10px;
}

.client-rotation-manager .rotation-row {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 7px;
}

.client-rotation-manager .form-select {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 10px;
}

.client-rotation-manager .btn {
  min-height: 33px;
  border-radius: 7px;
  font-size: 9.5px;
}

.client-rotation-manager__actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.client-table-card {
  overflow: visible;
}

.client-table-card__header {
  min-height: 64px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--admin-border);
}

.client-section-count {
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.client-table-shell {
  min-width: 0;
  overflow: visible;
}

.client-workspace-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.client-workspace-table th {
  height: 37px;
  padding: 0 11px;
  border-bottom: 1px solid var(--admin-border);
  background: #fbfcfe;
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.client-workspace-table td {
  min-width: 0;
  height: 58px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--admin-border);
  color: #52627a;
  font-size: 10.25px;
  vertical-align: middle;
}

.client-workspace-table tr:last-child td {
  border-bottom: 0;
}

.client-workspace-table tbody tr:hover td {
  background: #f9fbfe;
}

.client-workspace-table td > strong:not(.client-money) {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--admin-text);
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-workspace-table td > small {
  min-width: 0;
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-jobs-table th:nth-child(1), .client-jobs-table td:nth-child(1) { width: 10%; }
.client-jobs-table th:nth-child(2), .client-jobs-table td:nth-child(2) { width: 19%; }
.client-jobs-table th:nth-child(3), .client-jobs-table td:nth-child(3) { width: 19%; }
.client-jobs-table th:nth-child(4), .client-jobs-table td:nth-child(4) { width: 17%; }
.client-jobs-table th:nth-child(5), .client-jobs-table td:nth-child(5) { width: 13%; }
.client-jobs-table th:nth-child(6), .client-jobs-table td:nth-child(6) { width: 10%; }
.client-jobs-table th:nth-child(7), .client-jobs-table td:nth-child(7) { width: 12%; }

.client-money {
  color: var(--admin-text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.client-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.client-row-actions > .btn {
  min-height: 31px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 9.5px;
}

.client-work-menu summary {
  width: 31px;
  height: 31px;
  border-radius: 7px;
}

.client-work-menu .client-actions-menu__panel {
  width: 158px;
}

.client-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 12px;
  align-items: start;
}

.client-history-table th:nth-child(1), .client-history-table td:nth-child(1) { width: 9%; }
.client-history-table th:nth-child(2), .client-history-table td:nth-child(2) { width: 18%; }
.client-history-table th:nth-child(3), .client-history-table td:nth-child(3) { width: 17%; }
.client-history-table th:nth-child(4), .client-history-table td:nth-child(4) { width: 16%; }
.client-history-table th:nth-child(5), .client-history-table td:nth-child(5) { width: 10%; }
.client-history-table th:nth-child(6), .client-history-table td:nth-child(6) { width: 18%; }
.client-history-table th:nth-child(7), .client-history-table td:nth-child(7) { width: 12%; }

.client-report-pill {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--admin-primary);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.client-report-pill .admin-icon {
  width: 12px;
  height: 12px;
}

.client-muted-copy {
  color: var(--admin-muted);
  font-size: 9.5px;
}

.client-monthly-history {
  min-width: 0;
  padding: 14px;
}

.client-monthly-history > header {
  justify-content: space-between;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--admin-border);
}

.client-monthly-history > header .admin-icon {
  width: 17px;
  height: 17px;
  color: var(--admin-primary);
}

.client-monthly-history__list {
  display: grid;
  gap: 8px;
}

.client-monthly-history__list section {
  padding: 9px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fbfcfe;
}

.client-monthly-history__list section > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.client-monthly-history__list section > div strong {
  font-size: 10px;
}

.client-monthly-history__list section > div span {
  color: var(--admin-muted);
  font-size: 9px;
}

.client-monthly-history ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-monthly-history li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #5a6a81;
  font-size: 9.5px;
}

.client-monthly-history li strong {
  color: var(--admin-text);
}

.client-reports-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.client-report-card {
  min-width: 0;
  overflow: visible;
}

.client-report-card > header {
  min-height: 62px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--admin-border);
}

.client-report-card > header > strong {
  min-width: 24px;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--admin-primary);
  font-size: 9px;
  text-align: center;
}

.client-report-table th,
.client-report-table td {
  padding-inline: 8px;
}

.client-report-table th:nth-child(1), .client-report-table td:nth-child(1) { width: 24%; }
.client-report-table th:nth-child(2), .client-report-table td:nth-child(2) { width: 19%; }
.client-report-table th:nth-child(3), .client-report-table td:nth-child(3) { width: 17%; }
.client-report-table th:nth-child(4), .client-report-table td:nth-child(4) { width: 19%; }
.client-report-table th:nth-child(5), .client-report-table td:nth-child(5) { width: 21%; }

.client-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  white-space: nowrap;
}

.client-report-actions a {
  color: var(--admin-primary);
  font-size: 9px;
  font-weight: 600;
}

.client-report-actions a + a {
  padding-left: 7px;
  border-left: 1px solid var(--admin-border);
}

.client-empty-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 24px;
  color: var(--admin-muted);
  text-align: center;
}

.client-empty-state > span:first-child {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--admin-primary);
}

.client-empty-state .admin-icon {
  width: 17px;
  height: 17px;
}

.client-empty-state h3,
.client-empty-state h4 {
  margin: 2px 0 0;
  color: var(--admin-text);
  font-size: 12px;
}

.client-empty-state p {
  max-width: 360px;
  margin: 0;
  font-size: 9.75px;
}

.client-empty-state--compact {
  min-height: 144px;
  padding: 16px;
}

@media screen and (max-width: 1750px) {
  .client-profile-hero {
    grid-template-columns: minmax(250px, 0.86fr) minmax(390px, 1.25fr);
  }

  .client-profile-hero__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 10px;
    border-top: 1px solid var(--admin-border);
  }
}

@media screen and (max-width: 1279px) {
  .client-profile-hero {
    grid-template-columns: 1fr;
  }

  .client-profile-hero__contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-profile-hero__contact > a,
  .client-profile-hero__contact > span {
    padding-left: 0;
    border-left: 0;
  }

  .client-overview-grid,
  .client-reports-grid,
  .client-history-layout {
    grid-template-columns: 1fr;
  }

  .client-monthly-history__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-table-shell {
    padding: 10px;
  }

  .client-workspace-table,
  .client-workspace-table tbody {
    display: grid;
    gap: 9px;
  }

  .client-workspace-table thead {
    display: none;
  }

  .client-workspace-table tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 14px;
    padding: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 9px;
    background: var(--admin-surface);
  }

  .client-workspace-table td,
  .client-jobs-table td,
  .client-history-table td,
  .client-report-table td {
    width: auto !important;
    height: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
  }

  .client-workspace-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--admin-muted);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.045em;
    text-transform: uppercase;
  }

  .client-workspace-table td[data-label="Actions"] {
    align-self: end;
  }

  .client-report-table tr {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .client-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-metric-strip article:nth-child(3) {
    border-left: 0;
  }

  .client-metric-strip article:nth-child(n + 3) {
    border-top: 1px solid var(--admin-border);
  }

  .client-section-nav {
    flex-wrap: wrap;
  }

  .client-monthly-history__list {
    grid-template-columns: 1fr;
  }

  .client-workspace-table tr,
  .client-report-table tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 700px) {
  .client-workspace-page {
    gap: 11px;
  }

  .client-profile-hero {
    gap: 14px;
    padding: 15px;
  }

  .client-profile-hero__contact {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .client-profile-hero__contact > a,
  .client-profile-hero__contact > span {
    padding: 7px 0;
    border-top: 1px solid var(--admin-border);
  }

  .client-profile-hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-profile-hero__actions .btn {
    width: 100%;
  }

  .client-profile-more {
    position: static;
  }

  .client-profile-more summary {
    width: 100%;
  }

  .client-profile-more .client-actions-menu__panel {
    right: 15px;
    left: 15px;
    width: auto;
  }

  .client-section-nav {
    top: 106px;
  }

  .client-section-nav a {
    flex: 1 1 auto;
    justify-content: center;
  }

  .client-section-heading {
    align-items: flex-end;
  }

  .client-section-heading > p {
    display: none;
  }

  .client-info-card {
    min-height: 0;
    padding: 14px;
  }

  .client-data-list--compact {
    grid-template-columns: 1fr;
  }

  .client-note-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .client-rotation-progress {
    grid-template-columns: 1fr;
  }

  .client-table-card__header {
    align-items: flex-end;
  }

  .client-table-card__header p {
    display: none;
  }

  .client-workspace-table tr,
  .client-report-table tr {
    grid-template-columns: 1fr;
  }

  .client-workspace-table td {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--admin-border);
  }

  .client-workspace-table td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .client-row-actions,
  .client-report-actions {
    justify-content: flex-start;
  }

  .client-work-menu .client-actions-menu__panel {
    right: auto;
    left: 0;
  }
}

@media screen and (max-width: 430px) {
  .client-profile-avatar {
    width: 44px;
    height: 44px;
  }

  .client-profile-hero h2 {
    font-size: 18px;
  }

  .client-profile-eyebrow {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .client-profile-eyebrow span + span::before {
    display: none;
  }

  .client-metric-strip article {
    min-height: 78px;
    padding: 10px;
  }

  .client-metric-strip__icon {
    width: 32px;
    height: 32px;
  }

  .client-metric-strip strong {
    font-size: 15px;
  }

  .client-section-nav a {
    flex-basis: calc(50% - 4px);
    font-size: 9.5px;
  }

  .client-profile-hero__actions {
    grid-template-columns: 1fr;
  }

  .client-profile-more summary {
    height: 35px;
  }

  .client-subscription-next {
    grid-template-columns: 1fr;
  }

  .client-subscription-next a {
    grid-column: 1;
    grid-row: auto;
    margin-top: 5px;
  }

  .client-rotation-manager .rotation-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .client-rotation-manager .rotation-row .btn {
    grid-column: 2;
  }

  .client-rotation-manager__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 420px) {
  .admin-topbar__quick-action span {
    display: none;
  }

  .admin-topbar .admin-topbar__quick-action {
    width: 36px;
    padding-inline: 0;
  }

  .dashboard-kpi-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi,
  .dashboard-kpi:nth-child(odd),
  .dashboard-kpi:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--admin-border);
  }

  .dashboard-kpi:last-child {
    border-bottom: 0;
  }

  .dashboard-kpi {
    min-height: 82px;
  }

  .dashboard-timeline__row {
    grid-template-columns: 38px 10px minmax(0, 1fr);
  }

  .dashboard-timeline__row .admin-badge {
    display: none;
  }

  .dashboard-waiting-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-waiting-row > .dashboard-job-ref,
  .dashboard-waiting-row__meta time {
    display: none;
  }

  .dashboard-revenue-breakdown {
    grid-template-columns: 1fr;
  }

  .dashboard-revenue-breakdown > div + div {
    border-top: 1px solid var(--admin-border);
    border-left: 0;
  }
}

/* ================================================================
   PHASE 2A — CLIENTS DIRECTORY
   ================================================================ */
.admin-main:has(.clients-page) {
  padding-top: 18px;
}

.clients-page {
  display: grid;
  gap: 14px;
}

.clients-summary,
.clients-directory {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-card-shadow);
}

.clients-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.clients-summary__item {
  min-width: 0;
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
}

.clients-summary__item + .clients-summary__item {
  border-left: 1px solid var(--admin-border);
}

.clients-summary__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #edf3ff;
  color: var(--admin-primary);
}

.clients-summary__icon--violet {
  background: #f4edff;
  color: #7652c7;
}

.clients-summary__icon--cyan {
  background: #e9f8fa;
  color: #168fa0;
}

.clients-summary__icon--amber {
  background: var(--admin-warning-soft);
  color: #c1761c;
}

.clients-summary__icon .admin-icon {
  width: 19px;
  height: 19px;
}

.clients-summary__copy {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1px 8px;
}

.clients-summary__copy small,
.clients-summary__copy em {
  overflow: hidden;
  color: var(--admin-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-summary__copy small {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 600;
}

.clients-summary__copy strong {
  color: var(--admin-text);
  font-size: 23px;
  line-height: 1.15;
}

.clients-summary__copy em {
  font-size: 10.5px;
  font-style: normal;
}

.clients-directory {
  min-width: 0;
  overflow: visible;
}

.clients-directory__header {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--admin-border);
}

.clients-directory__header h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 16px;
  font-weight: 700;
}

.clients-directory__header p {
  margin: 2px 0 0;
  color: var(--admin-muted);
  font-size: 11px;
}

.clients-search-context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #dbe5f3;
  border-radius: 7px;
  background: #f8faff;
  color: var(--admin-muted);
  font-size: 11px;
}

.clients-search-context a {
  color: var(--admin-primary);
  font-weight: 600;
}

.clients-table-shell {
  min-width: 0;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.clients-table__col--client { width: 16%; }
.clients-table__col--contact { width: 18%; }
.clients-table__col--location { width: 18%; }
.clients-table__col--pool { width: 12%; }
.clients-table__col--service { width: 12%; }
.clients-table__col--work { width: 12%; }
.clients-table__col--actions { width: 14%; }

.clients-table th {
  height: 43px;
  padding: 0 12px;
  border-bottom: 1px solid var(--admin-border);
  background: #fbfcfe;
  color: var(--admin-muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-align: left;
  text-transform: uppercase;
}

.clients-table td {
  height: 76px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text);
  font-size: 12px;
  vertical-align: middle;
  transition: background 0.16s ease;
}

.clients-table tbody tr:last-child td {
  border-bottom: 0;
}

.clients-table tbody tr:hover td {
  background: #f8faff;
}

.client-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eaf1ff;
  color: #225fcf;
  font-size: 11px;
  font-weight: 700;
}

.client-avatar--1 { background: #f1eaff; color: #7652c7; }
.client-avatar--2 { background: #e8f7f2; color: #178566; }
.client-avatar--3 { background: #fff1e4; color: #bd6d18; }

.client-identity__copy,
.client-cell-stack,
.client-contact,
.client-open-work {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.client-identity__copy a,
.client-cell-stack strong,
.client-open-work strong {
  min-width: 0;
  overflow: hidden;
  color: var(--admin-text);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-identity__copy a {
  font-size: 12.5px;
}

.client-identity__copy a:hover {
  color: var(--admin-primary);
}

.client-identity__copy small,
.client-cell-stack small {
  color: var(--admin-muted);
  font-size: 10.75px;
  line-height: 1.35;
}

.client-contact a,
.client-muted-value {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #53647f;
  line-height: 1.35;
}

.client-contact a:hover {
  color: var(--admin-primary);
}

.client-contact a span,
.client-muted-value span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contact .admin-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  color: #8392aa;
}

.client-muted-value {
  color: #a0abbd;
}

.client-meta-tag,
.client-work-cue {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-meta-tag {
  color: #55719f;
}

.client-badge--salt,
.client-badge--neutral {
  width: max-content;
}

.client-badge--salt {
  background: #e8f7fa;
  color: #167f91;
}

.client-badge--neutral {
  background: #f0f2f6;
  color: #647084;
}

.client-open-work {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.client-work-cue {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #345b9c;
  background: #edf3ff;
  font-size: 10px;
}

.client-work-cue strong {
  color: inherit;
  font-size: 11px;
}

.client-work-cue--open {
  color: #345b9c;
  background: #edf3ff;
}

.client-work-cue--danger {
  color: #bd3131;
  background: #fff0f0;
}

.client-work-cue--warning {
  color: #a96308;
  background: #fff5e5;
}

.clients-table__actions {
  text-align: initial;
}

.clients-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.client-row-open {
  min-height: 34px;
  justify-content: center;
  padding-inline: 10px;
  font-size: 11px;
  white-space: nowrap;
}

.client-actions-menu {
  position: relative;
  display: inline-block;
}

.client-actions-menu summary {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  cursor: pointer;
  list-style: none;
}

.client-actions-menu summary::-webkit-details-marker {
  display: none;
}

.client-actions-menu summary:hover,
.client-actions-menu[open] summary {
  border-color: #cbd7e8;
  background: #f6f9fe;
  color: var(--admin-primary);
}

.client-actions-menu summary .admin-icon {
  width: 17px;
  height: 17px;
}

.client-actions-menu__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: 168px;
  display: grid;
  padding: 5px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface);
  box-shadow: 0 12px 28px rgba(13, 25, 57, 0.15);
  text-align: left;
}

.client-actions-menu__panel a,
.client-actions-menu__panel button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--admin-text);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
}

.client-actions-menu__panel a:hover,
.client-actions-menu__panel button:hover {
  background: #f2f6fc;
  color: var(--admin-primary);
}

.client-actions-menu__panel form {
  margin: 0;
}

.client-actions-menu__panel form button {
  color: #c93a3a;
}

.client-actions-menu__panel .admin-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.clients-empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  color: var(--admin-muted);
  text-align: center;
}

.clients-empty-state__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: var(--admin-primary);
}

.clients-empty-state__icon .admin-icon {
  width: 22px;
  height: 22px;
}

.clients-empty-state h3 {
  margin: 4px 0 0;
  color: var(--admin-text);
  font-size: 15px;
}

.clients-empty-state p {
  max-width: 420px;
  margin: 0 0 5px;
  font-size: 11.5px;
  line-height: 1.55;
}

@media screen and (min-width: 1280px) and (max-width: 1439px) {
  .clients-table th,
  .clients-table td {
    padding-inline: 9px;
  }

  .clients-table__col--contact { width: 16%; }
  .clients-table__col--location { width: 17%; }
  .clients-table__col--work { width: 13%; }
}

@media screen and (max-width: 1279px) {
  .clients-summary__item {
    padding-inline: 13px;
  }

  .clients-summary__icon {
    width: 34px;
    height: 34px;
  }

  .clients-table-shell {
    padding: 8px 12px 12px;
  }

  .clients-table,
  .clients-table tbody {
    display: grid;
    gap: 10px;
  }

  .clients-table colgroup,
  .clients-table thead {
    display: none;
  }

  .clients-table tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(190px, 1.15fr) minmax(210px, 1.2fr) minmax(180px, 1fr) minmax(130px, .8fr);
    gap: 12px 18px;
    padding: 14px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: var(--admin-surface);
  }

  .clients-table td {
    height: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
  }

  .clients-table__actions {
    grid-column: 1 / -1;
  }

  .clients-row-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .client-row-open,
  .client-actions-menu summary {
    min-height: 42px;
  }

  .client-row-open {
    width: 100%;
  }

  .client-actions-menu summary {
    width: 42px;
    height: 42px;
  }

  .clients-table__pool,
  .clients-table__service,
  .clients-table__work {
    padding-top: 10px !important;
    border-top: 1px solid var(--admin-border) !important;
  }

  .clients-table__pool::before,
  .clients-table__service::before,
  .clients-table__work::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--admin-muted);
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
}

@media screen and (max-width: 820px) {
  .clients-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-summary__item:nth-child(3) {
    border-left: 0;
  }

  .clients-summary__item:nth-child(n + 3) {
    border-top: 1px solid var(--admin-border);
  }

  .clients-table tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 700px) {
  .clients-page {
    gap: 12px;
  }

  .clients-directory__header {
    align-items: flex-start;
  }

  .clients-search-context {
    max-width: 58%;
  }

  .clients-search-context span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media screen and (max-width: 540px) {
  body:has(.clients-page) .admin-topbar__quick-action--secondary {
    width: 36px;
    display: inline-flex;
    padding-inline: 0;
  }

  body:has(.clients-page) .admin-topbar__quick-action--secondary span {
    display: none;
  }

  .clients-summary__item {
    min-height: 78px;
    gap: 9px;
    padding: 11px;
  }

  .clients-summary__icon {
    width: 32px;
    height: 32px;
  }

  .clients-summary__copy strong {
    font-size: 20px;
  }

  .clients-summary__copy em {
    display: none;
  }

  .clients-summary__copy small {
    overflow: visible;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
  }

  .clients-directory__header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .clients-search-context {
    width: max-content;
    max-width: 100%;
    align-self: flex-start;
  }

  .clients-table-shell {
    padding: 8px;
  }

  .clients-table tr {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 14px 13px;
  }

  .clients-table__contact,
  .clients-table__location {
    padding-top: 10px !important;
    border-top: 1px solid var(--admin-border) !important;
  }

  .clients-table__contact::before,
  .clients-table__location::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--admin-muted);
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .client-actions-menu__panel {
    position: fixed;
    z-index: 90;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
}

/* Phase 2B responsive QA micro-fixes. */
@media screen and (max-width: 1099px) and (min-width: 701px) {
  .client-profile-hero {
    grid-template-columns: 1fr;
  }

  .client-profile-hero__contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-profile-hero__contact > a,
  .client-profile-hero__contact > span {
    padding-left: 0;
    border-left: 0;
  }
}

@media screen and (max-width: 1300px) and (min-width: 1100px) {
  .client-profile-hero {
    grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
  }

  .client-profile-hero__contact {
    grid-template-columns: minmax(110px, 0.7fr) minmax(190px, 1.05fr) minmax(235px, 1.25fr);
  }
}

@media screen and (max-width: 700px) {
  body:has(.client-workspace-page) .admin-topbar__title {
    max-width: none;
    font-size: 12px;
  }

  .client-section-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .client-section-nav::-webkit-scrollbar {
    display: none;
  }

  .client-section-nav a {
    flex: 0 0 auto;
    gap: 3px;
    padding: 5px 4px;
    font-size: 8.25px;
  }

  .client-section-nav a span {
    min-width: 15px;
    padding: 1px 4px;
    font-size: 8px;
  }

  .client-work-menu .client-actions-menu__panel {
    position: fixed;
    z-index: 90;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
}

/* Phase 2B.1: restore the approved CRM reading scale on Client Detail only. */
.client-workspace-page {
  gap: 18px;
}

.client-profile-hero {
  padding: 16px 20px;
}

.client-profile-eyebrow {
  font-size: 10.5px;
}

.client-profile-hero h2 {
  font-size: 20px;
}

.client-profile-hero__identity p {
  font-size: 11.5px;
}

.client-profile-hero__contact small {
  font-size: 10.5px;
}

.client-profile-hero__contact strong {
  overflow: visible;
  font-size: 12.5px;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.client-profile-hero__actions .btn {
  min-height: 36px;
  padding: 8px 13px;
  font-size: 12px;
}

.client-profile-hero__actions .btn .admin-icon {
  width: 15px;
  height: 15px;
}

.client-profile-more summary {
  width: 36px;
  height: 36px;
}

.client-metric-strip article {
  min-height: 88px;
  gap: 13px;
  padding: 14px 20px;
}

.client-metric-strip__icon {
  width: 40px;
  height: 40px;
}

.client-metric-strip__icon .admin-icon {
  width: 20px;
  height: 20px;
}

.client-metric-strip small {
  font-size: 11px;
}

.client-metric-strip strong {
  font-size: 20px;
}

.client-metric-strip p {
  font-size: 10.75px;
}

.client-section-nav {
  min-height: 42px;
  padding: 5px 7px;
}

.client-section-nav a {
  min-height: 32px;
  padding: 7px 13px;
  font-size: 12px;
}

.client-section-nav a span {
  min-width: 20px;
  font-size: 10.5px;
}

.client-section-heading {
  min-height: 54px;
}

.client-section-heading span,
.client-table-card__header > div > span,
.client-monthly-history header span {
  font-size: 10.5px;
}

.client-section-heading h2,
.client-table-card__header h2 {
  font-size: 18px;
}

.client-section-heading p,
.client-table-card__header p {
  font-size: 11.5px;
}

.client-section-heading .btn,
.client-table-card__header .btn {
  min-height: 36px;
  font-size: 12px;
}

.client-overview-grid,
.client-reports-grid,
.client-history-layout {
  gap: 14px;
}

.client-info-card {
  min-height: 282px;
  padding: 18px;
}

.client-info-card > header,
.client-report-card > header,
.client-monthly-history > header {
  gap: 12px;
  margin-bottom: 15px;
}

.client-card-icon {
  width: 40px;
  height: 40px;
}

.client-card-icon .admin-icon {
  width: 20px;
  height: 20px;
}

.client-info-card h3,
.client-report-card h3,
.client-monthly-history h3 {
  font-size: 15px;
}

.client-info-card header p,
.client-report-card header p {
  font-size: 11px;
}

.client-status-pill {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 10.5px;
}

.client-data-list > div {
  min-height: 34px;
  padding: 8px 0;
}

.client-data-list dt {
  font-size: 11px;
}

.client-data-list dd {
  font-size: 12.5px;
}

.client-data-list dd small {
  font-size: 10.5px;
}

.client-subscription-next {
  min-height: 60px;
  padding: 11px 13px;
}

.client-subscription-next small {
  font-size: 10.5px;
}

.client-subscription-next strong {
  font-size: 16px;
}

.client-subscription-next a {
  font-size: 11.5px;
}

.client-subscription-next .admin-icon {
  width: 14px;
  height: 14px;
}

.client-note-list {
  gap: 9px;
}

.client-note-row {
  min-height: 40px;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 13px;
  padding: 10px 12px;
}

.client-note-row span {
  font-size: 11.5px;
}

.client-note-row p {
  font-size: 12.5px;
  line-height: 1.45;
}

.client-next-tech small {
  font-size: 10.5px;
}

.client-next-tech strong {
  font-size: 13px;
}

.client-rotation-sequence {
  min-height: 38px;
  padding: 9px 11px;
}

.client-rotation-sequence span {
  font-size: 11.5px;
}

.client-rotation-progress {
  gap: 9px;
  margin-top: 12px;
}

.client-rotation-progress > div {
  padding: 10px;
}

.client-rotation-progress strong,
.client-rotation-progress em {
  font-size: 11.5px;
}

.client-rotation-manager > summary {
  padding-top: 12px;
  font-size: 11.5px;
}

.client-rotation-manager .form-select {
  min-height: 36px;
  font-size: 12px;
}

.client-rotation-manager .btn {
  min-height: 35px;
  font-size: 11.5px;
}

.client-table-card__header {
  min-height: 72px;
  padding: 13px 16px;
}

.client-section-count {
  font-size: 11.5px;
}

.client-workspace-table th {
  height: 42px;
  padding: 0 12px;
  font-size: 10.5px;
}

.client-workspace-table td {
  height: 60px;
  padding: 9px 12px;
  font-size: 12px;
}

.client-workspace-table td > strong:not(.client-money) {
  font-size: 12.5px;
}

.client-workspace-table td > small {
  margin-top: 3px;
  font-size: 10.75px;
}

.client-money {
  font-size: 12.5px;
}

.client-row-actions {
  gap: 6px;
}

.client-row-actions > .btn {
  min-height: 32px;
  padding: 7px 11px;
  font-size: 11.5px;
}

.client-work-menu summary {
  width: 32px;
  height: 32px;
}

.client-history-layout {
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
}

.client-report-pill,
.client-muted-copy {
  font-size: 11.5px;
}

.client-report-pill .admin-icon {
  width: 14px;
  height: 14px;
}

.client-monthly-history {
  padding: 16px;
}

.client-monthly-history > header {
  padding-bottom: 11px;
}

.client-monthly-history__list {
  gap: 10px;
}

.client-monthly-history__list section {
  padding: 11px 12px;
}

.client-monthly-history__list section > div strong {
  font-size: 12px;
}

.client-monthly-history__list section > div span {
  font-size: 11px;
}

.client-monthly-history ul {
  gap: 6px;
}

.client-monthly-history li {
  font-size: 11.5px;
}

.client-report-card > header {
  min-height: 70px;
  padding: 13px 16px;
}

.client-report-card > header > strong {
  min-width: 26px;
  font-size: 10.5px;
}

.client-report-table th,
.client-report-table td {
  padding-inline: 10px;
}

.client-report-actions {
  gap: 8px;
}

.client-report-actions a {
  font-size: 11.5px;
}

.client-report-actions a + a {
  padding-left: 8px;
}

.client-report-table td > strong:not(.client-money) {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

@media screen and (max-width: 1500px) and (min-width: 701px) {
  .client-profile-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .client-profile-hero__contact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-profile-hero__contact > a,
  .client-profile-hero__contact > span {
    padding-left: 0;
    border-left: 0;
  }

  .client-profile-hero__actions {
    padding-top: 12px;
  }
}

@media screen and (max-width: 1279px) {
  .client-table-shell {
    padding: 12px;
  }

  .client-workspace-table,
  .client-workspace-table tbody {
    gap: 12px;
  }

  .client-workspace-table tr {
    gap: 12px 16px;
    padding: 14px;
  }

  .client-workspace-table td::before {
    margin-bottom: 5px;
    font-size: 10.5px;
  }
}

@media screen and (max-width: 700px) {
  .client-workspace-page {
    gap: 14px;
  }

  .client-profile-hero {
    padding: 16px;
  }

  .client-profile-hero__contact small {
    font-size: 10.5px;
  }

  .client-profile-hero__contact strong {
    font-size: 13px;
  }

  .client-metric-strip article {
    min-height: 90px;
    padding: 13px;
  }

  .client-metric-strip strong {
    font-size: 19px;
  }

  .client-section-nav {
    min-height: 42px;
    gap: 3px;
    padding: 5px;
  }

  .client-section-nav a {
    min-height: 32px;
    gap: 5px;
    padding: 7px 9px;
    font-size: 11.5px;
  }

  .client-section-nav a span {
    min-width: 18px;
    font-size: 10px;
  }

  .client-info-card {
    padding: 16px;
  }

  .client-note-row {
    min-height: 0;
  }

  .client-workspace-table tr,
  .client-report-table tr {
    padding: 14px;
  }

  .client-workspace-table td {
    padding-bottom: 10px;
    font-size: 12.5px;
  }
}

/* Phase 2C: shared Add / Edit Client workspace */
.client-form-workspace {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.client-form,
.client-form-context,
.client-form-section,
.client-form-actions,
.client-draft-notice {
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: #fff;
}

.client-form {
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
}

.client-form-context {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 16px 18px;
}

.client-form-context__avatar,
.client-form-context__icon {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #1760dd;
  font-size: 14px;
  font-weight: 700;
}

.client-form-context__icon .admin-icon {
  width: 20px;
  height: 20px;
}

.client-form-context__copy {
  min-width: 0;
}

.client-form-context__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #6f7d96;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.client-form-context h2 {
  margin: 0;
  color: #0b1f47;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.client-form-context p {
  margin: 2px 0 0;
  color: #64728b;
  font-size: 11.5px;
  line-height: 1.45;
}

.client-form-context__status {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f2f6fb;
  color: #64728b;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.client-form-context__status.is-dirty {
  background: #fff3d9;
  color: #9a5a00;
}

.client-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 14px;
  align-items: start;
}

.client-form-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.client-form-section {
  min-width: 0;
  padding: 18px;
}

.client-form-section__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f6;
}

.client-form-section__icon {
  display: inline-grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: #edf4ff;
  color: #1760dd;
}

.client-form-section__icon .admin-icon {
  width: 16px;
  height: 16px;
}

.client-form-section__header h3 {
  margin: 0;
  color: #0b1f47;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.client-form-section__header p {
  margin: 2px 0 0;
  color: #748199;
  font-size: 10.5px;
  line-height: 1.45;
}

.client-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 15px;
}

.client-form-fields--stacked {
  grid-template-columns: minmax(0, 1fr);
}

.client-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.client-field--full {
  grid-column: 1 / -1;
}

.client-field__label {
  color: #10234b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.client-field__control {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d9e1ec;
  border-radius: 9px;
  background: #fff;
  color: #12244a;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

select.client-field__control {
  padding-right: 34px;
}

.client-field__control::placeholder {
  color: #929db1;
}

.client-field__control:focus {
  outline: none;
  border-color: #2d6fe5;
  box-shadow: 0 0 0 3px rgba(45, 111, 229, 0.13);
}

.client-field__control.is-invalid {
  border-color: #d9535f;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(217, 83, 95, 0.1);
}

.client-field__control:disabled {
  cursor: not-allowed;
  background: #f4f6f9;
  color: #8a96aa;
}

.client-field__textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.55;
}

.client-field__help {
  color: #758299;
  font-size: 10.5px;
  line-height: 1.45;
}

.client-field__unit-control {
  position: relative;
  display: block;
}

.client-field__unit-control .client-field__control {
  padding-right: 38px;
}

.client-field__unit-control > span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #68768f;
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.client-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #f8faff;
  cursor: pointer;
}

.client-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.client-toggle__track {
  display: flex;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #bdc7d6;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.client-toggle__track span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 31, 71, 0.22);
  transition: transform 140ms ease;
}

.client-toggle input:checked + .client-toggle__track {
  background: #1760dd;
}

.client-toggle input:checked + .client-toggle__track span {
  transform: translateX(16px);
}

.client-toggle input:focus-visible + .client-toggle__track {
  box-shadow: 0 0 0 3px rgba(45, 111, 229, 0.18);
}

.client-toggle__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.client-toggle__copy strong {
  color: #10234b;
  font-size: 11.5px;
  font-weight: 600;
}

.client-toggle__copy small {
  color: #758299;
  font-size: 10.5px;
  line-height: 1.35;
}

.client-salt-profile[hidden] {
  display: none;
}

.client-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
}

.client-form-actions__copy {
  display: grid;
  gap: 2px;
}

.client-form-actions__copy strong {
  color: #10234b;
  font-size: 12px;
  font-weight: 700;
}

.client-form-actions__copy span {
  color: #758299;
  font-size: 10.5px;
  line-height: 1.4;
}

.client-form-actions__buttons,
.client-draft-notice__actions,
.client-unsaved-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.client-form .btn,
.client-draft-notice .btn,
.client-unsaved-dialog .btn {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 12px;
}

.client-draft-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  border-color: #c9daf8;
  background: #f4f8ff;
}

.client-draft-notice[hidden] {
  display: none;
}

.client-draft-notice [hidden] {
  display: none !important;
}

.client-draft-notice__icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: #e3edff;
  color: #1760dd;
}

.client-draft-notice__icon .admin-icon {
  width: 17px;
  height: 17px;
}

.client-draft-notice__copy strong {
  color: #10234b;
  font-size: 12.5px;
}

.client-draft-notice__copy p {
  margin: 2px 0 0;
  color: #5f6f89;
  font-size: 11px;
  line-height: 1.45;
}

.client-draft-notice__copy .client-draft-notice__warning {
  color: #9a5a00;
  font-weight: 600;
}

.client-unsaved-dialog {
  width: min(440px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 22px 55px rgba(11, 31, 71, 0.24);
}

.client-unsaved-dialog::backdrop {
  background: rgba(7, 22, 49, 0.5);
  backdrop-filter: blur(2px);
}

.client-unsaved-dialog__panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 20px;
  border: 1px solid #e3e9f2;
  border-radius: 14px;
  background: #fff;
}

.client-unsaved-dialog__icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #fff0f1;
  color: #d83a46;
}

.client-unsaved-dialog__icon .admin-icon {
  width: 19px;
  height: 19px;
}

.client-unsaved-dialog__copy h2 {
  margin: 0;
  color: #0b1f47;
  font-size: 17px;
  font-weight: 700;
}

.client-unsaved-dialog__copy p {
  margin: 6px 0 0;
  color: #64728b;
  font-size: 12.5px;
  line-height: 1.55;
}

.client-unsaved-dialog__actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 4px;
}

@media screen and (max-width: 900px) {
  .client-form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 600px) {
  .client-form-workspace,
  .client-form {
    gap: 12px;
  }

  .client-form-context,
  .client-form-section,
  .client-form-actions {
    padding: 14px;
  }

  .client-form-context {
    align-items: flex-start;
  }

  .client-form-context__status {
    display: none;
  }

  .client-form-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .client-field--full {
    grid-column: auto;
  }

  .client-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .client-form-actions__buttons {
    width: 100%;
  }

  .client-form-actions__buttons .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .client-draft-notice {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .client-draft-notice__actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .client-draft-notice__actions .btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .client-unsaved-dialog__panel {
    padding: 17px;
  }

  .client-unsaved-dialog__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .client-unsaved-dialog__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ================================================================
   PHASE 3B: JOB 360 WORKSPACE
   ================================================================ */
@media screen {
  .admin-main:has(.job-workspace-page) {
    padding-top: 18px;
  }

  .job-workspace-page {
    display: grid;
    gap: 14px;
    color: var(--admin-text);
  }

  .job-workspace-card {
    min-width: 0;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .job-workspace-hero {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(330px, 1.15fr) minmax(280px, 0.85fr) auto;
    align-items: center;
    gap: 24px;
    padding: 20px 22px;
  }

  .job-workspace-eyebrow,
  .job-section-heading span {
    color: var(--admin-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .job-workspace-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .job-workspace-eyebrow span + span::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 8px 2px 0;
    border-radius: 50%;
    background: #9aa9c2;
  }

  .job-workspace-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 6px;
  }

  .job-workspace-title-row h2 {
    margin: 0;
    color: var(--admin-text);
    font-size: 23px;
    line-height: 1.18;
  }

  .job-overdue-pill,
  .job-inline-alert,
  .job-state-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f4f8;
    color: #66748d;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }

  .job-overdue-pill,
  .job-inline-alert {
    background: var(--admin-danger-soft);
    color: #d43a3a;
  }

  .job-overdue-pill .admin-icon {
    width: 12px;
    height: 12px;
  }

  .job-state-pill--success {
    background: var(--admin-success-soft);
    color: #0b8f5d;
  }

  .job-workspace-client {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
  }

  .job-workspace-client__icon,
  .job-workspace-property__icon,
  .job-card-icon,
  .job-metric-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .job-workspace-client__icon,
  .job-workspace-property__icon {
    width: 34px;
    height: 34px;
  }

  .job-workspace-client__icon .admin-icon,
  .job-workspace-property__icon .admin-icon {
    width: 16px;
    height: 16px;
  }

  .job-workspace-client > span:last-child {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .job-workspace-client small,
  .job-workspace-hero__property small,
  .job-payment-summary small {
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 600;
  }

  .job-workspace-client a {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 700;
  }

  .job-workspace-hero__property {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 22px;
    border-left: 1px solid var(--admin-border);
  }

  .job-workspace-hero__property > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .job-workspace-hero__property strong {
    overflow-wrap: anywhere;
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.4;
  }

  .job-workspace-hero__property p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 11px;
  }

  .job-workspace-hero__property a,
  .job-card-header-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    color: var(--admin-primary);
    font-size: 10.5px;
    font-weight: 600;
  }

  .job-workspace-hero__property a .admin-icon,
  .job-card-header-link .admin-icon {
    width: 12px;
    height: 12px;
  }

  .job-workspace-hero__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .job-workspace-hero__actions .btn {
    white-space: nowrap;
  }

  .job-workspace-hero__actions .btn .admin-icon {
    width: 15px;
    height: 15px;
  }

  .job-detail-more {
    flex: 0 0 auto;
  }

  .job-detail-more .job-actions-menu__panel {
    top: calc(100% + 7px);
    right: 0;
    left: auto;
    min-width: 205px;
  }

  .job-metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }

  .job-metric-strip article {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-right: 1px solid var(--admin-border);
  }

  .job-metric-strip article:last-child {
    border-right: 0;
  }

  .job-metric-icon {
    width: 38px;
    height: 38px;
  }

  .job-metric-icon--violet,
  .job-card-icon--violet {
    background: #f2eaff;
    color: #7b45d8;
  }

  .job-metric-icon--green,
  .job-card-icon--green {
    background: var(--admin-success-soft);
    color: #0b8f5d;
  }

  .job-metric-icon--cyan,
  .job-card-icon--cyan {
    background: #e4f7fb;
    color: #1785a0;
  }

  .job-card-icon--amber {
    background: var(--admin-warning-soft);
    color: #c77709;
  }

  .job-metric-icon .admin-icon {
    width: 18px;
    height: 18px;
  }

  .job-metric-strip article > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .job-metric-strip small {
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 600;
  }

  .job-metric-strip strong {
    overflow: hidden;
    color: var(--admin-text);
    font-size: 18px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-metric-strip p {
    overflow: hidden;
    margin: 0;
    color: var(--admin-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-section-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
  }

  .job-section-nav a {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border-radius: 8px;
    color: #4f5f7a;
    font-size: 11.5px;
    font-weight: 600;
  }

  .job-section-nav a:hover,
  .job-section-nav a:focus-visible {
    background: #eef4ff;
    color: var(--admin-primary);
  }

  .job-workspace-section {
    display: grid;
    gap: 11px;
    scroll-margin-top: 90px;
  }

  .job-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: 2px 3px;
  }

  .job-section-heading h2 {
    margin: 2px 0 0;
    color: var(--admin-text);
    font-size: 18px;
    line-height: 1.2;
  }

  .job-section-heading p {
    margin: 0 0 2px;
    color: var(--admin-muted);
    font-size: 11px;
  }

  .job-overview-grid,
  .job-field-grid,
  .job-document-grid,
  .job-financial-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .job-info-card,
  .job-operation-card,
  .job-document-card,
  .job-finance-card,
  .job-payment-card {
    padding: 16px;
  }

  .job-info-card > header,
  .job-operation-card > header,
  .job-document-card > header,
  .job-finance-card > header,
  .job-payment-card > header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--admin-border);
  }

  .job-info-card > header > div,
  .job-operation-card > header > div,
  .job-document-card > header > div,
  .job-finance-card > header > div,
  .job-payment-card > header > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .job-card-icon {
    width: 36px;
    height: 36px;
  }

  .job-card-icon .admin-icon {
    width: 17px;
    height: 17px;
  }

  .job-info-card h3,
  .job-operation-card h3,
  .job-document-card h3,
  .job-finance-card h3,
  .job-payment-card h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 14.5px;
    line-height: 1.25;
  }

  .job-info-card header p,
  .job-operation-card header p,
  .job-document-card header p,
  .job-finance-card header p,
  .job-payment-card header p {
    margin: 2px 0 0;
    color: var(--admin-muted);
    font-size: 10.5px;
  }

  .job-data-list,
  .job-finance-list {
    margin: 0;
  }

  .job-data-list > div {
    min-height: 41px;
    display: grid;
    grid-template-columns: minmax(105px, 0.42fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid #edf1f6;
  }

  .job-data-list > div:last-child {
    border-bottom: 0;
  }

  .job-data-list dt {
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 500;
  }

  .job-data-list dd {
    min-width: 0;
    margin: 0;
    color: var(--admin-text);
    font-size: 12.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  .job-data-list dd small {
    display: block;
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 10px;
    font-weight: 500;
  }

  .job-data-list--compact > div {
    min-height: 38px;
  }

  .job-related-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 13px;
    padding: 11px 12px;
    border: 1px solid #dce7fa;
    border-radius: 9px;
    background: #f7faff;
  }

  .job-related-panel__icon {
    width: 32px;
    height: 32px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e8f0ff;
    color: var(--admin-primary);
  }

  .job-related-panel__icon .admin-icon {
    width: 15px;
    height: 15px;
  }

  .job-related-panel > div {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .job-related-panel small {
    color: var(--admin-primary);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .job-related-panel strong {
    font-size: 12.5px;
  }

  .job-related-panel p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 10px;
  }

  .job-contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 13px;
  }

  .job-contact-links a {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 8px;
    border: 1px solid var(--admin-border);
    border-radius: 7px;
    color: #4d5c76;
    font-size: 10.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
  }

  .job-contact-links .admin-icon {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    color: var(--admin-primary);
  }

  .job-crew-list {
    display: grid;
    gap: 7px;
    padding: 13px 0 6px;
  }

  .job-crew-list > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
  }

  .job-crew-avatar {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef3ff;
    color: var(--admin-primary);
    font-size: 10px;
    font-weight: 700;
  }

  .job-crew-list > div > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .job-crew-list strong {
    font-size: 12px;
  }

  .job-crew-list small,
  .job-crew-list em {
    color: var(--admin-muted);
    font-size: 9.5px;
    font-style: normal;
  }

  .job-note-list {
    display: grid;
    gap: 8px;
    padding-top: 13px;
  }

  .job-note-list > div {
    padding: 10px 11px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    background: #fbfcfe;
  }

  .job-note-list span {
    color: var(--admin-primary);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .job-note-list p {
    margin: 4px 0 0;
    color: #4d5c76;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-line;
  }

  .job-empty-state {
    min-height: 180px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    padding: 22px;
    text-align: center;
  }

  .job-empty-state > span:first-child {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef4ff;
    color: var(--admin-primary);
  }

  .job-empty-state > span:first-child .admin-icon {
    width: 17px;
    height: 17px;
  }

  .job-empty-state h4 {
    margin: 2px 0 0;
    color: var(--admin-text);
    font-size: 13px;
  }

  .job-empty-state p {
    max-width: 360px;
    margin: 0;
    color: var(--admin-muted);
    font-size: 10.5px;
    line-height: 1.45;
  }

  .job-empty-state--compact {
    min-height: 92px;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    justify-items: start;
    gap: 10px;
    padding: 14px 0 4px;
    text-align: left;
  }

  .job-empty-state--compact div {
    min-width: 0;
  }

  .job-operation-card,
  .job-document-card,
  .job-finance-card,
  .job-payment-card {
    min-height: 280px;
  }

  .job-task-progress {
    height: 7px;
    overflow: hidden;
    margin-top: 14px;
    border-radius: 999px;
    background: #e9edf4;
  }

  .job-task-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--admin-primary);
  }

  .job-task-counts {
    display: flex;
    gap: 17px;
    padding: 9px 1px 10px;
    color: var(--admin-muted);
    font-size: 10px;
  }

  .job-task-counts strong {
    color: var(--admin-text);
  }

  .job-task-preview {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .job-task-preview li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 45px;
    padding: 7px 0;
    border-top: 1px solid #edf1f6;
  }

  .job-task-preview li > span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f1f4f8;
    color: #7a879c;
  }

  .job-task-preview li.is-completed > span {
    background: var(--admin-success-soft);
    color: #0b8f5d;
  }

  .job-task-preview .admin-icon {
    width: 13px;
    height: 13px;
  }

  .job-task-preview li > div {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .job-task-preview strong {
    font-size: 11.5px;
  }

  .job-task-preview small {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 9.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-task-preview em {
    color: var(--admin-muted);
    font-size: 9.5px;
    font-style: normal;
  }

  .job-photo-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-top: 13px;
  }

  .job-photo-preview a {
    position: relative;
    min-height: 118px;
    overflow: hidden;
    border-radius: 9px;
    background: #eef2f7;
  }

  .job-photo-preview__missing {
    display: grid;
    min-height: 118px;
    place-items: center;
    border-radius: 9px;
    background: #eef2f7;
    color: var(--admin-muted);
    font-size: 10px;
    text-align: center;
  }

  .job-photo-preview img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
  }

  .job-photo-preview span {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(7, 26, 56, 0.76);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
  }

  .job-card-footnote {
    margin: 8px 0 0;
    color: var(--admin-muted);
    font-size: 9.5px;
  }

  .payout-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
    margin: 0 0 14px;
  }

  .payout-summary-grid > div {
    padding: 10px 11px;
    border: 1px solid #e2e9f2;
    border-radius: 10px;
    background: #f8fbff;
  }

  .payout-summary-grid span,
  .payout-technician-card header span,
  .payout-breakdown__label {
    display: block;
    color: var(--admin-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
  }

  .payout-summary-grid strong {
    display: block;
    margin-top: 3px;
    color: var(--admin-text);
    font-size: 15px;
  }

  .payout-technician-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 10px;
  }

  .payout-technician-card {
    overflow: hidden;
    border: 1px solid #e2e9f2;
    border-radius: 11px;
    background: #fff;
  }

  .payout-technician-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-bottom: 1px solid #e8eef5;
    background: #f8fbff;
  }

  .payout-technician-card h3 {
    margin: 2px 0 0;
    font-size: 14px;
  }

  .payout-technician-card header > strong,
  .payout-breakdown__amount > strong {
    color: var(--admin-text);
    font-size: 12px;
    white-space: nowrap;
  }

  .payout-breakdown {
    padding: 9px 12px 4px;
  }

  .payout-breakdown__label {
    margin-bottom: 3px;
  }

  .payout-breakdown__line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px 12px;
    padding: 9px 0;
    border-top: 1px solid #edf1f6;
  }

  .payout-breakdown__source {
    min-width: 0;
  }

  .payout-breakdown__source strong,
  .payout-breakdown__source span {
    display: block;
  }

  .payout-breakdown__source strong {
    color: var(--admin-text);
    font-size: 11.5px;
  }

  .payout-breakdown__source span {
    margin-top: 2px;
    color: var(--admin-muted);
    font-size: 9.5px;
    line-height: 1.35;
  }

  .payout-breakdown__amount {
    display: grid;
    justify-items: end;
  }

  #technician-payouts .payout-edit {
    min-width: 0;
    justify-self: end;
  }

  #technician-payouts .payout-edit > summary,
  #technician-payouts .payout-add > summary {
    min-height: 34px;
    gap: 5px;
    padding: 7px 11px;
    list-style: none;
    white-space: nowrap;
  }

  #technician-payouts .payout-edit > summary::-webkit-details-marker,
  #technician-payouts .payout-add > summary::-webkit-details-marker {
    display: none;
  }

  #technician-payouts .payout-edit__open-label,
  #technician-payouts .payout-add__open-label,
  #technician-payouts .payout-edit[open] .payout-edit__closed-label,
  #technician-payouts .payout-add[open] .payout-add__closed-label {
    display: none;
  }

  #technician-payouts .payout-edit[open] .payout-edit__open-label,
  #technician-payouts .payout-add[open] .payout-add__open-label {
    display: inline;
  }

  #technician-payouts .payout-edit[open] {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: grid;
    gap: 8px;
    padding-top: 2px;
  }

  #technician-payouts .payout-edit[open] > summary {
    justify-self: end;
  }

  #technician-payouts .payout-editor,
  #technician-payouts .payout-add__panel {
    min-width: 0;
    padding: 12px;
    border: 1px solid #dce6f2;
    border-radius: 10px;
    background: #f8fbff;
    box-shadow: 0 2px 8px rgba(13, 25, 57, 0.035);
  }

  #technician-payouts .payout-editor__header,
  #technician-payouts .payout-add__header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 11px;
  }

  #technician-payouts .payout-editor__header > div,
  #technician-payouts .payout-add__header > div {
    min-width: 0;
  }

  #technician-payouts .payout-editor__header strong,
  #technician-payouts .payout-editor__header span,
  #technician-payouts .payout-add__header strong,
  #technician-payouts .payout-add__header span {
    display: block;
  }

  #technician-payouts .payout-editor__header strong,
  #technician-payouts .payout-add__header strong {
    color: var(--admin-text);
    font-size: 11.5px;
  }

  #technician-payouts .payout-editor__header span,
  #technician-payouts .payout-add__header span,
  #technician-payouts .payout-editor__header small {
    margin-top: 3px;
    color: var(--admin-muted);
    font-size: 10px;
    line-height: 1.4;
  }

  #technician-payouts .payout-editor__header small {
    text-align: left;
  }

  #technician-payouts .payout-editor__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 11px;
  }

  #technician-payouts .payout-edit-form,
  #technician-payouts .payout-add-form {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  #technician-payouts .payout-edit-form__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  #technician-payouts .payout-field--note {
    grid-column: 1 / -1;
  }

  #technician-payouts .payout-field {
    display: grid;
    min-width: 0;
    gap: 5px;
    color: #53617a;
    font-size: 10px;
    font-weight: 700;
  }

  #technician-payouts .payout-field input,
  #technician-payouts .payout-field select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #ced8e6;
    border-radius: 8px;
    background: #fff;
    color: var(--admin-text);
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    transition: border-color 120ms ease, box-shadow 120ms ease;
  }

  #technician-payouts .payout-field input:focus-visible,
  #technician-payouts .payout-field select:focus-visible {
    border-color: var(--admin-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(22, 89, 216, 0.13);
  }

  #technician-payouts .payout-field input:disabled,
  #technician-payouts .payout-field select:disabled,
  #technician-payouts .payout-field input[readonly] {
    border-color: #e1e6ee;
    background: #f0f3f7;
    color: #78859b;
    cursor: not-allowed;
  }

  #technician-payouts .payout-editor__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  #technician-payouts .payout-delete-form {
    display: flex;
    align-items: flex-end;
    margin: 0;
  }

  #technician-payouts .payout-delete-form .btn {
    border: 1px solid rgba(163, 33, 33, 0.2);
    background: #fff;
    color: #a32121;
  }

  #technician-payouts .payout-admin-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 13px;
  }

  #technician-payouts .payout-add {
    min-width: 0;
  }

  #technician-payouts .payout-add[open] {
    flex: 1 1 100%;
  }

  #technician-payouts .payout-add__panel {
    margin-top: 8px;
  }

  #technician-payouts .payout-add-form__fields {
    display: grid;
    grid-template-columns: minmax(195px, 1.3fr) minmax(150px, 0.9fr) minmax(180px, 1.1fr) minmax(115px, 0.65fr);
    gap: 9px;
  }

  #technician-payouts .payout-add-form__actions {
    display: flex;
    justify-content: flex-end;
  }

  #technician-payouts .payout-split-form {
    display: flex;
    margin: 0;
  }

  .job-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
  }

  .job-finance-list > div {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #edf1f6;
  }

  .job-finance-list dt {
    color: #53617a;
    font-size: 11.5px;
  }

  .job-finance-list dd {
    margin: 0;
    color: var(--admin-text);
    font-size: 12.5px;
    font-weight: 700;
    text-align: right;
  }

  .job-finance-list dd small {
    display: block;
    color: var(--admin-muted);
    font-size: 9px;
    font-weight: 500;
  }

  .job-finance-list__cost dt,
  .job-finance-list__cost dd {
    color: #69768d;
  }

  .job-finance-list__total {
    min-height: 58px !important;
    border-bottom: 0 !important;
  }

  .job-finance-list__total dt {
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 700;
  }

  .job-finance-list__total dd {
    color: var(--admin-primary);
    font-size: 20px;
  }

  .job-payment-summary {
    display: grid;
    gap: 3px;
    padding: 19px 0 15px;
  }

  .job-payment-summary strong {
    color: var(--admin-text);
    font-size: 25px;
    line-height: 1.15;
  }

  .job-payment-summary p {
    max-width: 520px;
    margin: 5px 0 0;
    color: #53617a;
    font-size: 11.5px;
    line-height: 1.55;
  }

  .job-chemical-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 14px;
    padding: 12px;
    border: 1px solid #dce7fa;
    border-radius: 9px;
    background: #f7faff;
  }

  .job-chemical-summary span {
    color: #53617a;
    font-size: 10.5px;
  }

  .job-chemical-summary strong {
    color: var(--admin-text);
    font-size: 11.5px;
  }
}

/* ================================================================
   PHASE 3C: CREATE / EDIT JOB WORKSPACE
   ================================================================ */
.admin-main:has(.job-form-workspace) {
  padding-top: 18px;
}

.job-form-workspace {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
}

.job-form {
  display: grid;
  gap: 14px;
}

.job-form-context,
.job-form-section,
.job-form-actions {
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: #fff;
}

.job-form-context {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
}

.job-form-context__icon {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #1760dd;
}

.job-form-context__icon .admin-icon {
  width: 20px;
  height: 20px;
}

.job-form-context__copy {
  min-width: 0;
}

.job-form-context__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #6f7d96;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.job-form-context h2 {
  margin: 0;
  color: #0b1f47;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.job-form-context p {
  margin: 2px 0 0;
  color: #64728b;
  font-size: 11.5px;
  line-height: 1.45;
}

.job-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 14px;
  align-items: start;
}

.job-form-column {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.job-form-section {
  min-width: 0;
  padding: 18px;
}

.job-form-section__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f6;
}

.job-form-section__icon {
  display: inline-grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: #edf4ff;
  color: #1760dd;
}

.job-form-section__icon--green {
  background: #eaf8f1;
  color: #15865e;
}

.job-form-section__icon--purple {
  background: #f2ecff;
  color: #7c4bd8;
}

.job-form-section__icon--cyan {
  background: #e8f9fb;
  color: #148da3;
}

.job-form-section__icon--orange {
  background: #fff4e4;
  color: #c97912;
}

.job-form-section__icon .admin-icon {
  width: 16px;
  height: 16px;
}

.job-form-section__header h3 {
  margin: 0;
  color: #0b1f47;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.job-form-section__header p {
  margin: 2px 0 0;
  color: #748199;
  font-size: 10.5px;
  line-height: 1.45;
}

.job-form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 15px;
}

.job-form-fields--stacked {
  grid-template-columns: minmax(0, 1fr);
}

.job-client-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1.45fr) minmax(110px, 0.72fr) minmax(125px, 0.88fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #dfe8f5;
  border-radius: 10px;
  background: #f7faff;
}

.job-client-context[hidden],
.job-subscription-context[hidden] {
  display: none;
}

.job-client-context__ref {
  padding: 5px 7px;
  border-radius: 7px;
  background: #e7efff;
  color: #1760dd;
  font-size: 10.5px;
  font-weight: 700;
}

.job-client-context > div,
.job-subscription-context > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.job-client-context strong,
.job-subscription-context strong {
  overflow: hidden;
  color: #10234b;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.job-client-context span:not(.job-client-context__ref),
.job-client-context small,
.job-subscription-context small {
  color: #748199;
  font-size: 10px;
  line-height: 1.35;
}

.job-subscription-context {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dfe8f5;
  border-radius: 10px;
  background: #f8faff;
}

.job-subscription-context > span {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #e9f1ff;
  color: #1760dd;
}

.job-subscription-context .admin-icon {
  width: 15px;
  height: 15px;
}

.job-assignment-state {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e9f7f0;
  color: #137e59;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.job-assignment-state--manual {
  background: #fff1d9;
  color: #9a5a00;
}

.job-crew-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.job-crew-grid {
  display: grid;
  gap: 8px;
  margin: 7px 0 6px;
}

.job-crew-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.job-crew-option:has(input:checked) {
  border-color: #9dbdf4;
  background: #f4f8ff;
  box-shadow: 0 0 0 2px rgba(45, 111, 229, 0.07);
}

.job-crew-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.job-crew-option__avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #edf3ff;
  color: #2867d9;
  font-size: 10.5px;
  font-weight: 700;
}

.job-crew-option__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.job-crew-option__copy strong {
  color: #10234b;
  font-size: 11.5px;
  font-weight: 600;
}

.job-crew-option__copy small {
  color: #758299;
  font-size: 10.5px;
}

.job-crew-option__check {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #cbd5e2;
  border-radius: 50%;
  color: transparent;
}

.job-crew-option:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(45, 111, 229, 0.15);
}

.job-crew-option:has(input:checked) .job-crew-option__check {
  border-color: #1760dd;
  background: #1760dd;
  color: #fff;
}

.job-crew-option__check .admin-icon {
  width: 12px;
  height: 12px;
}

.job-form-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #f8faff;
  cursor: pointer;
}

.job-form-toggle > input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.job-form-toggle__track {
  display: flex;
  flex: 0 0 38px;
  width: 38px;
  height: 22px;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #bdc7d6;
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

.job-form-toggle__track span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 31, 71, 0.22);
  transition: transform 140ms ease;
}

.job-form-toggle input:checked + .job-form-toggle__track {
  background: #1760dd;
}

.job-form-toggle input:checked + .job-form-toggle__track span {
  transform: translateX(16px);
}

.job-form-toggle input:focus-visible + .job-form-toggle__track {
  box-shadow: 0 0 0 3px rgba(45, 111, 229, 0.18);
}

.job-form-toggle > span:last-child {
  display: grid;
  gap: 1px;
}

.job-form-toggle strong {
  color: #10234b;
  font-size: 11.5px;
  font-weight: 600;
}

.job-form-toggle small,
.job-system-assignment,
.job-task-note {
  margin: 0;
  color: #758299;
  font-size: 10.5px;
  line-height: 1.4;
}

.job-currency-control {
  position: relative;
  display: block;
}

.job-currency-control > span {
  position: absolute;
  top: 50%;
  left: 11px;
  z-index: 1;
  color: #6e7b91;
  font-size: 12px;
  font-weight: 600;
  transform: translateY(-50%);
  pointer-events: none;
}

.job-currency-control .client-field__control {
  padding-left: 25px;
}

.job-currency-control .client-field__control[readonly] {
  background: #f4f6f9;
  color: #65738b;
}

.job-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border: 1px solid #cfe0fb;
  border-radius: 10px;
  background: #f2f7ff;
}

.job-total-preview > div {
  display: grid;
  gap: 2px;
}

.job-total-preview span {
  color: #10234b;
  font-size: 11.5px;
  font-weight: 700;
}

.job-total-preview small {
  color: #6e7d95;
  font-size: 10px;
  line-height: 1.35;
}

.job-total-preview strong {
  color: #1359d2;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.job-operations-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
  padding-top: 15px;
}

.job-task-assignment,
.job-notes-grid {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.job-task-assignment {
  padding-right: 18px;
  border-right: 1px solid #edf1f6;
}

.job-task-multiselect {
  min-height: 158px;
  padding: 6px;
}

.job-task-multiselect option {
  padding: 7px 8px;
  border-radius: 6px;
}

.job-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
}

.job-form-actions__copy {
  display: grid;
  gap: 2px;
}

.job-form-actions__copy strong {
  color: #10234b;
  font-size: 12px;
  font-weight: 700;
}

.job-form-actions__copy span {
  color: #758299;
  font-size: 10.5px;
  line-height: 1.4;
}

.job-form-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.job-form .btn,
.job-form-workspace .client-draft-notice .btn {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 12px;
}

@media screen and (max-width: 1100px) {
  .job-client-context {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .job-client-context > div:nth-last-child(-n + 2) {
    padding-left: 50px;
  }
}

@media screen and (max-width: 900px) {
  .job-form-layout,
  .job-operations-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-task-assignment {
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid #edf1f6;
  }
}

@media screen and (max-width: 600px) {
  .admin-main:has(.job-form-workspace) {
    padding-top: 12px;
  }

  .job-form-workspace,
  .job-form,
  .job-form-column {
    gap: 12px;
  }

  .job-form-context,
  .job-form-section,
  .job-form-actions {
    padding: 14px;
  }

  .job-form-context {
    align-items: flex-start;
  }

  .job-form-context h2 {
    font-size: 17px;
  }

  .job-form-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .job-form-fields .client-field--full {
    grid-column: auto;
  }

  .job-client-context,
  .job-subscription-context {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .job-client-context > div:nth-last-child(-n + 2),
  .job-subscription-context > div:nth-last-child(-n + 2) {
    padding-left: 42px;
  }

  .job-form-section__header {
    align-items: flex-start;
  }

  .job-assignment-state {
    margin-left: auto;
  }

  .job-total-preview {
    align-items: flex-start;
  }

  .job-total-preview strong {
    font-size: 18px;
  }

  .job-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .job-form-actions__buttons {
    width: 100%;
  }

  .job-form-actions__buttons .btn {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media screen and (max-width: 1180px) {
  .job-workspace-hero {
    grid-template-columns: minmax(300px, 1fr) minmax(260px, 0.8fr);
  }

  .job-workspace-hero__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .job-metric-strip article {
    padding-inline: 14px;
  }
}

@media screen and (max-width: 900px) {
  .job-workspace-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .job-workspace-hero__property {
    padding: 14px 0 0;
    border-top: 1px solid var(--admin-border);
    border-left: 0;
  }

  .job-workspace-hero__actions {
    grid-column: auto;
    padding-top: 0;
  }

  .job-overview-grid,
  .job-field-grid,
  .job-document-grid,
  .job-financial-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-metric-strip article:nth-child(2) {
    border-right: 0;
  }

  .job-metric-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--admin-border);
  }
}

@media screen and (max-width: 600px) {
  .admin-main:has(.job-workspace-page) {
    padding-top: 12px;
  }

  .job-workspace-page {
    gap: 12px;
  }

  .job-workspace-hero {
    padding: 15px;
  }

  .job-workspace-title-row h2 {
    width: 100%;
    font-size: 21px;
  }

  .job-workspace-hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .job-workspace-hero__actions .btn {
    justify-content: center;
    padding-inline: 10px;
  }

  .job-metric-strip article {
    min-height: 98px;
    align-items: flex-start;
    gap: 9px;
    padding: 13px;
  }

  .job-metric-icon {
    width: 32px;
    height: 32px;
  }

  .job-metric-icon .admin-icon {
    width: 15px;
    height: 15px;
  }

  .job-metric-strip strong {
    font-size: 15px;
    white-space: normal;
  }

  .job-metric-strip p {
    white-space: normal;
  }

  .job-section-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .job-section-nav::-webkit-scrollbar {
    display: none;
  }

  .job-section-nav a {
    flex: 0 0 auto;
  }

  .job-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .job-section-heading p {
    font-size: 10.5px;
  }

  .job-info-card,
  .job-operation-card,
  .job-document-card,
  .job-finance-card,
  .job-payment-card {
    min-height: 0;
    padding: 14px;
  }

  .job-info-card > header,
  .job-operation-card > header,
  .job-document-card > header,
  .job-finance-card > header,
  .job-payment-card > header {
    flex-wrap: wrap;
  }

  .job-info-card > header .job-card-header-link,
  .job-operation-card > header .btn {
    margin-left: 46px;
  }

  .job-data-list > div {
    grid-template-columns: minmax(90px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
  }

  .job-contact-links {
    align-items: stretch;
    flex-direction: column;
  }

  .job-contact-links a {
    width: 100%;
  }

  .job-photo-preview a {
    min-height: 100px;
  }

  .job-photo-preview__missing {
    min-height: 100px;
  }

  .job-card-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .payout-summary-grid,
  .payout-technician-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .payout-breakdown__line {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  #technician-payouts .payout-edit-form__fields,
  #technician-payouts .payout-add-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  #technician-payouts .payout-editor__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  #technician-payouts .payout-editor__header {
    flex-direction: column;
    gap: 2px;
  }

  #technician-payouts .payout-editor__header small {
    text-align: left;
  }

  #technician-payouts .payout-editor__actions,
  #technician-payouts .payout-delete-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  #technician-payouts .payout-editor__actions > .btn,
  #technician-payouts .payout-delete-form .btn,
  #technician-payouts .payout-add-form__actions .btn {
    width: 100%;
    min-height: 40px;
  }

  #technician-payouts .payout-admin-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #technician-payouts .payout-add > summary,
  #technician-payouts .payout-split-form .btn {
    width: 100%;
    justify-content: center;
  }

  #technician-payouts .payout-split-form {
    min-width: 0;
  }

  .job-task-counts {
    justify-content: space-between;
    gap: 8px;
  }
}

@media screen and (max-width: 390px) {
  .job-workspace-hero__actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .job-workspace-hero__actions .btn--primary {
    grid-column: 1 / -1;
  }

  .job-task-preview li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .job-task-preview em {
    grid-column: 2;
  }
}

/* ================================================================
   PHASE 4A: TASKS REGISTRY + JOB TASKS WORKSPACE
   ================================================================ */
@media screen {
  .admin-main:has(.task-page),
  .admin-main:has(.task-workspace) {
    padding-top: 18px;
  }

  .task-page,
  .task-workspace {
    display: grid;
    gap: 14px;
    color: var(--admin-text);
  }

  .task-page-header,
  .task-workspace-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .task-page-header h1,
  .task-workspace-header h1 {
    margin: 1px 0 2px;
    color: var(--admin-text);
    font-size: 24px;
    line-height: 1.15;
  }

  .task-page-header p,
  .task-workspace-header p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 11.5px;
  }

  .task-page-header .admin-kicker,
  .task-workspace-header .admin-kicker,
  .task-progress-panel .admin-kicker {
    color: var(--admin-primary);
    font-size: 9.5px;
    letter-spacing: 0.08em;
  }

  .task-view-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: #f7f9fc;
  }

  .task-view-tab {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 7px;
    color: var(--admin-muted);
    font-size: 11.5px;
    font-weight: 600;
  }

  .task-view-tab.is-active {
    background: #fff;
    color: var(--admin-primary);
    box-shadow: 0 1px 4px rgba(13, 25, 57, 0.09);
  }

  .task-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .task-summary-item {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 18px;
    border-right: 1px solid var(--admin-border);
  }

  .task-summary-item:last-child {
    border-right: 0;
  }

  .task-summary-item > span:last-child {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .task-summary-item small {
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 600;
  }

  .task-summary-item strong {
    color: var(--admin-text);
    font-size: 21px;
    line-height: 1.05;
  }

  .task-summary-item em {
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .task-summary-item__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
  }

  .task-summary-item__icon .admin-icon {
    width: 18px;
    height: 18px;
  }

  .task-summary-item__icon--blue { background: #eaf1ff; color: var(--admin-primary); }
  .task-summary-item__icon--green { background: var(--admin-success-soft); color: #0b8f5d; }
  .task-summary-item__icon--amber { background: var(--admin-warning-soft); color: #c77709; }
  .task-summary-item__icon--violet { background: #f2eaff; color: #7b45d8; }

  .task-directory,
  .task-library-directory,
  .task-progress-panel,
  .task-job-context,
  .task-work-list,
  .task-tool-card {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-card-radius);
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .task-directory,
  .task-library-directory,
  .task-work-list {
    overflow: visible;
  }

  .task-directory__header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--admin-border);
  }

  .task-directory__header h2,
  .task-directory__header h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 15px;
  }

  .task-directory__header p {
    margin: 3px 0 0;
    color: var(--admin-muted);
    font-size: 11px;
  }

  .task-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--admin-primary);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
  }

  .task-filter-clear .admin-icon {
    width: 13px;
    height: 13px;
  }

  .task-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.25fr) minmax(0, 4.75fr);
    gap: 10px;
    padding: 13px 16px 15px;
    border-bottom: 1px solid var(--admin-border);
    background: #fbfcfe;
  }

  .task-filter-advanced {
    min-width: 0;
  }

  .task-filter-advanced__fields {
    display: grid;
    grid-template-columns: repeat(5, minmax(108px, 1fr)) auto;
    gap: 10px;
  }

  .task-filter-advanced__summary {
    display: none;
  }

  .task-filter-field {
    min-width: 0;
    display: grid;
    align-content: end;
    gap: 5px;
  }

  .task-filter-field > span:first-child {
    color: var(--admin-text);
    font-size: 11px;
    font-weight: 600;
  }

  .task-filter-field input,
  .task-filter-field select,
  .task-filter-search-control {
    width: 100%;
    height: 38px;
    min-width: 0;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    color: var(--admin-text);
    font-family: inherit;
    font-size: 12px;
  }

  .task-filter-field input,
  .task-filter-field select {
    padding: 0 10px;
  }

  .task-filter-search-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
  }

  .task-filter-search-control .admin-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: var(--admin-muted);
  }

  .task-filter-search-control input {
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .task-filter-field input:focus,
  .task-filter-field select:focus,
  .task-filter-search-control:focus-within {
    border-color: #8eb4f4;
    outline: 3px solid rgba(37, 99, 235, 0.1);
  }

  .task-filter-search-control input:focus {
    outline: 0;
  }

  .task-filter-actions {
    display: flex;
    align-items: end;
    gap: 8px;
  }

  .task-filter-actions .btn {
    min-height: 38px;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .task-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
  }

  .task-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border);
    background: #fbfcfe;
    color: var(--admin-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.055em;
    text-align: left;
    text-transform: uppercase;
  }

  .task-table td {
    height: 68px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    font-size: 12px;
    vertical-align: middle;
  }

  .task-table tr:last-child td { border-bottom: 0; }
  .task-table tbody tr:hover { background: #fbfdff; }
  .task-table th:nth-child(1), .task-table td:nth-child(1) { width: 25%; }
  .task-table th:nth-child(2), .task-table td:nth-child(2) { width: 10%; }
  .task-table th:nth-child(3), .task-table td:nth-child(3) { width: 18%; }
  .task-table th:nth-child(4), .task-table td:nth-child(4) { width: 15%; }
  .task-table th:nth-child(5), .task-table td:nth-child(5) { width: 12%; }
  .task-table th:nth-child(6), .task-table td:nth-child(6) { width: 9%; }
  .task-table th:nth-child(7), .task-table td:nth-child(7) { width: 11%; text-align: right; }

  .task-table td strong,
  .task-table td > a {
    display: block;
    overflow: hidden;
    color: var(--admin-text);
    font-size: 12.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .task-table__job > a,
  .task-table__client > a {
    color: var(--admin-primary);
  }

  .task-table td small,
  .task-table td > span:not(.admin-badge):not(.task-unassigned) {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--admin-muted);
    font-size: 10.5px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .task-table__task > span {
    font-size: 9.5px !important;
  }

  .task-unassigned {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f0f2f6;
    color: #667085;
    font-size: 10px;
    font-weight: 600;
  }

  .task-page .admin-badge,
  .task-workspace .admin-badge {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 600;
  }

  .task-page .admin-badge--pending,
  .task-workspace .admin-badge--pending { background: #eaf1ff; color: var(--admin-primary); }
  .task-page .admin-badge--completed,
  .task-workspace .admin-badge--completed { background: var(--admin-success-soft); color: #0b8f5d; }
  .task-page .admin-badge--skipped,
  .task-workspace .admin-badge--skipped { background: #f0f2f6; color: #667085; }

  .task-table__actions {
    white-space: nowrap;
  }

  .task-open-button {
    min-width: 50px;
    min-height: 34px;
    justify-content: center;
    padding-inline: 10px;
  }

  .task-actions-menu {
    display: inline-block;
    margin-left: 4px;
    vertical-align: middle;
  }

  .task-actions-menu[open] { z-index: 45; }
  .task-actions-menu .job-actions-menu__panel { width: 185px; }

  .task-empty-state,
  .task-work-empty {
    min-height: 230px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    padding: 32px;
    color: var(--admin-muted);
    text-align: center;
  }

  .task-empty-state > span,
  .task-work-empty > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf1ff;
    color: var(--admin-primary);
  }

  .task-empty-state .admin-icon,
  .task-work-empty .admin-icon { width: 19px; height: 19px; }
  .task-empty-state h3,
  .task-work-empty h3 { margin: 0; color: var(--admin-text); font-size: 14px; }
  .task-empty-state p,
  .task-work-empty p { margin: 0 0 5px; font-size: 11px; }

  .task-library-create { gap: 14px; }
  .task-library-create .admin-panel { margin: 0; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); box-shadow: var(--admin-card-shadow); }
  .task-library-create h2 { margin-bottom: 4px; font-size: 16px; }

  .task-library-search {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--admin-border);
    background: #fbfcfe;
  }

  .task-library-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    padding: 16px;
  }

  .task-library-panel { min-width: 0; }
  .task-library-panel > h3 { margin: 0 0 10px; font-size: 14px; }
  .task-page--library .task-branch-card,
  .task-page--library .task-template-card { padding: 12px; border-color: var(--admin-border); border-radius: 10px; background: #fbfcfe; }
  .task-page--library .task-branch-card p,
  .task-page--library .task-template-card p { margin: 3px 0; font-size: 11px; }
  .task-page--library .task-branch-card small,
  .task-page--library .task-template-card small { color: var(--admin-muted); font-size: 10px; }
  .task-page--library .task-icon { width: 34px; height: 34px; }
  .task-page--library .task-icon .admin-icon { width: 16px; height: 16px; }

  .task-workspace-header__copy { min-width: 0; }
  .task-workspace-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    color: var(--admin-primary);
    font-size: 11px;
    font-weight: 600;
  }

  .task-workspace-back .admin-icon { width: 13px; height: 13px; }

  .task-workspace-header__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }

  .task-job-context {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }

  .task-job-context > div {
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 13px 16px;
    border-right: 1px solid var(--admin-border);
  }

  .task-job-context > div:last-child { border-right: 0; }
  .task-job-context span { color: var(--admin-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
  .task-job-context strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
  .task-job-context small { overflow: hidden; color: var(--admin-muted); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }

  .task-progress-panel { padding: 15px 16px; }
  .task-progress-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
  .task-progress-panel__header h2 { margin: 1px 0 3px; font-size: 15px; }
  .task-progress-panel__header p { margin: 0; color: var(--admin-muted); font-size: 10.5px; }
  .task-progress-panel__header > strong { color: var(--admin-primary); font-size: 24px; line-height: 1; }
  .task-progress-bar { height: 8px; overflow: hidden; margin-top: 13px; border-radius: 999px; background: #e9edf4; }
  .task-progress-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--admin-primary), #4a86eb); transition: width 180ms ease; }
  .task-progress-counts { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 10px; color: var(--admin-muted); font-size: 10.5px; }
  .task-progress-counts strong { color: var(--admin-text); }
  .task-progress-counts .is-completed strong { color: #0b8f5d; }
  .task-progress-counts .is-pending strong { color: var(--admin-primary); }
  .task-progress-counts .is-skipped strong { color: #667085; }

  .task-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.65fr);
    gap: 14px;
    align-items: start;
  }

  .task-work-list { margin: 0; }
  .task-work-list__header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--admin-border); }
  .task-work-list__header h2 { margin: 0; font-size: 16px; }
  .task-work-list__header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 10.5px; }
  .task-work-list__items { display: grid; }

  .task-work-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 11px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--admin-border);
    box-shadow: inset 3px 0 0 #88aef0;
  }

  .task-work-item--completed { box-shadow: inset 3px 0 0 #35b681; }
  .task-work-item--skipped { box-shadow: inset 3px 0 0 #a7afbd; }
  .task-work-item__number { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #eaf1ff; color: var(--admin-primary); font-size: 11px; font-weight: 700; }
  .task-work-item--completed .task-work-item__number { background: var(--admin-success-soft); color: #0b8f5d; }
  .task-work-item--skipped .task-work-item__number { background: #f0f2f6; color: #667085; }
  .task-work-item__number .admin-icon { width: 14px; height: 14px; }
  .task-work-item__content { min-width: 0; display: grid; gap: 10px; }
  .task-work-item__content > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .task-work-item__content > header > div { min-width: 0; }
  .task-work-item__actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; }
  .task-remove-button { padding: 0; border: 0; color: #a52a2a; background: transparent; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
  .task-remove-button:hover, .task-remove-button:focus-visible { color: #7b1515; text-decoration: underline; }
  .task-work-item__content > header strong { display: block; font-size: 13px; }
  .task-work-item__content > header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.45; }
  .task-work-item__fields { display: grid; grid-template-columns: minmax(135px, 0.28fr) minmax(0, 1fr); gap: 10px; }
  .task-work-item__fields .form-label { font-size: 10.5px; }
  .task-work-item__fields .form-select,
  .task-work-item__fields .form-textarea { min-height: 40px; font-size: 11.5px; }
  .task-work-item__fields .form-textarea { resize: vertical; }

  .task-work-list__footer { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
  .task-work-tools { display: grid; gap: 12px; }
  .task-tool-card { padding: 14px; }
  .task-tool-card > header { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
  .task-tool-card > header > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #eaf1ff; color: var(--admin-primary); }
  .task-tool-card > header .admin-icon { width: 16px; height: 16px; }
  .task-tool-card h2 { margin: 0; font-size: 14px; }
  .task-tool-card header p { margin: 2px 0 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }
  .task-tool-form { display: grid; gap: 10px; }
  .task-tool-form .btn { width: fit-content; }
  .task-related-list { display: grid; border-top: 1px solid var(--admin-border); }
  .task-related-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; min-height: 42px; border-bottom: 1px solid var(--admin-border); font-size: 11px; }
  .task-related-list > div:last-child { border-bottom: 0; }
  .task-related-list strong { color: var(--admin-muted); font-size: 10.5px; }
  .task-related-list a { color: var(--admin-primary); font-weight: 600; }
}

@media screen and (max-width: 1320px) {
  .task-filter-grid { grid-template-columns: 1fr; }
  .task-filter-field--search { grid-column: auto; }
  .task-filter-advanced__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-table th,
  .task-table td { padding-inline: 9px; }
  .task-workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr); }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.task-page),
  .admin-main:has(.task-workspace) { padding-top: 12px; }
  .task-page,
  .task-workspace { gap: 12px; }
  .task-page-header,
  .task-workspace-header { align-items: stretch; flex-direction: column; padding: 14px; }
  .task-page-header h1,
  .task-workspace-header h1 { font-size: 21px; }
  .task-view-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .task-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-summary-item { min-height: 74px; gap: 9px; padding: 11px; border-bottom: 1px solid var(--admin-border); }
  .task-summary-item:nth-child(2n) { border-right: 0; }
  .task-summary-item:nth-last-child(-n + 2) { border-bottom: 0; }
  .task-summary-item__icon { width: 34px; height: 34px; }
  .task-summary-item strong { font-size: 19px; }
  .task-summary-item em { white-space: normal; }
  .task-directory__header { align-items: flex-start; padding: 12px; }
  .task-filter-grid { grid-template-columns: 1fr; padding: 12px; }
  .task-filter-field--search { grid-column: auto; }
  .task-filter-advanced { display: block; margin-top: -2px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .task-filter-advanced__summary { min-height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 12px; cursor: pointer; list-style: none; color: var(--admin-text); font-size: 12px; font-weight: 600; }
  .task-filter-advanced__summary::-webkit-details-marker { display: none; }
  .task-filter-advanced__summary::after { content: "⌄"; margin-left: auto; color: var(--admin-muted); font-size: 16px; }
  .task-filter-advanced[open] .task-filter-advanced__summary { border-bottom: 1px solid var(--admin-border); }
  .task-filter-advanced[open] .task-filter-advanced__summary::after { content: "⌃"; }
  .task-filter-advanced__summary strong { color: var(--admin-primary); font-size: 11px; }
  .task-filter-advanced__hint { color: var(--admin-muted); font-size: 10.5px; font-weight: 500; }
  .task-filter-advanced__fields { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .task-filter-advanced__summary:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.12); outline-offset: -3px; }
  .task-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .task-filter-actions .btn:only-child { grid-column: 1 / -1; }

  .task-table-shell { padding: 10px; }
  .task-table,
  .task-table tbody,
  .task-table tr,
  .task-table td { display: block; width: 100%; }
  .task-table thead { display: none; }
  .task-table tbody { display: grid; gap: 10px; }
  .task-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "task status" "job lead" "client client" "service service" "actions actions"; gap: 10px 13px; padding: 13px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .task-table td,
  .task-table tr:last-child td { width: auto !important; min-width: 0; height: auto; padding: 0; border: 0; text-align: left !important; }
  .task-table__task { grid-area: task; }
  .task-table__job { grid-area: job; }
  .task-table__client { grid-area: client; padding-top: 9px !important; border-top: 1px solid var(--admin-border) !important; }
  .task-table__service { grid-area: service; }
  .task-table__lead { grid-area: lead; text-align: right !important; }
  .task-table__status { grid-area: status; }
  .task-table__actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; padding-top: 10px !important; border-top: 1px solid var(--admin-border) !important; }
  .task-table__job::before,
  .task-table__lead::before,
  .task-table__service::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--admin-muted); font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
  .task-table td strong,
  .task-table td > a,
  .task-table td small { overflow: visible; text-overflow: clip; white-space: normal; }
  .task-actions-menu .job-actions-menu__panel { width: min(185px, calc(100vw - 48px)); }

  .task-library-create,
  .task-library-columns,
  .task-workspace-grid { grid-template-columns: 1fr; }
  .task-library-search { grid-template-columns: 1fr 1fr; padding: 12px; }
  .task-library-search .task-filter-field { grid-column: 1 / -1; }
  .task-library-columns { padding: 12px; }
  .task-page--library .task-branch-card,
  .task-page--library .task-template-card { display: grid; grid-template-columns: minmax(0, 1fr); }
  .task-page--library .task-template-card { grid-template-columns: auto minmax(0, 1fr); }
  .task-page--library .task-template-card .task-card-actions { grid-column: 1 / -1; }
  .task-card-actions { margin-left: 0; justify-content: flex-start; }

  .task-workspace-header__actions { justify-content: flex-start; }
  .task-workspace-header__actions .btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .task-job-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-job-context > div { border-bottom: 1px solid var(--admin-border); }
  .task-job-context > div:nth-child(2n) { border-right: 0; }
  .task-job-context > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .task-progress-panel__header h2 { font-size: 14px; }
  .task-progress-counts { justify-content: space-between; gap: 8px; }
  .task-workspace-grid { gap: 12px; }
  .task-work-list__header { align-items: flex-start; }
  .task-work-item { grid-template-columns: 32px minmax(0, 1fr); gap: 9px; padding: 13px 12px; }
  .task-work-item__number { width: 30px; height: 30px; }
  .task-work-item__fields { grid-template-columns: 1fr; }
  .task-work-list__footer { display: grid; grid-template-columns: 1fr; padding: 12px; }
  .task-work-list__footer .btn { width: 100%; justify-content: center; }
  .task-tool-card { padding: 13px; }
  .task-tool-form .btn { width: 100%; justify-content: center; }
}

@media screen and (max-width: 420px) {
  .task-summary-item { gap: 7px; padding: 10px 9px; }
  .task-summary-item small,
  .task-summary-item em { font-size: 9.5px; }
  .task-table tbody tr { grid-template-areas: "task status" "job lead" "client client" "service service" "actions actions"; }
  .task-workspace-header__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .task-workspace-header__actions .btn:last-child { grid-column: 1 / -1; }
  .task-progress-panel__header > strong { font-size: 21px; }
  .task-progress-counts { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Phase 4B: Photos library and job photo workspace */
.photo-library-page,
.photo-workspace {
  display: grid;
  gap: 16px;
}

.photo-library-header,
.photo-workspace-header,
.photo-library-directory,
.photo-job-gallery-section,
.photo-upload-panel,
.photo-job-summary,
.photo-job-context {
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--admin-shadow-soft);
}

.photo-library-header,
.photo-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
}

.photo-library-header h1,
.photo-workspace-header h1 {
  margin: 2px 0 4px;
  color: var(--admin-text);
  font-size: 26px;
  letter-spacing: -0.5px;
}

.photo-library-header p,
.photo-workspace-header p,
.photo-library-directory__header p,
.photo-job-gallery-section header p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
}

.photo-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--admin-shadow-soft);
}

.photo-summary-strip article {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  min-height: 86px;
  padding: 15px 18px;
  border-right: 1px solid var(--admin-border);
}

.photo-summary-strip article:last-child { border-right: 0; }
.photo-summary-strip article > span:last-child { display: grid; gap: 1px; min-width: 0; }
.photo-summary-strip small,
.photo-summary-strip em { color: var(--admin-muted); font-size: 10.5px; font-style: normal; line-height: 1.25; }
.photo-summary-strip strong { color: var(--admin-text); font-size: 23px; line-height: 1.05; }
.photo-summary-strip__icon { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 50%; }
.photo-summary-strip__icon .admin-icon { width: 18px; height: 18px; }
.photo-summary-strip__icon--blue { color: var(--admin-primary); background: #e9f1ff; }
.photo-summary-strip__icon--violet { color: #7a55d5; background: #f2eaff; }
.photo-summary-strip__icon--green { color: #0b9460; background: #e7f8f0; }
.photo-summary-strip__icon--amber { color: #bd7100; background: #fff3dd; }

.photo-library-directory__header,
.photo-job-gallery-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--admin-border);
}

.photo-library-directory__header h2,
.photo-job-gallery-section h2,
.photo-upload-panel h2 { margin: 0 0 3px; color: var(--admin-text); font-size: 15px; }
.photo-filter-clear { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-primary); font-size: 11px; font-weight: 650; white-space: nowrap; }
.photo-filter-clear .admin-icon { width: 13px; height: 13px; }

.photo-filter-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(0, 4.8fr);
  gap: 10px;
  padding: 13px 16px 15px;
  border-bottom: 1px solid var(--admin-border);
  background: #fbfcfe;
}

.photo-filter-advanced { min-width: 0; }
.photo-filter-advanced__fields { display: grid; grid-template-columns: repeat(4, minmax(116px, 1fr)); gap: 10px; }
.photo-filter-advanced__summary { display: none; }
.photo-filter-field { display: grid; min-width: 0; align-content: end; gap: 5px; }
.photo-filter-field > span:first-child { color: var(--admin-text); font-size: 11px; font-weight: 600; }
.photo-filter-field input,
.photo-filter-field select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 12px;
}

.photo-filter-field input { padding: 0 10px; }
.photo-filter-field select { padding: 0 28px 0 10px; }
.photo-filter-search-control { position: relative; display: block; }
.photo-filter-search-control .admin-icon { position: absolute; top: 50%; left: 11px; width: 15px; height: 15px; color: var(--admin-muted); transform: translateY(-50%); pointer-events: none; }
.photo-filter-search-control input { padding-left: 34px; }
.photo-filter-actions { display: flex; align-items: end; gap: 7px; }
.photo-filter-actions .btn { min-height: 40px; white-space: nowrap; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  padding: 16px;
}

.photo-gallery-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--admin-border);
  border-radius: 11px;
  background: #fff;
}

.photo-gallery-card__image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #edf2f7; }
.photo-gallery-card__image > button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.photo-gallery-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 160ms ease; }
.photo-gallery-card__image > button:hover img { transform: scale(1.025); }
.photo-gallery-card__body { display: grid; gap: 5px; padding: 12px; }
.photo-gallery-card__heading { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 8px; }
.photo-gallery-card__heading small,
.photo-gallery-card__body p { margin: 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
.photo-gallery-card__body > strong { overflow: hidden; color: var(--admin-text); font-size: 12.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.photo-gallery-card__actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.photo-gallery-card__actions .btn { min-height: 31px; padding: 0 9px; font-size: 10.5px; }
.admin-badge--before { background: #e7f0ff; color: #175cd3; }
.admin-badge--after { background: #e8f8ef; color: #087443; }
.admin-badge--equipment { background: #f1edff; color: #6f42c1; }
.admin-badge--issue { background: #fff0f1; color: #c72336; }
.admin-badge--water { background: #e7f7fb; color: #16708a; }
.admin-badge--other { background: #f0f2f6; color: #536072; }

.photo-missing-state,
.photo-empty-state {
  display: grid;
  place-items: center;
  text-align: center;
}

.photo-missing-state { height: 100%; align-content: center; gap: 6px; padding: 18px; color: var(--admin-muted); background: #f4f6f8; }
.photo-missing-state .admin-icon { width: 27px; height: 27px; color: #9aa7b8; }
.photo-missing-state strong { color: var(--admin-text); font-size: 12px; }
.photo-missing-state span { font-size: 10.5px; }
.photo-empty-state { min-height: 240px; gap: 8px; padding: 26px; color: var(--admin-muted); }
.photo-empty-state > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #eaf1ff; }
.photo-empty-state .admin-icon { width: 20px; height: 20px; }
.photo-empty-state h3 { margin: 0; color: var(--admin-text); font-size: 14px; }
.photo-empty-state p { max-width: 350px; margin: 0; font-size: 11px; }

.photo-workspace-header__copy { min-width: 0; }
.photo-workspace-header__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.photo-workspace-back { display: inline-flex; align-items: center; gap: 4px; color: var(--admin-primary); font-size: 11px; font-weight: 650; }
.photo-workspace-back .admin-icon { width: 13px; height: 13px; }
.photo-job-context { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.photo-job-context > div { display: grid; min-width: 0; gap: 3px; padding: 13px 16px; border-right: 1px solid var(--admin-border); }
.photo-job-context > div:last-child { border-right: 0; }
.photo-job-context small,
.photo-job-context span { color: var(--admin-muted); font-size: 10.5px; line-height: 1.3; }
.photo-job-context strong { overflow: hidden; color: var(--admin-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.photo-workspace-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr); gap: 16px; align-items: stretch; }
.photo-upload-panel { padding: 17px; }
.photo-upload-panel__header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.photo-upload-panel__header > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 9px; color: var(--admin-primary); background: #eaf1ff; }
.photo-upload-panel__header .admin-icon { width: 18px; height: 18px; }
.photo-upload-panel__header p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.photo-upload-panel__fields { display: block; }
.photo-upload-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.photo-upload-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 32px; }
.photo-upload-empty[hidden], .photo-upload-selection[hidden], .photo-upload-validation[hidden] { display: none; }
.photo-upload-empty small { color: var(--admin-muted); font-size: 10.5px; }
.photo-upload-validation { margin: 9px 0 0; padding: 8px 10px; font-size: 11px; }
.photo-upload-selection { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px; border: 1px solid #c8d9ec; border-radius: 10px; background: #f6faff; }
.photo-upload-selection[hidden] { display: none; }
.photo-upload-selection img { display: block; width: 86px; height: 64px; border-radius: 6px; object-fit: cover; background: #e9eff5; }
.photo-upload-selection > div { display: grid; min-width: 0; gap: 3px; }
.photo-upload-selection strong { overflow: hidden; color: var(--admin-text); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.photo-upload-selection small { color: var(--admin-muted); font-size: 10.5px; }
.photo-upload-selection__actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }

/* Each charge area is its own CRM card; the parent is intentionally not a fifth white surface. */
.completion-charges-workspace { display: grid; max-width: 1080px; gap: 20px; margin: 0 auto 24px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.completion-charges-card { display: grid; gap: 17px; margin: 0; padding: 22px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.completion-charges-card--service { border-top: 4px solid #5786c7; }
.completion-charges-card--extras { border-top: 4px solid #b9822a; }
.completion-charges-card--chemicals { border-top: 4px solid #3d8b78; }
.completion-charges-card--total { border-top: 4px solid var(--admin-primary); }
.completion-charges-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.completion-charges-card__header h2 { margin: 2px 0 5px; }
.completion-charges-card__header p:last-child { max-width: 720px; margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
.completion-charges-card__amount { display: grid; flex: 0 0 auto; gap: 3px; min-width: 148px; padding: 11px 13px; border: 1px solid #dbe5f0; border-radius: 9px; background: #f8fbff; text-align: right; }
.completion-charges-card__amount span { color: var(--admin-muted); font-size: 10px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
.completion-charges-card__amount strong { color: var(--admin-text); font-size: 19px; }
.completion-charges-empty-state { display: flex; align-items: center; min-height: 64px; margin: 0; padding: 14px 15px; border: 1px dashed #cbd8e6; border-radius: 10px; color: var(--admin-muted); background: #f8fbfe; font-size: 12px; line-height: 1.45; }
.completion-charge-line { position: relative; display: grid; grid-template-columns: minmax(190px, 1.8fr) repeat(2, minmax(105px, .7fr)) minmax(190px, 1.4fr); gap: 12px; align-items: end; margin: 10px 0; padding: 16px 48px 15px 15px; border: 1px solid #dce6f0; border-radius: 11px; background: #fbfcfe; box-shadow: 0 1px 2px rgba(21, 45, 73, .03); }
.completion-charge-line--chemical { grid-template-columns: minmax(180px, 1.5fr) minmax(120px, .8fr) repeat(2, minmax(100px, .65fr)) minmax(145px, 1fr) minmax(175px, 1.35fr); }
.completion-charge-line .form-field { margin: 0; min-width: 0; }
.completion-charge-line .form-label { color: #607085; font-size: 10px; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.completion-charge-line .form-label small { color: var(--admin-muted); font-size: 9px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.completion-charge-line__remove { position: absolute; top: 10px; right: 12px; padding: 0; border: 0; color: #a52a2a; background: transparent; font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; }
.completion-charge-line__remove:hover, .completion-charge-line__remove:focus-visible { color: #7b1515; text-decoration: underline; }
.completion-total-card { border-color: #bcd0ea; background: linear-gradient(135deg, #f5f9ff, #fff); box-shadow: 0 8px 22px rgba(33, 93, 165, .1); }
.completion-total-breakdown { display: grid; gap: 0; margin: 0; border: 1px solid #d9e5f2; border-radius: 10px; overflow: hidden; }
.completion-total-breakdown > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 42px; padding: 10px 13px; border-bottom: 1px solid #dce7f2; }
.completion-total-breakdown > div:last-child { min-height: 58px; border-bottom: 0; background: #eaf3ff; }
.completion-total-breakdown dt { color: var(--admin-muted); font-size: 12px; font-weight: 650; }
.completion-total-breakdown dd { margin: 0; color: var(--admin-text); font-size: 13px; font-variant-numeric: tabular-nums; }
.completion-total-breakdown > div:last-child dt { color: var(--admin-primary); font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.completion-total-breakdown > div:last-child strong { color: var(--admin-primary); font-size: 21px; }
.completion-total-card__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.completion-total-card__secondary-actions, .completion-total-card__primary-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.completion-total-card__save { border-color: #a9c5e6; color: var(--admin-primary); background: #f3f8fe; }

.photo-job-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 11px; padding: 18px; }
.photo-job-summary__icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: #16708a; background: #e7f7fb; }
.photo-job-summary__icon .admin-icon { width: 19px; height: 19px; }
.photo-job-summary div { display: grid; gap: 2px; }
.photo-job-summary small,
.photo-job-summary p,
.photo-job-summary__latest { margin: 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
.photo-job-summary strong { color: var(--admin-text); font-size: 24px; line-height: 1; }
.photo-job-summary__latest { grid-column: 1 / -1; padding-top: 11px; border-top: 1px solid var(--admin-border); }
.photo-gallery--job { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.photo-preview-dialog { width: min(960px, calc(100vw - 32px)); max-width: none; max-height: min(90vh, 900px); padding: 0; overflow: hidden; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 24px 80px rgba(16, 35, 68, 0.35); }
.photo-preview-dialog::backdrop { background: rgba(10, 25, 50, 0.62); }
.photo-preview-dialog__frame { display: grid; max-height: min(90vh, 900px); }
.photo-preview-dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 15px 17px; border-bottom: 1px solid var(--admin-border); }
.photo-preview-dialog__header h2 { margin: 2px 0 3px; color: var(--admin-text); font-size: 16px; }
.photo-preview-dialog__header p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.photo-preview-dialog__close { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border: 1px solid var(--admin-border); border-radius: 8px; color: var(--admin-text); background: #fff; cursor: pointer; }
.photo-preview-dialog__close .admin-icon { width: 17px; height: 17px; }
.photo-preview-dialog__image-wrap { display: grid; min-height: 200px; place-items: center; overflow: auto; background: #f3f6fa; }
.photo-preview-dialog__image-wrap img { display: block; max-width: 100%; max-height: calc(90vh - 102px); object-fit: contain; }

@media screen and (max-width: 1320px) {
  .photo-filter-grid { grid-template-columns: 1fr; }
  .photo-filter-advanced__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photo-workspace-grid { grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr); }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.photo-library-page),
  .admin-main:has(.photo-workspace) { padding-top: 12px; }
  .photo-library-page,
  .photo-workspace { gap: 12px; }
  .photo-library-header,
  .photo-workspace-header { align-items: stretch; flex-direction: column; padding: 14px; }
  .photo-library-header h1,
  .photo-workspace-header h1 { font-size: 21px; }
  .photo-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-summary-strip article { min-height: 74px; gap: 8px; padding: 11px; border-bottom: 1px solid var(--admin-border); }
  .photo-summary-strip article:nth-child(2n) { border-right: 0; }
  .photo-summary-strip article:nth-last-child(-n + 2) { border-bottom: 0; }
  .photo-summary-strip__icon { width: 33px; height: 33px; }
  .photo-summary-strip strong { font-size: 19px; }
  .photo-library-directory__header,
  .photo-job-gallery-section > header { align-items: flex-start; padding: 13px; }
  .photo-filter-grid { grid-template-columns: 1fr; padding: 12px; }
  .photo-filter-advanced { margin-top: -2px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .photo-filter-advanced__summary { display: flex; align-items: center; min-height: 42px; gap: 6px; padding: 0 12px; color: var(--admin-text); font-size: 12px; font-weight: 600; list-style: none; cursor: pointer; }
  .photo-filter-advanced__summary::-webkit-details-marker { display: none; }
  .photo-filter-advanced__summary::after { content: "⌄"; margin-left: auto; color: var(--admin-muted); font-size: 16px; }
  .photo-filter-advanced[open] .photo-filter-advanced__summary { border-bottom: 1px solid var(--admin-border); }
  .photo-filter-advanced[open] .photo-filter-advanced__summary::after { content: "⌃"; }
  .photo-filter-advanced__summary strong { color: var(--admin-primary); font-size: 11px; }
  .photo-filter-advanced__hint { color: var(--admin-muted); font-size: 10.5px; font-weight: 500; }
  .photo-filter-advanced__fields { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .photo-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .photo-filter-actions .btn:only-child { grid-column: 1 / -1; }
  .photo-gallery { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .photo-gallery-card__body { padding: 11px; }
  .photo-gallery-card__body > strong { overflow: visible; white-space: normal; }
  .photo-workspace-header__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .photo-workspace-header__actions .btn { justify-content: center; }
  .photo-job-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-job-context > div { padding: 12px; border-bottom: 1px solid var(--admin-border); }
  .photo-job-context > div:nth-child(2n) { border-right: 0; }
  .photo-job-context > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .photo-workspace-grid { grid-template-columns: 1fr; gap: 12px; }
  .photo-upload-panel { padding: 14px; }
  .photo-upload-selection { grid-template-columns: 74px minmax(0, 1fr); }
  .photo-upload-selection img { width: 74px; height: 58px; }
  .completion-charges-workspace { gap: 14px; margin-bottom: 16px; }
  .completion-charges-card { gap: 14px; padding: 15px; }
  .completion-charges-card__header { display: grid; gap: 11px; }
  .completion-charges-card__amount { width: 100%; text-align: left; }
  .completion-total-card__actions { display: grid; gap: 9px; }
  .completion-total-card__secondary-actions, .completion-total-card__primary-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .completion-total-card__actions .btn { width: 100%; }
  .completion-charge-line, .completion-charge-line--chemical { grid-template-columns: 1fr 1fr; padding-top: 34px; }
  .photo-job-summary { padding: 14px; }
  .photo-preview-dialog { width: calc(100vw - 20px); }
  .photo-preview-dialog__header { padding: 13px; }
  .photo-preview-dialog__image-wrap img { max-height: calc(90vh - 95px); }
}

@media screen and (max-width: 420px) {
  .photo-summary-strip article { gap: 7px; padding: 10px 9px; }
  .photo-summary-strip small,
  .photo-summary-strip em { font-size: 9.5px; }
  .photo-gallery-card__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Phase 4B.1: Keep Job Detail actions inside the mobile viewport. */
@media screen and (max-width: 600px) {
  .job-workspace-hero .job-detail-more .job-actions-menu__panel {
    position: absolute;
    top: auto;
    right: 0;
    bottom: calc(100% + 7px);
    left: auto;
    width: 205px;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
}

/* Phase 4C: Water Test field workspace and safe settings editor. */
.water-workspace,
.water-settings-workspace {
  display: grid;
  gap: 14px;
  width: 100%;
}

.water-workspace-card,
.water-context-grid,
.water-reading-group,
.water-settings-section,
.water-settings-warning,
.water-settings-overview {
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--admin-card-shadow);
}

.water-workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.8fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 20px;
}

.water-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--admin-primary);
  font-size: 11px;
  font-weight: 700;
}

.water-back-link .admin-icon {
  width: 14px;
  height: 14px;
}

.water-workspace-hero__identity .admin-kicker,
.water-reading-group__header .admin-kicker,
.water-results-panel .admin-kicker {
  margin: 0 0 3px;
}

.water-workspace-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.water-workspace-title-row h1,
.water-workspace-hero__identity > h1 {
  margin: 0;
  color: var(--admin-text);
  font-size: clamp(23px, 2vw, 31px);
  letter-spacing: -0.035em;
}

.water-workspace-hero__identity > p:last-child {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
}

/* Standalone customer headings must contain supported unbroken names. */
.page-client-water-test .water-workspace-hero__identity {
  min-width: 0;
}

.page-client-water-test .water-workspace-hero__identity > h1 {
  overflow-wrap: anywhere;
}

/* The same names remain readable when the saved test opens its Water Report. */
.report-view-workspace--water .report-view-toolbar > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.service-report-page--water .service-report-card {
  min-width: 0;
}

.service-report-page--water .service-report-meta strong,
.service-report-page--water .service-info-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.water-workspace-hero__meta {
  display: grid;
  gap: 9px;
}

.water-workspace-hero__meta > div {
  display: grid;
  gap: 2px;
}

.water-workspace-hero__meta small,
.water-context-card small {
  color: var(--admin-muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.water-workspace-hero__meta strong {
  color: var(--admin-text);
  font-size: 11.5px;
}

.water-workspace-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.water-workspace-hero__actions .btn,
.water-form-actions .btn {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 11.5px;
}

.water-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.water-context-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 82px;
  padding: 13px 16px;
  border-right: 1px solid var(--admin-border);
}

.water-context-card:last-child {
  border-right: 0;
}

.water-context-card > span {
  display: inline-grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border-radius: 10px;
  background: #edf4ff;
  color: #1760dd;
}

.water-context-card > span .admin-icon {
  width: 17px;
  height: 17px;
}

.water-context-card div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.water-context-card strong {
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-size: 12.5px;
}

.water-context-card p {
  margin: 0;
  color: var(--admin-muted);
  font-size: 10px;
  line-height: 1.4;
}

.water-test-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding-bottom: 4px;
}

.water-test-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(300px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 15px 18px;
}

.water-test-toolbar--client {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.water-test-toolbar .client-form-context__status {
  align-self: center;
  justify-self: end;
}

.water-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.water-workspace-layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.water-workspace-main,
.water-results-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.water-results-panel {
  position: sticky;
  top: 74px;
}

.water-reading-group {
  overflow: hidden;
}

.water-reading-group__header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--admin-border);
  background: #fbfcfe;
}

.water-reading-group__header h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 14px;
}

.water-reading-group__header > p {
  max-width: 460px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: right;
}

.water-reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.water-reading-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4eaf2;
  border-radius: 11px;
  background: #fff;
}

.water-reading-card--low,
.water-reading-card--high {
  border-color: #f1d6af;
  background: #fffaf2;
}

.water-reading-card--ok {
  border-color: #cde9db;
  background: #f7fcf9;
}

.water-reading-card.is-calculated {
  background: #f6f8fb;
}

.water-reading-card__header {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.water-reading-card__header > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.water-reading-card__header strong {
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-size: 11.5px;
}

.water-reading-card__header small {
  color: var(--admin-muted);
  font-size: 9px;
  line-height: 1.35;
}

.water-status-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf1f6;
  color: #64748b;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.water-status-badge--ok {
  background: #e2f6eb;
  color: #087547;
}

.water-status-badge--low,
.water-status-badge--high {
  background: #fff0dc;
  color: #a85a00;
}

.water-reading-card__control {
  position: relative;
  display: block;
}

.water-reading-card__control .client-field__control {
  min-height: 43px;
  padding-right: 54px;
  font-size: 14px;
  font-weight: 700;
}

.water-reading-card__control .client-field__control[readonly] {
  color: #53627a;
  background: #eef2f7;
  cursor: default;
}

.water-reading-card__unit {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.water-reading-card__target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
}

.water-reading-card__target small {
  grid-column: 1 / -1;
  color: var(--admin-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.water-reading-card__target strong {
  color: #31415e;
  font-size: 10.5px;
}

.water-reading-card__target span {
  color: var(--admin-muted);
  font-size: 9.5px;
}

.water-workspace .water-condition-panel {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--admin-card-shadow);
}

.water-workspace .water-condition-panel .admin-panel__header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--admin-border);
  background: #fbfcfe;
}

.water-workspace .water-condition-panel .admin-panel__header h2 {
  margin: 0;
  font-size: 14px;
}

.water-workspace .water-condition-panel .admin-panel__header p {
  margin: 3px 0 0;
  font-size: 10.5px;
}

.water-workspace .water-condition-grid {
  gap: 8px;
  padding: 12px;
}

.water-workspace .water-condition-switch {
  min-height: 52px;
  padding: 10px 11px;
  border-radius: 10px;
}

.water-workspace .water-condition-switch strong {
  font-size: 10.5px;
}

.water-workspace .water-condition-switch small {
  font-size: 8.5px;
}

.water-notes-card {
  padding: 15px 16px;
}

.water-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.water-results-summary,
.water-recommendation-panel {
  padding: 15px;
}

.water-results-summary > header,
.water-recommendation-panel > header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.water-results-summary h2,
.water-recommendation-panel h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.25;
}

.water-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
}

.water-summary-grid > div {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-right: 1px solid var(--admin-border);
  text-align: center;
}

.water-summary-grid > div:last-child {
  border-right: 0;
}

.water-summary-grid strong {
  color: var(--admin-text);
  font-size: 17px;
}

.water-summary-grid span {
  color: var(--admin-muted);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.water-results-summary > p {
  margin: 10px 0 0;
  font-size: 9.5px;
}

.water-recommendation-panel .service-notice,
.water-recommendation-panel .service-choice-panel,
.water-recommendation-panel .service-treatment-grid {
  margin-top: 10px;
}

.water-recommendation-panel .service-choice-grid,
.water-recommendation-panel .service-treatment-grid {
  grid-template-columns: minmax(0, 1fr);
}

.water-recommendation-panel .service-choice-or {
  margin: -2px auto;
}

.water-recommendation-panel .service-treatment,
.water-recommendation-panel .service-choice-panel,
.water-recommendation-panel .service-notice,
.water-recommendation-panel .service-report-card {
  padding: 11px;
  border-radius: 10px;
}

.water-recommendation-panel .service-treatment h3,
.water-recommendation-panel .service-report-card h3 {
  font-size: 11.5px;
}

.water-recommendation-panel .service-dose {
  font-size: 17px;
}

.water-recommendation-panel .service-treatment p,
.water-recommendation-panel .service-notice,
.water-recommendation-panel .service-choice-panel__header span,
.water-recommendation-panel .service-report-card p {
  font-size: 9.5px;
  line-height: 1.45;
}

.water-empty-result {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px dashed #cdd8e8;
  border-radius: 11px;
  background: #f8fafd;
  text-align: center;
}

.water-empty-result > span {
  display: inline-grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 50%;
  background: #e7f2ff;
  color: #1760dd;
}

.water-empty-result strong {
  color: var(--admin-text);
  font-size: 12px;
}

.water-empty-result p {
  max-width: 310px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 10px;
  line-height: 1.5;
}

.water-form-actions {
  position: sticky;
  bottom: 10px;
  z-index: 8;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px;
  border: 1px solid #dbe4f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(21, 43, 84, 0.14);
  backdrop-filter: blur(8px);
}

.water-settings-header {
  margin: 0;
}

.water-settings-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 13px 16px;
  border-color: #f0d7a8;
  background: #fffaf0;
}

.water-settings-warning > span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #ffedca;
  color: #a55b00;
}

.water-settings-warning strong {
  color: #5d3b0b;
  font-size: 11.5px;
}

.water-settings-warning p {
  margin: 2px 0 0;
  color: #7b5d30;
  font-size: 10px;
  line-height: 1.45;
}

.water-settings-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.water-settings-overview a {
  display: flex;
  min-height: 70px;
  gap: 10px;
  align-items: center;
  padding: 12px 15px;
  border-right: 1px solid var(--admin-border);
  color: inherit;
}

.water-settings-overview a:last-child {
  border-right: 0;
}

.water-settings-overview a > span {
  display: inline-grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border-radius: 9px;
  background: #edf4ff;
  color: #1760dd;
}

.water-settings-overview a > div {
  display: grid;
  gap: 1px;
}

.water-settings-overview strong {
  color: var(--admin-text);
  font-size: 17px;
}

.water-settings-overview small {
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 700;
}

.water-settings-section {
  overflow: hidden;
  scroll-margin-top: 75px;
}

.water-settings-section > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
}

.water-settings-section > summary::-webkit-details-marker,
.water-settings-editor > summary::-webkit-details-marker,
.water-settings-create > summary::-webkit-details-marker {
  display: none;
}

.water-settings-section > summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.water-settings-section > summary strong {
  color: var(--admin-text);
  font-size: 13.5px;
}

.water-settings-section > summary small {
  color: var(--admin-muted);
  font-size: 10px;
}

.water-settings-section__icon {
  display: inline-grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 10px;
  background: #e8f1ff;
  color: #1760dd;
}

.water-settings-section__icon--cyan { background: #e6f9fb; color: #0b8494; }
.water-settings-section__icon--orange { background: #fff1dc; color: #b56800; }
.water-settings-section__icon--violet { background: #f2ebff; color: #6e3bd1; }

.water-settings-section__count {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #5d6b82;
  font-size: 9.5px;
  font-weight: 700;
}

.water-settings-section__chevron .admin-icon,
.water-settings-editor > summary > span:last-child .admin-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.18s ease;
}

.water-settings-section[open] > summary .water-settings-section__chevron .admin-icon,
.water-settings-editor[open] > summary > span:last-child .admin-icon {
  transform: rotate(180deg);
}

.water-settings-section__body {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--admin-border);
  background: #f8fafd;
}

.water-settings-editor-list,
.water-settings-save-form {
  display: grid;
  gap: 9px;
}

.water-settings-editor {
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 10px;
  background: #fff;
}

.water-settings-editor > summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(110px, 0.55fr) auto auto;
  gap: 11px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
}

.water-settings-editor > summary > span:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.water-settings-editor > summary strong {
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-size: 11.5px;
}

.water-settings-editor > summary small,
.water-settings-editor__range {
  color: var(--admin-muted);
  font-size: 9.5px;
}

.water-settings-editor__state {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f0f2f6;
  color: #68758a;
  font-size: 8.5px;
  font-weight: 800;
}

.water-settings-editor__state.is-active {
  background: #e2f6eb;
  color: #087547;
}

.water-settings-editor__body {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--admin-border);
  background: #fbfcfe;
}

.water-settings-editor__actions,
.water-settings-form-actions {
  display: flex;
  justify-content: flex-end;
}

.water-settings-formula-note {
  padding: 10px 12px;
  border: 1px solid #d8e5f6;
  border-radius: 9px;
  background: #f2f7ff;
  color: #52627a;
  font-size: 10px;
  line-height: 1.5;
}

.water-settings-create {
  overflow: hidden;
  border: 1px dashed #b9c9df;
  border-radius: 10px;
  background: #fff;
}

.water-settings-create > summary {
  display: flex;
  min-height: 44px;
  gap: 7px;
  align-items: center;
  padding: 10px 12px;
  color: var(--admin-primary);
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.water-settings-create > summary .admin-icon {
  width: 15px;
  height: 15px;
}

.water-settings-create > form {
  display: grid;
  gap: 13px;
  padding: 14px;
  border-top: 1px solid var(--admin-border);
}

.water-settings-workspace .admin-form-grid {
  gap: 12px;
}

.water-settings-workspace .form-input,
.water-settings-workspace .form-select,
.water-settings-workspace .form-textarea {
  font-size: 11px;
}

@media screen and (max-width: 1200px) {
  .water-workspace-hero { grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr); }
  .water-workspace-hero__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .water-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-context-card:nth-child(2) { border-right: 0; }
  .water-context-card:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .water-workspace-layout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr); }
  .water-reading-grid { grid-template-columns: minmax(0, 1fr); }
  .water-test-toolbar--client { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-test-toolbar--client .client-form-context__status { justify-self: start; }
}

@media screen and (max-width: 900px) {
  .water-workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .water-results-panel { position: static; }
  .water-reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-settings-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-settings-overview a:nth-child(2) { border-right: 0; }
  .water-settings-overview a:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.water-workspace),
  .admin-main:has(.water-settings-workspace) { padding-top: 12px; }
  .water-workspace,
  .water-settings-workspace { gap: 11px; }
  .water-workspace-hero { grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 14px; }
  .water-workspace-hero__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-workspace-hero__actions .btn:only-child { grid-column: 1 / -1; }
  .water-workspace-hero__actions .btn { justify-content: center; }
  .water-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-context-card { min-height: 86px; padding: 11px; }
  .water-context-card > span { width: 32px; height: 32px; }
  .water-test-toolbar,
  .water-test-toolbar--client { grid-template-columns: minmax(0, 1fr); padding: 13px; }
  .water-test-toolbar .client-form-context__status { justify-self: start; }
  .water-reading-group__header { align-items: flex-start; flex-direction: column; gap: 4px; padding: 12px 13px; }
  .water-reading-group__header > p { text-align: left; }
  .water-reading-grid { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .water-reading-card { padding: 11px; }
  .water-reading-card__control .client-field__control { min-height: 46px; font-size: 16px; }
  .water-workspace .water-condition-grid { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  .water-workspace .water-condition-switch { min-height: 50px; }
  .water-note-grid { grid-template-columns: minmax(0, 1fr); }
  .water-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-summary-grid > div:nth-child(2) { border-right: 0; }
  .water-summary-grid > div:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .water-form-actions { bottom: 8px; display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
  .water-form-actions .btn { min-height: 44px; justify-content: center; }
  .water-settings-header { padding: 0 2px; }
  .water-settings-warning { align-items: flex-start; padding: 12px; }
  .water-settings-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .water-settings-overview a { min-height: 67px; padding: 10px; }
  .water-settings-section > summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; padding: 11px; }
  .water-settings-section__count { grid-column: 2; justify-self: start; }
  .water-settings-section__chevron { grid-column: 3; grid-row: 1 / 3; }
  .water-settings-section__body { padding: 10px; }
  .water-settings-editor > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 10px; }
  .water-settings-editor__range { grid-column: 1; }
  .water-settings-editor__state { grid-column: 2; grid-row: 1; }
  .water-settings-editor > summary > span:last-child { grid-column: 2; grid-row: 2; justify-self: end; }
  .water-settings-editor__body,
  .water-settings-create > form { padding: 11px; }
  .water-settings-editor__actions .btn,
  .water-settings-form-actions .btn,
  .water-settings-create > form > .btn { width: 100%; }
}

@media screen and (max-width: 420px) {
  .water-workspace-hero__actions { grid-template-columns: minmax(0, 1fr); }
  .water-context-grid { grid-template-columns: minmax(0, 1fr); }
  .water-context-card { border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .water-context-card:nth-child(2) { border-right: 0; }
  .water-context-card:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .water-context-card:last-child { border-bottom: 0; }
  .water-settings-overview { grid-template-columns: minmax(0, 1fr); }
  .water-settings-overview a { border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .water-settings-overview a:last-child { border-bottom: 0; }
  .water-form-actions { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 4D: Reports registry, job workspace, builder, delivery, and settings. */
.report-registry-page,
.report-job-workspace,
.report-form-workspace,
.report-view-workspace,
.report-settings-workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--admin-text);
}

.report-registry-page,
.report-job-workspace,
.report-form-workspace,
.report-settings-workspace {
  display: grid;
  gap: 14px;
}

.report-registry-header,
.report-job-hero,
.report-form-hero,
.report-view-toolbar,
.report-settings-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.report-registry-header h1,
.report-job-hero h1,
.report-form-hero h1,
.report-view-toolbar h1,
.report-settings-hero h1 {
  margin: 2px 0 4px;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.1;
}

.report-registry-header p,
.report-job-hero p,
.report-form-hero p,
.report-view-toolbar p,
.report-settings-hero p {
  margin: 0;
  color: var(--admin-muted);
}

.report-registry-header .btn,
.report-job-hero__actions .btn,
.report-form-hero__actions .btn,
.report-view-toolbar__actions .btn,
.report-settings-hero .btn {
  white-space: nowrap;
}

.report-summary-strip,
.report-form-context,
.report-job-context {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-card-shadow);
}

.report-summary-strip,
.report-form-context {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-job-context {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-summary-strip article,
.report-form-context article,
.report-job-context article {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-right: 1px solid var(--admin-border);
}

.report-summary-strip article:last-child,
.report-form-context article:last-child,
.report-job-context article:last-child {
  border-right: 0;
}

.report-summary-strip article > span:last-child,
.report-form-context article > div,
.report-job-context article > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.report-summary-strip small,
.report-form-context small,
.report-job-context small,
.report-job-hero__meta small {
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.report-summary-strip strong,
.report-form-context strong,
.report-job-context strong,
.report-job-hero__meta strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.25;
}

.report-summary-strip em,
.report-form-context em,
.report-job-context em {
  overflow-wrap: anywhere;
  color: var(--admin-muted);
  font-size: 11px;
  font-style: normal;
}

.report-summary-strip__icon,
.report-form-context article > span,
.report-job-context article > span,
.report-builder-section__icon,
.report-delivery-panel__icon,
.report-settings-section__icon {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #eef4ff;
  color: var(--admin-primary);
}

.report-summary-strip__icon svg,
.report-form-context article > span svg,
.report-job-context article > span svg,
.report-builder-section__icon svg,
.report-delivery-panel__icon svg,
.report-settings-section__icon svg {
  width: 18px;
  height: 18px;
}

.report-summary-strip__icon--violet { background: #f3edff; color: #7b3fe4; }
.report-summary-strip__icon--cyan { background: #e8f8ff; color: #1689c8; }
.report-summary-strip__icon--green { background: var(--admin-success-soft); color: var(--admin-success); }
.report-summary-strip__icon--amber { background: var(--admin-warning-soft); color: var(--admin-warning); }

.report-directory,
.report-version-directory,
.report-builder-section,
.report-builder-preview,
.report-delivery-panel,
.report-settings-section,
.report-settings-preview {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-card-shadow);
}

.report-directory__header,
.report-version-directory > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--admin-border);
}

.report-directory__header h2,
.report-version-directory h2,
.report-builder-section h2,
.report-builder-preview h2,
.report-settings-preview h2 {
  margin: 0;
  font-size: 16px;
}

.report-directory__header p,
.report-version-directory header p,
.report-builder-section header p,
.report-builder-preview header p,
.report-settings-preview header p {
  margin: 2px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
}

.report-filter-clear,
.report-back-link,
.report-settings-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-primary);
  font-size: 12px;
  font-weight: 700;
}

.report-back-link { margin-bottom: 8px; }
.report-back-link svg,
.report-filter-clear svg,
.report-settings-link svg { width: 15px; height: 15px; }

.report-filter-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.55fr) minmax(0, 1.45fr);
  gap: 12px;
  align-items: end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border);
  background: #fbfcff;
}

.report-filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.report-filter-field--search { align-self: start; }

.report-filter-field > span:first-child {
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.report-filter-field input,
.report-filter-field select {
  width: 100%;
  min-width: 0;
  height: var(--admin-control-height);
  padding: 0 11px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-text);
}

.report-filter-search-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  background: var(--admin-surface);
  color: var(--admin-muted);
}

.report-filter-search-control svg { width: 16px; height: 16px; margin-left: 11px; }
.report-filter-search-control input { border: 0; background: transparent; }
.report-filter-search-control input:focus { outline: 0; }

.report-filter-advanced > summary { display: none; }
.report-filter-advanced__fields { display: grid; grid-template-columns: repeat(4, minmax(115px, 1fr)); gap: 8px; align-items: end; }
.report-filter-actions { display: flex; gap: 6px; }

.report-table-shell { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.report-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: 0.045em; }
.report-table td { padding: 11px 12px; border-bottom: 1px solid var(--admin-border); vertical-align: middle; overflow-wrap: anywhere; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table tbody tr:hover { background: #f8faff; }
.report-table th:nth-child(1) { width: 18%; }
.report-table th:nth-child(2) { width: 10%; }
.report-table th:nth-child(3) { width: 16%; }
.report-table th:nth-child(4) { width: 13%; }
.report-table th:nth-child(5) { width: 13%; }
.report-table th:nth-child(6) { width: 13%; }
.report-table th:nth-child(7) { width: 17%; }
.report-table td strong,
.report-table td small { display: block; }
.report-table td small { margin-top: 3px; color: var(--admin-muted); font-size: 11px; }
.report-table td a:not(.btn) { color: var(--admin-primary); font-weight: 700; }
.report-table__actions { display: flex; flex-wrap: wrap; gap: 6px; }

.report-type-badge,
.report-delivery-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--admin-warning-soft);
  color: #a66211;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.report-type-badge svg { width: 13px; height: 13px; }
.report-type-badge--work { background: #f3edff; color: #7138c9; }
.report-type-badge--water { background: #e8f8ff; color: #147cad; }
.report-delivery-badge--sent { background: var(--admin-success-soft); color: #087d4c; }

.report-card-list { display: none; }
.report-empty-state { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 7px; padding: 30px; text-align: center; }
.report-empty-state > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #eef4ff; color: var(--admin-primary); }
.report-empty-state h3,
.report-empty-state p { margin: 0; }
.report-empty-state p { max-width: 520px; color: var(--admin-muted); }
.report-empty-state--compact { min-height: 190px; }

.report-job-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.65fr) auto;
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-card-shadow);
}

.report-job-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.report-job-hero__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-job-hero__meta > div { display: grid; align-content: center; gap: 4px; padding: 10px 12px; border-left: 1px solid var(--admin-border); }
.report-job-hero__actions,
.report-form-hero__actions,
.report-view-toolbar__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

.report-availability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-availability-card { display: grid; align-content: start; gap: 16px; min-height: 230px; padding: 16px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.report-availability-card.is-secondary { background: #fbfcff; }
.report-availability-card > header { display: flex; align-items: center; gap: 11px; }
.report-availability-card h2,
.report-availability-card p { margin: 0; }
.report-availability-card header p,
.report-availability-state p { color: var(--admin-muted); }
.report-availability-state { display: grid; align-content: start; gap: 7px; }
.report-availability-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.report-version-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(180px, 0.45fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 12px 16px; border-bottom: 1px solid var(--admin-border); }
.report-version-list article:last-child { border-bottom: 0; }
.report-version-list__icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #eef4ff; color: var(--admin-primary); }
.report-version-list article p,
.report-version-list article small { margin: 2px 0 0; color: var(--admin-muted); overflow-wrap: anywhere; }
.report-version-list__delivery { display: grid; justify-items: start; gap: 3px; }

.report-form-hero,
.report-view-toolbar,
.report-settings-hero { padding: 2px; }

.report-builder-layout,
.report-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.report-builder-main,
.report-settings-sections { display: grid; gap: 14px; }
.report-builder-section { padding: 16px; }
.report-builder-section > header,
.report-builder-preview > section > header,
.report-settings-preview > header { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.report-builder-section--internal { border-color: #f1d8a8; background: #fffdf8; }
.report-builder-section .form-label small { margin-left: 5px; color: var(--admin-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.report-upload-grid { align-items: start; }

.report-builder-preview,
.report-settings-preview { position: sticky; top: calc(var(--admin-topbar-height) + 14px); overflow: hidden; }
.report-builder-preview > section,
.report-settings-preview { padding: 16px; }
.report-builder-preview > section + section { border-top: 1px solid var(--admin-border); }
.report-builder-preview__details { display: grid; gap: 0; margin: 0; }
.report-builder-preview__details > div { display: grid; grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--admin-border); }
.report-builder-preview__details > div:last-child { border-bottom: 0; }
.report-builder-preview__details dt { color: var(--admin-muted); }
.report-builder-preview__details dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.report-builder-preview__empty { display: grid; justify-items: center; gap: 8px; padding: 18px; border-radius: 10px; background: #f7f9fd; color: var(--admin-muted); text-align: center; }
.report-builder-preview__empty svg { width: 24px; height: 24px; }
.report-settings-link { padding: 12px 16px; border-top: 1px solid var(--admin-border); background: #fbfcff; }

.report-builder-actions,
.report-settings-actions {
  position: sticky;
  z-index: 8;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 35px rgba(13, 25, 57, 0.12);
  backdrop-filter: blur(12px);
}
.report-builder-actions > div,
.report-settings-actions > div { display: flex; align-items: center; gap: 8px; }
.report-builder-actions > div:first-child,
.report-settings-actions > div:first-child { display: grid; gap: 2px; }
.report-builder-actions small,
.report-settings-actions small { color: var(--admin-muted); }
[data-client-form-status].is-dirty { color: var(--admin-warning); }

.report-view-workspace { display: block; }
.report-view-toolbar { margin-bottom: 14px; }
.report-delivery-panel { display: grid; grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1.2fr); align-items: end; gap: 20px; margin-bottom: 10px; padding: 14px 16px; }
.report-delivery-panel__status { display: flex; min-width: 0; align-items: center; gap: 11px; }
.report-delivery-panel__status > div { min-width: 0; }
.report-delivery-panel__status small,
.report-delivery-panel__status strong { display: block; }
.report-delivery-panel__status small { color: var(--admin-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.report-delivery-panel__status strong { font-size: 17px; }
.report-delivery-panel__status p { margin: 2px 0 0; color: var(--admin-muted); overflow-wrap: anywhere; }
.report-delivery-panel__form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.report-view-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 auto 12px; }
.report-view-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--admin-border); border-radius: 999px; background: var(--admin-surface); color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.report-view-links a:hover { border-color: #b9cdf7; color: var(--admin-primary); }
.report-view-links svg { width: 14px; height: 14px; }

.report-settings-section { overflow: hidden; }
.report-settings-section > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 16px; cursor: pointer; list-style: none; }
.report-settings-section > summary::-webkit-details-marker { display: none; }
.report-settings-section > summary > span:nth-child(2) { display: grid; gap: 2px; }
.report-settings-section > summary small { color: var(--admin-muted); font-weight: 400; }
.report-settings-section > summary > svg { width: 16px; height: 16px; transition: transform 0.18s ease; }
.report-settings-section[open] > summary > svg { transform: rotate(180deg); }
.report-settings-section__body { padding: 16px; border-top: 1px solid var(--admin-border); }
.report-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.report-color-field,
.report-option-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 10px; }
.report-color-field > span:first-child,
.report-option-row > span { display: grid; gap: 2px; }
.report-color-field small,
.report-option-row small { color: var(--admin-muted); }
.report-color-field__control { display: flex; align-items: center; gap: 8px; }
.report-color-field input[type="color"] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; }
.report-color-field code { color: var(--admin-muted); font-size: 11px; }
.report-option-list { display: grid; gap: 10px; }
.report-option-row input[type="checkbox"] { width: 38px; height: 20px; accent-color: var(--admin-primary); }
.report-settings-preview { padding: 16px; }
.report-style-preview__brand { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 3px solid var(--report-accent); }
.report-style-preview__brand > div { display: grid; }
.report-style-preview__brand small { color: var(--admin-muted); }
.report-style-preview__logo { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--report-accent); color: #fff; }
.report-style-preview footer { padding-top: 9px; border-top: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 11px; }

@media screen and (max-width: 1400px) {
  .report-filter-grid { grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1.6fr); }
  .report-filter-advanced__fields { grid-template-columns: repeat(3, minmax(115px, 1fr)); }
  .report-filter-actions { grid-column: span 1; }
  .report-summary-strip article,
  .report-form-context article,
  .report-job-context article { padding: 12px; }
}

@media screen and (max-width: 1100px) {
  .report-summary-strip,
  .report-form-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-summary-strip article:nth-child(3),
  .report-form-context article:nth-child(3) { border-right: 0; }
  .report-summary-strip article:nth-child(-n + 3),
  .report-form-context article:nth-child(-n + 3) { border-bottom: 1px solid var(--admin-border); }
  .report-job-hero { grid-template-columns: minmax(0, 1fr) minmax(230px, 0.65fr); }
  .report-job-hero__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .report-builder-layout,
  .report-settings-layout { grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.7fr); }
  .report-table th:nth-child(6),
  .report-table td:nth-child(6) { width: 11%; }
  .report-delivery-panel { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 900px) {
  .report-builder-layout,
  .report-settings-layout { grid-template-columns: minmax(0, 1fr); }
  .report-builder-preview,
  .report-settings-preview { position: static; }
  .report-job-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-job-context article:nth-child(2) { border-right: 0; }
  .report-job-context article:nth-child(-n + 2) { border-bottom: 1px solid var(--admin-border); }
  .report-availability-grid { grid-template-columns: minmax(0, 1fr); }
  .report-version-list article { grid-template-columns: auto minmax(0, 1fr) auto; }
  .report-version-list__delivery { grid-column: 2; }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.report-registry-page),
  .admin-main:has(.report-job-workspace),
  .admin-main:has(.report-form-workspace),
  .admin-main:has(.report-view-workspace),
  .admin-main:has(.report-settings-workspace) { padding-top: 12px; }
  .report-registry-page,
  .report-job-workspace,
  .report-form-workspace,
  .report-settings-workspace { gap: 11px; }
  .report-registry-header,
  .report-form-hero,
  .report-view-toolbar,
  .report-settings-hero { align-items: flex-start; flex-direction: column; gap: 11px; }
  .report-registry-header .btn,
  .report-settings-hero .btn { width: 100%; justify-content: center; }
  .report-summary-strip,
  .report-form-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-summary-strip article,
  .report-form-context article { min-height: 82px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
  .report-summary-strip article:nth-child(2n),
  .report-form-context article:nth-child(2n) { border-right: 0; }
  .report-summary-strip article:last-child,
  .report-form-context article:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .report-summary-strip article:nth-last-child(2),
  .report-form-context article:nth-last-child(2) { border-bottom: 0; }
  .report-directory__header { align-items: flex-start; }
  .report-filter-grid { grid-template-columns: minmax(0, 1fr); padding: 11px; }
  .report-filter-advanced > summary { display: flex; min-height: 42px; align-items: center; gap: 5px; padding: 0 12px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); color: var(--admin-text); cursor: pointer; list-style: none; font-weight: 800; }
  .report-filter-advanced > summary::-webkit-details-marker { display: none; }
  .report-filter-advanced__summary strong { color: var(--admin-primary); }
  .report-filter-advanced__hint { margin-left: auto; color: var(--admin-muted); font-size: 11px; font-weight: 500; }
  .report-filter-advanced__fields { grid-template-columns: minmax(0, 1fr); padding-top: 10px; }
  .report-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filter-actions .btn { justify-content: center; }
  .report-table-shell { display: none; }
  .report-card-list { display: grid; gap: 10px; padding: 11px; }
  .report-mobile-card { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 11px; background: var(--admin-surface); }
  .report-mobile-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .report-mobile-card h3,
  .report-mobile-card p { margin: 0; overflow-wrap: anywhere; }
  .report-mobile-card p { color: var(--admin-muted); }
  .report-mobile-card dl { display: grid; gap: 6px; margin: 0; }
  .report-mobile-card dl > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px; }
  .report-mobile-card dt { color: var(--admin-muted); }
  .report-mobile-card dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
  .report-mobile-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .report-mobile-card__actions .btn { justify-content: center; }
  .report-job-hero { grid-template-columns: minmax(0, 1fr); padding: 13px; }
  .report-job-hero__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-job-hero__meta > div:first-child { border-left: 0; }
  .report-job-hero__actions,
  .report-form-hero__actions,
  .report-view-toolbar__actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-job-hero__actions .btn,
  .report-form-hero__actions .btn,
  .report-view-toolbar__actions .btn { justify-content: center; white-space: normal; text-align: center; }
  .report-version-list article { grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  .report-version-list__delivery { grid-column: 2; }
  .report-version-list article > .btn { grid-column: 1 / -1; justify-content: center; }
  .report-builder-section { padding: 13px; }
  .report-upload-grid { grid-template-columns: minmax(0, 1fr); }
  .report-builder-actions,
  .report-settings-actions { position: static; align-items: stretch; flex-direction: column; }
  .report-builder-actions > div:last-child,
  .report-settings-actions > div:last-child { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-builder-actions .btn,
  .report-settings-actions .btn { justify-content: center; }
  .report-delivery-panel { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .report-delivery-panel__form { grid-template-columns: minmax(0, 1fr); }
  .report-delivery-panel__form .btn { justify-content: center; }
  .report-view-links { justify-content: flex-start; }
  .report-color-grid { grid-template-columns: minmax(0, 1fr); }
  .report-settings-section > summary { padding: 12px; }
  .report-settings-section__body { padding: 12px; }
}

@media screen and (max-width: 420px) {
  .report-form-context,
  .report-job-context { grid-template-columns: minmax(0, 1fr); }
  .report-form-context article,
  .report-job-context article,
  .report-form-context article:nth-child(2n),
  .report-job-context article:nth-child(2n) { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .report-form-context article:last-child,
  .report-job-context article:last-child { border-bottom: 0; }
  .report-job-hero__meta,
  .report-job-hero__actions,
  .report-form-hero__actions,
  .report-view-toolbar__actions,
  .report-mobile-card__actions,
  .report-builder-actions > div:last-child,
  .report-settings-actions > div:last-child { grid-template-columns: minmax(0, 1fr); }
  .report-job-hero__meta > div { border-left: 0; border-top: 1px solid var(--admin-border); }
  .report-color-field,
  .report-option-row { align-items: flex-start; flex-direction: column; }
}

@media print {
  .report-view-workspace > .report-view-toolbar,
  .report-view-workspace > .report-delivery-panel,
  .report-view-workspace > .report-view-links { display: none !important; }
}

/* Phase 5A: Accounting financial operations workspace. */
.accounting-workspace {
  display: grid;
  width: 100%;
  max-width: none;
  gap: 14px;
  margin: 0;
  color: var(--admin-text);
}

.accounting-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.accounting-header h1 {
  margin: 2px 0 4px;
  font-size: clamp(24px, 2vw, 34px);
  line-height: 1.1;
}

.accounting-header p { margin: 0; color: var(--admin-muted); }
.accounting-header__actions { display: flex; align-items: center; gap: 8px; }
.accounting-header__actions .btn { white-space: nowrap; }
.accounting-header__actions svg { width: 16px; height: 16px; }

.accounting-period-bar,
.accounting-kpi-strip,
.accounting-overview-card,
.accounting-directory,
.accounting-definition-note {
  border: 1px solid var(--admin-border);
  border-radius: var(--admin-card-radius);
  background: var(--admin-surface);
  box-shadow: var(--admin-card-shadow);
}

.accounting-period-bar {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
}

.accounting-period-bar__nav { display: flex; align-items: center; gap: 10px; }
.accounting-period-bar__nav > a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  color: var(--admin-primary);
}
.accounting-period-bar__nav svg { width: 15px; height: 15px; }
.accounting-period-bar__nav > span { display: grid; min-width: 132px; gap: 1px; text-align: center; }
.accounting-period-bar small { color: var(--admin-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.accounting-period-bar__current { padding: 7px 10px; border-radius: 8px; background: #eef4ff; color: var(--admin-primary); font-size: 11px; font-weight: 800; }
.accounting-period-bar p { margin: 0; color: var(--admin-muted); font-size: 11px; text-align: right; }

.accounting-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}
.accounting-kpi-strip article { display: flex; min-width: 0; align-items: center; gap: 11px; padding: 14px 15px; border-right: 1px solid var(--admin-border); }
.accounting-kpi-strip article:last-child { border-right: 0; }
.accounting-kpi-strip article > span:last-child { display: grid; min-width: 0; gap: 2px; }
.accounting-kpi-strip small { color: var(--admin-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.accounting-kpi-strip strong { overflow-wrap: anywhere; font-size: clamp(17px, 1.4vw, 22px); line-height: 1.15; }
.accounting-kpi-strip em { overflow-wrap: anywhere; color: var(--admin-muted); font-size: 10px; font-style: normal; }
.accounting-kpi-strip__icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #eef4ff; color: var(--admin-primary); }
.accounting-kpi-strip__icon svg { width: 18px; height: 18px; }
.accounting-kpi-strip__icon--green { background: var(--admin-success-soft); color: var(--admin-success); }
.accounting-kpi-strip__icon--amber { background: var(--admin-warning-soft); color: var(--admin-warning); }
.accounting-kpi-strip__icon--cyan { background: #e8f8ff; color: #1689c8; }
.accounting-kpi-strip__icon--violet { background: #f3edff; color: #7b3fe4; }

.accounting-overview-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.9fr); gap: 14px; }
.accounting-overview-card { min-width: 0; overflow: hidden; }
.accounting-overview-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--admin-border); }
.accounting-overview-card h2,
.accounting-overview-card p { margin: 0; }
.accounting-overview-card h2 { font-size: 16px; }
.accounting-overview-card header p { margin-top: 2px; color: var(--admin-muted); font-size: 11px; }
.accounting-overview-card > header > span { color: var(--admin-primary); font-size: 18px; font-weight: 800; white-space: nowrap; }

.accounting-chart { position: relative; min-height: 210px; padding: 12px 20px 4px; }
.accounting-chart__svg { display: block; width: 100%; max-width: none; height: 210px; margin: 0; }
.accounting-chart__grid line { stroke: #e7edf7; stroke-width: 1; }
.accounting-chart__y-labels text,
.accounting-chart__x-labels text { fill: #8390a8; font-size: 9px; }
.accounting-chart__message { display: grid; min-height: 210px; place-items: center; align-content: center; gap: 4px; color: var(--admin-muted); text-align: center; }
.accounting-chart__message svg { width: 26px; height: 26px; color: var(--admin-primary); }
.accounting-chart__message strong { color: var(--admin-text); font-size: 18px; }
.accounting-chart__message small { color: var(--admin-muted); }
.accounting-overview-card--trend > footer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--admin-border); }
.accounting-overview-card--trend > footer > span { display: grid; gap: 2px; padding: 11px 14px; border-right: 1px solid var(--admin-border); }
.accounting-overview-card--trend > footer > span:last-child { border-right: 0; }
.accounting-overview-card--trend footer small { color: var(--admin-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.accounting-overview-card--trend footer strong { font-size: 14px; }

.accounting-payout-list { display: grid; }
.accounting-payout-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--admin-border); }
.accounting-payout-list > div:last-child { border-bottom: 0; }
.accounting-payout-list > div > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.accounting-payout-list small { color: var(--admin-muted); font-size: 10px; overflow-wrap: anywhere; }
.accounting-payout-list b { font-size: 13px; white-space: nowrap; }
.accounting-payout-list__avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #f3edff; color: #7b3fe4; font-size: 10px; font-weight: 800; }
.accounting-payout-list__empty { display: block !important; color: var(--admin-muted); text-align: center; }

.accounting-directory { overflow: hidden; }
.accounting-directory__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--admin-border); }
.accounting-directory__header h2,
.accounting-directory__header p { margin: 0; }
.accounting-directory__header h2 { font-size: 16px; }
.accounting-directory__header p { margin-top: 2px; color: var(--admin-muted); font-size: 11px; }
.accounting-directory__tabs { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: #f1f5fb; }
.accounting-directory__tabs a { padding: 6px 10px; border-radius: 7px; color: var(--admin-muted); font-size: 11px; font-weight: 800; }
.accounting-directory__tabs a.is-active { background: var(--admin-surface); color: var(--admin-primary); box-shadow: 0 1px 4px rgba(20, 39, 77, 0.12); }

.accounting-filter-grid { display: grid; grid-template-columns: minmax(240px, 0.7fr) 160px minmax(0, 1.7fr); gap: 10px; align-items: end; padding: 12px 16px; border-bottom: 1px solid var(--admin-border); background: #fbfcff; }
.accounting-filter-field { display: grid; min-width: 0; gap: 6px; }
.accounting-filter-field > span:first-child { color: var(--admin-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.accounting-filter-field input,
.accounting-filter-field select { width: 100%; min-width: 0; height: var(--admin-control-height); padding: 0 10px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); color: var(--admin-text); }
.accounting-filter-search-control { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); color: var(--admin-muted); }
.accounting-filter-search-control svg { width: 15px; height: 15px; margin-left: 10px; }
.accounting-filter-search-control input { border: 0; background: transparent; }
.accounting-filter-search-control input:focus { outline: 0; }
.accounting-filter-advanced > summary { display: none; }
.accounting-filter-advanced__fields { display: grid; grid-template-columns: repeat(5, minmax(105px, 1fr)) auto; gap: 7px; align-items: end; }
.accounting-filter-actions { display: flex; gap: 6px; }
.accounting-filter-actions .btn { white-space: nowrap; }

.accounting-table-shell { overflow-x: auto; }
.accounting-table { width: 100%; min-width: 1100px; border-collapse: collapse; table-layout: fixed; }
.accounting-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: 0.05em; }
.accounting-table td { padding: 11px 12px; border-bottom: 1px solid var(--admin-border); vertical-align: top; overflow-wrap: anywhere; }
.accounting-table tr:last-child td { border-bottom: 0; }
.accounting-table tbody tr:hover { background: #f8faff; }
.accounting-table th:nth-child(1) { width: 11%; }
.accounting-table th:nth-child(2) { width: 15%; }
.accounting-table th:nth-child(3) { width: 16%; }
.accounting-table th:nth-child(4) { width: 15%; }
.accounting-table th:nth-child(5) { width: 13%; }
.accounting-table th:nth-child(6) { width: 17%; }
.accounting-table th:nth-child(7) { width: 13%; }
.accounting-table td > strong,
.accounting-table td > small,
.accounting-table td > span { display: block; }
.accounting-table td > small,
.accounting-table td > span { margin-top: 3px; color: var(--admin-muted); font-size: 10px; }
.accounting-table td a:not(.btn) { color: var(--admin-primary); font-weight: 800; }
.accounting-table__job { display: table-cell; }
.accounting-table__job > a,
.accounting-table__job > small { display: block; }
.accounting-table__job .admin-badge { margin-top: 6px; }
.accounting-table__total > strong { color: var(--admin-text); font-size: 16px; }
.accounting-payment-state { display: grid; justify-items: start; gap: 6px; }
.accounting-payment-state small { color: var(--admin-muted); font-size: 10px; }
.accounting-payment-status-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; width: 100%; }
.accounting-payment-status-form .form-select { min-width: 0; min-height: 30px; padding: 4px 24px 4px 8px; font-size: 11px; }
.accounting-payment-status-form .btn { min-height: 30px; padding: 4px 8px; }
.accounting-payment-state--invoice { min-width: 170px; padding: 8px; border: 1px solid #cfe0fb; border-radius: 8px; background: #f7faff; }
.accounting-invoice-payment__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.accounting-invoice-payment__heading .admin-badge { margin: 0; font-size: 9px; }
.accounting-invoice-payment__amounts { display: grid; width: 100%; gap: 2px; margin: 0; }
.accounting-invoice-payment__amounts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.accounting-invoice-payment__amounts dt { color: var(--admin-muted); font-size: 9px; }
.accounting-invoice-payment__amounts dd { margin: 0; font-size: 10px; font-weight: 800; text-align: right; white-space: nowrap; }
.accounting-payment-state--invoice > .btn { min-height: 27px; padding: 3px 7px; font-size: 10px; }
.accounting-internal-values,
.accounting-breakdown dl { display: grid; gap: 0; margin: 0; }
.accounting-internal-values > div,
.accounting-breakdown dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; }
.accounting-internal-values dt,
.accounting-breakdown dt { color: var(--admin-muted); font-size: 9px; }
.accounting-internal-values dd,
.accounting-breakdown dd { margin: 0; font-size: 10px; font-weight: 800; text-align: right; white-space: nowrap; }
.accounting-breakdown { margin-top: 6px; }
.accounting-breakdown > summary,
.accounting-note > summary { width: fit-content; color: var(--admin-primary); cursor: pointer; font-size: 10px; font-weight: 800; list-style-position: inside; }
.accounting-breakdown dl { margin-top: 5px; padding: 7px; border-radius: 8px; background: #f5f8fd; }
.accounting-note { margin-top: 6px; }
.accounting-note p { max-width: 220px; margin: 5px 0 0; color: var(--admin-muted); font-size: 10px; overflow-wrap: anywhere; }
.accounting-table__actions { display: grid; gap: 6px; }
.accounting-table__actions .btn { justify-content: center; white-space: normal; text-align: center; }
.accounting-chemical-action { justify-content: center; white-space: normal; text-align: center; }
.accounting-chemical-action svg { width: 13px; height: 13px; }
.accounting-card-list { display: none; }

.accounting-mobile-card { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 11px; background: var(--admin-surface); }
.accounting-mobile-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.accounting-mobile-card > header > span { display: grid; gap: 2px; }
.accounting-mobile-card > header a { color: var(--admin-primary); font-weight: 800; }
.accounting-mobile-card > header small { color: var(--admin-muted); font-size: 10px; }
.accounting-mobile-card h3,
.accounting-mobile-card p { margin: 0; overflow-wrap: anywhere; }
.accounting-mobile-card p { color: var(--admin-muted); font-size: 11px; }
.accounting-mobile-card__total { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 9px; background: #f5f8fd; }
.accounting-mobile-card__total > span { display: grid; gap: 2px; }
.accounting-mobile-card__total small { color: var(--admin-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.accounting-mobile-card__total strong { font-size: 20px; }
.accounting-mobile-card__total em { max-width: 145px; color: var(--admin-muted); font-size: 10px; font-style: normal; text-align: right; }
.accounting-mobile-card > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.accounting-mobile-card > dl > div { display: grid; gap: 2px; padding: 8px; border: 1px solid var(--admin-border); border-radius: 8px; }
.accounting-mobile-card dt { color: var(--admin-muted); font-size: 9px; }
.accounting-mobile-card dd { margin: 0; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.accounting-breakdown--mobile { margin: 0; padding: 8px 10px; border: 1px solid var(--admin-border); border-radius: 8px; }
.accounting-mobile-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.accounting-mobile-card__actions .btn { justify-content: center; }
.accounting-mobile-card__actions .accounting-chemical-action { grid-column: 1 / -1; }
.accounting-empty-state { display: grid; min-height: 250px; place-items: center; align-content: center; gap: 7px; padding: 30px; text-align: center; }
.accounting-empty-state > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #eef4ff; color: var(--admin-primary); }
.accounting-empty-state h3,
.accounting-empty-state p { margin: 0; }
.accounting-empty-state p { color: var(--admin-muted); }

.accounting-definition-note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: #fffdf8; }
.accounting-definition-note > span { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--admin-warning-soft); color: var(--admin-warning); }
.accounting-definition-note svg { width: 16px; height: 16px; }
.accounting-definition-note p { margin: 0; color: var(--admin-muted); font-size: 11px; }
.accounting-definition-note strong { color: var(--admin-text); }

@media screen and (max-width: 1500px) {
  .accounting-filter-grid { grid-template-columns: minmax(220px, 0.55fr) 150px minmax(0, 1.8fr); }
  .accounting-filter-advanced__fields { grid-template-columns: repeat(3, minmax(105px, 1fr)); }
  .accounting-kpi-strip article { padding: 12px; }
}

@media screen and (max-width: 1100px) {
  .accounting-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .accounting-kpi-strip article:nth-child(3) { border-right: 0; }
  .accounting-kpi-strip article:nth-child(-n + 3) { border-bottom: 1px solid var(--admin-border); }
  .accounting-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .accounting-filter-grid { grid-template-columns: minmax(220px, 1fr) 150px; }
  .accounting-filter-advanced { grid-column: 1 / -1; }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.accounting-workspace) { padding-top: 12px; }
  .accounting-workspace { gap: 11px; }
  .accounting-header { align-items: flex-start; flex-direction: column; gap: 11px; }
  .accounting-header__actions,
  .accounting-header__actions .btn { width: 100%; }
  .accounting-header__actions .btn { justify-content: center; }
  .accounting-period-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 10px; }
  .accounting-period-bar__nav { justify-content: space-between; }
  .accounting-period-bar__nav > span { min-width: 0; }
  .accounting-period-bar p { grid-column: 1 / -1; text-align: left; }
  .accounting-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounting-kpi-strip article,
  .accounting-kpi-strip article:nth-child(3) { min-height: 82px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
  .accounting-kpi-strip article:nth-child(2n) { border-right: 0; }
  .accounting-kpi-strip article:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .accounting-kpi-strip article:nth-last-child(2) { border-bottom: 0; }
  .accounting-kpi-strip__icon { width: 34px; height: 34px; }
  .accounting-overview-grid { display: none; }
  .accounting-directory__header { align-items: flex-start; flex-direction: column; }
  .accounting-directory__tabs { width: 100%; }
  .accounting-directory__tabs a { flex: 1; text-align: center; }
  .accounting-filter-grid { grid-template-columns: minmax(0, 1fr); padding: 11px; }
  .accounting-filter-advanced { grid-column: auto; }
  .accounting-filter-advanced > summary { display: flex; min-height: 42px; align-items: center; gap: 5px; padding: 0 12px; border: 1px solid var(--admin-border); border-radius: 9px; background: var(--admin-surface); color: var(--admin-text); cursor: pointer; list-style: none; font-weight: 800; }
  .accounting-filter-advanced > summary::-webkit-details-marker { display: none; }
  .accounting-filter-advanced__summary strong { color: var(--admin-primary); }
  .accounting-filter-advanced__hint { margin-left: auto; color: var(--admin-muted); font-size: 10px; font-weight: 500; }
  .accounting-filter-advanced__fields { grid-template-columns: minmax(0, 1fr); padding-top: 9px; }
  .accounting-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounting-filter-actions .btn { justify-content: center; }
  .accounting-table-shell { display: none; }
  .accounting-card-list { display: grid; gap: 10px; padding: 11px; }
  .accounting-definition-note { align-items: flex-start; }
}

@media screen and (max-width: 420px) {
  .accounting-kpi-strip article { padding: 10px; }
  .accounting-kpi-strip strong { font-size: 16px; }
  .accounting-mobile-card > dl,
  .accounting-mobile-card__actions { grid-template-columns: minmax(0, 1fr); }
  .accounting-mobile-card__total { align-items: flex-start; flex-direction: column; }
  .accounting-mobile-card__total em { max-width: none; text-align: left; }
}

/* Phase 5C: Technician registry, detail workspace and form. */
.admin-main:has(.technician-page),
.admin-main:has(.technician-detail-page),
.admin-main:has(.technician-form-page),
.admin-main:has(.technician-unavailability-page) { padding-top: 18px; }

.technician-page,
.technician-detail-page,
.technician-form-page,
.technician-unavailability-page { display: grid; width: 100%; max-width: none; gap: 14px; margin: 0; color: var(--admin-text); }

.technician-page-header,
.technician-form-header,
.technician-unavailability-header,
.technician-hero { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.technician-page-header h1,
.technician-form-header h1,
.technician-unavailability-header h1,
.technician-hero h1 { margin: 1px 0 2px; color: var(--admin-text); font-size: 24px; line-height: 1.15; }
.technician-page-header p,
.technician-form-header p,
.technician-unavailability-header p { margin: 0; color: var(--admin-muted); font-size: 11.5px; }
.technician-page-header .admin-icon,
.technician-form-header .admin-icon,
.technician-unavailability-header .admin-icon,
.technician-hero .admin-actions .admin-icon { width: 14px; height: 14px; }

.technician-summary-strip,
.technician-detail-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.technician-summary-strip article { min-height: 90px; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-right: 1px solid var(--admin-border); }
.technician-summary-strip article:last-child { border-right: 0; }
.technician-summary-strip article > span:last-child { min-width: 0; display: grid; gap: 2px; }
.technician-summary-strip small,
.technician-detail-summary small { color: var(--admin-muted); font-size: 10.5px; font-weight: 700; }
.technician-summary-strip strong,
.technician-detail-summary strong { color: var(--admin-text); font-size: 20px; line-height: 1; }
.technician-summary-strip em,
.technician-detail-summary em { color: var(--admin-muted); font-size: 10.5px; font-style: normal; }
.technician-summary-strip__icon { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; }
.technician-summary-strip__icon .admin-icon { width: 18px; height: 18px; }
.technician-summary-strip__icon--blue { color: var(--admin-primary); background: #eef4ff; }
.technician-summary-strip__icon--green { color: #159b61; background: #eaf9f1; }
.technician-summary-strip__icon--violet { color: #7b4fd1; background: #f1ebff; }
.technician-summary-strip__icon--cyan { color: #1386a8; background: #e8f8fb; }
.technician-summary-strip__icon--red { color: var(--admin-danger); background: var(--admin-danger-soft); }

.technician-directory,
.technician-workspace-section,
.technician-detail-summary { border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.technician-directory { overflow: hidden; }
.technician-directory__header,
.technician-workspace-section > header { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 15px; border-bottom: 1px solid var(--admin-border); }
.technician-directory__header h2,
.technician-workspace-section h2 { margin: 0; color: var(--admin-text); font-size: 14px; }
.technician-directory__header p,
.technician-workspace-section > header p { margin: 2px 0 0; color: var(--admin-muted); font-size: 11px; }
.technician-workspace-section > header .admin-kicker { margin-bottom: 2px; color: var(--admin-primary); font-size: 10px; }
.technician-filter-clear { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-primary); font-size: 11px; font-weight: 750; }
.technician-filter-clear .admin-icon { width: 13px; height: 13px; }

.technician-filter-grid { display: grid; grid-template-columns: minmax(250px, 1.35fr) minmax(150px, .65fr) minmax(160px, .7fr) auto; align-items: end; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--admin-border); background: #fbfcfe; }
.technician-filter-field { min-width: 0; display: grid; gap: 4px; color: var(--admin-muted); font-size: 10.5px; font-weight: 750; }
.technician-filter-field input,
.technician-filter-field select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 9px; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; outline: 0; }
.technician-filter-field input:focus,
.technician-filter-field select:focus { border-color: #8fb6ff; box-shadow: 0 0 0 3px rgba(40, 103, 215, .1); }
.technician-filter-search-control { position: relative; display: block; }
.technician-filter-search-control .admin-icon { position: absolute; top: 50%; left: 11px; width: 14px; height: 14px; transform: translateY(-50%); color: var(--admin-muted); }
.technician-filter-search-control input { padding-left: 33px; }
.technician-filter-actions { display: flex; gap: 7px; }

.technician-table-shell { overflow-x: auto; }
.technician-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.technician-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 10.5px; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
.technician-table th:nth-child(1) { width: 19%; }
.technician-table th:nth-child(2) { width: 16%; }
.technician-table th:nth-child(3) { width: 11%; }
.technician-table th:nth-child(4) { width: 13%; }
.technician-table th:nth-child(5) { width: 14%; }
.technician-table th:nth-child(6) { width: 13%; }
.technician-table th:nth-child(7) { width: 14%; }
.technician-table tbody tr { border-bottom: 1px solid var(--admin-border); }
.technician-table tbody tr:last-child { border-bottom: 0; }
.technician-table td { padding: 14px 12px; border-bottom: 0; color: var(--admin-text); font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.technician-table tbody tr:hover { background: #fbfcff; }
.technician-table td > small,
.technician-table td > em { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; font-style: normal; line-height: 1.35; }
.technician-table__identity { display: flex; align-items: center; gap: 10px; }
.technician-table__identity > span:last-child { min-width: 0; display: block; }
.technician-table__identity a { color: var(--admin-text); font-size: 13px; font-weight: 850; }
.technician-table__identity small,
.technician-table__identity em { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; font-style: normal; line-height: 1.35; }
.technician-table__identity em { font-size: 10.5px; }
.technician-avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #eaf1ff; color: var(--admin-primary); font-size: 10.5px; font-weight: 850; }
.technician-avatar--large { width: 54px; height: 54px; font-size: 16px; }
.technician-status { width: fit-content; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 850; line-height: 1.1; white-space: nowrap; }
.technician-status--active { color: #087746; background: #ddf5e8; }
.technician-status--unavailable { color: #9a5a00; background: #fff0d8; }
.technician-status--inactive { color: #687286; background: #edf0f4; }
.technician-catch-up { width: fit-content; padding: 3px 6px; border-radius: 6px; color: #6b42ba !important; background: #f1ebff; }
.technician-table__metric strong,
.technician-table__payout strong { display: block; font-size: 13px; }
.technician-table__split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.technician-table__split span { display: grid; gap: 2px; }
.technician-table__split small { color: var(--admin-muted); font-size: 10.5px; }
.technician-table__split strong { font-size: 12.5px; }
.technician-table .is-alert,
.technician-detail-summary .is-alert strong { color: var(--admin-danger); }
.technician-table__actions { display: grid; gap: 6px; }
.technician-table__actions .btn { width: 100%; justify-content: center; white-space: nowrap; font-size: 11.5px; }
.technician-card-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 15px 15px; }
.technician-registry-card { min-width: 0; display: grid; gap: 11px; padding: 14px; border: 1px solid var(--admin-border); border-radius: 11px; background: #fff; transition: border-color 140ms ease, box-shadow 140ms ease; }
.technician-registry-card:hover { border-color: #cbd8ed; box-shadow: 0 6px 16px rgba(18, 47, 94, .06); }
.technician-registry-card__header { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.technician-registry-card__identity { min-width: 0; display: grid; gap: 2px; }
.technician-registry-card__identity a { overflow: hidden; color: var(--admin-text); font-size: 13px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.technician-registry-card__identity a:hover { color: var(--admin-primary); }
.technician-registry-card__identity small { color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
.technician-registry-card__availability { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; padding: 8px 9px; border-radius: 8px; background: #fbfcfe; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
.technician-registry-card__availability strong { color: var(--admin-text); font-size: 10px; }
.technician-registry-card__availability .technician-catch-up { margin-left: auto; }
.technician-registry-card__contact { display: grid; gap: 4px; min-height: 16px; color: var(--admin-muted); font-size: 10.5px; }
.technician-registry-card__contact a { min-width: 0; display: flex; align-items: center; gap: 5px; color: var(--admin-muted); }
.technician-registry-card__contact a:hover { color: var(--admin-primary); }
.technician-registry-card__contact .admin-icon { width: 13px; height: 13px; flex: 0 0 auto; }
.technician-registry-card__contact a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.technician-registry-card__metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
.technician-registry-card__metrics > div { min-width: 0; display: grid; gap: 3px; padding: 8px; border: 1px solid var(--admin-border); border-radius: 8px; background: #fff; }
.technician-registry-card__metrics > .technician-registry-card__payout { grid-column: 1 / -1; background: #f5f8ff; border-color: #dce7fb; }
.technician-registry-card__metrics dt { color: var(--admin-muted); font-size: 10px; font-weight: 650; }
.technician-registry-card__metrics dd { margin: 0; color: var(--admin-text); font-size: 13px; font-weight: 850; line-height: 1.2; }
.technician-registry-card__metrics dd small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 10px; font-weight: 500; line-height: 1.3; }
.technician-registry-card__payout-state { color: var(--admin-muted); font-size: 12px; font-weight: 700; }
.technician-registry-card__metrics .is-alert { color: var(--admin-danger); }
.technician-registry-card__actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.technician-registry-card__actions .btn { min-height: 38px; justify-content: center; white-space: nowrap; }

@media screen and (min-width: 761px) and (max-width: 1499px) {
  .technician-card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.technician-empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 30px; text-align: center; }
.technician-empty-state > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #eef4ff; }
.technician-empty-state > span .admin-icon { width: 20px; height: 20px; }
.technician-empty-state h3,
.technician-empty-state p { margin: 0; }
.technician-empty-state p { color: var(--admin-muted); font-size: 11px; }

.technician-hero__identity { min-width: 0; display: flex; align-items: center; gap: 14px; }
.technician-hero__identity h1 { margin-top: 2px; }
.technician-hero__meta,
.technician-hero__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 6px; color: var(--admin-muted); font-size: 11px; }
.technician-hero__contact a { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-text); }
.technician-hero__contact .admin-icon { width: 13px; height: 13px; color: var(--admin-primary); }
.technician-detail-summary article { min-height: 82px; display: grid; align-content: center; gap: 4px; padding: 12px 16px; border-right: 1px solid var(--admin-border); }
.technician-detail-summary article:last-child { border-right: 0; }
.technician-detail-summary article strong { font-size: 18px; }

.technician-workspace-section { overflow: hidden; }
.technician-work-table-shell { overflow-x: auto; }
.technician-work-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.technician-work-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 10.5px; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
.technician-work-table th:nth-child(1) { width: 11%; }
.technician-work-table th:nth-child(2) { width: 18%; }
.technician-work-table th:nth-child(3) { width: 19%; }
.technician-work-table th:nth-child(4) { width: 18%; }
.technician-work-table th:nth-child(5) { width: 11%; }
.technician-work-table th:nth-child(6) { width: 12%; }
.technician-work-table th:nth-child(7) { width: 11%; }
.technician-work-table tbody tr { border-bottom: 1px solid var(--admin-border); }
.technician-work-table tbody tr:last-child { border-bottom: 0; }
.technician-work-table td { padding: 13px 12px; border-bottom: 0; font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.technician-work-table tr.is-overdue { background: #fffafa; }
.technician-work-table td > a,
.technician-work-table td > strong { color: var(--admin-text); font-weight: 800; }
.technician-work-table td > small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }
.technician-role { width: fit-content; display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 850; }
.technician-role--lead { color: #174eaf; background: #eaf1ff; }
.technician-role--crew { color: #6b42ba; background: #f1ebff; }
.technician-work-card-list { display: none; }

.technician-detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 14px; }
.technician-subscription-list,
.technician-availability-list,
.technician-history-list,
.technician-payout-list { display: grid; }
.technician-subscription-list > article { display: grid; grid-template-columns: auto minmax(135px, .8fr) minmax(0, 1.7fr); align-items: center; gap: 11px; padding: 12px 15px; border-bottom: 1px solid var(--admin-border); }
.technician-subscription-list > article:last-child { border-bottom: 0; }
.technician-subscription-list a { color: var(--admin-text); font-size: 12px; font-weight: 850; }
.technician-subscription-list small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; }
.technician-subscription-list dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0; }
.technician-subscription-list dl div { min-width: 0; display: grid; gap: 2px; }
.technician-subscription-list dt { color: var(--admin-muted); font-size: 10px; }
.technician-subscription-list dd { margin: 0; font-size: 11.5px; font-weight: 750; overflow-wrap: anywhere; }

.technician-availability-list > article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--admin-border); }
.technician-availability-list strong { display: block; font-size: 11.5px; }
.technician-availability-list small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 10.5px; }
.technician-availability-list p { margin: 4px 0 0; color: var(--admin-muted); font-size: 10.5px; }
.technician-catch-up-panel { padding: 12px 15px; border-top: 1px solid var(--admin-border); background: #fbfcfe; }
.technician-catch-up-panel h3 { margin: 0; font-size: 12.5px; }
.technician-catch-up-panel p { margin: 3px 0 8px; color: var(--admin-muted); font-size: 10.5px; }
.technician-catch-up-panel ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.technician-catch-up-panel li { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }

.technician-history-list > article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 15px; border-bottom: 1px solid var(--admin-border); }
.technician-history-list > article:last-child { border-bottom: 0; }
.technician-history-list div > a { color: var(--admin-text); font-size: 12.5px; font-weight: 800; }
.technician-history-list small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; }
.technician-history-list > article > span:nth-child(3) { color: var(--admin-muted); font-size: 10.5px; }
.technician-payout-total { color: var(--admin-text); font-size: 18px; }
.technician-payout-list > article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 15px; border-bottom: 1px solid var(--admin-border); }
.technician-payout-list > article:last-child { border-bottom: 0; }
.technician-payout-list a { color: var(--admin-text); font-size: 12.5px; font-weight: 800; }
.technician-payout-list small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; }
.technician-payout-list > article > strong { font-size: 13px; }
.technician-compact-empty { padding: 22px 15px; color: var(--admin-muted); font-size: 11px; text-align: center; }

.technician-form,
.technician-unavailability-form { width: 100%; display: grid; gap: 14px; }
.technician-form-layout,
.technician-unavailability-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .95fr); align-items: stretch; gap: 14px; }
.technician-form-card,
.technician-unavailability-card,
.technician-form-note,
.technician-form-actions { border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.technician-form-card,
.technician-unavailability-card { min-width: 0; padding: 18px; }
.technician-form-card > header,
.technician-unavailability-card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.technician-form-card h2,
.technician-unavailability-card h2 { margin: 0; font-size: 14px; }
.technician-form-card header p,
.technician-unavailability-card header p { margin: 2px 0 0; color: var(--admin-muted); font-size: 10.5px; }
.technician-form__section-icon { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--admin-primary); background: #eaf1ff; }
.technician-form__section-icon--violet { color: #6b42ba; background: #f1ebff; }
.technician-form__section-icon .admin-icon { width: 17px; height: 17px; }
.technician-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.technician-form-card--eligibility { display: flex; flex-direction: column; }
.technician-form .form-label,
.technician-unavailability-form .form-label { font-size: 11.5px; }
.technician-form .form-input,
.technician-form .form-select,
.technician-unavailability-form .form-input,
.technician-unavailability-form .form-select,
.technician-unavailability-form .form-textarea { min-height: 42px; font-size: 13px; }
.technician-form .form-helper,
.technician-unavailability-form .form-helper { color: var(--admin-muted); font-size: 10.5px; line-height: 1.45; }
.technician-active-control { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fbfcfe; }
.technician-active-control > span { display: flex; align-items: center; gap: 8px; }
.technician-active-control input { width: 16px; height: 16px; }
.technician-active-control strong { font-size: 12px; }
.technician-active-control small { color: var(--admin-muted); font-size: 10.5px; line-height: 1.45; }
.technician-form-header__context { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin-top: 9px; }
.technician-form-header__context strong { font-size: 12px; }
.technician-form-header__context small { flex-basis: 100%; font-size: 10.5px; }
.technician-current-availability { display: flex; align-items: flex-start; gap: 10px; margin-top: auto; padding: 13px; border: 1px solid #cee0ff; border-radius: 10px; background: #f4f8ff; }
.technician-current-availability__icon { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #e3edff; }
.technician-current-availability__icon .admin-icon { width: 16px; height: 16px; }
.technician-current-availability small,
.technician-current-availability strong,
.technician-current-availability p,
.technician-current-availability em { display: block; }
.technician-current-availability small { color: var(--admin-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }
.technician-current-availability strong { margin-top: 2px; font-size: 12.5px; }
.technician-current-availability p { margin: 3px 0 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }
.technician-current-availability em { margin-top: 5px; color: var(--admin-text); font-size: 10.5px; font-style: normal; font-weight: 700; }
.technician-form-note { display: flex; align-items: flex-start; gap: 10px; padding: 15px 18px; color: #715315; border-color: #f0d99d; background: #fffaf0; }
.technician-form-note > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #a7770d; background: #fff0c7; }
.technician-form-note .admin-icon { width: 17px; height: 17px; }
.technician-form-note p { margin: 0; font-size: 11px; line-height: 1.5; }
.technician-form-note strong { display: block; margin-bottom: 2px; color: var(--admin-text); font-size: 12.5px; }
.technician-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 16px; }
.technician-form-actions .btn,
.technician-unavailability-actions .btn { font-size: 11.5px; }

.technician-unavailability-card > header > span { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--admin-primary); background: #eaf1ff; }
.technician-unavailability-card > header > span .admin-icon { width: 17px; height: 17px; }
.technician-unavailability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.technician-unavailability-form .form-textarea { min-height: 105px; resize: vertical; }
.technician-unavailability-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--admin-border); }
.technician-unavailability-card--context { display: flex; flex-direction: column; }
.technician-unavailability-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fbfcfe; }
.technician-unavailability-identity > div { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; }
.technician-unavailability-identity strong { color: var(--admin-text); font-size: 13px; }
.technician-unavailability-identity small { flex-basis: 100%; color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }
.technician-existing-unavailability { margin-top: 15px; }
.technician-existing-unavailability h3 { margin: 0 0 8px; font-size: 12.5px; }
.technician-existing-unavailability article { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; padding: 10px 0; border-top: 1px solid var(--admin-border); }
.technician-existing-unavailability article:first-of-type { border-top: 0; }
.technician-existing-unavailability article strong { display: block; font-size: 11.5px; line-height: 1.4; }
.technician-existing-unavailability article small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 10.5px; }
.technician-existing-unavailability > p { margin: 0; padding: 14px; border: 1px dashed var(--admin-border); border-radius: 10px; color: var(--admin-muted); font-size: 10.5px; text-align: center; }
.technician-unavailability-empty { min-height: 230px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 22px; text-align: center; }
.technician-unavailability-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #eef4ff; }
.technician-unavailability-empty > span .admin-icon { width: 19px; height: 19px; }
.technician-unavailability-empty strong { font-size: 12.5px; }
.technician-unavailability-empty p { max-width: 290px; margin: 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.5; }

@media screen and (max-width: 1180px) {
  .technician-summary-strip article { padding-inline: 12px; }
  .technician-summary-strip__icon { width: 34px; height: 34px; }
  .technician-table th,
  .technician-table td { padding-inline: 9px; }
  .technician-table__actions .btn { padding-inline: 7px; font-size: 9.5px; }
  .technician-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .technician-form-layout,
  .technician-unavailability-layout { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.technician-page),
  .admin-main:has(.technician-detail-page),
  .admin-main:has(.technician-form-page),
  .admin-main:has(.technician-unavailability-page) { padding-top: 12px; }
  .technician-page,
  .technician-detail-page,
  .technician-form-page,
  .technician-unavailability-page { gap: 11px; }
  .technician-page-header,
  .technician-form-header,
  .technician-unavailability-header,
  .technician-hero { min-height: 0; align-items: flex-start; flex-direction: column; padding: 14px; }
  .technician-page-header .admin-actions,
  .technician-hero .admin-actions,
  .technician-form-header > .btn,
  .technician-unavailability-header > .btn { width: 100%; }
  .technician-page-header .admin-actions .btn,
  .technician-hero .admin-actions .btn,
  .technician-form-header > .btn,
  .technician-unavailability-header > .btn { flex: 1; justify-content: center; }
  .technician-summary-strip,
  .technician-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technician-summary-strip article,
  .technician-detail-summary article { min-height: 78px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
  .technician-summary-strip article:nth-child(2n),
  .technician-detail-summary article:nth-child(2n) { border-right: 0; }
  .technician-summary-strip article:last-child,
  .technician-detail-summary article:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .technician-summary-strip article:nth-last-child(2),
  .technician-detail-summary article:nth-last-child(2) { border-bottom: 0; }
  .technician-directory__header,
  .technician-workspace-section > header { align-items: flex-start; flex-direction: column; }
  .technician-filter-grid { grid-template-columns: minmax(0, 1fr); padding: 11px; }
  .technician-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technician-filter-actions .btn { justify-content: center; }
  .technician-table-shell,
  .technician-work-table-shell { display: none; }
  .technician-card-list,
  .technician-work-card-list { display: grid; gap: 10px; padding: 11px; }
  .technician-card-list { grid-template-columns: minmax(0, 1fr); }
  .technician-registry-card { gap: 10px; padding: 12px; }
  .technician-registry-card__actions { grid-template-columns: minmax(0, 1fr) auto; }
  .technician-mobile-card,
  .technician-work-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 11px; background: #fff; }
  .technician-mobile-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
  .technician-mobile-card header a { color: var(--admin-text); font-size: 13px; font-weight: 850; }
  .technician-mobile-card header small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 10.5px; overflow-wrap: anywhere; }
  .technician-mobile-card > p { margin: 0; color: var(--admin-muted); font-size: 10.5px; }
  .technician-mobile-card > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
  .technician-mobile-card > dl div { min-width: 0; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--admin-border); border-radius: 8px; }
  .technician-mobile-card dt { color: var(--admin-muted); font-size: 10px; }
  .technician-mobile-card dd { margin: 0; font-size: 13px; font-weight: 850; }
  .technician-mobile-card dd small { display: block; color: var(--admin-muted); font-size: 10px; font-weight: 500; }
  .technician-mobile-card__payout { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; background: #f5f8ff; }
  .technician-mobile-card__payout small { display: block; color: var(--admin-muted); font-size: 10px; }
  .technician-mobile-card__payout strong { font-size: 14px; }
  .technician-mobile-card__payout em { color: var(--admin-muted); font-size: 10px; font-style: normal; text-align: right; }
  .technician-mobile-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .technician-mobile-card__actions .btn { justify-content: center; }
  .technician-hero__identity { align-items: flex-start; }
  .technician-hero__meta { align-items: flex-start; flex-direction: column; }
  .technician-work-card.is-overdue { border-color: #f2c3c3; background: #fffafa; }
  .technician-work-card header { display: flex; justify-content: space-between; gap: 8px; }
  .technician-work-card header > span { display: grid; gap: 2px; }
  .technician-work-card header a { color: var(--admin-text); font-size: 12px; font-weight: 850; }
  .technician-work-card header small { color: var(--admin-muted); font-size: 10px; }
  .technician-work-card h3 { margin: 0; font-size: 13px; }
  .technician-work-card > p { margin: -6px 0 0; color: var(--admin-muted); font-size: 10.5px; }
  .technician-work-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
  .technician-work-card dl div { min-width: 0; display: grid; gap: 2px; }
  .technician-work-card dt { color: var(--admin-muted); font-size: 10px; }
  .technician-work-card dd { margin: 0; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
  .technician-work-card > .btn { justify-content: center; }
  .technician-subscription-list > article { grid-template-columns: auto minmax(0, 1fr); }
  .technician-subscription-list dl { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 8px; border-top: 1px solid var(--admin-border); }
  .technician-availability-list > article { grid-template-columns: minmax(0, 1fr) auto; }
  .technician-availability-list > article > .technician-status { grid-column: 1 / -1; }
  .technician-history-list > article { grid-template-columns: auto minmax(0, 1fr); }
  .technician-history-list > article > span:nth-child(3) { grid-column: 2; }
  .technician-history-list > article > .btn { grid-column: 1 / -1; justify-content: center; }
  .technician-form-grid,
  .technician-unavailability-grid { grid-template-columns: minmax(0, 1fr); }
  .technician-form-card,
  .technician-unavailability-card { padding: 14px; }
  .technician-form-actions,
  .technician-unavailability-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technician-form-actions .btn,
  .technician-unavailability-actions .btn { justify-content: center; }
}

/* ================================================================
   PHASE 6B: FOLLOW-UPS WORKSPACE
   ================================================================ */
@media screen {
  .admin-main:has(.follow-ups-page) { padding-top: 18px; }

  .follow-ups-page { display: grid; gap: 14px; width: 100%; color: var(--admin-text); }
  .follow-ups-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 3px 1px 1px; }
  .follow-ups-header h1 { margin: 2px 0 4px; font-size: clamp(25px, 2vw, 32px); line-height: 1.05; }
  .follow-ups-header p:last-child { margin: 0; color: var(--admin-muted); font-size: 12px; }
  .follow-ups-header .btn { gap: 7px; white-space: nowrap; }
  .follow-ups-header .admin-icon { width: 15px; height: 15px; }

  .follow-ups-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
  .follow-ups-summary article { min-width: 0; min-height: 86px; display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-right: 1px solid var(--admin-border); }
  .follow-ups-summary article:last-child { border-right: 0; }
  .follow-ups-summary article > span:last-child { min-width: 0; display: grid; gap: 2px; }
  .follow-ups-summary small { color: var(--admin-muted); font-size: 10.5px; font-weight: 600; }
  .follow-ups-summary strong { color: var(--admin-text); font-size: 21px; line-height: 1.05; }
  .follow-ups-summary em { overflow: hidden; color: var(--admin-muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
  .follow-ups-summary__icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #7040bd; background: #f2eaff; }
  .follow-ups-summary__icon .admin-icon { width: 18px; height: 18px; }
  .follow-ups-summary__icon--blue { color: var(--admin-primary); background: #eaf1ff; }
  .follow-ups-summary__icon--amber { color: #c77709; background: var(--admin-warning-soft); }
  .follow-ups-summary__icon--danger { color: #d43a3a; background: var(--admin-danger-soft); }

  .follow-ups-registry { overflow: visible; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
  .follow-ups-registry__header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--admin-border); }
  .follow-ups-registry__header h2 { margin: 0; color: var(--admin-text); font-size: 15px; line-height: 1.2; }
  .follow-ups-registry__header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 11px; }

  .follow-ups-filter-panel { display: block; border-bottom: 1px solid var(--admin-border); background: #fbfcfe; }
  .follow-ups-filter-panel > summary { display: none; }
  .follow-ups-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; gap: 10px; align-items: end; padding: 13px 16px 15px; }
  .follow-ups-filter-actions { display: flex; align-items: end; gap: 8px; }
  .follow-ups-filter-actions .btn { min-height: 38px; justify-content: center; padding-inline: 14px; white-space: nowrap; }

  .follow-ups-table-shell { overflow: visible; }
  .follow-ups-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
  .follow-ups-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); background: #fbfcfe; color: var(--admin-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .055em; text-align: left; text-transform: uppercase; }
  .follow-ups-table td { height: 68px; padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-text); font-size: 12px; vertical-align: middle; }
  .follow-ups-table tr:last-child td { border-bottom: 0; }
  .follow-ups-table tbody tr { transition: background 140ms ease; }
  .follow-ups-table tbody tr:hover { background: #fbfdff; }
  .follow-ups-table tbody tr.is-overdue { background: linear-gradient(90deg, rgba(227,54,54,.045), rgba(227,54,54,0) 45%); }
  .follow-ups-table th:nth-child(1), .follow-ups-table td:nth-child(1) { width: 16%; }
  .follow-ups-table th:nth-child(2), .follow-ups-table td:nth-child(2) { width: 23%; }
  .follow-ups-table th:nth-child(3), .follow-ups-table td:nth-child(3) { width: 18%; }
  .follow-ups-table th:nth-child(4), .follow-ups-table td:nth-child(4) { width: 16%; }
  .follow-ups-table th:nth-child(5), .follow-ups-table td:nth-child(5) { width: 17%; }
  .follow-ups-table th:nth-child(6), .follow-ups-table td:nth-child(6) { width: 10%; text-align: right; }
  .follow-ups-table td strong, .follow-ups-table td > a { color: var(--admin-text); font-size: 12.5px; font-weight: 600; }
  .follow-ups-table td small, .follow-ups-table td > span:not(.admin-badge):not(.job-attention-cue):not(.job-unassigned) { display: block; margin-top: 2px; overflow: hidden; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
  .follow-ups-table .job-reference, .follow-ups-table .job-client-link { display: block; overflow: hidden; color: var(--admin-primary) !important; text-overflow: ellipsis; white-space: nowrap; }
  .follow-ups-table .job-reference:hover, .follow-ups-table .job-client-link:hover { text-decoration: underline; }
  .follow-ups-source-link { display: block; margin-top: 4px; color: #7040bd !important; font-size: 10px !important; font-weight: 650 !important; }
  .follow-ups-table__job > strong, .follow-ups-table__schedule > strong, .follow-ups-table__technician > strong { display: block; }
  .follow-ups-table .job-state-stack { display: flex; flex-wrap: wrap; gap: 5px; }
  .follow-ups-page .admin-badge { min-height: 22px; padding: 0 7px; border-radius: 7px; font-size: 10px; font-weight: 600; }
  .follow-ups-page .admin-badge--priority-emergency { background: var(--admin-danger-soft); color: #c72f2f; }
  .follow-ups-page .admin-badge--priority-high { background: var(--admin-warning-soft); color: #b86609; }
  .follow-ups-page .admin-badge--priority-normal { background: #edf3ff; color: #305aa4; }
  .follow-ups-page .admin-badge--priority-low { background: #f0f2f6; color: #647084; }
  .follow-ups-table .job-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
  .follow-ups-table .job-open-button { min-width: 52px; min-height: 34px; justify-content: center; padding-inline: 10px; }
  .follow-ups-table .job-actions-menu[open] { z-index: 40; }
  .follow-ups-table .job-actions-menu__panel { width: 205px; }

  .follow-ups-empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 30px; color: var(--admin-muted); text-align: center; }
  .follow-ups-empty-state > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #7040bd; background: #f2eaff; }
  .follow-ups-empty-state .admin-icon { width: 20px; height: 20px; }
  .follow-ups-empty-state h3 { margin: 0; color: var(--admin-text); font-size: 14px; }
  .follow-ups-empty-state p { max-width: 330px; margin: 0 0 5px; font-size: 11px; }
}

@media screen and (min-width: 761px) and (max-width: 1320px) {
  .follow-ups-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .follow-ups-filter-actions { grid-column: span 3; }
  .follow-ups-table th, .follow-ups-table td { padding-inline: 9px; }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.follow-ups-page) { padding-top: 12px; }
  .follow-ups-page { gap: 12px; }
  .follow-ups-header { align-items: flex-start; flex-direction: column; gap: 12px; padding-inline: 1px; }
  .follow-ups-header h1 { font-size: 26px; }
  .follow-ups-header .btn { width: 100%; justify-content: center; }

  .follow-ups-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .follow-ups-summary article { min-height: 76px; gap: 10px; padding: 12px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
  .follow-ups-summary article:nth-child(2n) { border-right: 0; }
  .follow-ups-summary article:nth-last-child(-n + 2) { border-bottom: 0; }
  .follow-ups-summary__icon { width: 34px; height: 34px; }
  .follow-ups-summary strong { font-size: 19px; }
  .follow-ups-summary em { white-space: normal; }

  .follow-ups-registry__header { align-items: flex-start; flex-direction: column; gap: 7px; padding: 13px; }
  .follow-ups-filter-panel > summary { min-height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 13px; cursor: pointer; list-style: none; color: var(--admin-text); font-size: 12px; font-weight: 650; }
  .follow-ups-filter-panel > summary::-webkit-details-marker { display: none; }
  .follow-ups-filter-panel > summary::after { content: "⌄"; margin-left: auto; color: var(--admin-muted); font-size: 17px; line-height: 1; }
  .follow-ups-filter-panel[open] > summary { border-bottom: 1px solid var(--admin-border); }
  .follow-ups-filter-panel[open] > summary::after { content: "⌃"; }
  .follow-ups-filter-panel > summary strong { color: var(--admin-primary); font-size: 10.5px; }
  .follow-ups-filter-grid { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .follow-ups-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .follow-ups-filter-actions .btn { width: 100%; }

  .follow-ups-table-shell { padding: 10px; }
  .follow-ups-table, .follow-ups-table tbody { display: block; }
  .follow-ups-table thead { display: none; }
  .follow-ups-table tbody { display: grid; gap: 10px; }
  .follow-ups-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "job state" "client client" "schedule technician" "actions actions"; gap: 10px 14px; padding: 13px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .follow-ups-table tbody tr.is-overdue { border-color: #f0caca; background: linear-gradient(135deg, rgba(227,54,54,.055), #fff 52%); }
  .follow-ups-table td, .follow-ups-table tr:last-child td { width: auto !important; min-width: 0; height: auto; padding: 0; border: 0; text-align: left !important; }
  .follow-ups-table__job { grid-area: job; }
  .follow-ups-table__client { grid-area: client; padding-top: 9px !important; border-top: 1px solid var(--admin-border) !important; }
  .follow-ups-table__schedule { grid-area: schedule; }
  .follow-ups-table__technician { grid-area: technician; }
  .follow-ups-table__state { grid-area: state; }
  .follow-ups-table__actions { grid-area: actions; }
  .follow-ups-table__schedule::before, .follow-ups-table__technician::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--admin-muted); font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .follow-ups-table__state .job-state-stack { justify-content: flex-end; }
  .follow-ups-table .job-row-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
  .follow-ups-table .job-open-button { width: 100%; }
  .follow-ups-table .job-actions-menu__panel { width: min(205px, calc(100vw - 48px)); }
}

@media screen and (max-width: 420px) {
  .follow-ups-summary article { gap: 8px; padding: 11px 10px; }
  .follow-ups-summary small, .follow-ups-summary em { font-size: 9.5px; }
  .follow-ups-table tbody tr { grid-template-areas: "job state" "client client" "schedule schedule" "technician technician" "actions actions"; }
}

@media screen and (max-width: 420px) {
  .technician-page-header .admin-actions,
  .technician-hero .admin-actions,
  .technician-mobile-card__actions,
  .technician-form-actions,
  .technician-unavailability-actions { grid-template-columns: minmax(0, 1fr); flex-direction: column; }
  .technician-page-header .admin-actions .btn,
  .technician-hero .admin-actions .btn { width: 100%; }
  .technician-mobile-card > header { grid-template-columns: auto minmax(0, 1fr); }
  .technician-mobile-card > header .technician-status { grid-column: 1 / -1; }
  .technician-work-card dl { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 9A: Technician Profile operational summary. */
.technician-profile-page .technician-detail-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.technician-profile-page .technician-detail-summary article:last-child { border-right: 0; }
.technician-account-state { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 999px; color: #087746; background: #ddf5e8; font-size: 10px; font-weight: 800; }
.technician-account-state--unlinked { color: #687286; background: #edf0f4; }
.technician-upcoming-list { display: grid; }
.technician-upcoming-list article { display: grid; grid-template-columns: minmax(118px, .45fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--admin-border); }
.technician-upcoming-list article:last-child { border-bottom: 0; }
.technician-upcoming-list time { display: grid; gap: 2px; color: var(--admin-text); font-size: 11px; font-weight: 800; }
.technician-upcoming-list time small,
.technician-upcoming-list div small { color: var(--admin-muted); font-size: 10px; font-weight: 500; }
.technician-upcoming-list div { min-width: 0; display: grid; gap: 2px; }
.technician-upcoming-list a { overflow-wrap: anywhere; color: var(--admin-text); font-size: 12px; font-weight: 800; }
.technician-activity-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.technician-activity-metrics article { min-width: 0; display: grid; gap: 4px; padding: 14px 15px; border-right: 1px solid var(--admin-border); }
.technician-activity-metrics article:last-child { border-right: 0; }
.technician-activity-metrics small,
.technician-compensation-summary small { color: var(--admin-muted); font-size: 10px; font-weight: 750; }
.technician-activity-metrics strong,
.technician-compensation-summary strong { color: var(--admin-text); font-size: 20px; line-height: 1.1; }
.technician-activity-metrics span,
.technician-compensation-summary span { color: var(--admin-muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.technician-activity-metrics .is-alert { color: var(--admin-danger); }
.technician-compensation-summary { display: grid; gap: 4px; padding: 14px 15px; border-bottom: 1px solid var(--admin-border); background: #f5f8ff; }
.technician-compact-empty > strong,
.technician-compact-empty > span { display: block; }
.technician-compact-empty > strong { margin-bottom: 5px; color: var(--admin-text); font-size: 11px; }
.my-account-identity__technician-state { margin-left: auto; color: var(--admin-muted); font-size: 10.5px; font-weight: 700; text-align: right; }

@media screen and (max-width: 760px) {
  .technician-profile-page .technician-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .technician-profile-page .technician-detail-summary article:last-child { grid-column: auto; border-right: 0; }
  .technician-profile-page .technician-detail-summary article:nth-last-child(-n + 2) { border-bottom: 0; }
  .technician-upcoming-list { gap: 9px; padding: 11px; }
  .technician-upcoming-list article { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 10px; }
  .technician-upcoming-list time { grid-column: 1; }
  .technician-upcoming-list div { grid-column: 1 / -1; padding-top: 7px; border-top: 1px solid var(--admin-border); }
  .technician-upcoming-list .admin-badge { grid-column: 2; grid-row: 1; }
  .technician-activity-metrics { grid-template-columns: minmax(0, 1fr); }
  .technician-activity-metrics article { padding: 12px; border-right: 0; border-bottom: 1px solid var(--admin-border); }
  .technician-activity-metrics article:last-child { border-bottom: 0; }
  .my-account-identity__technician-state { width: 100%; margin-left: 0; padding-top: 9px; border-top: 1px solid var(--admin-border); text-align: left; }
}

/* ================================================================
   PHASE 6A-4: OPERATIONAL SCHEDULE
   ================================================================ */
@media screen {
  .admin-main:has(.schedule-page) { width: 100%; max-width: none; padding-top: 18px; }

  .schedule-page {
    min-width: 0;
    display: grid;
    gap: 14px;
    color: var(--admin-text);
  }

  .schedule-page__header,
  .schedule-period,
  .schedule-workspace > header,
  .schedule-unscheduled > header,
  .schedule-filter-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .schedule-page__header h1 {
    margin: 3px 0 5px;
    color: var(--admin-text);
    font-size: clamp(24px, 2.5vw, 32px);
    line-height: 1.12;
  }

  .schedule-page__header p:not(.admin-kicker),
  .schedule-workspace > header p,
  .schedule-unscheduled > header p,
  .schedule-filter-panel > header p {
    margin: 0;
    color: var(--admin-muted);
    font-size: 12px;
  }

  .schedule-page__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
  .schedule-page__actions .btn { width: auto; white-space: nowrap; }
  .schedule-page__actions .admin-icon { width: 15px; height: 15px; }

  .schedule-period,
  .schedule-filter-panel,
  .schedule-workspace,
  .schedule-unscheduled {
    min-width: 0;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }

  .schedule-period { min-height: 68px; padding: 10px 12px; }
  .schedule-period__nav { display: flex; align-items: center; gap: 10px; min-width: 245px; }
  .schedule-period__nav > div { min-width: 170px; display: grid; gap: 2px; }
  .schedule-period__nav span { color: var(--admin-muted); font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .055em; }
  .schedule-period__nav strong { color: var(--admin-text); font-size: 14px; line-height: 1.2; }
  .schedule-period__arrow {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text);
    background: #fff;
  }
  .schedule-period__arrow:hover { border-color: #b6c8e5; color: var(--admin-primary); background: #f7faff; }
  .schedule-period__arrow .admin-icon { width: 16px; height: 16px; }
  .schedule-period__views { display: inline-flex; padding: 3px; border-radius: 9px; background: #f1f5fb; }
  .schedule-period__views a { padding: 6px 10px; border-radius: 7px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
  .schedule-period__views a.is-active { color: var(--admin-primary); background: #fff; box-shadow: 0 1px 3px rgba(13, 25, 57, .1); }
  .schedule-period__today { width: auto; min-height: 34px; white-space: nowrap; }

  .schedule-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    box-shadow: var(--admin-card-shadow);
  }
  .schedule-kpis article { min-width: 0; min-height: 88px; display: flex; align-items: center; gap: 11px; padding: 14px 15px; border-right: 1px solid var(--admin-border); }
  .schedule-kpis article:last-child { border-right: 0; }
  .schedule-kpis article > span:last-child { min-width: 0; display: grid; gap: 2px; }
  .schedule-kpis small { color: var(--admin-muted); font-size: 10.5px; font-weight: 650; white-space: nowrap; }
  .schedule-kpis strong { color: var(--admin-text); font-size: 21px; line-height: 1.05; }
  .schedule-kpis em { overflow: hidden; color: var(--admin-muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-kpis__icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #eaf1ff; color: var(--admin-primary); }
  .schedule-kpis__icon .admin-icon { width: 17px; height: 17px; }
  .schedule-kpis__icon--blue { background: #e4f7fb; color: #1785a0; }
  .schedule-kpis__icon--amber { background: var(--admin-warning-soft); color: #c77709; }
  .schedule-kpis__icon--danger { background: var(--admin-danger-soft); color: #d43a3a; }
  .schedule-kpis__icon--violet { background: #f2eaff; color: #7b45d8; }

  .schedule-filter-panel > header { min-height: 58px; padding: 11px 15px; border-bottom: 1px solid var(--admin-border); }
  .schedule-filter-panel > header h2,
  .schedule-workspace > header h2,
  .schedule-unscheduled > header h2 { margin: 0 0 2px; color: var(--admin-text); font-size: 15px; line-height: 1.2; }
  .schedule-filter-panel > header > a { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-primary); font-size: 11px; font-weight: 700; white-space: nowrap; }
  .schedule-filter-panel > header > a .admin-icon { width: 13px; height: 13px; }
  .schedule-filters { display: grid; grid-template-columns: minmax(210px, 1fr) 142px auto; align-items: end; gap: 10px; padding: 12px 15px 14px; background: #fbfcfe; }
  .schedule-filter-field { min-width: 0; display: grid; gap: 5px; }
  .schedule-filter-field > span:first-child { color: var(--admin-text); font-size: 10.5px; font-weight: 650; }
  .schedule-filter-field input,
  .schedule-filter-field select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #dce4ef; border-radius: 8px; outline: 0; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; }
  .schedule-filter-field input:focus,
  .schedule-filter-field select:focus { border-color: #8eb4f4; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
  .schedule-filter-field--search > span:last-child { height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; }
  .schedule-filter-field--search > span:last-child:focus-within { border-color: #8eb4f4; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
  .schedule-filter-field--search i { width: 14px; height: 14px; flex: 0 0 auto; color: var(--admin-muted); }
  .schedule-filter-field--search .admin-icon { width: 14px; height: 14px; }
  .schedule-filter-field--search input { height: 36px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .schedule-filter-advanced { grid-column: 1 / -1; grid-row: 2; min-height: 59px; display: block; }
  .schedule-filter-advanced summary { display: none; }
  .schedule-filter-advanced > div,
  .schedule-filter-advanced:not([open]) > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .schedule-filters > .btn { grid-column: 3; grid-row: 1; min-height: 38px; width: auto; padding-inline: 15px; white-space: nowrap; }

  .schedule-workspace > header,
  .schedule-unscheduled > header { min-height: 64px; padding: 13px 15px; border-bottom: 1px solid var(--admin-border); }
  .schedule-workspace > header > span { padding: 5px 8px; border-radius: 999px; background: #edf4ff; color: var(--admin-primary); font-size: 10.5px; font-weight: 700; white-space: nowrap; }
  .schedule-week-grid { min-width: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .schedule-day { min-width: 0; min-height: 370px; display: flex; flex-direction: column; border-right: 1px solid var(--admin-border); background: #fff; }
  .schedule-day:last-child { border-right: 0; }
  .schedule-day.is-weekend { background: #fcfdff; }
  .schedule-day.is-today { background: linear-gradient(180deg, #f5f9ff 0, #fff 26%); box-shadow: inset 0 3px 0 var(--admin-primary); }
  .schedule-day__header { min-height: 62px; padding: 11px 10px 9px; border-bottom: 1px solid var(--admin-border); }
  .schedule-day__header > div { display: flex; align-items: baseline; gap: 6px; }
  .schedule-day__header span { color: var(--admin-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
  .schedule-day__header strong { color: var(--admin-text); font-size: 18px; line-height: 1; }
  .schedule-day.is-today .schedule-day__header strong { color: var(--admin-primary); }
  .schedule-day__header small { display: block; margin-top: 5px; overflow: hidden; color: var(--admin-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-day__availability { display: grid; gap: 4px; padding: 7px 8px 0; }
  .schedule-day__availability span { overflow: hidden; display: block; padding: 4px 5px; border-radius: 5px; color: #8b4b00; background: #fff4df; font-size: 10.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-day__jobs { min-width: 0; display: grid; align-content: start; gap: 7px; padding: 8px; }
  .schedule-day__empty { margin: 11px 2px; color: #93a0b7; font-size: 10.5px; font-style: italic; }
  .schedule-job-card { min-width: 0; display: grid; gap: 5px; padding: 9px; border: 1px solid #dfe7f2; border-radius: 9px; background: #fff; box-shadow: 0 1px 3px rgba(13,25,57,.035); }
  .schedule-job-card:hover { border-color: #b7c9e7; box-shadow: 0 4px 12px rgba(13,25,57,.07); }
  .schedule-job-card.is-overdue { border-color: #f0c8c8; background: #fffafa; }
  .schedule-job-card.is-muted { opacity: .69; }
  .schedule-job-card__topline { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; }
  .schedule-job-card__time { color: var(--admin-text); font-size: 12px; line-height: 1.1; }
  .schedule-job-card .admin-badge { max-width: 100%; min-height: 20px; padding: 3px 6px; overflow: hidden; font-size: 10px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
  .schedule-job-card__client { overflow-wrap: anywhere; color: var(--admin-text); font-size: 12.5px; font-weight: 800; line-height: 1.2; }
  .schedule-job-card__client:hover { color: var(--admin-primary); }
  .schedule-job-card__service { margin: -2px 0 0; overflow-wrap: anywhere; color: var(--admin-muted); font-size: 11px; line-height: 1.25; }
  .schedule-job-card__identity,
  .schedule-job-card__assignment { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
  .schedule-job-card__reference { color: #687894; font-size: 10.5px; font-weight: 750; }
  .schedule-card-cue { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; border-radius: 4px; font-size: 10px; font-weight: 700; line-height: 1.15; }
  .schedule-card-cue .admin-icon { width: 10px; height: 10px; }
  .schedule-card-cue--recurring { color: #7150be; background: #f3edff; }
  .schedule-card-cue--overdue { color: #bf3333; background: #fff0f0; }
  .schedule-job-card__assignment { color: var(--admin-muted); font-size: 10.5px; line-height: 1.3; }
  .schedule-job-card__assignment b,
  .schedule-unscheduled-card__assignment b { color: #4a5b78; font-weight: 750; }
  .schedule-unassigned { color: #c65d19; font-size: 10.5px; font-weight: 750; }
  .schedule-job-card__footer { display: flex; align-items: center; padding-top: 1px; }
  .schedule-job-card__footer .admin-badge { color: #586a87; background: #f2f5f9; font-size: 10px; }
  .schedule-mobile-agenda { display: none; }

  .schedule-unscheduled > header .admin-kicker { margin-bottom: 4px; }
  .schedule-unscheduled > header h2 span { display: inline-grid; min-width: 20px; place-items: center; margin-left: 4px; padding: 2px 6px; border-radius: 999px; color: var(--admin-primary); background: #edf4ff; font-size: 11px; vertical-align: middle; }
  .schedule-unscheduled > header .btn { width: auto; white-space: nowrap; }
  .schedule-unscheduled__list { display: grid; }
  .schedule-unscheduled-card { min-width: 0; display: grid; grid-template-columns: minmax(210px, 1.6fr) minmax(115px, .75fr) minmax(145px, 1fr) minmax(210px, 1.15fr) auto; align-items: center; gap: 14px; padding: 12px 15px; border-bottom: 1px solid var(--admin-border); }
  .schedule-unscheduled-card:last-child { border-bottom: 0; }
  .schedule-unscheduled-card.is-overdue { background: linear-gradient(90deg, #fff9f9, #fff 46%); }
  .schedule-unscheduled-card__main { min-width: 0; display: flex; align-items: center; gap: 9px; }
  .schedule-unscheduled-card__main > a { padding: 5px 6px; border-radius: 6px; color: var(--admin-primary); background: #edf4ff; font-size: 10px; font-weight: 800; white-space: nowrap; }
  .schedule-unscheduled-card h3 { margin: 0; overflow-wrap: anywhere; color: var(--admin-text); font-size: 12.5px; line-height: 1.2; }
  .schedule-unscheduled-card p { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--admin-muted); font-size: 10.5px; }
  .schedule-unscheduled-card__deadline { display: grid; gap: 2px; }
  .schedule-unscheduled-card__deadline small { color: var(--admin-muted); font-size: 9.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .045em; }
  .schedule-unscheduled-card__deadline strong { color: var(--admin-text); font-size: 11px; }
  .schedule-unscheduled-card__deadline span { color: #c23b3b; font-size: 9.5px; font-weight: 750; }
  .schedule-unscheduled-card__assignment { min-width: 0; display: grid; gap: 3px; color: var(--admin-muted); font-size: 10.5px; }
  .schedule-unscheduled-card__state { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
  .schedule-unscheduled-card__state .admin-badge { min-height: 20px; padding: 3px 6px; font-size: 9px; }
  .schedule-unscheduled-card > .btn { width: auto; white-space: nowrap; }
  .schedule-empty-state { min-height: 104px; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 18px; color: var(--admin-muted); text-align: left; }
  .schedule-empty-state .admin-icon { width: 24px; height: 24px; color: var(--admin-success); }
  .schedule-empty-state strong { display: block; color: var(--admin-text); font-size: 12px; }
  .schedule-empty-state p { margin: 3px 0 0; font-size: 11px; }
}

@media screen and (max-width: 1350px) {
  .schedule-kpis article { gap: 8px; padding-inline: 11px; }
  .schedule-kpis__icon { width: 30px; height: 30px; }
  .schedule-kpis strong { font-size: 19px; }
  .schedule-kpis em { display: none; }
  .schedule-week-grid .schedule-day__header { padding-inline: 8px; }
  .schedule-week-grid .schedule-day__jobs { padding: 6px; gap: 6px; }
  .schedule-week-grid .schedule-job-card { padding: 8px; }
  .schedule-week-grid .schedule-job-card__topline { align-items: flex-start; flex-direction: column; }
  .schedule-week-grid .schedule-job-card__client { font-size: 12px; }
  .schedule-week-grid .schedule-job-card__service { font-size: 10.5px; }
}

@media screen and (max-width: 1100px) {
  .schedule-period { align-items: stretch; flex-wrap: wrap; }
  .schedule-period__views { margin-left: auto; }
  .schedule-period__today { margin-left: auto; }
  .schedule-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .schedule-kpis article:nth-child(3) { border-right: 0; }
  .schedule-kpis article:nth-child(-n + 3) { border-bottom: 1px solid var(--admin-border); }
  .schedule-kpis article:last-child { grid-column: span 2; }
  .schedule-filters { grid-template-columns: minmax(0, 1.5fr) minmax(120px, .8fr) auto; }
  .schedule-filter-advanced { grid-column: auto; grid-row: auto; min-height: 0; display: block; position: relative; }
  .schedule-filter-advanced summary { height: 38px; display: flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid #dce4ef; border-radius: 8px; background: #fff; color: var(--admin-text); font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
  .schedule-filter-advanced summary::-webkit-details-marker { display: none; }
  .schedule-filter-advanced summary b { min-width: 16px; display: grid; place-items: center; border-radius: 999px; color: #fff; background: var(--admin-primary); font-size: 9px; }
  .schedule-filter-advanced summary small { margin-left: auto; color: var(--admin-muted); font-size: 9.5px; font-weight: 500; }
  .schedule-filter-advanced > div { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; width: min(600px, calc(100vw - 40px)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(13,25,57,.14); }
  .schedule-filter-advanced:not([open]) > div { display: none; }
  .schedule-filters > .btn { grid-column: auto; grid-row: auto; }
  .schedule-week-grid { display: none; }
  .schedule-mobile-agenda { display: grid; gap: 10px; padding: 11px; background: #f7f9fc; }
  .schedule-mobile-agenda .schedule-day { min-height: 0; display: block; overflow: hidden; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; }
  .schedule-mobile-agenda .schedule-day.is-today { box-shadow: inset 3px 0 0 var(--admin-primary); }
  .schedule-mobile-agenda .schedule-day__header { min-height: 0; display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; }
  .schedule-mobile-agenda .schedule-day__header > div { gap: 7px; }
  .schedule-mobile-agenda .schedule-day__header strong { font-size: 17px; }
  .schedule-mobile-agenda .schedule-day__header small { margin: 0; font-size: 10.5px; }
  .schedule-mobile-agenda .schedule-day__availability { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); padding: 8px 11px 0; }
  .schedule-mobile-agenda .schedule-day__availability span { padding: 5px 7px; font-size: 10px; }
  .schedule-mobile-agenda .schedule-day__jobs { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 10px 11px 11px; }
  .schedule-mobile-agenda .schedule-job-card { min-height: 136px; padding: 11px; }
  .schedule-mobile-agenda .schedule-job-card__time { font-size: 12px; }
  .schedule-mobile-agenda .schedule-job-card__client { font-size: 13px; }
  .schedule-mobile-agenda .schedule-job-card__service { font-size: 11px; }
  .schedule-mobile-agenda .schedule-job-card__assignment { font-size: 10.5px; }
  .schedule-unscheduled-card { grid-template-columns: minmax(180px, 1.3fr) minmax(110px, .75fr) minmax(130px, 1fr) auto; }
  .schedule-unscheduled-card__state { display: none; }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.schedule-page) { padding-top: 12px; }
  .schedule-page { gap: 11px; }
  .schedule-page__header,
  .schedule-workspace > header,
  .schedule-unscheduled > header,
  .schedule-filter-panel > header { align-items: flex-start; flex-direction: column; }
  .schedule-page__header { padding: 2px 1px 0; }
  .schedule-page__header h1 { font-size: 25px; }
  .schedule-page__actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-page__actions .btn { justify-content: center; }
  .schedule-period { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 10px; }
  .schedule-period__nav { min-width: 0; gap: 7px; }
  .schedule-period__nav > div { min-width: 0; }
  .schedule-period__nav strong { font-size: 12.5px; }
  .schedule-period__views { margin: 0; }
  .schedule-period__today { grid-column: 1 / -1; width: 100%; margin: 0; justify-content: center; }
  .schedule-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-kpis article { min-height: 75px; padding: 11px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
  .schedule-kpis article:nth-child(2n) { border-right: 0; }
  .schedule-kpis article:nth-child(3) { border-right: 1px solid var(--admin-border); }
  .schedule-kpis article:nth-child(5) { grid-column: 1 / -1; border-bottom: 0; }
  .schedule-kpis article:last-child { grid-column: 1 / -1; }
  .schedule-kpis small { font-size: 10px; white-space: normal; }
  .schedule-filter-panel > header { padding: 12px; gap: 5px; }
  .schedule-filters { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 11px; }
  .schedule-filter-field--search { grid-column: 1 / -1; }
  .schedule-filter-advanced { grid-column: 1 / -1; position: static; }
  .schedule-filter-advanced > div { position: static; width: auto; grid-template-columns: minmax(0, 1fr); margin-top: 9px; box-shadow: none; }
  .schedule-filters > .btn { justify-content: center; }
  .schedule-workspace > header,
  .schedule-unscheduled > header { min-height: 0; padding: 12px; }
  .schedule-workspace > header > span { display: none; }
  .schedule-mobile-agenda { gap: 8px; padding: 8px; }
  .schedule-mobile-agenda .schedule-day__jobs { grid-template-columns: minmax(0, 1fr); padding: 9px; }
  .schedule-mobile-agenda .schedule-job-card { min-height: 0; }
  .schedule-unscheduled > header .btn { width: 100%; justify-content: center; }
  .schedule-unscheduled-card { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 11px 12px; }
  .schedule-unscheduled-card__main { grid-column: 1 / -1; }
  .schedule-unscheduled-card__deadline,
  .schedule-unscheduled-card__assignment { align-self: start; }
  .schedule-unscheduled-card > .btn { align-self: end; justify-content: center; }
}

@media screen and (max-width: 420px) {
  .schedule-page__actions { grid-template-columns: minmax(0, 1fr); }
  .schedule-period { grid-template-columns: minmax(0, 1fr); }
  .schedule-period__views { width: 100%; }
  .schedule-period__views a { flex: 1; text-align: center; }
  .schedule-unscheduled-card { grid-template-columns: minmax(0, 1fr); }
  .schedule-unscheduled-card > .btn { width: 100%; }
}

/* ================================================================
   PHASE 6C: RECURRING SERVICES WORKSPACE
   ================================================================ */
@media screen {
  .admin-main:has(.subscriptions-page),
  .admin-main:has(.subscription-form-page) { padding-top: 18px; }

  .subscriptions-page,
  .subscription-form-page { display: grid; width: 100%; gap: 14px; color: var(--admin-text); }

  .subscriptions-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 3px 1px 1px; }
  .subscriptions-header h1,
  .subscription-form-header h1 { margin: 2px 0 4px; color: var(--admin-text); font-size: clamp(25px, 2vw, 32px); line-height: 1.05; }
  .subscriptions-header p:last-child,
  .subscription-form-header > div > p:last-of-type { max-width: 670px; margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
  .subscriptions-header .btn { gap: 7px; white-space: nowrap; }
  .subscriptions-header .admin-icon,
  .subscription-form-header .admin-icon { width: 15px; height: 15px; }

  .subscriptions-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
  .subscriptions-summary article { min-width: 0; min-height: 86px; display: flex; align-items: center; gap: 13px; padding: 15px 18px; border-right: 1px solid var(--admin-border); }
  .subscriptions-summary article:last-child { border-right: 0; }
  .subscriptions-summary article > span:last-child { min-width: 0; display: grid; gap: 2px; }
  .subscriptions-summary small { color: var(--admin-muted); font-size: 10.5px; font-weight: 750; }
  .subscriptions-summary strong { color: var(--admin-text); font-size: 21px; line-height: 1; }
  .subscriptions-summary em { color: var(--admin-muted); font-size: 10.5px; font-style: normal; }
  .subscriptions-summary__icon { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #edf4ff; }
  .subscriptions-summary__icon .admin-icon { width: 18px; height: 18px; }
  .subscriptions-summary__icon--green { color: #128352; background: #e5f7ed; }
  .subscriptions-summary__icon--slate { color: #687286; background: #edf0f4; }
  .subscriptions-summary__icon--amber { color: #9a5a00; background: #fff1d9; }

  .subscriptions-registry,
  .subscription-form-card,
  .subscription-form-note,
  .subscription-form-actions,
  .subscription-form-header { border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
  .subscriptions-registry { overflow: hidden; }
  .subscriptions-registry__header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--admin-border); }
  .subscriptions-registry__header h2 { margin: 0; font-size: 14px; }
  .subscriptions-registry__header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 11px; }
  .subscriptions-filter-clear { display: inline-flex; align-items: center; gap: 5px; color: var(--admin-primary); font-size: 11px; font-weight: 800; white-space: nowrap; }
  .subscriptions-filter-clear .admin-icon { width: 13px; height: 13px; }

  .subscriptions-filter-grid { display: grid; grid-template-columns: minmax(250px, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr) auto; align-items: end; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--admin-border); background: #fbfcfe; }
  .subscriptions-filter-field { min-width: 0; display: grid; gap: 4px; color: var(--admin-muted); font-size: 10.5px; font-weight: 750; }
  .subscriptions-filter-field input,
  .subscriptions-filter-field select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--admin-border); border-radius: 9px; background: #fff; color: var(--admin-text); font: inherit; font-size: 12px; outline: 0; }
  .subscriptions-filter-field input:focus,
  .subscriptions-filter-field select:focus { border-color: #8fb6ff; box-shadow: 0 0 0 3px rgba(40, 103, 215, .1); }
  .subscriptions-filter-search-control { position: relative; display: block; }
  .subscriptions-filter-search-control .admin-icon { position: absolute; top: 50%; left: 11px; width: 14px; height: 14px; transform: translateY(-50%); color: var(--admin-muted); }
  .subscriptions-filter-search-control input { padding-left: 33px; }
  .subscriptions-filter-actions { display: flex; gap: 7px; }
  .subscriptions-filter-actions .btn { min-height: 40px; justify-content: center; font-size: 11.5px; }

  .subscriptions-table-shell { overflow-x: auto; }
  .subscriptions-table { width: 100%; min-width: 920px; table-layout: fixed; border-collapse: collapse; }
  .subscriptions-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
  .subscriptions-table th:nth-child(1) { width: 20%; }
  .subscriptions-table th:nth-child(2) { width: 17%; }
  .subscriptions-table th:nth-child(3) { width: 18%; }
  .subscriptions-table th:nth-child(4) { width: 17%; }
  .subscriptions-table th:nth-child(5) { width: 12%; }
  .subscriptions-table th:nth-child(6) { width: 8%; }
  .subscriptions-table th:nth-child(7) { width: 8%; }
  .subscriptions-table tbody tr { border-bottom: 1px solid var(--admin-border); }
  .subscriptions-table tbody tr:last-child { border-bottom: 0; }
  .subscriptions-table tbody tr:hover { background: #fbfcff; }
  .subscriptions-table tbody tr.is-overdue { background: #fffafa; }
  .subscriptions-table td { min-width: 0; padding: 14px 12px; color: var(--admin-text); font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
  .subscriptions-table td strong { display: block; font-size: 12px; line-height: 1.35; }
  .subscriptions-table td small { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
  .subscriptions-table__client { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; }
  .subscriptions-table__client a { display: block; color: var(--admin-text); font-size: 12.5px; font-weight: 850; }
  .subscriptions-client-avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #eaf1ff; font-size: 10.5px; font-weight: 850; }
  .subscriptions-client-avatar--1 { color: #127f99; background: #e7f8fb; }
  .subscriptions-client-avatar--2 { color: #6b42ba; background: #f0ebff; }
  .subscriptions-client-avatar--3 { color: #a05a13; background: #fff1df; }
  .subscriptions-unassigned { color: #8b5a10; font-size: 11.5px; font-weight: 800; }
  .subscription-status,
  .subscription-due-state { width: fit-content; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 850; line-height: 1.15; white-space: nowrap; }
  .subscription-status--active { color: #087746; background: #ddf5e8; }
  .subscription-status--inactive { color: #687286; background: #edf0f4; }
  .subscription-due-state { margin-top: 5px; }
  .subscription-due-state--overdue { color: #ab3434; background: #ffe6e6; }
  .subscription-due-state--today { color: #9a5a00; background: #fff0d8; }
  .subscription-due-state--soon { color: #176fc3; background: #e9f3ff; }
  .subscriptions-table__actions .btn { width: 100%; justify-content: center; gap: 5px; white-space: nowrap; font-size: 11px; }
  .subscriptions-table__actions .admin-icon { width: 13px; height: 13px; }
  .subscriptions-card-list { display: none; }

  .subscriptions-empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 30px; text-align: center; }
  .subscriptions-empty-state > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #edf4ff; }
  .subscriptions-empty-state > span .admin-icon { width: 20px; height: 20px; }
  .subscriptions-empty-state h3,
  .subscriptions-empty-state p { margin: 0; }
  .subscriptions-empty-state h3 { font-size: 13px; }
  .subscriptions-empty-state p { max-width: 330px; color: var(--admin-muted); font-size: 11px; line-height: 1.45; }

  .subscription-form-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; }
  .subscription-form-header__context { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 9px; margin-top: 9px; }
  .subscription-form-header__context small { color: var(--admin-muted); font-size: 10.5px; }
  .subscription-form-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: 14px; }
  .subscription-form-card { min-width: 0; padding: 18px; }
  .subscription-form-card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
  .subscription-form-card h2 { margin: 0; font-size: 14px; }
  .subscription-form-card header p { margin: 2px 0 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.45; }
  .subscription-form__section-icon { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--admin-primary); background: #eaf1ff; }
  .subscription-form__section-icon .admin-icon { width: 17px; height: 17px; }
  .subscription-form__section-icon--violet { color: #6b42ba; background: #f1ebff; }
  .subscription-form__section-icon--amber { color: #a05a13; background: #fff1df; }
  .subscription-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .subscription-form .form-label { font-size: 11.5px; }
  .subscription-form .form-input,
  .subscription-form .form-select { min-height: 42px; font-size: 13px; }
  .subscription-form .form-helper { color: var(--admin-muted); font-size: 10.5px; line-height: 1.4; }
  .subscription-form-card--settings { padding-bottom: 15px; }
  .subscription-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .subscription-check { min-width: 0; display: grid; gap: 5px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fbfcfe; }
  .subscription-check > span { display: flex; align-items: flex-start; gap: 8px; }
  .subscription-check input { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
  .subscription-check strong { font-size: 12px; line-height: 1.35; }
  .subscription-check small { color: var(--admin-muted); font-size: 10.5px; line-height: 1.42; }
  .subscription-form-note { display: flex; align-items: flex-start; gap: 10px; padding: 15px 18px; color: #715315; border-color: #f0d99d; background: #fffaf0; }
  .subscription-form-note > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #a7770d; background: #fff0c7; }
  .subscription-form-note .admin-icon { width: 17px; height: 17px; }
  .subscription-form-note p { margin: 0; font-size: 11px; line-height: 1.5; }
  .subscription-form-note strong { display: block; margin-bottom: 2px; color: var(--admin-text); font-size: 12.5px; }
  .subscription-form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 16px; }
  .subscription-form-actions .btn { font-size: 11.5px; }
}

@media screen and (max-width: 1180px) {
  .subscriptions-table { min-width: 860px; }
  .subscriptions-table th,
  .subscriptions-table td { padding-inline: 9px; }
  .subscriptions-table__actions .btn { padding-inline: 7px; font-size: 10px; }
  .subscription-form-layout { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 760px) {
  .admin-main:has(.subscriptions-page),
  .admin-main:has(.subscription-form-page) { padding-top: 12px; }
  .subscriptions-page,
  .subscription-form-page { gap: 11px; }
  .subscriptions-header,
  .subscription-form-header { align-items: flex-start; flex-direction: column; padding: 14px; }
  .subscriptions-header .btn,
  .subscription-form-header > .btn { width: 100%; justify-content: center; }
  .subscriptions-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscriptions-summary article { min-height: 78px; padding: 12px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }
  .subscriptions-summary article:nth-child(2n) { border-right: 0; }
  .subscriptions-summary article:nth-last-child(-n + 2) { border-bottom: 0; }
  .subscriptions-summary__icon { width: 34px; height: 34px; }
  .subscriptions-summary strong { font-size: 18px; }
  .subscriptions-registry__header { align-items: flex-start; flex-direction: column; }
  .subscriptions-filter-grid { grid-template-columns: minmax(0, 1fr); padding: 11px; }
  .subscriptions-filter-field input,
  .subscriptions-filter-field select { height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .subscriptions-filter-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscriptions-filter-actions .btn { width: 100%; min-height: 44px; }
  .subscriptions-table-shell { display: none; }
  .subscriptions-card-list { display: grid; gap: 10px; padding: 11px; }
  .subscriptions-mobile-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 11px; background: #fff; }
  .subscriptions-mobile-card.is-overdue { border-color: #f2c3c3; background: #fffafa; }
  .subscriptions-mobile-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; }
  .subscriptions-mobile-card header a { color: var(--admin-text); font-size: 13px; font-weight: 850; }
  .subscriptions-mobile-card header small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 10.5px; overflow-wrap: anywhere; }
  .subscriptions-mobile-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }
  .subscriptions-mobile-card dl div { min-width: 0; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--admin-border); border-radius: 8px; }
  .subscriptions-mobile-card dt { color: var(--admin-muted); font-size: 10px; }
  .subscriptions-mobile-card dd { margin: 0; font-size: 11.5px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
  .subscriptions-mobile-card dd .subscription-due-state { margin-top: 5px; font-size: 9.5px; }
  .subscriptions-mobile-card > p { margin: 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.45; }
  .subscriptions-mobile-card > .btn { justify-content: center; }
  .subscription-form-card { padding: 14px; }
  .subscription-form-grid { grid-template-columns: minmax(0, 1fr); }
  .subscription-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .subscription-form-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .subscription-form-actions .btn { justify-content: center; }
}

@media screen and (max-width: 420px) {
  .subscriptions-summary article { padding: 10px; }
  .subscriptions-summary__icon { width: 30px; height: 30px; }
  .subscriptions-summary strong { font-size: 17px; }
  .subscriptions-mobile-card > header { grid-template-columns: auto minmax(0, 1fr); }
  .subscriptions-mobile-card > header .subscription-status { grid-column: 1 / -1; justify-self: start; }
  .subscriptions-mobile-card dl { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 6D: One-Time Jobs operational registry. */
html:has(.one-time-jobs-page) { overflow-x: clip; }
.admin-main:has(.one-time-jobs-page) { padding-top: 18px; }
.one-time-jobs-page { display: grid; width: 100%; min-width: 0; gap: 14px; color: var(--admin-text); }
.one-time-jobs-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 3px 1px 1px; }
.one-time-jobs-header h1 { margin: 2px 0 4px; font-size: clamp(25px, 2vw, 32px); line-height: 1.05; }
.one-time-jobs-header p:last-child { max-width: 660px; margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.45; }
.one-time-jobs-header .btn { gap: 7px; white-space: nowrap; }
.one-time-jobs-header .admin-icon { width: 15px; height: 15px; }

.one-time-jobs-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: 12px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.one-time-jobs-summary article { display: flex; min-width: 0; min-height: 86px; align-items: center; gap: 13px; padding: 15px 18px; border-right: 1px solid var(--admin-border); }
.one-time-jobs-summary article:last-child { border-right: 0; }
.one-time-jobs-summary article > span:last-child { display: grid; min-width: 0; gap: 2px; }
.one-time-jobs-summary small { color: var(--admin-muted); font-size: 10.5px; font-weight: 750; }
.one-time-jobs-summary strong { color: var(--admin-text); font-size: 21px; line-height: 1; }
.one-time-jobs-summary em { color: var(--admin-muted); font-size: 10.5px; font-style: normal; }
.one-time-jobs-summary__icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #edf4ff; }
.one-time-jobs-summary__icon .admin-icon { width: 18px; height: 18px; }
.one-time-jobs-summary__icon--blue { color: #177c9e; background: #e4f7fb; }
.one-time-jobs-summary__icon--amber { color: #9a5a00; background: #fff1d9; }
.one-time-jobs-summary__icon--danger { color: #ba3939; background: #ffe9e9; }

.one-time-jobs-registry { min-width: 0; overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.one-time-jobs-registry__header { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--admin-border); }
.one-time-jobs-registry__header h2 { margin: 0; font-size: 14px; }
.one-time-jobs-registry__header p { margin: 3px 0 0; color: var(--admin-muted); font-size: 11px; }
.one-time-jobs-filter-panel { border-bottom: 1px solid var(--admin-border); background: #fbfcfe; }
.one-time-jobs-filter-panel > summary { display: none; }
.one-time-jobs-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(115px, 1fr)) auto; align-items: end; gap: 10px; padding: 12px 15px; }
.one-time-jobs-filter-actions { display: flex; gap: 7px; }
.one-time-jobs-filter-actions .btn { min-height: 40px; justify-content: center; font-size: 11.5px; white-space: nowrap; }

.one-time-jobs-table-shell { max-width: 100%; overflow-x: auto; }
.one-time-jobs-table { width: 100%; min-width: 1160px; border-collapse: collapse; table-layout: fixed; }
.one-time-jobs-table th { padding: 10px 12px; border-bottom: 1px solid var(--admin-border); color: var(--admin-muted); font-size: 10.5px; font-weight: 800; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
.one-time-jobs-table th:nth-child(1) { width: 8%; }.one-time-jobs-table th:nth-child(2) { width: 17%; }.one-time-jobs-table th:nth-child(3) { width: 13%; }.one-time-jobs-table th:nth-child(4) { width: 15%; }.one-time-jobs-table th:nth-child(5) { width: 15%; }.one-time-jobs-table th:nth-child(6) { width: 12%; }.one-time-jobs-table th:nth-child(7) { width: 10%; }.one-time-jobs-table th:nth-child(8) { width: 10%; }
.one-time-jobs-table tbody tr { border-bottom: 1px solid var(--admin-border); }.one-time-jobs-table tbody tr:last-child { border-bottom: 0; }.one-time-jobs-table tbody tr:hover { background: #fbfcff; }.one-time-jobs-table tbody tr.is-overdue { background: #fffafa; }
.one-time-jobs-table td { min-width: 0; padding: 14px 12px; color: var(--admin-text); font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.one-time-jobs-table td strong { display: block; font-size: 12px; line-height: 1.35; }.one-time-jobs-table td small, .one-time-jobs-table td > span:not(.admin-badge):not(.job-unassigned):not(.job-attention-cue) { display: block; margin-top: 3px; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
.one-time-jobs-table__job .job-reference, .one-time-jobs-table__client .job-client-link { color: var(--admin-text); font-size: 12.5px; font-weight: 850; }.one-time-jobs-table__client .job-client-link { display: block; }
.one-time-jobs-table__payment { display: grid; gap: 6px; }.one-time-jobs-table__payment .admin-badge { width: fit-content; }.one-time-jobs-table__payment strong { font-size: 12.5px; }
.one-time-jobs-table__actions .job-row-actions { justify-content: flex-end; }.one-time-jobs-table__actions .btn { white-space: nowrap; }
.one-time-jobs-card-list { display: none; }

.one-time-jobs-empty-state { display: grid; min-height: 250px; place-items: center; align-content: center; gap: 7px; padding: 30px; text-align: center; }
.one-time-jobs-empty-state > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; color: var(--admin-primary); background: #edf4ff; }.one-time-jobs-empty-state > span .admin-icon { width: 20px; height: 20px; }.one-time-jobs-empty-state h3, .one-time-jobs-empty-state p { margin: 0; }.one-time-jobs-empty-state h3 { font-size: 13px; }.one-time-jobs-empty-state p { max-width: 330px; color: var(--admin-muted); font-size: 11px; line-height: 1.45; }

@media screen and (max-width: 1280px) {
  .one-time-jobs-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }.one-time-jobs-filter-actions { grid-column: span 3; }.one-time-jobs-filter-actions .btn { min-width: 130px; }
  .one-time-jobs-table { min-width: 100%; }.one-time-jobs-table th:nth-child(1) { width: 9%; }.one-time-jobs-table th:nth-child(2) { width: 17%; }.one-time-jobs-table th:nth-child(3) { width: 12%; }.one-time-jobs-table th:nth-child(4) { width: 15%; }.one-time-jobs-table th:nth-child(5) { width: 14%; }.one-time-jobs-table th:nth-child(6) { width: 13%; }.one-time-jobs-table th:nth-child(7) { width: 11%; }.one-time-jobs-table th:nth-child(8) { width: 9%; }
  .one-time-jobs-table th, .one-time-jobs-table td { padding-inline: 8px; }.one-time-jobs-table td { font-size: 11.5px; }.one-time-jobs-table__actions .job-row-actions { flex-direction: column; align-items: stretch; }.one-time-jobs-table__actions .job-open-button { width: 100%; justify-content: center; padding-inline: 5px; }.one-time-jobs-table__actions .job-actions-menu { align-self: center; }
}
@media screen and (max-width: 760px) {
  .admin-main:has(.one-time-jobs-page) { padding-top: 12px; }.one-time-jobs-page { gap: 11px; }.one-time-jobs-header { align-items: flex-start; flex-direction: column; padding: 0 2px; }.one-time-jobs-header .btn { width: 100%; min-height: 44px; justify-content: center; }
  .one-time-jobs-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.one-time-jobs-summary article { min-height: 78px; gap: 10px; padding: 12px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }.one-time-jobs-summary article:nth-child(2n) { border-right: 0; }.one-time-jobs-summary article:nth-last-child(-n + 2) { border-bottom: 0; }.one-time-jobs-summary__icon { width: 34px; height: 34px; }.one-time-jobs-summary strong { font-size: 18px; }
  .one-time-jobs-registry__header { align-items: flex-start; flex-direction: column; }.one-time-jobs-filter-panel > summary { display: flex; min-height: 48px; align-items: center; padding: 0 12px; color: var(--admin-text); font-size: 12px; font-weight: 800; list-style: none; cursor: pointer; }.one-time-jobs-filter-panel > summary::-webkit-details-marker { display: none; }.one-time-jobs-filter-panel > summary::after { margin-left: auto; content: "⌄"; color: var(--admin-muted); font-size: 16px; }.one-time-jobs-filter-panel[open] > summary::after { transform: rotate(180deg); }.one-time-jobs-filter-panel > summary strong { margin-left: 3px; color: var(--admin-primary); }
  .one-time-jobs-filter-grid { grid-template-columns: minmax(0, 1fr); padding: 11px; }.one-time-jobs-filter-grid .job-filter-field input, .one-time-jobs-filter-grid .job-filter-field select { min-height: 44px; font-size: 13px; }.one-time-jobs-filter-actions { display: grid; grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }.one-time-jobs-filter-actions .btn { width: 100%; min-height: 44px; }
  .one-time-jobs-table-shell { display: none; }.one-time-jobs-card-list { display: grid; gap: 10px; padding: 11px; }.one-time-jobs-mobile-card { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--admin-border); border-radius: 11px; background: #fff; }.one-time-jobs-mobile-card.is-overdue { border-color: #f2c3c3; background: #fffafa; }.one-time-jobs-mobile-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }.one-time-jobs-mobile-card header a, .one-time-jobs-mobile-card__client { color: var(--admin-text); font-size: 13px; font-weight: 850; }.one-time-jobs-mobile-card header small { display: block; margin-top: 2px; color: var(--admin-muted); font-size: 10.5px; }.one-time-jobs-mobile-card__client { padding-top: 9px; border-top: 1px solid var(--admin-border); }
  .one-time-jobs-mobile-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; }.one-time-jobs-mobile-card dl div { display: grid; min-width: 0; gap: 4px; padding: 8px; border: 1px solid var(--admin-border); border-radius: 8px; }.one-time-jobs-mobile-card dt { color: var(--admin-muted); font-size: 10px; }.one-time-jobs-mobile-card dd { margin: 0; color: var(--admin-text); font-size: 11.5px; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }.one-time-jobs-mobile-card dd small { display: block; margin-top: 4px; font-size: 10px; }.one-time-jobs-mobile-card dd .admin-badge { margin-right: 4px; }.one-time-jobs-mobile-card dd strong { display: inline; font-size: 11.5px; }.one-time-jobs-mobile-card__actions { display: flex; align-items: center; gap: 8px; }.one-time-jobs-mobile-card__actions .btn { flex: 1; min-height: 40px; justify-content: center; }.one-time-jobs-mobile-card__actions .job-actions-menu { flex: 0 0 auto; }
}
@media screen and (max-width: 420px) { .one-time-jobs-summary article { padding: 10px; }.one-time-jobs-summary__icon { width: 30px; height: 30px; }.one-time-jobs-summary strong { font-size: 17px; }.one-time-jobs-mobile-card dl { grid-template-columns: minmax(0, 1fr); } }

/* Phase 6E: General Settings deployment overview. */
.general-settings-workspace { display: grid; width: 100%; min-width: 0; gap: 14px; color: var(--admin-text); }
.general-settings-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 3px 2px; }
.general-settings-hero h1 { margin: 2px 0 5px; font-size: clamp(25px, 2vw, 34px); line-height: 1.08; }
.general-settings-hero p:last-child { max-width: 680px; margin: 0; color: var(--admin-muted); font-size: 12px; line-height: 1.5; }
.general-settings-hero__status { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--admin-border); border-radius: 11px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.general-settings-hero__status > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--admin-primary); background: #eaf1ff; }
.general-settings-hero__status .admin-icon { width: 17px; height: 17px; }
.general-settings-hero__status div { display: grid; gap: 2px; }.general-settings-hero__status strong { font-size: 12px; }.general-settings-hero__status small { color: var(--admin-muted); font-size: 10.5px; }

.general-settings-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 11px; align-items: center; padding: 13px 15px; border: 1px solid #d5e3f8; border-radius: var(--admin-card-radius); background: #f5f9ff; }
.general-settings-notice > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #1760d5; background: #e3efff; }.general-settings-notice .admin-icon { width: 17px; height: 17px; }
.general-settings-notice strong { color: #1f426f; font-size: 12px; }.general-settings-notice p { margin: 2px 0 0; color: #5c6f87; font-size: 10.8px; line-height: 1.45; }

.general-settings-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.general-settings-summary article { display: flex; min-width: 0; min-height: 82px; align-items: center; gap: 12px; padding: 14px 16px; border-right: 1px solid var(--admin-border); }.general-settings-summary article:last-child { border-right: 0; }
.general-settings-summary article > div { display: grid; min-width: 0; gap: 2px; }.general-settings-summary small { color: var(--admin-muted); font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }.general-settings-summary strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.2; }.general-settings-summary em { overflow-wrap: anywhere; color: var(--admin-muted); font-size: 10.5px; font-style: normal; }
.general-settings-summary__icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--admin-primary); background: #eaf1ff; }.general-settings-summary__icon .admin-icon { width: 17px; height: 17px; }.general-settings-summary__icon--green { color: #087849; background: #e2f5ea; }.general-settings-summary__icon--violet { color: #6a43b4; background: #f0ebff; }

.general-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }.general-settings-card { min-width: 0; overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }.general-settings-card--wide { grid-column: 1 / -1; }
.general-settings-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 70px; padding: 14px 16px; border-bottom: 1px solid var(--admin-border); }.general-settings-card > header > div { min-width: 0; }.general-settings-card h2 { margin: 0; font-size: 14px; }.general-settings-card header p { margin: 2px 0 0; color: var(--admin-muted); font-size: 10.5px; line-height: 1.35; }
.general-settings-card__icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; color: #6a43b4; background: #f0ebff; }.general-settings-card__icon .admin-icon { width: 17px; height: 17px; }.general-settings-card__icon--blue { color: #1760d5; background: #eaf1ff; }.general-settings-card__icon--violet { color: #6a43b4; background: #f0ebff; }.general-settings-card__icon--slate { color: #526176; background: #edf1f5; }.general-settings-card__icon--cyan { color: #147f9b; background: #e5f7fa; }
.general-settings-state { width: fit-content; max-width: 128px; padding: 4px 8px; border-radius: 999px; background: #eef2f6; color: #607087; font-size: 9.5px; font-weight: 800; line-height: 1.2; text-align: center; }.general-settings-state.is-ready { background: #e1f5e9; color: #087848; }.general-settings-state.is-muted { background: #fff0df; color: #9c5a10; }
.general-settings-card__body { display: grid; gap: 11px; padding: 14px 16px 16px; }.general-settings-detail { display: grid; gap: 3px; padding-bottom: 11px; border-bottom: 1px solid #edf0f5; }.general-settings-detail:last-child { padding-bottom: 0; border-bottom: 0; }.general-settings-detail strong { font-size: 11.5px; }.general-settings-detail p, .general-settings-helper { margin: 0; color: var(--admin-muted); font-size: 10.8px; line-height: 1.48; }
.general-settings-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }.general-settings-facts > div { display: grid; min-width: 0; gap: 4px; padding: 10px; border: 1px solid #e6ebf2; border-radius: 9px; background: #fbfcfe; }.general-settings-facts dt { color: var(--admin-muted); font-size: 10px; font-weight: 750; }.general-settings-facts dd { min-width: 0; margin: 0; color: var(--admin-text); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.general-settings-highlight { display: grid; gap: 3px; padding: 12px; border: 1px solid #e4ddfa; border-radius: 10px; background: #faf8ff; }.general-settings-highlight small { color: #746a92; font-size: 10px; font-weight: 750; }.general-settings-highlight strong { color: #4f358d; font-size: 15px; overflow-wrap: anywhere; }.general-settings-code-block { padding: 10px 11px; overflow: auto; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; color: #42516a; font-size: 10.5px; line-height: 1.45; white-space: nowrap; }
.general-settings-workspace code { font-size: .94em; overflow-wrap: anywhere; }

@media screen and (max-width: 760px) {
  .admin-main:has(.general-settings-workspace) { padding-top: 12px; }.general-settings-workspace { gap: 11px; }.general-settings-hero { align-items: flex-start; flex-direction: column; gap: 12px; padding: 0 2px; }.general-settings-hero__status { width: 100%; }.general-settings-notice { align-items: flex-start; padding: 12px; }.general-settings-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.general-settings-summary article { min-height: 78px; padding: 12px; border-right: 1px solid var(--admin-border); border-bottom: 1px solid var(--admin-border); }.general-settings-summary article:nth-child(2n) { border-right: 0; }.general-settings-summary article:last-child { grid-column: 1 / -1; border-bottom: 0; }.general-settings-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }.general-settings-card--wide { grid-column: auto; }.general-settings-card > header { min-height: 66px; padding: 12px; }.general-settings-card__body { padding: 12px; }.general-settings-facts { grid-template-columns: minmax(0, 1fr); }.general-settings-code-block { white-space: normal; }
}

@media screen and (max-width: 420px) {
  .general-settings-summary { grid-template-columns: minmax(0, 1fr); }.general-settings-summary article, .general-settings-summary article:nth-child(2n), .general-settings-summary article:last-child { grid-column: auto; border-right: 0; border-bottom: 1px solid var(--admin-border); }.general-settings-summary article:last-child { border-bottom: 0; }.general-settings-card > header { grid-template-columns: auto minmax(0, 1fr); }.general-settings-state { grid-column: 2; justify-self: start; }
}

/* Phase 7: shared mobile interaction sizing. */
@media screen and (max-width: 760px) {
  .page-admin-crm .btn--small,
  .page-admin-crm .job-actions-menu > summary {
    min-height: 40px;
  }

  .page-admin-crm .job-actions-menu > summary {
    min-width: 40px;
  }
}

/* Phase 7: Internal admin login visual polish. */
.page-admin--login {
  background: #f4f7fb;
  color: var(--admin-text);
}

.page-admin--login main {
  min-height: 100vh;
}

.page-admin--login .auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 99, 220, 0.07), transparent 32%),
    #f4f7fb;
}

.page-admin--login .auth__card {
  width: min(432px, 100%);
  padding: 32px;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: var(--admin-surface);
  box-shadow: 0 14px 34px rgba(13, 25, 57, 0.08);
  text-align: left;
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth__brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #eaf1ff;
}

.auth__brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.auth__brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.auth__brand-copy strong {
  color: var(--admin-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.auth__brand-copy small {
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth__heading {
  margin: 26px 0 22px;
}

.auth__heading h1 {
  margin: 0;
  color: var(--admin-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.page-admin--login .auth__subtitle {
  margin: 5px 0 0;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth__flash-list {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.page-admin--login .auth__alert {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}

.page-admin--login .auth__alert.alert--danger {
  border-color: #f1cbcb;
  background: var(--admin-danger-soft);
  color: #b93737;
}

.page-admin--login .auth__form {
  display: grid;
  gap: 16px;
}

.page-admin--login .auth__form .form-field {
  gap: 6px;
}

.page-admin--login .auth__form .form-label {
  color: var(--admin-text);
  font-size: 12px;
  font-weight: 600;
}

.page-admin--login .auth__input {
  min-height: 46px;
  padding: 0 13px;
  border-color: #dbe3ef;
  border-radius: 10px;
  font-size: 13px;
}

.page-admin--login .auth__input:focus {
  border-color: #78a6fb;
  box-shadow: 0 0 0 3px rgba(22, 89, 216, 0.13);
}

.page-admin--login .auth__submit {
  min-height: 46px;
  margin-top: 4px;
  border-color: var(--admin-primary);
  border-radius: 10px;
  background: var(--admin-primary);
  font-size: 13px;
  font-weight: 600;
}

.page-admin--login .auth__submit:hover,
.page-admin--login .auth__submit:focus-visible {
  border-color: var(--admin-primary-hover);
  background: var(--admin-primary-hover);
}

.auth__security-note {
  margin: 18px 0 0;
  color: var(--admin-muted);
  font-size: 10.5px;
  text-align: center;
}

@media screen and (max-width: 540px) {
  .page-admin--login .auth {
    padding: 20px 14px;
  }

  .page-admin--login .auth__card {
    width: 100%;
    padding: 26px 20px;
    border-radius: 14px;
  }

  .auth__heading {
    margin: 22px 0 20px;
  }
}

/* Phase 10B: In-app notification feed. */
.admin-main:has(.notifications-page) { padding-top: 18px; }
.notifications-page { display: grid; width: 100%; min-width: 0; gap: 14px; color: var(--admin-text); }
.notifications-page__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 3px 1px 1px; }
.notifications-page__header h1 { margin: 2px 0 4px; font-size: clamp(25px, 2vw, 32px); line-height: 1.05; }
.notifications-page__header p:not(.admin-kicker) { margin: 0; color: var(--admin-muted); font-size: 12px; }
.notifications-filter { display: flex; align-items: center; gap: 4px; width: max-content; max-width: 100%; padding: 4px; border: 1px solid var(--admin-border); border-radius: 10px; background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.notifications-filter a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 7px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.notifications-filter a span { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: #edf1f6; color: inherit; font-size: 10px; text-align: center; }
.notifications-filter a.is-active { background: #eaf1ff; color: var(--admin-primary); }
.notifications-list { overflow: hidden; border: 1px solid var(--admin-border); border-radius: var(--admin-card-radius); background: var(--admin-surface); box-shadow: var(--admin-card-shadow); }
.notification-row { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 88px; padding: 14px 16px 14px 0; border-bottom: 1px solid #edf1f6; }
.notification-row:last-child { border-bottom: 0; }
.notification-row.is-unread { background: #f6f9ff; }
.notification-row__indicator { width: 4px; align-self: stretch; border-radius: 0 4px 4px 0; background: transparent; }
.notification-row.is-unread .notification-row__indicator { background: var(--admin-primary); }
.notification-row__content { min-width: 0; }
.notification-row__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.notification-row h2 { margin: 0; color: var(--admin-text); font-size: 13px; line-height: 1.35; }
.notification-row__heading span { padding: 2px 6px; border-radius: 999px; background: #dfeaff; color: var(--admin-primary); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.notification-row p { margin: 3px 0 4px; color: var(--admin-muted); font-size: 11.5px; line-height: 1.45; }
.notification-row time { color: #8795aa; font-size: 10.5px; }
.notification-row__actions { display: flex; align-items: center; }
.notification-row__actions .btn { min-height: 34px; padding-inline: 11px; font-size: 11px; white-space: nowrap; }
.notifications-empty-state { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 7px; padding: 30px; color: var(--admin-muted); text-align: center; }
.notifications-empty-state > span { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #edf4ff; color: var(--admin-primary); }
.notifications-empty-state .admin-icon { width: 20px; height: 20px; }
.notifications-empty-state h2, .notifications-empty-state p { margin: 0; }
.notifications-empty-state h2 { color: var(--admin-text); font-size: 14px; }
.notifications-empty-state p { max-width: 330px; font-size: 11px; line-height: 1.45; }

@media screen and (max-width: 540px) {
  .admin-notification-panel { width: min(370px, calc(100vw - 18px)); }
  .admin-notification-preview { gap: 8px; }
  .admin-notification-preview strong, .admin-notification-preview p { overflow: visible; text-overflow: clip; white-space: normal; }
  .admin-notification-panel button { min-height: 36px; }
  .admin-main:has(.notifications-page) { padding-top: 12px; }
  .notifications-page { gap: 12px; }
  .notifications-page__header { align-items: flex-start; flex-direction: column; gap: 11px; }
  .notifications-page__header form, .notifications-page__header .btn { width: 100%; }
  .notifications-page__header .btn { min-height: 44px; justify-content: center; }
  .notifications-filter { width: 100%; }
  .notifications-filter a { flex: 1; justify-content: center; min-height: 40px; }
  .notification-row { grid-template-columns: 4px minmax(0, 1fr); gap: 11px; padding: 13px 12px 13px 0; }
  .notification-row__actions { grid-column: 2; }
  .notification-row__actions .btn { width: 100%; min-height: 40px; justify-content: center; }
}

/* Phase 13B.3 public, customer-safe Service Confirmation document. */
.public-service-confirmation-page { min-height: 100vh; margin: 0; padding: 32px 16px; background: linear-gradient(145deg, #eef5fb 0%, #f8fbfe 55%, #e9f2f9 100%); color: #17253e; font-family: Poppins, system-ui, sans-serif; }.public-service-confirmation-shell { width: min(100%, 760px); margin: 0 auto; }.public-service-confirmation-card { overflow: hidden; border: 1px solid #dce7f4; border-radius: 16px; background: #fff; box-shadow: 0 16px 42px rgba(13, 25, 57, .12); }.public-service-confirmation-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 28px 20px; border-bottom: 3px solid #071a38; }.public-service-confirmation-brand { display: flex; min-width: 0; align-items: center; gap: 11px; }.public-service-confirmation-brand img { width: 52px; height: 52px; flex: 0 0 auto; object-fit: contain; }.public-service-confirmation-brand strong, .public-service-confirmation-brand span { display: block; }.public-service-confirmation-brand strong { color: #071a38; font-size: 18px; letter-spacing: -.025em; }.public-service-confirmation-brand span { margin-top: 2px; color: #607089; font-size: 11px; }.public-service-confirmation-title { flex: 0 1 auto; text-align: right; }.public-service-confirmation-title p, .public-service-confirmation-hero p, .public-service-confirmation-actions p { margin: 0; color: #64748b; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.public-service-confirmation-title h1 { margin: 4px 0 0; color: #071a38; font-size: 25px; line-height: 1.08; letter-spacing: -.035em; }.public-service-confirmation-hero { padding: 26px 28px 22px; background: #f7fafe; }.public-service-confirmation-hero h2 { margin: 6px 0; color: #102647; font-size: clamp(24px, 4vw, 34px); line-height: 1.12; letter-spacing: -.04em; overflow-wrap: anywhere; }.public-service-confirmation-hero span { color: #53637b; font-size: 14px; overflow-wrap: anywhere; }.public-service-confirmation-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 20px 28px 0; }.public-service-confirmation-overview div, .public-service-confirmation-details { min-width: 0; padding: 14px; border: 1px solid #dce7f4; border-radius: 10px; background: #fbfdff; }.public-service-confirmation-overview span, .public-service-confirmation-details strong { display: block; color: #64748b; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }.public-service-confirmation-overview strong { display: block; margin-top: 5px; color: #1a2a43; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }.public-service-confirmation-details { margin: 14px 28px 0; }.public-service-confirmation-details p { margin: 7px 0 0; color: #4d5d74; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }.public-service-confirmation-lines { padding: 24px 28px 0; }.public-service-confirmation-lines h2 { margin: 0 0 10px; color: #132544; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }.public-service-confirmation-lines dl, .public-service-confirmation-totals { margin: 0; }.public-service-confirmation-lines dl { border-top: 1px solid #e0e9f2; }.public-service-confirmation-lines dl div, .public-service-confirmation-totals > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; }.public-service-confirmation-lines dl div { padding: 12px 2px; border-bottom: 1px solid #e0e9f2; }.public-service-confirmation-lines dt { min-width: 0; color: #34445d; font-size: 14px; overflow-wrap: anywhere; }.public-service-confirmation-lines dd { margin: 0; color: #17253e; font-size: 14px; font-weight: 650; white-space: nowrap; }.public-service-confirmation-totals { display: grid; gap: 7px; width: min(100% - 56px, 340px); margin: 18px 28px 0 auto; }.public-service-confirmation-totals > div { padding: 0 3px; color: #53637b; font-size: 14px; }.public-service-confirmation-totals strong { color: #17253e; white-space: nowrap; }.public-service-confirmation-totals__total { margin-top: 3px; padding: 13px 14px !important; border-radius: 10px; background: #071a38; color: #fff !important; }.public-service-confirmation-totals__total strong { color: #fff; font-size: 18px; }.public-service-confirmation-totals__total small { color: #bdcce1; font-size: 11px; font-weight: 600; }.public-service-confirmation-actions, .public-service-confirmation-terminal { margin-top: 26px; padding: 20px 28px; border-top: 1px solid #dce7f4; background: #f7fafe; }.public-service-confirmation-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }.public-service-confirmation-actions strong, .public-service-confirmation-actions span { display: block; }.public-service-confirmation-actions strong { margin-top: 4px; color: #17253e; font-size: 14px; }.public-service-confirmation-actions span { margin-top: 5px; color: #64748b; font-size: 12px; line-height: 1.4; }.public-service-confirmation-actions__buttons { display: grid; min-width: 180px; gap: 9px; }.public-service-confirmation-actions__buttons .btn { justify-content: center; min-height: 42px; }.public-service-confirmation-decline { color: #8c3030; }.public-service-confirmation-noscript { margin: 12px 28px; padding: 12px; border-radius: 8px; background: #fff3cd; color: #755300; }.public-service-confirmation-terminal { text-align: center; }.public-service-confirmation-terminal strong { color: #176844; font-size: 20px; }.public-service-confirmation-terminal p { margin: 7px 0 0; color: #53637b; }.public-service-confirmation-unavailable { display: grid; justify-items: center; gap: 9px; margin-top: 14vh; padding: 42px 28px; text-align: center; }.public-service-confirmation-unavailable img { width: 62px; height: 62px; object-fit: contain; }.public-service-confirmation-unavailable p { margin: 0; color: #64748b; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.public-service-confirmation-unavailable h1 { margin: 0; color: #071a38; font-size: 26px; line-height: 1.2; }.public-service-confirmation-unavailable span { color: #53637b; }
@media screen and (max-width: 600px) { .public-service-confirmation-page { padding: 12px; }.public-service-confirmation-header { align-items: stretch; flex-direction: column; padding: 20px 18px 17px; gap: 14px; }.public-service-confirmation-title { text-align: left; }.public-service-confirmation-title h1 { font-size: 23px; }.public-service-confirmation-hero { padding: 22px 18px 18px; }.public-service-confirmation-overview { grid-template-columns: 1fr; padding: 16px 18px 0; }.public-service-confirmation-details { margin: 12px 18px 0; }.public-service-confirmation-lines { padding: 20px 18px 0; }.public-service-confirmation-totals { width: auto; margin: 16px 18px 0; }.public-service-confirmation-actions { align-items: stretch; flex-direction: column; padding: 18px; }.public-service-confirmation-actions__buttons { min-width: 0; width: 100%; }.public-service-confirmation-terminal { margin-top: 20px; padding: 20px 18px; }.public-service-confirmation-unavailable { margin-top: 11vh; padding: 34px 20px; } }


/* Complete Water Test and its Client history titles at every viewport. The title
   can grow vertically while history/menu and actions retain their own space.
   Specificity also overrides the later water-device.css desktop title rule. */
.page-admin-crm:is(.page-client-water-test, .page-client-detail) .admin-workspace .admin-topbar {
  height: auto;
  padding-block: 10px;
}
.page-admin-crm:is(.page-client-water-test, .page-client-detail) .admin-workspace .admin-topbar__title-area {
  min-width: 0;
  flex: 0 1 auto;
}
.page-admin-crm:is(.page-client-water-test, .page-client-detail) .admin-workspace .admin-topbar__title {
  min-width: 0;
  flex: 0 1 auto;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

/* Progressive gallery state stays within the existing fixed image area. */
.photo-load-status { position: absolute; inset: 0; display: grid; place-content: center; margin: 0; padding: 20px; color: var(--admin-muted); text-align: center; pointer-events: none; }
.photo-load-status[hidden], .photo-gallery-card__image img[hidden], .photo-gallery-card__image > button[hidden] { display: none; }
.photo-gallery-card__image > .photo-load-retry { position: absolute; bottom: 12px; left: 25%; width: 50%; height: 32px; border: 1px solid var(--admin-border); border-radius: 6px; background: #fff; cursor: pointer; }

.photo-preview-dialog__image-wrap img[hidden] { display: none; }
