:root {
  --admin-radius: 8px;
  --admin-radius-pill: 999px;
  --admin-shadow: 0 1px 3px rgba(20, 30, 40, 0.08);
}

/* Voided row — used in service-orders and payments tracking */
.row-voided td { opacity: 0.5; text-decoration: line-through; }
.row-voided td .chip { text-decoration: none; }

/* Shared AdminLTE-like admin shell */
.admin-page {
  color: #1f2933;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 auto;
  max-width: 1440px;
  padding: 22px 24px 32px;
}

.page-header,
.crm-header {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-left: 4px solid var(--unit4);
  border-radius: var(--admin-radius);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px 18px;
}

.page-header > div,
.crm-header > div:first-child {
  display: grid;
  gap: 4px;
}

.page-title {
  color: #1f2933;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.page-subtitle,
.panel-subtitle {
  color: #6b7885;
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

.admin-crm {
  gap: 16px;
}

.crm-actions,
.toolbar,
.form-actions,
.pricing-save-bar,
.actions-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-actions {
  justify-content: flex-end;
}

.crm-button,
.btn-sm,
.btn-sm-secondary,
.btn-sm-danger,
.btn-icon,
.btn-action {
  align-items: center;
  border-radius: var(--admin-radius);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  text-decoration: none;
}

.crm-button.primary,
.btn-sm {
  background: #f4721e;
  border: 1px solid #df6419;
  color: #ffffff;
}

.crm-button.secondary,
.btn-sm-secondary,
.btn-icon {
  background: #ffffff;
  border: 1px solid #cfd8e1;
  color: #31404c;
}

.btn-sm-danger {
  background: #ffffff;
  border: 1px solid var(--red);
  color: var(--red);
}

.btn-icon:hover,
.btn-sm-secondary:hover,
.crm-button.secondary:hover {
  background: #f5f7fa;
  border-color: #aebbc7;
}

.btn-sm-danger:hover {
  background: #fff5f5;
}

.btn-action {
  background: #3c8dbc;
  border: 1px solid #367fa9;
  color: #ffffff;
  min-height: 30px;
  padding: 0 10px;
}

.btn-finish {
  background: #00a65a;
  border-color: #008d4c;
}

.btn-pay {
  background: #f39c12;
  border-color: #db8b0b;
}

.crm-kpis,
.stat-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.crm-kpi-card,
.stat-card {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-radius: var(--admin-radius);
  border-top: 3px solid #3c8dbc;
  box-shadow: var(--admin-shadow);
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
}

.crm-kpi-card.revenue {
  border-top-color: #f4721e;
}

.crm-kpi-card.warning {
  border-top-color: #f39c12;
}

.stat-label {
  color: #6b7885;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-value {
  color: #1f2933;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.stat-sub {
  color: #6b7885;
  font-size: 12px;
}

.crm-workspace,
.two-col {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.crm-stack,
.crm-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.attendance-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
}

.panel,
.form-panel {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
}

.panel {
  padding: 0;
}

.panel-header {
  align-items: center;
  border-bottom: 1px solid #d8e0e7;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 16px;
}

.panel-title {
  color: #1f2933;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
  text-transform: none;
}

.panel-link {
  color: #3c8dbc;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.panel-link:hover {
  text-decoration: underline;
}

.panel > .empty-state,
.panel > .feedback-msg,
.panel > .pricing-matrix-wrap,
.panel > .pricing-save-bar,
.panel > .data-table,
.panel > .table-wrap,
.panel > .toolbar,
.panel > p:not(.empty-state) {
  margin: 16px;
}

.panel > .data-table {
  width: calc(100% - 32px);
}

.panel > .toolbar {
  margin-bottom: 0 !important;
}

.table-wrap,
.crm-table-wrap,
.pricing-matrix-wrap {
  overflow-x: auto;
}

.table-count {
  color: #6b7885;
  font-size: 13px;
  font-weight: 800;
  margin-left: auto;
}

.data-table,
.pricing-matrix {
  border-collapse: collapse;
  font-size: 14px;
  min-width: 760px;
  width: 100%;
}

.data-table th,
.pricing-matrix th {
  background: #f5f7fa;
  border-bottom: 1px solid #d8e0e7;
  color: #566371;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td,
.pricing-matrix td {
  border-bottom: 1px solid #e5ebf0;
  padding: 11px 12px;
  vertical-align: middle;
}

.data-table tr:last-child td,
.pricing-matrix tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #f8fafc;
}

.table-muted,
.empty-inline {
  color: #6b7885;
  font-size: 12px;
}

.chip,
.status-chip,
.payment-chip,
.type-badge,
.size-badge {
  align-items: center;
  border-radius: var(--admin-radius-pill);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 4px 10px;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-green,
.status-3,
.payment-chip.paid {
  background: #e8f6ef;
  color: #16845c;
}

.chip-amber,
.status-0 {
  background: #fff7e8;
  color: #c27b1b;
}

.chip-blue,
.status-1 {
  background: #eaf6fb;
  color: #237c9b;
}

.chip-orange,
.status-2 {
  background: #fff2e9;
  color: #f4721e;
}

.chip-muted,
.payment-chip {
  background: #edf1f4;
  color: #6b7885;
}

.size-s { background: #e8f1ff; color: #1d4ed8; }
.size-m { background: #e8f6ef; color: #15803d; }
.size-l { background: #fff7d6; color: #a16207; }
.size-xl { background: #ffe8ed; color: #be123c; }
.size-2xl { background: #f3e8ff; color: #7c3aed; }

.type-wash {
  background: #eaf6fb;
  color: #237c9b;
}

.type-detail {
  background: #fff7e8;
  color: #c27b1b;
}

.bay-grid,
.crm-bay-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  padding: 16px;
}

.bay-card {
  border: 1px solid #d8e0e7;
  border-left: 4px solid #3c8dbc;
  border-radius: var(--admin-radius);
  display: grid;
  gap: 5px;
  padding: 12px;
}

.bay-available { background: #f7fcf9; border-left-color: #00a65a; }
.bay-parked { background: #fffaf0; border-left-color: #f39c12; }
.bay-inprogress { background: #f4fbff; border-left-color: #3c8dbc; }
.bay-closed { background: #f1f4f6; border-left-color: #9aa7b3; opacity: 0.72; }

.bay-card-topline {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.bay-dot {
  border-radius: 999px;
  height: 9px;
  width: 9px;
}

.bay-available .bay-dot { background: #00a65a; }
.bay-parked .bay-dot { background: #f39c12; }
.bay-inprogress .bay-dot { background: #3c8dbc; }
.bay-closed .bay-dot { background: #9aa7b3; }

.bay-card-name {
  font-size: 14px;
  font-weight: 800;
}

.bay-card-status {
  color: #6b7885;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.bay-card-plate {
  font-size: 13px;
  font-weight: 800;
}

.bay-card-plate.muted {
  color: #6b7885;
  font-weight: 600;
}

.bay-card-timer {
  color: #f4721e;
  font-size: 11px;
  font-weight: 800;
}

.shift-list,
.control-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.shift-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5ebf0;
  border-radius: var(--admin-radius);
  display: flex;
  gap: 10px;
  padding: 9px 10px;
}

.shift-avatar {
  align-items: center;
  background: #3c8dbc;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.shift-meta {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.shift-name {
  font-size: 14px;
  font-weight: 800;
}

.shift-role,
.shift-time {
  color: #6b7885;
  font-size: 12px;
}

.control-list a {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5ebf0;
  border-radius: var(--admin-radius);
  color: #1f2933;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  text-decoration: none;
}

.control-list a:hover {
  border-color: #3c8dbc;
}

.control-list span {
  color: #6b7885;
  font-size: 12px;
  font-weight: 700;
}

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

.pipeline-step {
  border: 1px solid #d8e0e7;
  border-left: 4px solid #3c8dbc;
  border-radius: var(--admin-radius);
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
}

.pipeline-step span {
  color: #6b7885;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pipeline-step strong {
  color: #1f2933;
  font-size: 26px;
}

.pipeline-step.queued { border-left-color: #f39c12; }
.pipeline-step.parked { border-left-color: #3c8dbc; }
.pipeline-step.progress { border-left-color: #f4721e; }
.pipeline-step.release { border-left-color: #00a65a; }

.toolbar-search,
.toolbar-select,
.form-row input,
.form-row select,
.edit-input,
.pricing-matrix input[type="number"] {
  border: 1px solid #cfd8e1;
  border-radius: var(--admin-radius);
  color: #1f2933;
  font-size: 14px;
  min-height: 36px;
  padding: 7px 10px;
}

.toolbar-search {
  width: 260px;
}

.toolbar-select {
  width: auto;
}

.form-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.form-panel-title {
  border-bottom: 1px solid #d8e0e7;
  color: #1f2933;
  font-size: 15px;
  font-weight: 800;
  margin: -16px -16px 0;
  padding: 13px 16px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-row label {
  color: #31404c;
  flex: 1;
  font-size: 13px;
  font-weight: 800;
  min-width: 180px;
}

.attendance-settings {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.attendance-settings label {
  color: #31404c;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.attendance-settings input,
.attendance-settings select,
.attendance-settings textarea {
  border: 1px solid #cfd8e1;
  border-radius: var(--admin-radius);
  color: #1f2933;
  font-size: 14px;
  min-height: 36px;
  padding: 7px 10px;
}

.attendance-settings textarea {
  min-height: 78px;
  resize: vertical;
}

.attendance-wide {
  grid-column: 1 / -1;
}

.attendance-table {
  min-width: 980px;
}

.attendance-photo-thumb {
  aspect-ratio: 4 / 3;
  border: 1px solid #d8e0e7;
  border-radius: var(--admin-radius);
  display: block;
  height: 64px;
  object-fit: cover;
  width: 84px;
}

.attention-row {
  background: #fffaf0;
}

.calendar-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-nav {
  align-items: center;
  display: flex;
  gap: 8px;
}

.calendar-range-label {
  color: #1f2933;
  font-size: 13px;
  font-weight: 800;
  min-width: 120px;
  text-align: center;
}

.calendar-grid-table {
  table-layout: fixed;
}

.calendar-grid-table th,
.calendar-grid-table td {
  text-align: center;
  white-space: normal;
}

.calendar-attendant-col {
  background: #ffffff;
  left: 0;
  overflow: hidden;
  position: sticky;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  width: 170px;
  z-index: 1;
}

.calendar-weekday-label {
  color: #6b7885;
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-today-col {
  background: #eaf6fb;
}

.calendar-cell {
  min-width: 34px;
}

.calendar-grid-week .calendar-cell {
  min-width: 96px;
}

.calendar-cell-icon {
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
}

.calendar-status-present .calendar-cell-icon,
.calendar-status-present .calendar-cell-status {
  color: #16845c;
}

.calendar-status-absent .calendar-cell-icon,
.calendar-status-absent .calendar-cell-status {
  color: #f4721e;
}

.calendar-status-extra .calendar-cell-icon,
.calendar-status-extra .calendar-cell-status {
  color: #237c9b;
}

.calendar-status-off .calendar-cell-icon,
.calendar-status-off .calendar-cell-status {
  color: #c3cdd6;
}

.calendar-status-upcoming .calendar-cell-icon,
.calendar-status-upcoming .calendar-cell-status {
  color: #9aa7b3;
}

.calendar-status-absent {
  background: #fff2e9;
}

.calendar-cell-detail {
  display: grid;
  gap: 2px;
}

.calendar-cell-status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-cell-time {
  color: #566371;
  font-size: 12px;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
}

.billing-order-list {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.billing-order-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5ebf0;
  border-radius: var(--admin-radius);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.billing-order-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.billing-order-row span,
.billing-order-row small {
  color: #6b7885;
  font-size: 12px;
}

.billing-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.payment-admin-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.payout-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

.compact-toolbar {
  justify-content: flex-end;
}

.compact-toolbar label {
  align-items: center;
  color: #566371;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.payment-summary-strip {
  border-bottom: 1px solid #e5ebf0;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 12px 16px;
}

.payment-summary-strip span {
  background: #f8fafc;
  border: 1px solid #e5ebf0;
  border-radius: var(--admin-radius);
  color: #566371;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 36px;
  padding: 9px 10px;
}

.payment-summary-strip strong {
  color: #1f2933;
}

.payment-tracking-table,
.payout-summary-table,
.payout-source-table {
  min-width: 780px;
}

.billing-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.form-span-2 {
  grid-column: 1 / -1;
}

.billing-form label {
  color: #31404c;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.billing-form input,
.billing-form select {
  border: 1px solid #cfd8e1;
  border-radius: var(--admin-radius);
  color: #1f2933;
  font-size: 14px;
  min-height: 36px;
  padding: 7px 10px;
}

.billing-actions {
  border-top: 1px solid #e5ebf0;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  padding: 12px 16px 16px;
}

.billing-client-table,
.billing-history-table,
.payment-account-table,
.payment-liquidation-table {
  min-width: 680px;
}

.liquidation-note {
  border: 1px solid #cfd8e1;
  border-radius: var(--admin-radius);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  min-height: 32px;
  padding: 6px 8px;
  width: 180px;
}

.selected-row {
  background: #eaf6fb !important;
}

.billing-printable {
  background: #ffffff;
  color: #1f2933;
  padding: 28px;
}

.billing-print-header {
  align-items: center;
  border-bottom: 4px solid #f4721e;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
}

.billing-print-brand {
  display: grid;
  gap: 10px;
}

.billing-print-brand img {
  display: block;
  height: 46px;
  object-fit: contain;
  width: 194px;
}

.billing-print-brand p,
.billing-print-title span,
.billing-print-title em {
  color: #6b7885;
  display: block;
  font-size: 13px;
  margin: 0;
}

.billing-print-title {
  text-align: right;
}

.billing-print-title strong {
  color: #1f2933;
  display: block;
  font-size: 22px;
  margin: 4px 0 8px;
}

.billing-print-title em {
  border-radius: 999px;
  display: inline-block;
  font-style: normal;
  font-weight: 800;
  padding: 5px 10px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.billing-print-summary {
  border: 1px solid #dfe6ee;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 1.2fr);
  margin-top: 22px;
  padding: 18px;
}

.billing-print-client {
  border-right: 1px solid #dfe6ee;
  display: grid;
  gap: 6px;
  padding-right: 18px;
}

.billing-print-client span,
.billing-print-meta span,
.billing-print-payment span,
.billing-print-total span,
.billing-print-section-title span {
  color: #6b7885;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.billing-print-client strong {
  color: #111827;
  font-size: 18px;
}

.billing-print-client p,
.billing-print-payment p,
.billing-print-footer p {
  color: #566371;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.billing-print-meta {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.billing-print-meta div {
  background: #f8fafc;
  border: 1px solid #e6edf3;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.billing-print-meta strong {
  color: #1f2933;
  font-size: 14px;
}

.billing-print-section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 24px 0 10px;
}

.billing-print-section-title strong {
  color: #31404c;
  font-size: 13px;
}

.billing-print-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 0;
  width: 100%;
}

.billing-print-table th {
  background: #1f2933;
  color: #ffffff;
  font-size: 11px;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
}

.billing-print-table th:last-child,
.billing-print-table td:last-child {
  text-align: right;
}

.billing-print-table td {
  border-bottom: 1px solid #e6edf3;
  color: #31404c;
  padding: 11px 12px;
  vertical-align: top;
}

.billing-print-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.billing-print-bottom {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin-top: 22px;
}

.billing-print-payment {
  border-left: 4px solid #f4721e;
  display: grid;
  gap: 7px;
  padding: 8px 0 8px 14px;
}

.billing-print-payment strong {
  color: #1f2933;
  font-size: 16px;
}

.billing-print-total {
  border: 1px solid #dfe6ee;
  display: grid;
  font-size: 14px;
}

.billing-print-total div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
}

.billing-print-total div + div {
  border-top: 1px solid #e6edf3;
}

.billing-print-total strong {
  color: #1f2933;
  font-size: 15px;
}

.billing-print-total-due {
  background: #fff7ed;
}

.billing-print-total-due strong {
  color: #c2410c;
  font-size: 20px;
}

.billing-print-footer {
  border-top: 1px solid #e6edf3;
  margin-top: 24px;
  padding-top: 14px;
}

.table-muted.block {
  display: block;
  margin-top: 3px;
}

.form-actions {
  justify-content: flex-start;
}

.edit-input {
  width: 90px;
}

.pricing-matrix {
  min-width: 780px;
}

.pricing-matrix th,
.pricing-matrix td {
  text-align: center;
}

.pricing-matrix th.matrix-service-col,
.pricing-matrix td.matrix-service-name {
  text-align: left;
}

.pricing-matrix .matrix-class-header {
  background: #ecf3f8;
  color: #3c8dbc;
}

.pricing-matrix input[type="number"] {
  text-align: right;
  width: 86px;
}

.pricing-save-bar {
  border-top: 1px solid #d8e0e7;
  justify-content: flex-end;
  padding-top: 14px;
}

.pagination-bar {
  align-items: center;
  border-top: 1px solid #d8e0e7;
  color: #6b7885;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px;
  justify-content: space-between;
  margin: 0 16px;
  padding: 12px 0 16px;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.service-summary-grid,
.pricing-guide-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-summary-card,
.pricing-guide-card {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-left: 4px solid #3c8dbc;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  display: grid;
  gap: 5px;
  padding: 14px 16px;
}

.service-summary-card span,
.pricing-guide-card strong {
  color: #566371;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-summary-card strong {
  color: #1f2933;
  font-size: 28px;
  line-height: 1;
}

.service-summary-card small,
.pricing-guide-card span {
  color: #6b7885;
  font-size: 13px;
  line-height: 1.35;
}

.service-map-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 300px minmax(0, 1fr);
  padding: 16px;
}

.service-map-list,
.service-map-detail {
  border: 1px solid #d8e0e7;
  border-radius: var(--admin-radius);
  min-width: 0;
}

.service-map-list {
  align-self: start;
  background: #f8fafc;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.service-map-list-header {
  color: #566371;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 4px 8px;
  text-transform: uppercase;
}

.service-map-package {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-left: 4px solid transparent;
  border-radius: var(--admin-radius);
  color: #1f2933;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 58px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.service-map-package.active {
  border-left-color: #f4721e;
  box-shadow: inset 0 0 0 1px rgba(244, 114, 30, 0.16);
}

.service-map-package.inactive {
  opacity: 0.68;
}

.service-map-package span:first-child {
  display: grid;
  gap: 3px;
}

.service-map-package strong {
  font-size: 14px;
}

.service-map-package small {
  color: #6b7885;
  font-size: 12px;
}

.service-map-detail {
  background: #ffffff;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.service-map-detail-header {
  align-items: start;
  border-bottom: 1px solid #d8e0e7;
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
}

.service-map-detail-header h3 {
  color: #1f2933;
  font-size: 18px;
  margin: 0 0 4px;
}

.service-map-detail-header p {
  color: #6b7885;
  font-size: 13px;
  line-height: 1.4;
}

.service-map-add {
  align-items: end;
  background: #f8fafc;
  border: 1px solid #e5ebf0;
  border-radius: var(--admin-radius);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) 180px auto;
  padding: 12px;
}

.service-map-add label {
  color: #31404c;
  font-size: 13px;
}

.service-map-add input,
.service-map-add select {
  min-height: 36px;
  font-size: 14px;
}

.mapping-table-wrap {
  overflow-x: auto;
}

.compact-table {
  min-width: 520px;
}

.matrix-subtext {
  color: #6b7885;
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
}

.floating-save {
  background: #ffffff;
  border: 1px solid #d8e0e7;
  border-radius: var(--admin-radius);
  box-shadow: var(--admin-shadow);
  margin: 0;
  padding: 12px 16px;
}

.pricing-save-note {
  color: #6b7885;
  flex: 1;
  font-size: 13px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-tab,
.toggle-btn {
  border-radius: var(--admin-radius);
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 0 10px;
}

.filter-tab {
  background: #ffffff;
  border: 1px solid #cfd8e1;
  color: #566371;
}

.filter-tab.active,
.filter-tab:hover {
  background: #3c8dbc;
  border-color: #367fa9;
  color: #ffffff;
}

.toggle-btn {
  border: 1px solid transparent;
}

.toggle-active {
  background: #e8f6ef;
  color: #16845c;
}

.toggle-inactive {
  background: #edf1f4;
  color: #6b7885;
}

.feedback-msg {
  border-radius: var(--admin-radius);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
}

.feedback-success {
  background: #e8f6ef;
  border: 1px solid #b9dfcd;
  color: #16845c;
}

.feedback-error,
.form-error {
  background: #fff5f5;
  border: 1px solid #efc8c8;
  border-radius: var(--admin-radius);
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
}

.empty-state {
  color: #6b7885;
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}

.action-sheet-backdrop {
  align-items: center;
  background: rgba(15, 23, 31, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 200;
}

.action-sheet {
  background: #ffffff;
  border-radius: var(--admin-radius);
  box-shadow: 0 16px 40px rgba(15, 23, 31, 0.24);
  display: grid;
  max-width: 520px;
  padding: 18px;
  width: min(100%, 520px);
}

@media (max-width: 980px) {
  .crm-kpis,
  .stat-row,
  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-workspace,
  .two-col,
  .billing-grid,
  .payment-admin-grid,
  .payout-grid,
  .billing-print-summary,
  .billing-print-bottom,
  .attendance-layout,
  .service-map-layout {
    grid-template-columns: 1fr;
  }

  .service-summary-grid,
  .pricing-guide-grid {
    grid-template-columns: 1fr;
  }

  .service-map-add {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-page {
    padding: 16px 12px 24px;
  }

  .page-header,
  .crm-header {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-actions,
  .toolbar {
    justify-content: stretch;
  }

  .crm-button,
  .toolbar-search,
  .toolbar-select,
  .btn-sm,
  .btn-sm-secondary {
    width: 100%;
  }

  .crm-kpis,
  .stat-row,
  .pipeline-grid,
  .attendance-settings,
  .billing-form,
  .billing-print-meta {
    grid-template-columns: 1fr;
  }

  .billing-print-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .billing-print-title {
    text-align: left;
  }

  .billing-print-client {
    border-right: 0;
    border-bottom: 1px solid #dfe6ee;
    padding: 0 0 16px;
  }
}

@media print {
  body {
    background: #ffffff !important;
  }

  .no-print,
  .nav-bar,
  .admin-sidebar {
    display: none !important;
  }

  .app-shell,
  .admin-app-shell,
  .admin-page {
    margin: 0 !important;
    padding: 0 !important;
  }

  .admin-page > *:not(.billing-printable) {
    display: none !important;
  }

  .billing-printable {
    border: none !important;
    box-shadow: none !important;
    display: block !important;
    padding: 0 !important;
  }

  .billing-print-header,
  .billing-print-table th,
  .billing-print-total-due,
  .billing-print-title em {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .billing-print-table,
  .billing-print-table th,
  .billing-print-table td {
    font-size: 12px;
  }
}
