* {
  box-sizing: border-box;
}

:root {
  --blue: #245f89;
  --blue-dark: #153d5f;
  --ink: #101828;
  --muted: #475467;
  --line: #cfd8e3;
  --soft: #f3f6f9;
  --paper: #ffffff;
  --green: #248a54;
  --red: #d9534f;
  --amber: #b76e00;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.container-no-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.container-no-help.valid {
  color: var(--green);
}

.container-no-help.warning {
  color: var(--amber);
}

.container-no-help.invalid {
  color: var(--red);
}

.yard-line-autodetect {
  display: block;
  margin-top: 5px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
}

input.input-valid {
  border-color: var(--green) !important;
}

input.input-warning {
  border-color: var(--amber) !important;
}

input.input-invalid {
  border-color: var(--red) !important;
}

.hidden {
  display: none !important;
}

.force-password-required .work-area > .panel:not(#usersPanel),
.force-password-required .tabs,
.force-password-required .case-subtabs,
.force-password-required .workflow,
.force-password-required .stats {
  display: none !important;
}

.force-password-box {
  max-width: 560px;
  margin: 0 auto 18px;
}

.force-password-box input {
  width: 100%;
  margin-bottom: 10px;
}

.app-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(22, 32, 51, 0.38);
}

.app-popup-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 22px 70px rgba(22, 32, 51, 0.24);
  padding: 18px;
}

.app-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--blue);
  font-size: 18px;
}

.app-popup-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #e8eef4;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.app-popup p {
  margin: 12px 0 16px;
  line-height: 1.45;
  color: var(--ink);
}

.app-popup-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.app-popup-actions.confirm-mode {
  grid-template-columns: 1fr 1fr;
}

.app-popup-actions.choice-mode {
  grid-template-columns: 1fr 1fr;
}

.app-popup-actions .btn {
  width: 100%;
}

.repair-completed-action-buttons {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.repair-completed-action-buttons .btn {
  width: 100%;
}

.delete-impact-title,
.delete-impact-note {
  display: block;
  text-align: left;
}

.delete-impact-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 6px;
}

.delete-impact-note {
  color: var(--muted);
  font-size: 13px;
}

.delete-impact-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  text-align: left;
}

.delete-impact-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
}

.delete-impact-item.locked {
  cursor: default;
  background: #eef6fb;
  border-color: #b8d7ea;
}

.delete-impact-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--blue);
}

.delete-impact-item b,
.delete-impact-item small {
  display: block;
}

.delete-impact-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eaf0f5;
}

.login-card {
  width: min(430px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 18px 50px rgba(22, 32, 51, 0.12);
}

.login-card h1 {
  margin: 8px 0 14px;
  text-align: center;
}

.login-card label {
  font-weight: 700;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 16px;
}

.login-tab {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #eef4f9;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.login-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.login-link-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.customer-phone-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.65fr) minmax(180px, 1fr);
  gap: 10px;
}

.customer-wrap {
  max-width: 1180px;
}

.customer-card {
  display: grid;
  gap: 16px;
}

.customer-readonly-note {
  color: #9fb0c8;
}

body.customer-readonly-mode #appScreen {
  display: none !important;
}

.customer-search-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.customer-result {
  display: grid;
  gap: 14px;
}

.customer-result-section,
.customer-subsection {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.customer-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.customer-info-grid div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.customer-info-grid b,
.customer-info-grid span {
  display: block;
}

.customer-info-grid b {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.customer-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.customer-photo-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.customer-photo-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.customer-table th,
.customer-table td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
}

.logo-mark,
.logo {
  background: white;
  color: var(--blue);
  border-radius: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark {
  border: 2px solid var(--blue);
  width: 84px;
  height: 58px;
  font-size: 28px;
}

.login-logo {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo img {
  max-height: 58px;
  max-width: 180px;
  object-fit: contain;
}

.stack {
  display: grid;
  gap: 12px;
}

.top {
  background: linear-gradient(90deg, #17496d, #245f89);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 76px;
  height: 54px;
  font-size: 28px;
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top h1 {
  margin: 0;
  font-size: 28px;
}

.top p,
.soft,
.hint {
  margin: 4px 0 0;
  color: #e4eef7;
}

.soft,
.hint {
  color: var(--muted);
}

.mini {
  margin: 16px 0 0;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.login-company {
  text-align: center;
  margin-top: 8px;
}

.link-btn {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  padding: 6px;
}

.link-btn:hover {
  color: var(--blue-dark);
  text-decoration: underline;
}

.reset-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.customer-resend-hint {
  margin: 0;
  text-align: center;
}

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

.btn {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--blue);
  color: white;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn.light {
  background: white;
  color: var(--blue);
}

.btn.gray {
  background: #e8eef4;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.red {
  background: var(--red);
}

.btn.green {
  background: var(--green);
}

.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px;
  overflow: hidden;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.card {
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 16px;
}

.stat b {
  font-size: 26px;
}

.stat {
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.stat.active {
  border-color: var(--blue);
  background: #edf6fb;
}

.main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.main.case-sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.main > *,
.panel,
.yard-layout > *,
.program-layout > *,
.program-detail-pane,
.table-scroll {
  min-width: 0;
}

.yard-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.yard-stat {
  background: #f3f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.yard-stat.active {
  border-color: var(--blue);
  background: #edf6fb;
}

.yard-stat b {
  display: block;
  color: var(--ink);
  font-size: 24px;
  margin-top: 4px;
}

.intake-stepper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.intake-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7fb;
  color: var(--muted);
  text-align: left;
  font-weight: 900;
  cursor: pointer;
}

.intake-step b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #dcecf7;
  color: var(--blue);
  flex: 0 0 auto;
}

.intake-step span {
  line-height: 1.25;
}

.intake-step.active {
  border-color: var(--blue);
  background: #edf6fb;
  color: var(--ink);
}

.intake-step.active b {
  background: var(--blue);
  color: #fff;
}

.mode-selector {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.mode-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7fb;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.mode-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.inbound-batch-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.inbound-batch-list-pane,
.inbound-batch-detail-pane,
.inbound-paste-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.inbound-batch-list-pane {
  display: grid;
  gap: 10px;
}

.inbound-progress-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.inbound-progress-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f3f7fb;
  color: var(--muted);
  font-weight: 800;
}

.inbound-progress-card b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.inbound-progress-issues {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.inbound-unit-actions,
.filter-row {
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.field-error-panel {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.field-error {
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 800;
}

.inbound-units-grid {
  display: grid;
  gap: 8px;
}

.inbound-unit-header,
.inbound-unit-row {
  display: grid;
  grid-template-columns: 42px minmax(150px, 1.1fr) minmax(120px, .75fr) minmax(120px, .8fr) minmax(170px, 1.1fr) minmax(120px, .75fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
}

.inbound-unit-header {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.inbound-unit-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbfd;
}

.inbound-unit-row input,
.inbound-unit-row select {
  width: 100%;
}

.inbound-unit-row.invalid {
  border-color: #f59e0b;
}

.inbound-unit-validation {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.inbound-unit-validation.invalid {
  color: #f59e0b;
}

.inbound-unit-validation.valid {
  color: #10b981;
}

.batch-receive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 8px;
  background: rgba(14, 116, 144, 0.18);
}

.batch-receive-banner b {
  display: block;
  margin-bottom: 3px;
}

.batch-receive-meta {
  color: var(--muted);
  font-size: 13px;
}

.status-badge.cancelled,
.status-badge.status-cancelled {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
}

.inbound-paste-panel {
  margin: 10px 0;
}

.wide {
  width: 100%;
}

.intake-queue .section-subhead,
.intake-step-panel .section-subhead {
  padding-top: 0;
}

.intake-hint {
  margin: 8px 0 10px;
}

.gate-in-existing-visits {
  margin: 10px 0;
}

.gate-in-visit-list {
  display: grid;
  gap: 8px;
}

.gate-in-visit-card {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f7fb;
  color: var(--ink);
  text-align: left;
}

.gate-in-visit-card.active {
  border-color: var(--blue);
  background: #edf6fb;
}

.gate-in-visit-card b {
  display: block;
}

.gate-in-visit-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.gate-in-duplicate-warning {
  margin-top: 8px;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.dash-card {
  background: #f3f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.dash-card:hover {
  border-color: var(--blue);
  background: #edf6fb;
}

.dash-card b {
  display: block;
  color: var(--ink);
  font-size: 28px;
  margin-top: 4px;
}

.case-history {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.history-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 150px;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  background: #f8fbfe;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
}

.history-row b {
  color: var(--blue);
}

.history-row span {
  color: var(--muted);
}

.approval-summary,
.repair-summary {
  border-left: 4px solid var(--blue);
}

.repair-summary.ready {
  border-left-color: var(--green);
}

.repair-summary.needs-work {
  border-left-color: var(--amber);
}

.estimate-case-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 260px);
  gap: 12px;
  margin: 10px 0 12px;
}

.report-search-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, auto) minmax(220px, auto);
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
}

.report-search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 13px 14px;
  font-weight: 800;
}

#reportContainerSearch {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
}

.estimate-photo-head {
  margin-top: 18px;
}

.estimate-version-history {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.estimate-version-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(24, 183, 215, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: #0b1624;
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.estimate-version-card b {
  color: #ffffff;
}

.estimate-version-card span {
  color: #cbd5e1;
  font-size: 13px;
}

.estimate-version-card.original-version-card {
  border-color: rgba(34, 211, 238, 0.42);
}

.estimate-version-card.supplementary-version-card {
  border-color: rgba(251, 191, 36, 0.42);
}

.estimate-version-card.estimate-cumulative-card {
  border-color: rgba(74, 222, 128, 0.36);
}

.estimate-version-actions {
  justify-content: flex-start;
  margin-top: 8px;
}

.supplementary-eligibility-hint {
  margin-top: 4px;
}


.section-subhead {
  color: var(--ink);
  font-weight: 900;
  font-size: 18px;
  padding: 10px 0 2px;
}

.eir-inspection-heading {
  grid-column: 1 / -1;
}

.approval-total-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.repair-approved-total {
  margin-top: 16px;
}

.estimate-approval-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 8, 23, .76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.estimate-approval-card {
  width: min(1180px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .45);
  padding: 18px;
}

.estimate-approval-card .table-scroll {
  margin-top: 12px;
}

.reopen-repair-card {
  width: min(720px, 100%);
}

.reopen-repair-card textarea {
  min-height: 96px;
  resize: vertical;
}

.approval-check-cell {
  text-align: center;
}

.approval-check-cell input {
  width: 22px;
  height: 22px;
  cursor: pointer;
}

.approval-check-cell .mini {
  display: block;
  margin: 4px 0 0;
  line-height: 1.2;
}

.approval-check-cell .green-text {
  color: var(--good);
}

.approval-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  color: white;
  background: var(--muted);
}

.status-new {
  background: #667085;
}

.status-completed {
  background: var(--green);
}

.status-estimate,
.status-pending {
  background: var(--amber);
}

.status-approved {
  background: var(--green);
}

.status-repair {
  background: var(--blue);
}

.status-cleared {
  background: #14532d;
}

.global-search-box,
.restore-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
  margin: 12px 0;
}

.dashboard-tools,
.bulk-program-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.dashboard-tools {
  grid-template-columns: repeat(2, minmax(160px, 220px));
}

.bulk-program-box label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bulk-program-box input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 10px;
  font-weight: 800;
}

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

.kanban-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfe;
  min-height: 130px;
  padding: 10px;
}

.kanban-column h4 {
  margin: 0 0 8px;
  color: var(--blue);
}

.kanban-card,
.search-hit {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px;
  margin-bottom: 7px;
}

.kanban-card b,
.search-hit b {
  display: block;
  color: var(--ink);
}

.kanban-card span,
.search-hit span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.search-hit button {
  min-height: 30px;
  padding: 5px 10px;
  margin-top: 7px;
}

.global-search-box input,
.restore-box select {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 800;
}

.yard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
}

.eir-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.program-add {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  margin: 12px 0;
  align-items: start;
}

.program-add .btn {
  min-height: 40px;
  height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  align-self: start;
}

.program-head {
  margin-top: 0;
}

.program-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.program-container-search {
  display: grid;
  gap: 8px;
}

.program-container-search input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 10px;
  font-weight: 700;
}

.program-container-results {
  display: grid;
  gap: 6px;
  max-height: 172px;
  overflow: auto;
}

.program-container-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.program-container-choice {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
}

.program-container-choice input {
  width: 15px;
  height: 15px;
}

.program-container-choice.disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.program-container-result:hover {
  border-color: var(--blue);
  background: #edf6fb;
}

.program-container-result b,
.program-container-result span,
.program-container-result small {
  display: block;
}

.program-container-result span,
.program-container-result small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.program-container-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: inherit !important;
}

.program-container-head b {
  color: inherit;
}

.program-lock-message {
  margin: 8px 0 10px;
  color: #f8fbff;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.65);
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 800;
}

.program-expiry-display {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.4);
}

.cro-expiry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  border: 1px solid transparent;
}

.cro-expiry-valid {
  color: #dcfce7;
  background: rgba(22, 163, 74, 0.24);
  border-color: rgba(22, 163, 74, 0.7);
}

.cro-expiry-soon {
  color: #ffedd5;
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(245, 158, 11, 0.75);
}

.cro-expiry-expired {
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.75);
}

.cro-expiry-not-set {
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.55);
}

.program-expiry-warning {
  color: #fecaca;
  font-weight: 900;
}

#programContainerTable input {
  min-width: 120px;
  padding: 6px;
  font-size: 13px;
}

#programContainerTable {
  min-width: 980px;
}

.program-selected-search {
  margin: 12px 0 10px;
}

.photo-report-frame {
  position: relative;
  min-height: 160px;
}

.photo-report-frame .broken-photo {
  display: none;
}

.photo-not-found {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: #f7f9fb;
  font-weight: 800;
}

.photo-not-found.hidden {
  display: none;
}

.program-detail-pane .actions {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

#yardPanel .actions {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.yard-list-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 10px;
  align-items: end;
}

.yard-list-filters .btn {
  grid-column: 1 / -1;
}

.programPrintTable {
  min-width: 0;
}

.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.case-list {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
}

.case-item {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}

.yard-case-item {
  display: block;
}

.yard-case-item.yard-condition-sound {
  border-color: rgba(34, 197, 94, 0.75);
}

.yard-case-item.yard-condition-damage {
  border-color: rgba(239, 68, 68, 0.85);
}

.yard-case-item.yard-condition-hole {
  border-color: rgba(127, 29, 29, 0.95);
}

.yard-case-item.yard-condition-dirty {
  border-color: rgba(245, 158, 11, 0.9);
}

.yard-case-item.yard-condition-wet {
  border-color: rgba(20, 184, 166, 0.9);
}

.yard-case-item.yard-condition-not-fit {
  border-color: rgba(168, 85, 247, 0.9);
}

.yard-case-item.yard-condition-in-repair {
  border-color: rgba(14, 165, 233, 0.9);
}

.yard-case-text {
  min-width: 0;
}

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

.yard-condition-badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

.yard-condition-badge.yard-condition-sound {
  background: #16a34a;
}

.yard-condition-badge.yard-condition-damage {
  background: #dc2626;
}

.yard-condition-badge.yard-condition-hole {
  background: #7f1d1d;
}

.yard-condition-badge.yard-condition-dirty {
  background: #d97706;
}

.yard-condition-badge.yard-condition-wet {
  background: #0f766e;
}

.yard-condition-badge.yard-condition-not-fit {
  background: #7e22ce;
}

.yard-condition-badge.yard-condition-in-repair {
  background: #0284c7;
}

.case-item.active {
  border-color: var(--blue);
  background: #edf6fb;
}

.case-item b,
.case-item span {
  display: block;
}

.case-item span {
  color: var(--muted);
  font-size: 12px;
}

.empty-list {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  background: #f8fafc;
}

.tabs,
.case-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.case-subtabs {
  margin-top: -4px;
}

.tab,
.case-subtab {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
}

.tab.active,
.case-subtab.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.panel {
  display: none;
}

.active-panel {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.field {
  background: #eef3f8;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  padding: 8px 10px;
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.shipping-line-other {
  margin-top: 4px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 700;
}

.field input,
.field select,
label input,
label select,
.rate-form input,
.inline-actions select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  outline: 0;
  min-height: 34px;
  border-radius: 9px;
  padding: 6px 8px;
}

.field input,
.field select {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 2px 0 0;
}

.span-2 {
  grid-column: span 2;
}

.section-head,
.total,
.inline-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.media-warning {
  margin: 8px 0 14px;
  color: #fbbf24;
  font-weight: 700;
}

.media-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}

.media-summary-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
}

.media-summary-card b {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 22px;
}

.media-integrity-table-wrap {
  margin-top: 12px;
}

.media-path-cell {
  word-break: break-all;
}

.smart-search {
  min-width: 280px;
}

.estimate-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.estimate-picker select,
.estimate-picker input {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  font-size: 15px;
  font-weight: 700;
  outline: 0;
  min-height: 42px;
  border-radius: 9px;
  padding: 8px;
}

.smart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 12px 0;
  align-items: stretch;
}

.part-guide {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.part-guide img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: transparent;
}

.container-parts-reference {
  padding: 0;
  background: transparent !important;
  filter: contrast(1.14) saturate(1.08) brightness(1.03);
  transform-origin: center center;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.container-parts-reference:hover {
  transform: scale(1.08);
  filter: contrast(1.22) saturate(1.12) brightness(1.05);
}

.container-anatomy-svg {
  display: block;
  width: 100%;
  height: min(76vh, 700px);
  background: #eaf6e7;
}

.diagram-title {
  fill: #2746a4;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
}

.diagram-subtitle {
  fill: #2746a4;
  font-size: 16px;
  font-weight: 800;
}

.part-shape {
  stroke: #153d5f;
  stroke-width: 2;
  filter: url(#softLift);
}

.part-shape.roof {
  fill: url(#mtlRoof);
}

.part-shape.right-side,
.part-shape.door-left,
.part-shape.door-right {
  fill: url(#mtlSide);
}

.part-shape.side-wall {
  fill: url(#mtlSteel);
}

.part-shape.front-panel {
  fill: url(#mtlSteel);
}

.part-shape.floor-frame {
  fill: #d8e2eb;
}

.part-shape.floor-panel {
  fill: url(#mtlWood);
}

.part-shape.tunnel-rail {
  fill: #dfe8ef;
}

.part-shape.door-frame {
  fill: #163f72;
}

.roof-ribs line,
.wall-ribs line,
.right-ribs line,
.front-ribs line,
.crossmembers line,
.door-line {
  stroke: rgba(255, 255, 255, 0.65);
  stroke-width: 2;
}

.crossmembers line {
  stroke: #85a9bc;
}

.diagram-labels .part-label {
  cursor: help;
}

.diagram-labels line {
  stroke: #1f2937;
  stroke-width: 1.7;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

.diagram-labels text {
  fill: #111827;
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: rgba(234, 246, 231, 0.82);
  stroke-width: 4px;
  transition: fill 0.15s ease, stroke 0.15s ease, filter 0.15s ease;
}

.diagram-labels .part-label:hover line {
  stroke: #22c7e8;
  stroke-width: 3;
}

.diagram-labels .part-label:hover text {
  fill: #0ea5e9;
  stroke: #ffffff;
  filter: drop-shadow(0 0 9px rgba(34, 199, 232, 0.72));
}

.part-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.part-hotspots span {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: block;
  border: 1px solid transparent;
  background: transparent;
  color: transparent;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
  overflow: hidden;
  cursor: help;
  box-shadow: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.part-hotspots span:hover {
  background: rgba(34, 199, 232, 0.08);
  border-color: #22c7e8;
  box-shadow: 0 0 0 3px rgba(34, 199, 232, 0.16), 0 0 22px rgba(34, 199, 232, 0.28);
  transform: translate(-50%, -50%);
}

#estimatePanel .smart-help,
#estimatePanel .part-buttons {
  display: none !important;
}

.app-popup {
  background: rgba(0, 8, 15, 0.72) !important;
}

.app-popup-card {
  width: min(560px, 100%) !important;
  background: #0b1421 !important;
  border-color: #263b55 !important;
  color: #ffffff !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(24, 183, 215, 0.12) !important;
}

.app-popup-head,
.app-popup p,
.delete-impact-title {
  color: #ffffff !important;
}

.app-popup-head button {
  background: #142238 !important;
  color: #ffffff !important;
  border: 1px solid #263b55 !important;
}

.delete-impact-note,
.delete-impact-item small {
  color: #c7d7ea !important;
}

.delete-impact-item {
  background: #0f1a29 !important;
  border-color: #263b55 !important;
  color: #ffffff !important;
}

.delete-impact-item.locked {
  background: #102438 !important;
  border-color: #1f789d !important;
}

.estimate-list-head {
  margin-top: 16px;
}

.part-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.part-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--blue);
  border-radius: 9px;
  min-height: 36px;
  padding: 8px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.part-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.smart-help {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.smart-help b {
  font-size: 18px;
  color: var(--blue);
}

.smart-help span {
  color: var(--muted);
  line-height: 1.5;
}

.small-title {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.damage-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.damage-btn {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  min-height: 34px;
  padding: 7px 11px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.damage-btn.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.quick-add {
  display: grid;
  grid-template-columns: 1fr 90px 130px 1fr 120px;
  gap: 10px;
  align-items: end;
  margin-top: 4px;
}

.quick-add label {
  font-size: 12px;
}

.table-scroll {
  overflow: auto;
  margin-top: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  overflow: hidden;
  min-width: 920px;
}

th {
  background: #e7edf4;
  color: #344054;
  text-align: left;
  padding: 10px;
  font-size: 13px;
}

td {
  border-top: 1px solid #dbe4ee;
  color: var(--ink);
  padding: 8px;
  font-size: 14px;
  vertical-align: top;
}

td input,
td select {
  width: 100%;
  border: 1px solid #d0d7df;
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 7px;
}

.right {
  text-align: right;
}

.total {
  margin-top: 12px;
}

.totalBox {
  background: var(--blue);
  color: white;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 900;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  background: #eef2f6;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}

.light-pill {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.sql-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: #eaf6ff;
  white-space: nowrap;
}

.sql-status-pill .sql-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
  flex: 0 0 auto;
}

.sql-status-pill .sql-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sql-status-pill.sql-connected {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(6, 78, 59, 0.42);
  color: #d7fff0;
}

.sql-status-pill.sql-connected .sql-dot {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.95);
}

.sql-status-pill.sql-disconnected {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(127, 29, 29, 0.38);
  color: #ffe4e6;
}

.sql-status-pill.sql-disconnected .sql-dot {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95);
}

.sql-status-pill.sql-checking .sql-dot {
  background: #f59e0b;
}

#headerSqlPill {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.header-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.header-icon-btn,
.header-user-btn {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.58);
  color: #eef7ff;
  border-radius: 12px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.header-icon-btn {
  width: 42px;
}

.header-icon-btn:hover,
.header-user-btn:hover,
.header-icon-btn:focus-visible,
.header-user-btn:focus-visible,
.header-icon-btn[aria-expanded="true"],
.header-user-btn[aria-expanded="true"] {
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(14, 116, 144, 0.35);
  outline: none;
}

.header-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-icon-btn.sql-status-pill {
  width: auto;
  max-width: 128px;
  padding-right: 12px;
  border-color: rgba(56, 189, 248, 0.45);
}

.header-icon-btn.sql-status-pill.sql-connected {
  border-color: rgba(59, 130, 246, 0.72);
  background: rgba(30, 64, 175, 0.35);
}

.header-icon-btn.sql-status-pill.sql-connected .sql-dot {
  background: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.95);
}

.header-icon-btn.sql-status-pill.sql-disconnected {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(127, 29, 29, 0.42);
}

.header-icon-btn.sql-status-pill.sql-checking {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(120, 53, 15, 0.42);
}

.header-compact-label {
  font-size: 12px;
  max-width: 76px;
}

.header-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  border: 2px solid #0b1726;
}

.header-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0ea5e9, #1d4ed8);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.header-avatar.large {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.header-user-label {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.header-caret {
  font-size: 12px;
  color: #b8d6ec;
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(340px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  display: none;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: #0b1726;
  color: #e5f2ff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.header-dropdown.open {
  display: grid;
  gap: 10px;
}

.header-menu-title {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}

.header-menu-list {
  display: grid;
  gap: 8px;
}

.header-preview-item,
.header-menu-action {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.82);
  color: #eaf6ff;
  border-radius: 10px;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.header-preview-item:hover,
.header-menu-action:hover,
.header-preview-item:focus-visible,
.header-menu-action:focus-visible {
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(14, 116, 144, 0.32);
  outline: none;
}

.header-preview-item.unread {
  border-left: 3px solid #38bdf8;
}

.header-preview-item span,
.header-preview-item small,
.header-menu-meta,
.header-user-card span,
.header-user-card small {
  color: #b8cbe0;
  font-size: 12px;
}

.header-menu-action {
  font-weight: 800;
}

.header-menu-action.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.32);
}

.header-menu-separator {
  height: 1px;
  background: rgba(148, 163, 184, 0.22);
}

.header-status-row,
.header-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-status-row div,
.header-user-card div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.header-status-row span,
.header-user-card span,
.header-user-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sql-dot-large {
  width: 12px;
  height: 12px;
}

.sql-dot-connected {
  background: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.95);
}

.sql-dot-disconnected {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.95);
}

.sql-dot-checking {
  background: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
}

.header-empty-state {
  padding: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  color: #b8cbe0;
  font-size: 13px;
}

.photos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.photo-card {
  border: 2px dashed #c8d2dc;
  background: #f8fafc;
  border-radius: 14px;
  min-height: 148px;
  padding: 10px;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: hidden;
}

.photo-card b {
  color: var(--blue);
}

.photo-card img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  transform-origin: center;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.photo-card input {
  width: 100%;
  font-size: 12px;
}

.eir-photo-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.eir-photo-section .section-subhead {
  margin: 4px 0 0;
}

.eir-photo-section > .hint {
  margin: -2px 0 0;
}

.eir-fixed-photo-grid,
.eir-damage-evidence-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eir-row-damage-photo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.damage-evidence-card {
  border-style: solid;
}

.damage-evidence-add-card {
  border-color: #18c5df;
}

.eir-linked-section {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.eir-linked-collapse {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.eir-linked-collapse summary {
  cursor: pointer;
  font-weight: 900;
  color: #ffffff;
}

.eir-linked-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eir-damage-evidence-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.eir-damage-evidence-card {
  border: 1px solid #3d6a8b;
  border-radius: 8px;
  background: #0f1c2b;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.eir-damage-evidence-card-head,
.eir-evidence-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.eir-damage-evidence-card-head b {
  color: #ffffff;
  font-size: 16px;
}

.eir-damage-evidence-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.eir-damage-evidence-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #0b1624;
}

.eir-damage-evidence-meta span,
.eir-evidence-card-foot {
  color: #8fb3d1;
  font-size: 12px;
}

.eir-damage-evidence-meta b {
  display: block;
  color: #ffffff;
  margin-top: 4px;
}

.eir-evidence-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.eir-evidence-photo-thumb {
  display: grid;
  gap: 8px;
}

.eir-evidence-photo-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07111d;
}

.eir-linked-photo-card {
  border-style: solid;
  border-color: #3d6a8b;
  background: #0f1c2b;
}

.eir-linked-photo-card b {
  color: #ffffff;
}

.linked-photo-note,
.reportPhotoSource {
  color: #8fb3d1;
  font-size: 12px;
}

.eir-linked-include {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 700;
}

.eir-linked-include input {
  width: auto;
}

.estimate-eir-evidence-print {
  page-break-inside: auto;
}

.estimate-eir-evidence-print-card {
  border: 1px solid #222;
  padding: 8px;
  margin-bottom: 10px;
  page-break-inside: avoid;
}

.estimate-eir-evidence-print-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.estimate-eir-evidence-print-meta div {
  border: 1px solid #444;
  padding: 5px;
}

.estimate-eir-evidence-print-meta span {
  display: block;
  font-size: 10px;
  color: #333;
}

.estimate-eir-evidence-print-meta b {
  display: block;
  font-size: 11px;
}

@media (max-width: 900px) {
  .eir-damage-evidence-cards,
  .eir-damage-evidence-meta,
  .eir-evidence-photo-strip {
    grid-template-columns: 1fr;
  }
}

.photo-upload-control {
  display: block;
  cursor: pointer;
}

.photo-upload-control span {
  display: block;
  width: 100%;
  border: 1px dashed var(--blue);
  border-radius: 8px;
  padding: 8px 10px;
  color: #f8fafc;
  text-align: center;
  font-weight: 900;
  background: #0b1624;
  box-shadow: inset 0 0 0 1px rgba(24, 183, 215, 0.1);
}

.photo-upload-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-control:hover span,
.photo-upload-control:focus-within span {
  border-color: #28c7dc;
  background: #12304a;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(40, 199, 220, 0.22), 0 0 16px rgba(40, 199, 220, 0.18);
}

.photo-upload-control:has(input:disabled) {
  cursor: not-allowed;
}

.photo-upload-control:has(input:disabled) span {
  border-color: rgba(148, 163, 184, 0.45);
  background: #172033;
  color: #94a3b8;
  box-shadow: none;
}

.add-photo-card {
  border-style: solid;
  justify-content: center;
  min-height: 148px;
}

.add-photo-card .btn {
  width: 100%;
}

.case-proof-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.case-proof-card {
  background: #f3f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}

.case-proof-card a {
  display: block;
  color: var(--blue);
  font-weight: 800;
}

.repair-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.compact-grid {
  margin-top: 10px;
}

.repair-checklist {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.repair-check-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
}

.repair-check-item small {
  color: var(--muted);
  font-weight: 700;
}

.warning-card {
  border-color: #d99a27;
  background: #fff8e8;
}

.workflow-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.rate-form {
  display: grid;
  grid-template-columns: 90px 1fr 210px 70px 70px 80px 120px 110px 100px;
  gap: 8px;
  margin: 12px 0;
}

.user-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 150px 110px 110px;
  gap: 8px;
  margin: 12px 0;
}

.approval-settings {
  display: grid;
  grid-template-columns: 1fr 170px 190px;
  gap: 8px;
  margin: 12px 0;
}

.approval-settings input,
.user-form input,
.user-form select {
  border: 1px solid var(--line);
  background: white;
  min-height: 40px;
  border-radius: 9px;
  padding: 8px;
  font-weight: 700;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.permission-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

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

.display-names-section {
  margin: 18px 0 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfe;
}

.display-names-section .hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #4a5a68;
}

.display-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #e4edf4;
}

.display-name-row b {
  display: block;
}

.display-name-row small {
  display: block;
  color: #5b6b78;
  font-size: 12px;
}

.dash-card [data-display-name] {
  display: inline;
}

@media (max-width: 900px) {
  .display-name-row {
    grid-template-columns: 1fr;
  }
}

.option-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfe;
  padding: 12px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
}

.option-card.enabled {
  border-color: var(--blue);
  background: #edf6fb;
}

.option-card b,
.option-card small {
  display: block;
}

.option-card small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.option-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 140px;
  gap: 10px;
  margin: 14px 0;
}

.option-command input {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 700;
}

.report {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--line);
}

.reportHead {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 10px;
  margin-bottom: 12px;
  gap: 12px;
}

.reportInfo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.reportInfo div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}

.reportInfo span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

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

.reportPhoto {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 6px;
  overflow: hidden;
}

.reportPhoto img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  transform-origin: center;
  border-radius: 6px;
  background: #ffffff;
}

.reportPhoto b {
  font-size: 12px;
  color: var(--blue);
  position: relative;
  z-index: 2;
  background: var(--panel);
}

.photo-report-card {
  border: 1px solid #285071;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 6px;
  background: #0c1a2a;
  overflow: hidden;
}

.photo-report-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transform-origin: center;
  border-radius: 6px;
  background: #ffffff;
}

.photo-report-card b {
  font-size: 12px;
  color: #dff7ff;
  position: relative;
  z-index: 2;
  background: #0c1a2a;
}

.programPrintPhotoBlocks {
  margin-top: 16px;
}

.program-container-photo-section {
  border: 1px solid #285071;
  border-radius: 8px;
  padding: 8px;
  margin: 10px 0 14px;
  background: #081522;
  break-inside: avoid;
  page-break-inside: avoid;
}

.program-container-photo-section h3 {
  margin: 0 0 6px;
  color: #f8fbff;
  font-size: 16px;
}

.program-photo-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 8px;
  font-size: 12px;
}

.program-photo-meta span {
  border: 1px solid #285071;
  padding: 5px;
  background: #0c1a2a;
  color: #f8fbff;
}

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

.gateInPrintSheet .eirPrintSectionTitle,
.eirPrintRemarks h3,
.eirPrintPhotosSection h3 {
  color: var(--ink);
  margin: 14px 0 8px;
  font-size: 16px;
}

.eirPrintInfoBox {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.eirChecklistTable td:nth-child(1),
.eirChecklistTable th:nth-child(1) {
  width: 70px;
  text-align: center;
}

.eirChecklistTable td:nth-child(3),
.eirChecklistTable th:nth-child(3) {
  width: 180px;
  text-align: center;
  font-weight: 900;
}

.eirPrintRemarks {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  background: #ffffff;
}

.eirPrintRemarks p {
  margin: 0;
  color: var(--ink);
  min-height: 28px;
}

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

.gateInPrintSheet .eirPrintPhotoGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.gateInPrintSheet .photo-report-card {
  padding: 6px;
  gap: 5px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.gateInPrintSheet .photo-report-card img {
  height: 150px;
  object-fit: contain;
  object-position: center;
  transform: none;
  max-width: 100%;
  max-height: 100%;
}

.gateInPrintSheet .photo-report-card b {
  line-height: 1.2;
}

.eir-bulk-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}

.eir-select-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.eir-select-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.eir-print-record {
  break-after: page;
  page-break-after: always;
}

.eir-print-record:last-child {
  break-after: auto;
  page-break-after: auto;
}

.eirPrintSignatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.eirPrintSignatures div {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 64px;
  padding: 8px;
  background: #ffffff;
}

.eirPrintSignatures b,
.eirPrintSignatures span {
  display: block;
  color: var(--ink);
}

.eirPrintSignatures span {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
  min-height: 24px;
}

.eir-print-signature-name {
  border-top: 0;
  padding-top: 2px;
  min-height: 42px;
}

.eir-print-signature-name img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 42px;
  object-fit: contain;
  object-position: left center;
  background: transparent;
}

.fullContainerReport .full-report-section {
  margin-top: 14px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.fullContainerReport .full-report-section h3 {
  margin: 0 0 8px;
  color: #0b4268;
  font-size: 16px;
}

.full-report-kv td:nth-child(2) {
  font-weight: 700;
  width: 32%;
}

.full-report-condition {
  margin-top: 8px;
}

.containerHistoryReport .full-report-section {
  border: 1px solid #b8c4d2;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.containerHistoryReport .container-history-visit {
  border-color: #7f95ad;
}

.containerHistoryReport .history-return-gap {
  margin: 12px 0 4px;
  padding: 8px 10px;
  border: 1px solid #a7b6c6;
  border-radius: 8px;
  background: #f4f8fb;
  color: #111827;
  font-weight: 800;
}

.containerHistoryReport .history-legacy-section {
  border-color: #d9a441;
  background: #fff9ec;
}

.containerHistoryReport .report-table {
  margin-top: 8px;
}

.dashboard-history-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #203650;
  border-radius: 8px;
  background: #0d1726;
}

.compact-section-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.dashboard-history-help {
  margin: 4px 0 0;
  color: #9fb5ca;
  font-size: 13px;
}

.dashboard-history-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.dashboard-history-results {
  display: grid;
  gap: 14px;
}

.dashboard-history-summary-bar,
.dashboard-history-container,
.dashboard-history-visit,
.dashboard-history-legacy {
  border: 1px solid #203650;
  border-radius: 8px;
  background: #101d2e;
}

.dashboard-history-summary-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 14px;
  color: #9fb5ca;
}

.dashboard-history-summary-bar b {
  display: block;
  color: #ffffff;
  font-size: 16px;
}

.dashboard-history-summary-bar p {
  margin: 0;
  color: #d8e8f7;
  font-weight: 700;
}

.dashboard-history-container {
  padding: 14px;
  min-width: 0;
}

.dashboard-history-container-head,
.dashboard-history-visit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.dashboard-history-container h4,
.dashboard-history-visit h4,
.dashboard-history-suggestions h4 {
  margin: 0;
}

.dashboard-history-container-head > div,
.dashboard-history-visit-head > div {
  min-width: 0;
}

.dashboard-history-container-head span,
.dashboard-history-visit-head span,
.dashboard-container-summary span {
  color: #9fb5ca;
}

.dashboard-container-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-container-summary > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #203650;
  border-radius: 8px;
  background: #0a1422;
}

.dashboard-container-summary b {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  overflow-wrap: anywhere;
}

.yard-history-fallback {
  margin-bottom: 12px;
}

.yard-history-fallback-card {
  padding: 14px;
  border: 1px solid #314966;
  border-radius: 10px;
  background: #0a1422;
  color: #d8e8f7;
}

.yard-history-fallback-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
}

.yard-history-fallback-status {
  font-weight: 800;
  color: #f3c46b;
  margin: 0 0 10px;
}

.yard-history-fallback-card .dashboard-history-table {
  width: 100%;
  margin-bottom: 12px;
}

.history-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid #314966;
  border-radius: 999px;
  background: #142238;
  color: #d8e8f7;
  font-size: 12px;
  font-weight: 800;
  white-space: normal;
  text-align: center;
}

.history-status-badge.active {
  border-color: #1f91bf;
  background: #12344b;
  color: #9ee9ff;
}

.history-status-badge.out {
  border-color: #d9a441;
  background: #3a2b13;
  color: #ffd98a;
}

.history-status-badge.repair {
  border-color: #8e6bd9;
  background: #24183d;
  color: #d7c8ff;
}

.history-status-badge.complete,
.history-status-badge.final {
  border-color: #21be91;
  background: #102f29;
  color: #9cf2d6;
}

.dashboard-history-visit {
  padding: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #2b3846;
  border-radius: 10px;
  background: #121b24;
}

.dashboard-history-visit-accordion {
  display: grid;
  gap: 8px;
}

.dashboard-history-visit.current-visit {
  border-color: #3d9960;
  box-shadow: 0 0 0 1px rgba(61, 153, 96, 0.18);
}

.dashboard-history-visit.collapsed .dashboard-history-visit-body {
  display: none;
}

.dashboard-history-visit-head {
  cursor: pointer;
  padding: 14px;
  margin-bottom: 0;
  list-style: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-history-visit-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-history-visit-head-main h4 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.35rem;
}

.dashboard-history-visit-title {
  font-weight: 700;
}

.dashboard-history-visit-summary {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #8b96a3;
}

.dashboard-history-visit-chevron {
  flex: 0 0 auto;
  color: #8b96a3;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-top: 0.1rem;
}

.dashboard-history-visit-id {
  margin: 0 0 0.75rem;
  padding: 0 14px;
  font-size: 0.72rem;
  color: #8b96a3;
  letter-spacing: 0.02em;
}

.dashboard-history-visit.expanded .dashboard-history-visit-head {
  border-bottom: 1px solid #2b3846;
}

.dashboard-history-visit.matched-visit {
  border-color: #1f91bf;
  box-shadow: 0 0 0 1px rgba(31, 145, 191, 0.28);
}

.visit-head-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.dashboard-history-timeline {
  display: grid;
  gap: 0;
  padding: 0 14px 14px;
}

.history-stage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  position: relative;
}

.history-stage:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: #203650;
}

.history-stage-marker {
  z-index: 1;
  width: 22px;
  height: 22px;
  margin-top: 4px;
  border: 2px solid #314966;
  border-radius: 50%;
  background: #0d1726;
}

.history-stage.available .history-stage-marker {
  border-color: #1f91bf;
  background: #1f91bf;
}

.history-stage.current .history-stage-marker {
  border-color: #21be91;
  background: #21be91;
  box-shadow: 0 0 0 4px rgba(33, 190, 145, 0.16);
}

.history-stage-body {
  min-width: 0;
  padding-bottom: 14px;
}

.history-stage-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
  min-width: 0;
}

.history-stage-title h5,
.dashboard-history-subsection h5 {
  margin: 0 0 8px;
  color: #d8e8f7;
}

.history-stage-card,
.history-empty-state {
  min-width: 0;
  padding: 12px;
  border: 1px solid #203650;
  border-radius: 8px;
  background: #0a1422;
}

.history-empty-state {
  color: #9fb5ca;
}

.legacy-eir-preserved-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #2f8db3;
  border-radius: 8px;
  background: rgba(31, 145, 191, 0.13);
  color: #d8f3ff;
  font-weight: 700;
}

.history-stage-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.dashboard-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.dashboard-history-table th,
.dashboard-history-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #203650;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.dashboard-history-table th {
  width: 38%;
  color: #9fb5ca;
  text-align: left;
  font-weight: 700;
}

.dashboard-history-table.wide th {
  width: auto;
}

.dashboard-history-subsection,
.dashboard-history-media-grid,
.dashboard-history-legacy,
.dashboard-history-technical {
  margin-top: 12px;
}

.dashboard-history-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.dashboard-history-media {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 128px;
  padding: 8px;
  border: 1px solid #263b55;
  border-radius: 8px;
  background: #0a1422;
  color: #ffffff;
  text-align: left;
}

.dashboard-history-media b {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.dashboard-history-media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-history-media-actions .photo-action-btn {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  text-align: center;
  white-space: normal;
}

.dashboard-history-media img,
.dashboard-history-file {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 6px;
  background: #07101b;
}

.dashboard-history-file {
  display: grid;
  place-items: center;
  color: #9fb5ca;
}

.dashboard-history-legacy {
  padding: 10px 12px;
}

.dashboard-history-technical {
  margin: 0 14px 14px;
  padding: 10px 12px;
  border: 1px dashed #314966;
  border-radius: 8px;
  background: #0a1422;
}

.dashboard-history-suggestions {
  display: grid;
  gap: 10px;
}

.compact-empty {
  min-height: auto;
  padding: 12px;
}

.program-photo-cell {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.program-photo-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.program-photo-cell input {
  min-width: 150px;
  padding: 8px;
  font-size: 12px;
}
}

.estimate-report-title {
  display: none;
}

.estimateSheet {
  background: #07111c;
  color: #f8fbff;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  border: 1px solid #1f3855;
}

.estimateBrand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #06101a;
  color: #f8fbff;
  min-height: 48px;
  text-align: center;
  border-bottom: 2px solid #18c5df;
}

.estimateLogo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 4px 12px;
}

.estimateLogo img {
  display: block;
  max-width: 145px;
  max-height: 42px;
  object-fit: contain;
}

.estimateBrand strong {
  font-size: 26px;
  letter-spacing: 0;
}

.estimateTitle {
  background: #102033;
  color: #f8fbff;
  text-align: center;
  font-size: 19px;
  font-weight: 900;
  padding: 6px;
  border-bottom: 1px solid #1f3855;
}

.standardReportHeader {
  display: block;
  width: 100%;
}

.standardReportSubtitle {
  background: #e9f2f7;
  color: #173d56;
  border-bottom: 1px solid #8aa8ba;
  padding: 5px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.croPrintMeta {
  grid-template-columns: 150px minmax(180px, 1fr) 140px minmax(180px, 1fr);
}

.internalReportTitle {
  background: #fff3cd;
  color: #7a4b00;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  padding: 5px;
  border-bottom: 1px solid #d6b45f;
}

.estimateMeta {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) 140px minmax(180px, 1fr);
  align-items: stretch;
  margin-top: 0;
}

.estimateMeta .label {
  background: #12304c;
  color: #f8fbff;
  font-weight: 900;
  padding: 7px 8px;
  border: 1px solid #285071;
  white-space: nowrap;
  line-height: 1.15;
  overflow: visible;
  font-size: 15px;
}

.estimateMeta .value {
  background: #0c1a2a;
  color: #f8fbff;
  font-weight: 900;
  padding: 7px 8px;
  border: 1px solid #285071;
}

.reportSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.reportSummary div {
  border: 1px solid #b8c7d3;
  background: #f4f8fb;
  padding: 7px 8px;
}

.reportSummary b,
.reportSummary span {
  display: block;
}

.reportSummary b {
  color: #1f5a86;
  font-size: 11px;
}

.reportSummary span {
  color: #000;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.estimateTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  margin-top: 10px;
}

.estimateTable th {
  background: #12304c;
  color: #f8fbff;
  border: 1px solid #285071;
  padding: 8px 6px;
  text-align: center;
  font-size: 14px;
}

.estimateTable td {
  border: 1px solid #285071;
  padding: 6px 6px;
  font-size: 14px;
  color: #f8fbff;
  background: #081522;
}

.estimateTable td:nth-child(1),
.estimateTable td:nth-child(3),
.estimateTable td:nth-child(4),
.estimateTable td:nth-child(5),
.estimateTable td:nth-child(6),
.estimateTable td:nth-child(7),
.estimateTable td:nth-child(8) {
  text-align: center;
}

.estimateTable tfoot td {
  background: #12304c;
  color: #f8fbff;
  font-weight: 900;
}

.estimateTable tfoot td:first-child {
  text-align: center;
}

.blankEstimateRow td {
  height: 28px;
}

.estimatePhotos {
  margin-top: 18px;
}

.estimatePhotos h3 {
  margin: 0 0 10px;
  color: #f8fbff;
}

@media (max-width: 980px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .main,
  .grid,
  .yard-layout,
  .yard-stats,
  .dash-grid,
  .dashboard-tools,
  .bulk-program-box,
  .kanban-board,
  .program-layout,
  .options-grid,
  .photos,
  .reportInfo,
  .smart-layout,
  .estimate-case-search,
  .report-search-panel,
  .reportPhotos {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .actions,
  .rate-form,
  .approval-settings,
  .user-form,
  .permission-grid,
  .option-command,
  .global-search-box,
  .restore-box,
  .quick-add,
  .estimate-picker,
  .program-add {
    grid-template-columns: 1fr;
  }
}

@media screen {
  * {
    scrollbar-width: thin;
    scrollbar-color: #5f738c #07111d;
  }

  *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  *::-webkit-scrollbar-track {
    background: #07111d;
    border-radius: 999px;
  }

  *::-webkit-scrollbar-thumb {
    background: #314966;
    border: 2px solid #07111d;
    border-radius: 999px;
  }

  *::-webkit-scrollbar-thumb:hover {
    background: #18b7d7;
  }

  *::-webkit-scrollbar-corner {
    background: #07111d;
  }

  #appScreen .btn:not(#reportPanel *),
  #appScreen button:not(#reportPanel *) {
    background: #111d2d !important;
    color: #ffffff !important;
    border: 1px solid #314966 !important;
    box-shadow: none !important;
  }

  #appScreen .btn.primary:not(#reportPanel *),
  #appScreen button.btn.primary:not(#reportPanel *),
  #appScreen #saveYardBtn,
  #appScreen #saveProgramBtn,
  #appScreen #saveCaseBtn,
  #appScreen #saveUserBtn,
  #appScreen #applyBulkProgramBtn,
  #appScreen #globalSearchBtn,
  #appScreen #runHealthCheckBtn {
    background: #111d2d !important;
    color: #ffffff !important;
    border-color: #1f7fa8 !important;
  }

  #appScreen .btn.green:not(#reportPanel *),
  #appScreen button.btn.green:not(#reportPanel *),
  #appScreen #yardRepairCaseBtn,
  #appScreen #printYardListBtn,
  #appScreen #printProgramBtn,
  #appScreen #markProgramExportedBtn,
  #appScreen [data-quick="Approved"],
  #appScreen [data-quick="Final Cleared"] {
    background: #111d2d !important;
    color: #ffffff !important;
    border-color: #218c70 !important;
  }

  #appScreen .btn.red:not(#reportPanel *),
  #appScreen button.btn.red:not(#reportPanel *),
  #appScreen #deleteYardBtn,
  #appScreen #deleteProgramBtn,
  #appScreen #deleteCaseBtn,
  #appScreen [data-action="delete"],
  #appScreen [data-remove-program-container] {
    background: #111d2d !important;
    color: #ffffff !important;
    border-color: #9f454d !important;
  }

  #appScreen .btn.gray:not(#reportPanel *),
  #appScreen button.btn.gray:not(#reportPanel *),
  #appScreen #newYardBtn,
  #appScreen #newProgramBtn,
  #appScreen #duplicateBtn,
  #appScreen #exportBtn,
  #appScreen #fullReportPrintBtn,
  #appScreen #generatePasswordBtn {
    background: #111d2d !important;
    color: #ffffff !important;
    border-color: #314966 !important;
  }

  #appScreen .btn:hover:not(#reportPanel *),
  #appScreen button:hover:not(#reportPanel *) {
    transform: translateY(-1px);
    border-color: #18b7d7 !important;
    box-shadow: 0 0 0 2px rgba(24, 183, 215, 0.38), 0 0 22px rgba(24, 183, 215, 0.16) !important;
  }

  #appScreen .btn.green:hover:not(#reportPanel *),
  #appScreen button.btn.green:hover:not(#reportPanel *),
  #appScreen #yardRepairCaseBtn:hover,
  #appScreen #printYardListBtn:hover,
  #appScreen #printProgramBtn:hover,
  #appScreen #markProgramExportedBtn:hover,
  #appScreen [data-quick="Approved"]:hover,
  #appScreen [data-quick="Final Cleared"]:hover {
    border-color: #2be6ad !important;
    box-shadow: 0 0 0 2px rgba(43, 230, 173, 0.36), 0 0 24px rgba(43, 230, 173, 0.2) !important;
  }

  #appScreen .btn.red:hover:not(#reportPanel *),
  #appScreen button.btn.red:hover:not(#reportPanel *),
  #appScreen #deleteYardBtn:hover,
  #appScreen #deleteProgramBtn:hover,
  #appScreen #deleteCaseBtn:hover,
  #appScreen [data-action="delete"]:hover,
  #appScreen [data-remove-program-container]:hover {
    border-color: #ff747a !important;
    box-shadow: 0 0 0 2px rgba(255, 116, 122, 0.38), 0 0 24px rgba(255, 116, 122, 0.22) !important;
  }
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4;
    margin: 8mm;
  }

  html {
    background: #ffffff !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0;
  }

  .top,
  .workflow,
  .stats,
  .tabs,
  .app-popup,
  .photo-viewer,
  .estimate-approval-modal,
  .no-print,
  .panel:not(#reportPanel) {
    display: none !important;
  }

  .wrap {
    padding: 0;
  }

  .main {
    display: block;
    margin: 0;
  }

  .card {
    box-shadow: none;
  }

  #reportPanel {
    display: block !important;
  }

  .estimate-print-only .full-report-only,
  .estimate-print-only .full-report-title {
    display: none !important;
  }

  .estimate-print-only .estimate-report-title {
    display: inline !important;
  }

  .report {
    border: 0;
    border-radius: 0;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .report,
  .estimateSheet {
    padding: 0;
  }

  .estimateSheet {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    box-shadow: none !important;
  }

  .estimateBrand {
    background: #06101a !important;
    color: #f8fbff !important;
    border-bottom: 2px solid #18c5df !important;
    min-height: 44px;
  }

  .estimateLogo {
    height: 44px;
  }

  .estimateLogo img {
    max-height: 36px;
  }

  .estimateBrand strong {
    color: #f8fbff !important;
    font-size: 24px;
  }

  .estimateTitle {
    background: #f2f2f2 !important;
    color: #000000 !important;
    font-size: 18px;
    padding: 5px;
    border-bottom: 1px solid #000000 !important;
  }

  .estimateMeta {
    grid-template-columns: 138px minmax(150px, 1fr) 130px minmax(150px, 1fr);
  }

  .estimateMeta .label {
    background: #f2f2f2 !important;
    color: #000000 !important;
    border-color: #000000 !important;
    padding: 6px 7px;
    font-size: 11px;
    white-space: nowrap;
    overflow: visible;
  }

  .estimateMeta .value {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
    padding: 6px 7px;
    font-size: 13px;
  }

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

  .reportSummary div {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
    padding: 5px 6px;
  }

  .estimateTable {
    margin-top: 9px;
    width: 100%;
    border-collapse: collapse;
  }

  .estimateTable thead {
    display: table-header-group;
  }

  .estimateTable tfoot {
    display: table-footer-group;
  }

  .estimateTable tr,
  .estimateTable td,
  .estimateTable th {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .estimateTable th {
    background: #f2f2f2 !important;
    color: #000000 !important;
    border-color: #000000 !important;
    padding: 7px 5px;
    font-size: 12px;
  }

  .estimateTable td {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
    padding: 5px;
    font-size: 12px;
  }

  .estimateTable tfoot td {
    background: #f2f2f2 !important;
    color: #000000 !important;
    border-color: #000000 !important;
    font-weight: 900 !important;
  }

  .programPrintMeta,
  .croPrintMeta {
    grid-template-columns: 138px minmax(150px, 1fr) 130px minmax(150px, 1fr);
  }

  .programPrintTable {
    min-width: 0 !important;
  }

  .programPrintTable th,
  .programPrintTable td {
    font-size: 11px;
    padding: 6px 4px;
  }

  .blankEstimateRow td {
    height: 24px;
  }

  .estimatePhotos h3 {
    color: #000000 !important;
    font-size: 16px;
    margin: 12px 0 8px;
  }

  .reportPhotos {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .reportPhoto {
    border: 1px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
    border-radius: 4px;
    padding: 5px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .reportPhoto img {
    display: block;
    width: 100%;
    height: 185px;
    max-width: 100%;
    max-height: 185px;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    transform-origin: center !important;
    background: #ffffff !important;
    image-rendering: auto;
  }

  .photo-not-found {
    display: flex !important;
    min-height: 155px;
    align-items: center;
    justify-content: center;
    border: 1px dashed #666 !important;
    background: #f5f5f5 !important;
    color: #000000 !important;
    font-weight: 700;
  }

  .photo-not-found.hidden {
    display: none !important;
  }

  .reportPhoto b,
  .reportPhotoLabel,
  .reportPhotoSource {
    display: block !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 11px;
    font-weight: 900 !important;
    line-height: 1.25;
    margin-top: 5px;
    text-align: center;
    visibility: visible !important;
  }

  .photo-report-card {
    background: #ffffff !important;
    border-color: #000000 !important;
    color: #000000 !important;
    padding: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .photo-report-card img {
    display: block;
    width: 100%;
    height: 170px;
    max-width: 100%;
    max-height: 170px;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    transform-origin: center !important;
    background: #ffffff !important;
    image-rendering: auto;
  }

  .photo-report-card b {
    display: block !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 11px;
    font-weight: 900 !important;
    line-height: 1.25;
    margin-top: 5px;
    text-align: center;
    visibility: visible !important;
  }

  .programPrintPhotoBlocks,
  .program-container-photo-section {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .program-container-photo-section {
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
    padding: 10px !important;
  }

  .program-container-photo-section h3 {
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 16px !important;
    font-weight: 900 !important;
  }

  .program-photo-meta span {
    border: 1px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  .programPrintPhotos {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .programPrintPhotos .photo-report-card {
    border: 1px solid #000000 !important;
    border-radius: 6px !important;
    padding: 8px !important;
    background: #ffffff !important;
  }

  .programPrintPhotos .photo-report-frame {
    min-height: 220px !important;
    border: 1px solid #000000 !important;
    background: #ffffff !important;
  }

  .programPrintPhotos .photo-report-card img {
    height: 250px !important;
    max-height: 250px !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    border-radius: 0 !important;
    background: #ffffff !important;
  }

  .fullContainerReport,
  .fullContainerReport * {
    color: #000000 !important;
  }

  .fullContainerReport .full-report-section {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-top: 12px !important;
  }

  .fullContainerReport .full-report-section + .full-report-section {
    break-before: auto;
    page-break-before: auto;
  }

  .fullContainerReport table,
  .fullContainerReport tr,
  .fullContainerReport .reportPhoto,
  .fullContainerReport .photo-report-card,
  .fullContainerReport .program-container-photo-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .fullContainerReport h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .estimateSheet,
  .eirPrintSheet,
  .programPrintSheet,
  .clearanceSheet,
  .estimatePhotos,
  .page-break-section,
  .program-container-photo-section {
    orphans: 3;
    widows: 3;
  }

  #reportPanel,
  #reportPanel *,
  .report,
  .report * {
    color: #000000 !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  #reportPanel .card,
  #reportPanel .panel,
  #reportPanel .dashboard-history-card,
  #reportPanel .dashboard-history-summary-bar,
  #reportPanel .dashboard-history-container,
  #reportPanel .dashboard-history-visit,
  #reportPanel .history-stage-card,
  #reportPanel .history-empty-state,
  #reportPanel .repair-cycle-current,
  #reportPanel .repair-cycle-card,
  #reportPanel .repair-cycle-reopen,
  #reportPanel .repair-cycle-approval,
  #reportPanel .repair-cycle-work,
  #reportPanel .repair-cycle-photo-group,
  #reportPanel .case-proof-card,
  #reportPanel .warning-card,
  #reportPanel .empty-state,
  .report .card,
  .report .panel,
  .report .dashboard-history-card,
  .report .dashboard-history-summary-bar,
  .report .dashboard-history-container,
  .report .dashboard-history-visit,
  .report .history-stage-card,
  .report .history-empty-state,
  .report .repair-cycle-current,
  .report .repair-cycle-card,
  .report .repair-cycle-reopen,
  .report .repair-cycle-approval,
  .report .repair-cycle-work,
  .report .repair-cycle-photo-group,
  .report .case-proof-card,
  .report .warning-card,
  .report .empty-state {
    background: #ffffff !important;
    background-image: none !important;
    border-color: #c9d2dc !important;
    color: #000000 !important;
    box-shadow: none !important;
  }

  #reportPanel h1,
  #reportPanel h2,
  #reportPanel h3,
  #reportPanel h4,
  #reportPanel h5,
  #reportPanel h6,
  .report h1,
  .report h2,
  .report h3,
  .report h4,
  .report h5,
  .report h6 {
    color: #000000 !important;
    background: #ffffff !important;
    break-after: avoid;
    page-break-after: avoid;
  }

  #reportPanel .pill,
  #reportPanel .status-badge,
  #reportPanel .history-status-badge,
  .report .pill,
  .report .status-badge,
  .report .history-status-badge {
    background: #ffffff !important;
    border: 1px solid #8c9aaa !important;
    color: #000000 !important;
  }

  #reportPanel table,
  .report table {
    border-collapse: collapse !important;
    background: #ffffff !important;
    color: #000000 !important;
  }

  #reportPanel thead,
  .report thead {
    display: table-header-group;
  }

  #reportPanel th,
  #reportPanel td,
  .report th,
  .report td {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }

  #reportPanel th,
  .report th {
    background: #f2f4f7 !important;
    font-weight: 900 !important;
  }

  #reportPanel button,
  #reportPanel input,
  #reportPanel select,
  #reportPanel textarea,
  #reportPanel .photo-actions,
  #reportPanel .dashboard-history-media-actions,
  .report button,
  .report input,
  .report select,
  .report textarea,
  .report .photo-actions,
  .report .dashboard-history-media-actions {
    display: none !important;
  }

  .repairCyclePrintHistory,
  .repairCyclePrintSection,
  .repairCyclePrintApproval,
  .repairCyclePrintState,
  .repairCyclePrintPhotos {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #c9d2dc !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .repairCyclePrintHistory h3 {
    margin: 14px 0 8px !important;
    padding: 7px 0 !important;
    border-bottom: 2px solid #000000 !important;
    font-size: 16px !important;
  }

  .repairCyclePrintState {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 !important;
    border: 1px solid #000000 !important;
    margin: 8px 0 12px !important;
  }

  .repairCyclePrintState div {
    border-right: 1px solid #000000 !important;
    padding: 6px !important;
    background: #ffffff !important;
  }

  .repairCyclePrintState div:last-child {
    border-right: 0 !important;
  }

  .repairCyclePrintState b,
  .repairCyclePrintState span {
    display: block !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  .repairCyclePrintState b {
    font-size: 10px !important;
    text-transform: uppercase;
  }

  .repairCyclePrintSection {
    border: 1px solid #000000 !important;
    margin-top: 12px !important;
    padding: 8px !important;
  }

  .repairCyclePrintHead {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    align-items: center !important;
    border-bottom: 1px solid #000000 !important;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
    background: #ffffff !important;
  }

  .repairCyclePrintHead h4,
  .repairCyclePrintApproval h5,
  .repairCyclePrintPhotos h4 {
    margin: 0 0 6px !important;
    color: #000000 !important;
    background: #ffffff !important;
    font-size: 13px !important;
  }

  .repairCyclePrintHead span {
    border: 1px solid #000000 !important;
    padding: 3px 6px !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 900 !important;
  }

  .repairCyclePrintMeta,
  .repairCyclePrintTable {
    margin: 7px 0 !important;
  }

  .repairCyclePrintMeta th,
  .repairCyclePrintMeta td,
  .repairCyclePrintTable th,
  .repairCyclePrintTable td {
    font-size: 10.5px !important;
    padding: 5px !important;
    vertical-align: top !important;
    overflow-wrap: anywhere !important;
  }

  .repairCyclePrintApproval {
    border: 1px solid #c9d2dc !important;
    margin: 8px 0 !important;
    padding: 6px !important;
  }

  .print-empty-text,
  .print-warning-text {
    color: #000000 !important;
    background: #ffffff !important;
    border: 1px solid #c9d2dc !important;
    padding: 6px !important;
    font-size: 11px !important;
  }

  .estimatePhotos h3,
  .page-break-section h3 {
    break-after: avoid;
    page-break-after: avoid;
  }
}

@media screen {
  :root {
    --blue: #195f86;
    --blue-dark: #0f3f5f;
    --ink: #172033;
    --muted: #607089;
    --line: #d8e1ec;
    --soft: #eef3f8;
    --paper: #ffffff;
    --green: #148d67;
    --red: #d94949;
    --amber: #c47a10;
    --cyan: #18b7d7;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 14px 35px rgba(30, 54, 84, 0.12);
  }

  body {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background:
      radial-gradient(circle at top left, rgba(24, 183, 215, 0.12), transparent 24rem),
      linear-gradient(180deg, #dfe9f0 0%, #d7e3ec 100%);
    color: var(--ink);
    font-size: 14px;
  }

  .top {
    min-height: 76px;
    padding: 12px 20px;
    background: #102033;
    color: var(--ink);
    border-bottom: 1px solid #1c344e;
    box-shadow: var(--shadow-sm);
  }

  .brand {
    gap: 14px;
  }

  .logo {
    width: 62px;
    height: 46px;
    border: 1px solid #dce6f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(25, 95, 134, 0.12);
    color: var(--blue);
    font-size: 24px;
  }

  .top h1 {
    color: #ffffff;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .top p {
    color: #c9d8e8;
    font-size: 13px;
  }

  .top-actions {
    gap: 10px;
  }

  .top-actions .pill {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
  }

  .btn {
    border-radius: 9px;
    min-height: 36px;
    border: 1px solid transparent;
    box-shadow: none;
    padding: 8px 12px;
    font-size: 14px;
  }

  .btn.primary,
  .btn:not(.gray):not(.red):not(.green):not(.light) {
    background: var(--blue);
  }

  .btn.light,
  .tab,
  .case-subtab {
    background: #ffffff;
    color: #13243a;
    border-color: #d9e3ee;
    box-shadow: var(--shadow-sm);
  }

  .btn.gray {
    background: #edf3f8;
    color: #172033;
    border-color: #d9e3ee;
  }

  .btn.green {
    background: var(--green);
  }

  .btn.red {
    background: var(--red);
  }

  .wrap {
    padding: 14px 18px 24px;
  }

  .stats {
    gap: 14px;
  }

  .card,
  .panel,
  .yard-layout > *,
  .program-layout > *,
  .smart-help,
  .part-guide,
  .photo-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
  }

  .panel {
    padding: 18px;
  }

  .panel h2,
  .side h2 {
    margin-top: 0;
    color: #111f31;
    font-size: 22px;
  }

  .main {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
  }

  .side {
    position: sticky;
    top: 12px;
    align-self: start;
    border-radius: 14px;
    padding: 18px;
  }

  .tabs,
  .case-subtabs {
    gap: 10px;
    margin-bottom: 12px;
  }

  .tab,
  .case-subtab {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
  }

  .tab.active,
  .case-subtab.active {
    background: #102033;
    color: #ffffff;
    border-color: #102033;
    box-shadow: 0 8px 22px rgba(16, 32, 51, 0.18);
  }

  .dash-grid,
  .yard-stats {
    gap: 12px;
  }

  .dash-card,
  .yard-stat,
  .stat {
    position: relative;
    min-height: 82px;
    border: 1px solid #d8e3ee;
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(180deg, #f8fbfe 0%, #eef4f8 100%);
    color: #53657a;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    font-size: 13px;
  }

  .dash-card::before,
  .yard-stat::before,
  .stat::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--cyan);
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .dash-card:hover,
  .yard-stat:hover,
  .stat:hover,
  .yard-stat.active,
  .stat.active {
    border-color: #9fd8e8;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }

  .dash-card:hover::before,
  .yard-stat:hover::before,
  .stat:hover::before,
  .yard-stat.active::before,
  .stat.active::before {
    opacity: 1;
  }

  .dash-card b,
  .yard-stat b,
  .stat b {
    display: block;
    color: #07182d;
    font-size: 26px;
    line-height: 1.1;
    margin-top: 5px;
  }

  .search,
  input,
  select,
  textarea,
  .field input,
  .field select,
  label input,
  label select,
  .rate-form input,
  .inline-actions select,
  .estimate-picker select,
  .estimate-picker input {
    border: 1px solid #d5e0eb;
    border-radius: 10px;
    background: #ffffff;
    color: #122033;
    min-height: 36px;
    box-shadow: none;
    font-size: 14px;
  }

  .search:focus,
  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(24, 183, 215, 0.15);
    outline: none;
  }

  .field {
    background: #f4f8fb;
    border: 1px solid #dce6f0;
    border-radius: 12px;
    color: #5e6f85;
    padding: 7px 9px;
    font-size: 12px;
  }

  .field input,
  .field select {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-height: 28px;
    padding-left: 0;
  }

  .case-list > div,
  .program-container-option,
  .yard-case-item,
  .kanban-card,
  .case-proof-card,
  .history-row {
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dce6f0;
    font-size: 13px;
  }

  .case-list > div.active,
  .case-list > div:hover,
  .program-container-option:hover {
    border-color: #9fd8e8;
    background: #f3fbfe;
  }

  .table-scroll {
    border: 1px solid #dce6f0;
    border-radius: 14px;
    background: #ffffff;
    overflow: auto;
  }

  table {
    border-radius: 0;
    min-width: 920px;
  }

  th {
    background: #f1f6fa;
    color: #47566b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0;
    border-bottom: 1px solid #dce6f0;
    padding: 8px;
  }

  td {
    border-top: 1px solid #edf2f7;
    color: #172033;
    font-size: 13px;
    padding: 7px;
  }

  tr:hover td {
    background: #fbfdff;
  }

  .smart-layout {
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
    gap: 14px;
  }

  .part-guide img {
    height: 270px;
  }

  .damage-btn,
  .part-btn {
    border-color: #d8e3ee;
    color: #17314c;
    background: #ffffff;
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .damage-btn.active,
  .part-btn.active {
    background: #102033;
    border-color: #102033;
    color: #ffffff;
  }

  .totalBox {
    background: linear-gradient(135deg, #102033, #195f86);
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(25, 95, 134, 0.16);
    padding: 12px 16px;
  }

  .photos {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .photo-card {
    border-style: solid;
    min-height: 170px;
  }

  .photo-card b {
    color: #17496d;
  }

  .photo-card img {
    border-radius: 10px;
  }
}

@media screen {
  .login-screen {
    background:
      radial-gradient(circle at 50% 20%, rgba(24, 183, 215, 0.16), transparent 28rem),
      #050b12;
  }

  .login-card {
    background: #0b1421;
    border-color: #263b55;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
  }

  .login-logo img {
    opacity: 1;
    filter: none;
  }

  .login-company {
    color: #ffffff;
  }

  .login-card label,
  .login-card h1 {
    color: #ffffff;
  }

  .login-card select,
  .login-card input {
    background: #07111d;
    color: #ffffff;
    border: 1px solid #263b55;
    border-radius: 10px;
  }

  .login-card select:focus,
  .login-card input:focus {
    border-color: #18b7d7;
    box-shadow: 0 0 0 3px rgba(24, 183, 215, 0.16);
  }

  .login-card .btn {
    background: #1d6f91;
    color: #ffffff;
    border: 1px solid #268ab2;
  }

  .link-btn {
    color: #5fd7f0;
  }

  body {
    background: #050b12;
    color: #eef6ff;
  }

  #headerOptionsBtn {
    display: none !important;
  }

  .top {
    min-height: 74px;
    background: #050b12;
    border-bottom: 1px solid #142338;
    color: #eef6ff;
  }

  .top h1 {
    color: #ffffff;
    font-size: 24px;
  }

  .top p {
    display: none;
  }

  .logo {
    background: #ffffff;
    color: #0b5f86;
  }

  .top-actions .pill {
    background: #121d2d;
    color: #ffffff;
    border-color: #263b55;
  }

  .btn.light {
    background: #0f1a29;
    color: #ffffff;
    border-color: #263b55;
  }

  .wrap {
    background: #050b12;
  }

  .card,
  .panel,
  .yard-layout > *,
  .program-layout > *,
  .smart-help,
  .part-guide,
  .photo-card,
  .side,
  .table-scroll {
    background: #0b1421;
    color: #eef6ff;
    border-color: #21334a;
    box-shadow: none;
  }

  .panel h2,
  .side h2,
  h2,
  h3 {
    color: #ffffff;
  }

  .tabs,
  .case-subtabs {
    gap: 8px;
  }

  .tab,
  .case-subtab {
    min-height: 34px;
    padding: 7px 11px;
    background: #0d1827;
    color: #dcecff;
    border-color: #263b55;
    box-shadow: none;
    font-size: 13px;
  }

  .tab.active,
  .case-subtab.active {
    background: #1a8bb0;
    border-color: #1a8bb0;
    color: #ffffff;
    box-shadow: none;
  }

  .dash-card,
  .yard-stat,
  .stat {
    min-height: 76px;
    background: #0f1a29;
    color: #b9c9dc;
    border-color: #263b55;
    box-shadow: none;
    padding: 11px;
  }

  .dash-card b,
  .yard-stat b,
  .stat b {
    color: #ffffff;
    font-size: 24px;
  }

  .dash-card:hover,
  .yard-stat:hover,
  .stat:hover,
  .yard-stat.active,
  .stat.active {
    background: #112238;
    border-color: #1a8bb0;
    box-shadow: none;
  }

  .field,
  .empty-list,
  .case-proof-list,
  .case-list > div,
  .program-container-option,
  .yard-case-item,
  .mode-btn,
  .inbound-batch-list-pane,
  .inbound-batch-detail-pane,
  .inbound-paste-panel,
  .inbound-progress-card,
  .inbound-unit-row,
  .kanban-card,
  .case-proof-card,
  .history-row {
    background: #0f1a29;
    color: #eef6ff;
    border-color: #263b55;
  }

  .field {
    color: #a8bdd4;
  }

  .field input,
  .field select,
  input,
  select,
  textarea,
  .search,
  label input,
  label select,
  .rate-form input,
  .inline-actions select,
  .estimate-picker select,
  .estimate-picker input {
    background: #07111d;
    color: #ffffff;
    border-color: #263b55;
  }

  select {
    color-scheme: dark;
    appearance: auto;
  }

  select option {
    background: #07111d;
    color: #ffffff;
  }

  .field input,
  .field select {
    background: transparent;
    border: 0;
  }

  .program-container-results {
    background: #07111d;
    border: 1px solid #263b55;
    border-radius: 12px;
    padding: 6px;
  }

  .program-container-result,
  .program-container-choice {
    background: #0f1a29 !important;
    color: #eef6ff !important;
    border: 1px solid #263b55 !important;
    border-radius: 10px;
  }

  .program-container-result:hover,
  .program-container-choice:hover {
    background: #112238 !important;
    border-color: #1a8bb0 !important;
  }

  .program-container-result b {
    color: #ffffff;
  }

  .program-container-result span,
  .program-container-result small {
    color: #a8bdd4 !important;
  }

  .program-container-choice input,
  .yard-case-item input {
    accent-color: #1a8bb0;
  }

  input::placeholder {
    color: #8fa5bd;
  }

  .case-list > div.active,
  .case-list > div:hover,
  .program-container-option:hover {
    background: #112238;
    border-color: #1a8bb0;
  }

  .soft,
  .hint,
  .history-row span,
  .kanban-card span {
    color: #a8bdd4;
  }

  th {
    background: #111d2d;
    color: #c6d8ec;
    border-bottom-color: #263b55;
  }

  td {
    background: #0b1421;
    color: #eef6ff;
    border-top-color: #203249;
  }

  tr:hover td {
    background: #101d2e;
  }

  td input,
  td select {
    background: #07111d;
    color: #ffffff;
    border-color: #263b55;
  }

  .pill {
    background: #111d2d;
    color: #d8e9fb;
  }

  .damage-btn,
  .part-btn {
    background: #0d1827;
    color: #dcecff;
    border-color: #263b55;
  }

  .damage-btn.active,
  .part-btn.active {
    background: #1a8bb0;
    border-color: #1a8bb0;
  }

  .totalBox {
    background: #1a8bb0;
    color: #ffffff;
  }

  #reportPanel .print-wrap,
  #reportPanel .report,
  #reportPanel .reportPreview,
  #reportPanel .estimate-print,
  #reportPanel .estimatePrint {
    background: #07111c !important;
    color: #f8fbff !important;
  }

  #reportPanel .print-wrap *,
  #reportPanel .report *,
  #reportPanel .reportPreview *,
  #reportPanel .estimate-print *,
  #reportPanel .estimatePrint * {
    color: inherit;
  }

  #reportPanel .estimateTable {
    background: #07111c !important;
    color: #f8fbff !important;
  }

  #reportPanel .estimateTable th {
    background: #12304c !important;
    color: #f8fbff !important;
    border-color: #285071 !important;
  }

  #reportPanel .estimateTable td {
    background: #081522 !important;
    color: #f8fbff !important;
    border-color: #285071 !important;
  }

  #reportPanel .estimateTable tfoot td {
    background: #12304c !important;
    color: #f8fbff !important;
  }

  .actions .btn,
  #yardPanel .actions .btn,
  #programPanel .actions .btn {
    background: #111d2d;
    color: #ffffff;
    border: 1px solid #263b55;
    min-height: 38px;
  }

  .actions .btn.primary,
  #saveYardBtn,
  #saveProgramBtn {
    background: #1d6f91;
    border-color: #268ab2;
  }

  .actions .btn.green,
  #yardRepairCaseBtn,
  #printYardListBtn,
  #printProgramBtn {
    background: #128765;
    border-color: #16a078;
  }

  .actions .btn.red,
  #deleteYardBtn,
  #deleteProgramBtn {
    background: #c83f45;
    border-color: #d9555a;
  }

  .actions .btn.gray,
  #newYardBtn,
  #newProgramBtn {
    background: #18263a;
    color: #e6f1ff;
    border-color: #314966;
  }
}

@media screen {
  #appScreen :not(#reportPanel):not(#reportPanel *) {
    color: #ffffff;
  }

  #appScreen .soft:not(#reportPanel *),
  #appScreen .hint:not(#reportPanel *),
  #appScreen small:not(#reportPanel *),
  #appScreen span:not(#reportPanel *),
  #appScreen label:not(#reportPanel *) {
    color: #c7d7ea;
  }

  #appScreen b:not(#reportPanel *),
  #appScreen strong:not(#reportPanel *),
  #appScreen h1:not(#reportPanel *),
  #appScreen h2:not(#reportPanel *),
  #appScreen h3:not(#reportPanel *),
  #appScreen h4:not(#reportPanel *) {
    color: #ffffff;
  }

  button,
  .btn,
  .tab,
  .case-subtab,
  .dash-card,
  .yard-stat,
  .part-btn,
  .damage-btn,
  .program-container-result,
  .case-list > div,
  .kanban-card,
  .search-hit {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
  }

  button:hover,
  .btn:hover,
  .tab:hover,
  .case-subtab:hover,
  .dash-card:hover,
  .yard-stat:hover,
  .part-btn:hover,
  .damage-btn:hover,
  .program-container-result:hover,
  .case-list > div:hover,
  .kanban-card:hover,
  .search-hit:hover {
    border-color: #18b7d7 !important;
    box-shadow: 0 0 0 2px rgba(24, 183, 215, 0.38), 0 0 22px rgba(24, 183, 215, 0.16) !important;
  }

  .btn,
  button {
    background: #111d2d;
    color: #ffffff;
    border: 1px solid #263b55;
  }

  .btn.primary,
  button.btn.primary,
  #saveYardBtn,
  #saveProgramBtn,
  #saveCaseBtn,
  #saveUserBtn,
  #applyBulkProgramBtn,
  #globalSearchBtn,
  #runHealthCheckBtn,
  #estimateOnlyPrintBtn {
    background: linear-gradient(180deg, #1d78a0, #175f82) !important;
    color: #ffffff !important;
    border-color: #1f91bf !important;
  }

  .btn.green,
  button.btn.green,
  #yardRepairCaseBtn,
  #printYardListBtn,
  #printProgramBtn,
  #markProgramExportedBtn,
  [data-quick="Approved"],
  [data-quick="Final Cleared"] {
    background: linear-gradient(180deg, #16a078, #128765) !important;
    color: #ffffff !important;
    border-color: #21be91 !important;
  }

  .btn.red,
  button.btn.red,
  #deleteYardBtn,
  #deleteProgramBtn,
  #deleteCaseBtn,
  [data-action="delete"],
  [data-remove-program-container] {
    background: linear-gradient(180deg, #d84a50, #bd3940) !important;
    color: #ffffff !important;
    border-color: #ef686e !important;
  }

  .btn.gray,
  button.btn.gray,
  #newYardBtn,
  #newProgramBtn,
  #duplicateBtn,
  #exportBtn,
  #fullReportPrintBtn,
  #generatePasswordBtn {
    background: #142238 !important;
    color: #ffffff !important;
    border-color: #314966 !important;
  }

  .btn:hover,
  button:hover {
    transform: translateY(-1px);
  }

  .btn.primary:hover,
  button.btn.primary:hover,
  #saveYardBtn:hover,
  #saveProgramBtn:hover,
  #saveCaseBtn:hover,
  #saveUserBtn:hover,
  #applyBulkProgramBtn:hover,
  #globalSearchBtn:hover,
  #runHealthCheckBtn:hover,
  #estimateOnlyPrintBtn:hover {
    border-color: #24c8ef !important;
    box-shadow: 0 0 0 2px rgba(36, 200, 239, 0.42), 0 0 24px rgba(36, 200, 239, 0.22) !important;
  }

  .btn.green:hover,
  button.btn.green:hover,
  #yardRepairCaseBtn:hover,
  #printYardListBtn:hover,
  #printProgramBtn:hover,
  #markProgramExportedBtn:hover,
  [data-quick="Approved"]:hover,
  [data-quick="Final Cleared"]:hover {
    border-color: #2be6ad !important;
    box-shadow: 0 0 0 2px rgba(43, 230, 173, 0.36), 0 0 24px rgba(43, 230, 173, 0.2) !important;
  }

  .btn.red:hover,
  button.btn.red:hover,
  #deleteYardBtn:hover,
  #deleteProgramBtn:hover,
  #deleteCaseBtn:hover,
  [data-action="delete"]:hover,
  [data-remove-program-container]:hover {
    border-color: #ff747a !important;
    box-shadow: 0 0 0 2px rgba(255, 116, 122, 0.38), 0 0 24px rgba(255, 116, 122, 0.22) !important;
  }

  .btn.gray:hover,
  button.btn.gray:hover,
  #newYardBtn:hover,
  #newProgramBtn:hover,
  #duplicateBtn:hover,
  #exportBtn:hover,
  #fullReportPrintBtn:hover,
  #generatePasswordBtn:hover {
    border-color: #18b7d7 !important;
    box-shadow: 0 0 0 2px rgba(24, 183, 215, 0.38), 0 0 22px rgba(24, 183, 215, 0.16) !important;
  }

  .kanban-column {
    background: #0b1421 !important;
    border-color: #263b55 !important;
    color: #ffffff !important;
  }

  .kanban-column h4 {
    color: #ffffff !important;
  }

  .kanban-card,
  .search-hit,
  .empty-list {
    background: #0f1a29 !important;
    color: #ffffff !important;
    border-color: #263b55 !important;
  }

  .kanban-card b,
  .search-hit b {
    color: #ffffff !important;
  }

  .kanban-card span,
  .search-hit span {
    color: #c7d7ea !important;
  }

  .bulk-program-box label {
    color: #c7d7ea !important;
  }

  .bulk-program-box input {
    background: #07111d !important;
    color: #ffffff !important;
    border-color: #263b55 !important;
  }

  #programPanel .table-scroll {
    overflow-x: hidden;
  }

  #programContainerTable {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed;
  }

  #programContainerTable th,
  #programContainerTable td {
    white-space: normal;
    overflow-wrap: anywhere;
    padding: 7px 5px;
    font-size: 12px;
  }

  #programContainerTable input {
    min-width: 0 !important;
    width: 100% !important;
    font-size: 12px;
    padding: 6px;
  }

  #programContainerTable .btn {
    min-width: 0;
    padding: 7px 8px;
    font-size: 12px;
  }

  .workflow-actions .btn,
  #casePanel .actions .btn,
  #programPanel .actions .btn,
  #yardPanel .actions .btn {
    background: #111d2d !important;
    color: #ffffff !important;
    border: 1px solid #263b55 !important;
    box-shadow: none;
  }

  .workflow-actions .btn:hover,
  #casePanel .actions .btn:hover,
  #programPanel .actions .btn:hover,
  #yardPanel .actions .btn:hover {
    border-color: #18b7d7 !important;
    box-shadow: 0 0 0 2px rgba(24, 183, 215, 0.38), 0 0 22px rgba(24, 183, 215, 0.16) !important;
  }

  .workflow-actions .btn.green,
  #casePanel .actions .btn.green,
  #programPanel .actions .btn.green,
  #yardPanel .actions .btn.green {
    background: #128765 !important;
    border-color: #16a078 !important;
  }

  .workflow-actions .btn.red,
  #casePanel .actions .btn.red,
  #programPanel .actions .btn.red,
  #yardPanel .actions .btn.red {
    background: #c83f45 !important;
    border-color: #d9555a !important;
  }

  .workflow-actions .btn.primary,
  #casePanel .actions .btn.primary,
  #programPanel .actions .btn.primary,
  #yardPanel .actions .btn.primary {
    background: #1d6f91 !important;
    border-color: #268ab2 !important;
  }

  .estimate-picker {
    background: #0b1421 !important;
    border-color: #263b55 !important;
  }

  .estimate-picker select,
  .estimate-picker input {
    background: #07111d !important;
    color: #ffffff !important;
    border-color: #263b55 !important;
  }

  .quick-add label,
  .rate-form input,
  .inline-actions select {
    color: #c7d7ea !important;
  }

  .part-guide,
  .part-buttons,
  .smart-help {
    background: #0b1421 !important;
    border-color: #263b55 !important;
  }

  #reportPanel,
  #reportPanel *,
  #reportPanel .report,
  #reportPanel .report * {
    color: revert;
  }

  #usersPanel .approval-settings input,
  #usersPanel .user-form input,
  #usersPanel .user-form select {
    background: #07111d !important;
    color: #ffffff !important;
    border: 1px solid #263b55 !important;
  }

  #usersPanel .approval-settings input::placeholder,
  #usersPanel .user-form input::placeholder {
    color: #9eb3cc !important;
  }

  #usersPanel .permission-grid {
    background: #0f1a29 !important;
    border: 1px solid #263b55 !important;
    border-radius: 14px;
    padding: 14px;
  }

  #usersPanel .permission-grid label {
    background: #0b1421;
    border: 1px solid #263b55;
    border-radius: 10px;
    color: #ffffff !important;
    min-height: 44px;
    padding: 10px 12px;
  }

  #usersPanel .permission-grid input {
    width: 18px;
    height: 18px;
    accent-color: #18b7d7;
  }

  #usersPanel .table-scroll {
    background: #0b1421 !important;
    border-color: #263b55 !important;
  }

  #usersPanel #userTable {
    min-width: 0;
  }

  #usersPanel #userTable th {
    background: #111d2d !important;
    color: #cfe2f7 !important;
  }

  #usersPanel #userTable td {
    background: #0b1421 !important;
    color: #ffffff !important;
  }

  #usersPanel #userTable tr:hover td {
    background: #101d2e !important;
  }

  #usersPanel #userTable .btn,
  #usersPanel .approval-settings .btn,
  #usersPanel .user-form .btn {
    background: #111d2d !important;
    color: #ffffff !important;
    border: 1px solid #263b55 !important;
  }

  #usersPanel #userTable .btn.primary,
  #usersPanel .approval-settings .btn.primary,
  #usersPanel .user-form .btn.primary {
    background: #1d6f91 !important;
    border-color: #268ab2 !important;
  }

  #usersPanel #userTable .btn.red {
    background: #c83f45 !important;
    border-color: #d9555a !important;
  }

  #usersPanel button:disabled,
  #usersPanel .btn:disabled {
    background: #1a2638 !important;
    color: #8fa5bd !important;
    border-color: #2a3d55 !important;
    opacity: 1;
    cursor: not-allowed;
  }

  #customerAccountsPanel .table-scroll {
    background: #0b1421 !important;
    border-color: #263b55 !important;
  }

  #customerAccountsPanel #customerAccountsTable {
    min-width: 980px;
  }

  #customerAccountsPanel #customerAccountsTable th {
    background: #111d2d !important;
    color: #cfe2f7 !important;
  }

  #customerAccountsPanel #customerAccountsTable td {
    background: #0b1421 !important;
    color: #ffffff !important;
  }

  #customerAccountsPanel #customerAccountsTable tr:hover td {
    background: #101d2e !important;
  }

  #customerAccountsPanel #customerAccountsTable .btn {
    background: #111d2d !important;
    color: #ffffff !important;
    border: 1px solid #263b55 !important;
  }

  #customerAccountsPanel #customerAccountsTable .btn.green {
    background: #138a4e !important;
    border-color: #21b66a !important;
  }

  #customerAccountsPanel #customerAccountsTable .btn.red {
    background: #c83f45 !important;
    border-color: #d9555a !important;
  }

  #customerAccountsPanel .badge-green {
    background: #138a4e;
  }

  #customerAccountsPanel .badge-red {
    background: #c83f45;
  }

  .top .logo {
    background: #0b1421 !important;
    color: #ffffff !important;
    border: 1px solid #2a4a68 !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    padding: 8px;
    overflow: hidden;
  }

  .top .logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .login-logo {
    width: 190px;
    margin: 0 auto 12px;
    background: #0b1421;
    border: 1px solid #2a4a68;
    border-radius: 14px;
    padding: 8px 14px;
  }
}

/* Final dark-theme polish for native dropdowns and repair photo workflow. */
#appScreen select,
#loginScreen select,
.field select,
label select,
td select,
.inline-actions select,
.estimate-picker select,
.user-form select {
  background: #07111d !important;
  color: #ffffff !important;
  border: 1px solid #2a4663 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color-scheme: dark;
  outline: none;
}

#appScreen select option,
#loginScreen select option,
.field select option,
label select option,
td select option,
.inline-actions select option,
.estimate-picker select option,
.user-form select option {
  background: #07111d !important;
  color: #ffffff !important;
  font-size: 14px !important;
}

#appScreen select option:checked,
#appScreen select option:hover,
#loginScreen select option:checked,
#loginScreen select option:hover,
.field select option:checked,
.field select option:hover,
label select option:checked,
label select option:hover,
td select option:checked,
td select option:hover {
  background: #1f789d !important;
  color: #ffffff !important;
}

#appScreen select:focus,
#loginScreen select:focus,
.field select:focus,
label select:focus,
td select:focus {
  border-color: #22c7e8 !important;
  box-shadow: 0 0 0 3px rgba(34, 199, 232, 0.18), 0 0 22px rgba(34, 199, 232, 0.12) !important;
}

.repair-photo-head {
  margin-top: 30px;
}

.repair-photo-head .section-head-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.repair-photo-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  margin-top: 10px;
}

.repair-empty-slot-remove {
  justify-self: start;
}

.clearanceSheet .page-break-section + .page-break-section {
  break-before: page;
  page-break-before: always;
}

#estimatePanel .smart-layout {
  grid-template-columns: 1fr !important;
}

#estimatePanel .part-guide {
  position: relative;
  background: var(--panel);
  overflow: auto;
}

#estimatePanel .part-guide img {
  height: auto !important;
  width: 100%;
  min-width: 1280px;
  max-height: none;
  object-fit: fill;
}

#estimatePanel .container-anatomy-svg {
  display: none !important;
  height: min(76vh, 700px) !important;
}

#estimatePanel .smart-help,
#estimatePanel .part-buttons {
  display: none !important;
}

#estimatePanel .container-parts-reference {
  display: block;
  width: 100%;
  min-width: 1280px;
  max-height: none;
  object-fit: fill !important;
  background: #c6dec1 !important;
  filter: contrast(1.08) saturate(1.04) brightness(1.02);
  transform: none !important;
}

#estimatePanel .container-parts-reference:hover {
  transform: none !important;
  filter: contrast(1.08) saturate(1.04) brightness(1.02);
}

#estimatePanel .anatomy-hover-labels {
  display: none !important;
}

#estimatePanel .hot-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 32px;
  padding: 3px 8px;
  border-radius: 8px;
  color: transparent;
  font-size: clamp(10px, .72vw, 13px);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  left: calc(var(--label-x, 0) * 1%);
  top: calc(var(--label-y, 0) * 1%);
  transform: translate(-50%, -50%);
  transition: color .14s ease, background .14s ease, box-shadow .14s ease;
}

#estimatePanel .hot-label:hover {
  color: #22d3ee;
  background: rgba(6, 17, 29, .78);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, .42), 0 0 18px rgba(34, 211, 238, .35), 0 8px 18px rgba(0, 0, 0, .22);
}

#estimatePanel .hot-label.long {
  min-width: 150px;
}

#estimatePanel .hot-label.xlong {
  min-width: 220px;
}

#estimatePanel .hot-label.small {
  min-width: 72px;
  min-height: 28px;
}

.photo-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.photo-action-btn {
  border: 1px solid rgba(24, 183, 215, 0.62);
  background: #0b1624;
  color: #f8fafc;
  border-radius: 10px;
  min-height: 34px;
  padding: 7px 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(24, 183, 215, 0.08);
}

.photo-action-btn:hover,
.photo-action-btn:focus-visible {
  border-color: #28c7dc;
  background: #12304a;
  box-shadow: 0 0 0 2px rgba(40, 199, 220, 0.22), 0 0 16px rgba(40, 199, 220, 0.18);
  outline: none;
}

.photo-action-btn:disabled,
.photo-action-btn[disabled] {
  border-color: rgba(148, 163, 184, 0.42);
  background: #172033;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.photo-action-btn.danger {
  border-color: rgba(239, 68, 68, 0.55);
}

.photo-action-btn.danger:hover,
.photo-action-btn.danger:focus-visible {
  border-color: #ef4444;
  background: #4b1018;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.22), 0 0 16px rgba(239, 68, 68, 0.18);
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 8, 15, 0.86);
}

.photo-viewer-card {
  width: min(1100px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #08111d;
  border: 1px solid #263b55;
  border-radius: 16px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(24, 183, 215, 0.16);
  overflow: hidden;
}

.damage-photo-modal-card {
  width: min(920px, 96vw);
}

.row-damage-photo-card {
  min-height: 190px;
}

.eir-row-print-photos {
  margin-top: 8px;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
}

.eir-row-print-photo img {
  height: 90px;
}

.photo-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  color: #ffffff;
  border-bottom: 1px solid #263b55;
}

.photo-viewer-head .photo-viewer-close,
.photo-viewer-head #programGateOutPhotoClose {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 999px;
  border: 1px solid #263b55;
  background: #13243a;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}

.photo-viewer-head-actions .photo-action-btn {
  width: auto;
  min-width: 148px;
  height: 36px;
  border-radius: 10px;
  padding: 0 14px;
  white-space: nowrap;
}

.photo-viewer-body {
  overflow: auto;
  padding: 14px;
  display: grid;
  place-items: center;
}

.photo-viewer-body img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #263b55;
  background: #ffffff;
}

.image-viewer-card {
  width: min(1280px, 98vw);
  height: min(900px, 94vh);
}

.image-viewer-head {
  align-items: flex-start;
  flex-wrap: wrap;
}

.image-viewer-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.image-viewer-head .image-viewer-tools .photo-action-btn {
  width: auto;
  height: auto;
  min-width: 74px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.photo-viewer-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #385878;
  background: #13243a;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.photo-viewer-close:hover,
.photo-viewer-close:focus-visible {
  background: #12304a;
  border-color: #28c7dc;
  outline: none;
}

.image-viewer-body {
  min-height: 0;
  touch-action: none;
  user-select: none;
  overscroll-behavior: contain;
}

.image-viewer-body img {
  transition: transform 120ms ease-out;
  transform-origin: center center;
  will-change: transform;
}

.image-viewer-error {
  padding: 18px 22px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.28);
  color: #fee2e2;
  font-weight: 900;
}

@media (max-width: 720px) {
  .photo-viewer {
    padding: 8px;
  }

  .image-viewer-card {
    width: 100vw;
    height: 96vh;
  }

  .image-viewer-tools {
    width: 100%;
    justify-content: stretch;
  }

  .image-viewer-tools .photo-action-btn {
    flex: 1 1 42%;
  }
}

.photo-adjust-card {
  width: min(980px, 96vw);
}

.photo-adjust-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 16px;
  padding: 16px;
  overflow: auto;
}

.photo-adjust-preview {
  display: grid;
  place-items: center;
  min-height: 460px;
  border: 1px solid #263b55;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.photo-adjust-preview img {
  width: 100%;
  height: 460px;
  display: block;
  transform-origin: center;
}

.photo-adjust-controls {
  display: grid;
  align-content: start;
  gap: 14px;
  color: #dbeafe;
}

.photo-adjust-controls label {
  color: #dbeafe !important;
}

.photo-adjust-controls select,
.photo-adjust-controls input[type="range"] {
  width: 100%;
}

.photo-adjust-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}



.section-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-btn {
  min-height: 34px;
  padding: 7px 14px;
  width: auto;
  white-space: nowrap;
}

.ratePrintTable th:nth-child(3),
.ratePrintTable td:nth-child(3) {
  text-align: left;
}

.photo-count-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid #19b7d4;
  border-radius: 999px;
  background: rgba(25, 183, 212, 0.08);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.photo-count-btn:hover,
.photo-count-btn:focus-visible {
  border-color: #2bd4ef;
  background: rgba(25, 183, 212, 0.18);
  box-shadow: 0 0 0 2px rgba(25, 183, 212, 0.24), 0 0 18px rgba(25, 183, 212, 0.18);
  outline: none;
}

.photo-gallery-card {
  width: min(1180px, 96vw);
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  overflow: auto;
  padding: 16px;
}

.photo-gallery-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #263b55;
  border-radius: 14px;
  background: #0d1b2b;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.photo-gallery-item:hover,
.photo-gallery-item:focus-visible {
  border-color: #19b7d4;
  box-shadow: 0 0 0 2px rgba(25, 183, 212, 0.18), 0 14px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
  outline: none;
}

.photo-gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #2a4563;
  background: #ffffff;
}

.photo-gallery-item span {
  font-weight: 800;
  color: #dbeafe;
}

.gate-out-photo-modal-card {
  width: min(1180px, 96vw);
}

.gate-out-photo-modal-body {
  overflow: auto;
  padding: 16px 18px 20px;
  color: #dbeafe;
}

.gate-out-photo-modal-body h3 {
  margin: 18px 0 10px;
  color: #ffffff;
  font-size: 1rem;
}

.gate-out-photo-modal-body h3:first-child {
  margin-top: 0;
}

.gate-out-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.gate-out-photo-slot {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #263b55;
  border-radius: 14px;
  background: #0d1b2b;
}

.gate-out-photo-slot img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #2a4563;
  background: #ffffff;
}

.gate-out-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px dashed #3b5f84;
  background: #13243a;
  color: #dbeafe;
  font-weight: 700;
  cursor: pointer;
}

.gate-out-upload-btn:hover,
.gate-out-upload-btn:focus-within {
  border-color: #28c7dc;
  background: #12304a;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(40, 199, 220, 0.18);
}

.gate-out-upload-btn input {
  display: none;
}

.gate-out-photo-slot .photo-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gate-out-photo-slot .photo-action-btn {
  width: 100%;
  min-width: 0;
  padding-left: 6px;
  padding-right: 6px;
  font-size: 0.82rem;
}

.eir-detailed-inspection {
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
}

.eir-remarks-header-field {
  grid-column: span 3;
}

.eir-remarks-header-field textarea {
  width: 100%;
  min-height: 72px;
  max-height: 120px;
  resize: vertical;
  line-height: 1.35;
  color: #ffffff;
}

@media (max-width: 800px) {
  .eir-remarks-header-field {
    grid-column: auto;
  }
}

.legacy-inspection-card,
.detailed-inspection-toolbar,
.eir-area-card {
  border: 1px solid #263b55;
  border-radius: 12px;
  background: #0d1b2b;
}

.legacy-inspection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.detailed-inspection-toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px) 140px repeat(5, auto);
  gap: 8px;
  align-items: center;
  padding: 12px;
}

.detailed-inspection-toolbar input,
.detailed-inspection-toolbar select {
  min-height: 38px;
}

.eir-area-list {
  display: grid;
  gap: 12px;
}

.eir-area-card {
  overflow: hidden;
}

.eir-area-card.is-damaged {
  border-color: rgba(239, 68, 68, 0.9);
}

.eir-area-card.is-na {
  opacity: 0.85;
}

.eir-area-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: #11243a;
  font-weight: 800;
}

.area-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #b7c7d9;
  font-size: 0.86rem;
}

.area-badges b {
  color: #ffffff;
}

.area-badges .ok {
  color: #22c55e;
}

.area-badges .damage {
  color: #fb7185;
}

.eir-area-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #203750;
}

.eir-component-grid {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.eir-component-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.8fr) minmax(320px, 1.5fr) 110px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #243b56;
  border-radius: 10px;
  background: #081525;
}

.eir-component-row.has-damage {
  border-color: #7f1d1d;
  box-shadow: inset 3px 0 0 #ef4444;
}

.eir-damage-row {
  outline: 1px solid rgba(31, 127, 168, 0.3);
}

.eir-component-row label {
  display: grid;
  gap: 4px;
  color: #bcd0e5;
  font-size: 0.78rem;
  font-weight: 700;
}

.eir-component-row input,
.eir-component-row select {
  min-height: 34px;
  padding: 6px 8px;
}

.component-row-actions {
  display: grid;
  gap: 6px;
}

.component-photo-warning {
  color: #fbbf24;
  font-size: 0.75rem;
}

.eirDetailedPrintTable {
  font-size: 0.78rem;
}

.eirPrintThumb {
  max-width: 78px;
  max-height: 58px;
  object-fit: contain;
  border: 1px solid #666;
}

.eirAllOkPrint {
  padding: 10px;
  border: 1px solid #111;
  font-weight: 700;
}

@media (max-width: 1500px) {
  .compact-header-actions {
    gap: 6px;
  }

  .header-compact-label,
  .header-user-label,
  .header-caret {
    display: none;
  }

  .header-icon-btn.sql-status-pill {
    width: 42px;
    padding: 7px 10px;
  }

  .detailed-inspection-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .eir-component-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .top {
    align-items: flex-start;
  }

  .brand {
    min-width: 0;
  }

  .top h1 {
    font-size: 20px;
  }

  .compact-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .header-menu-wrap {
    position: static;
  }

  .header-dropdown {
    top: auto;
    right: 12px;
    left: 12px;
    width: auto;
    margin-top: 8px;
  }

  .legacy-inspection-card,
  .eir-area-card summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .detailed-inspection-toolbar,
  .eir-component-row {
    grid-template-columns: 1fr;
  }

  .dashboard-history-search {
    grid-template-columns: 1fr;
  }

  .dashboard-history-container-head,
  .dashboard-history-visit-head {
    flex-direction: column;
  }
}

.user-management-layout {
  display: grid;
  gap: 18px;
}

.user-management-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 22, 38, 0.78);
  padding: 18px;
}

.user-management-card.compact {
  padding: 14px;
}

.user-management-card h3,
.user-management-card h4 {
  margin: 0;
}

.user-management-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.staff-user-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.staff-user-grid .field {
  display: grid;
  gap: 6px;
}

.staff-user-grid .span-2 {
  grid-column: span 2;
}

.staff-user-grid label,
.permission-grid label,
.checkbox-row {
  color: var(--text);
  font-weight: 700;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.password-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.permission-group-card {
  border: 1px solid rgba(67, 104, 145, 0.78);
  border-radius: 8px;
  padding: 12px;
  background: rgba(4, 15, 28, 0.58);
}

.permission-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.button-row.compact {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-btn {
  min-height: 34px;
  padding: 7px 11px;
}

.permission-grid.grouped {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.permission-grid.grouped label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(67, 104, 145, 0.55);
  border-radius: 8px;
  background: rgba(12, 29, 50, 0.72);
}

.permission-grid.grouped input {
  width: 16px;
  height: 16px;
}

.destructive-permission {
  border-color: rgba(239, 68, 68, 0.5) !important;
}

.danger-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  font-size: 12px;
}

.permission-summary-card {
  display: grid;
  gap: 8px;
}

.permission-summary {
  min-height: 42px;
  color: var(--muted);
  line-height: 1.45;
}

.permission-summary b,
.destructive-summary {
  color: var(--text);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 12px;
  font-weight: 800;
}

.status-badge.badge-green {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}

.status-badge.badge-red {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
}

@media (max-width: 860px) {
  .staff-user-grid {
    grid-template-columns: 1fr;
  }

  .staff-user-grid .span-2 {
    grid-column: auto;
  }

  .compact-head,
  .permission-group-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.repair-cycle-history {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.repair-cycle-current,
.repair-cycle-card,
.repair-cycle-reopen,
.repair-cycle-approval {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 24, 38, 0.72);
  padding: 12px;
}

.repair-cycle-current {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.repair-cycle-current span,
.repair-cycle-mini-history .mini {
  color: var(--muted);
  font-size: 12px;
}

.repair-cycle-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.repair-cycle-head h5,
.repair-cycle-approval h6,
.repair-cycle-photo-group h6 {
  margin: 0 0 4px;
}

.repair-cycle-card.additional-cycle {
  border-color: rgba(31, 145, 191, 0.65);
}

.repair-cycle-card.legacy-cycle {
  border-color: rgba(148, 163, 184, 0.45);
}

.repair-cycle-reopen {
  border-style: dashed;
  margin-bottom: 10px;
}

.repair-cycle-approval,
.repair-cycle-work,
.repair-cycle-photo-group {
  margin-top: 10px;
}

.history-proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.case-cycle-summary {
  margin-top: 14px;
}

.repair-cycle-details summary {
  cursor: pointer;
  color: var(--accent);
  margin: 8px 0;
}

@media print {
  .dashboard-history-print .dashboard-history-summary-bar,
  .dashboard-history-print .dashboard-history-container,
  .dashboard-history-print .dashboard-history-visit,
  .dashboard-history-print .history-stage-card,
  .dashboard-history-print .history-empty-state {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #b8c4d2 !important;
    box-shadow: none !important;
  }

  .dashboard-history-print .dashboard-container-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-history-print .dashboard-container-summary > div {
    background: #ffffff !important;
    border-color: #d0d7de !important;
  }

  .dashboard-history-print .dashboard-history-visit {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .dashboard-history-print .dashboard-history-visit-head {
    cursor: default;
  }

  .dashboard-history-print .history-stage-marker {
    background: #ffffff !important;
  }

  .dashboard-history-print .history-stage.available .history-stage-marker,
  .dashboard-history-print .history-stage.current .history-stage-marker {
    background: #1f91bf !important;
  }

  .dashboard-history-print .dashboard-history-table th,
  .dashboard-history-print .dashboard-history-table td {
    border-color: #d0d7de !important;
    color: #000000 !important;
  }

  .dashboard-history-print .history-status-badge {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #8c9aaa !important;
  }

  .dashboard-history-print .dashboard-history-media-actions {
    display: none !important;
  }

  .dashboard-history-print .repair-cycle-card,
  .dashboard-history-print .repair-cycle-current,
  .dashboard-history-print .repair-cycle-reopen,
  .dashboard-history-print .repair-cycle-approval {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #d0d7de !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.customer-printing > :not(#customerScreen) {
    display: none !important;
  }

  body.customer-printing #customerScreen > :not(#customerPrintArea) {
    display: none !important;
  }

  body.customer-printing #customerPrintArea {
    display: block !important;
    color: #000;
    background: #fff;
  }
}

@media (max-width: 980px) {
  .inbound-batch-layout {
    grid-template-columns: 1fr;
  }

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

  .inbound-unit-header {
    display: none;
  }

  .inbound-unit-row {
    grid-template-columns: 1fr;
  }

  .inbound-unit-row > div::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }
}

@media (max-width: 620px) {
  .mode-selector {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inbound-progress-grid {
    grid-template-columns: 1fr;
  }
}


.pending-eir-list {
  display: grid;
  gap: 10px;
}

.pending-eir-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) repeat(4, minmax(110px, 1fr)) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 17, 30, 0.72);
}

.pending-eir-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.pending-eir-row b {
  display: block;
}

.photo-viewer-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

@media (max-width: 980px) {
  .pending-eir-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* === UI-1 Global Application Shell + Light Enterprise Theme === */
:root {
  --nav: #0d2a43;
  --nav-secondary: #123852;
  --app-bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbfe;
  --border-soft: #d8e3ed;
  --text-main: #13263a;
  --text-muted: #6f8295;
  --primary-blue: #1677d2;
  --primary-blue-hover: #0e63ad;
  --semantic-teal: #0fa88f;
  --semantic-amber: #c9860d;
  --semantic-danger: #cf4b5b;
  --semantic-violet: #6f5bc4;
  --focus-ring: rgba(22, 119, 210, 0.28);
}

body {
  background: var(--app-bg);
  color: var(--text-main);
}

.login-screen {
  background:
    radial-gradient(circle at 15% 20%, rgba(22, 119, 210, 0.14), transparent 34%),
    linear-gradient(135deg, #eef5fb 0%, #f9fbfe 54%, #e8f4f6 100%);
  align-items: center;
  justify-items: center;
}

.login-card {
  width: min(470px, 100%);
  border-color: rgba(13, 42, 67, 0.14);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 22px 60px rgba(13, 42, 67, 0.16);
}

.login-tab,
.link-btn,
button,
.btn {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.login-tab:hover,
.app-nav-link:hover,
.btn:hover,
.dash-card:hover,
.stat:hover,
.yard-stat:hover {
  transform: translateY(-1px);
}

.login-tab:focus-visible,
.link-btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

#appScreen {
  min-height: 100vh;
  background: var(--app-bg);
}

#appScreen > .top,
#customerScreen > .top {
  position: sticky;
  top: 0;
  z-index: 70;
  min-height: 68px;
  background: var(--surface);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 8px 24px rgba(13, 42, 67, 0.06);
  padding: 12px 18px;
}

#appScreen .brand h1,
#customerScreen .brand h1 {
  font-size: 20px;
  letter-spacing: 0;
  color: var(--text-main);
}

#appScreen .top p,
#customerScreen .top p {
  color: var(--text-muted);
}

#appScreen .top .logo,
#customerScreen .top .logo {
  width: 56px;
  height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}

.staff-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.app-sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  height: calc(100vh - 68px);
  overflow-y: auto;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-secondary) 100%);
  color: #e8f2fb;
  padding: 18px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-block {
  display: grid;
  gap: 4px;
  padding: 0 8px 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-brand-block strong {
  font-size: 17px;
}

.sidebar-kicker,
.page-eyebrow,
.nav-group-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-kicker,
.nav-group-title {
  color: rgba(232, 242, 251, 0.68);
}

.app-nav,
.nav-group {
  display: grid;
  gap: 8px;
}

.nav-group {
  margin: 0 0 16px;
}

.app-nav-link,
#appScreen .app-nav-link.tab,
#appScreen .app-nav-link.case-subtab {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 10px 11px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

#appScreen .app-nav-link:hover,
#appScreen .app-nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--semantic-teal);
}

.staff-content.wrap {
  padding: 18px;
  overflow: visible;
}

.app-page-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(13, 42, 67, 0.05);
}

.app-page-heading h2 {
  margin: 4px 0 3px;
  font-size: 24px;
  color: var(--text-main);
}

.app-page-heading p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 700;
}

.page-eyebrow {
  color: var(--primary-blue);
}

#appScreen .work-area > .tabs {
  display: none;
}

#appScreen .work-area > .case-subtabs {
  position: static;
  margin-top: 0;
  background: rgba(244, 247, 251, 0.94);
  padding: 8px 0;
  margin-bottom: 12px;
}

#appScreen .work-area > .case-subtabs .case-subtab {
  border-radius: 8px;
}

#appScreen .card,
#appScreen .panel,
#customerScreen .card {
  border-color: var(--border-soft);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(13, 42, 67, 0.05);
}

#appScreen .btn,
#customerScreen .btn {
  border-radius: 8px;
  min-height: 38px;
}

#appScreen .btn.primary,
#customerScreen .btn.primary,
#appScreen button.btn.primary,
#customerScreen button.btn.primary {
  background: var(--primary-blue);
}

#appScreen .btn.primary:hover,
#customerScreen .btn.primary:hover,
#appScreen button.btn.primary:hover,
#customerScreen button.btn.primary:hover {
  background: var(--primary-blue-hover);
}

#appScreen .btn.green,
#customerScreen .btn.green {
  background: var(--semantic-teal);
}

#appScreen .btn.red,
#customerScreen .btn.red {
  background: var(--semantic-danger);
}

#appScreen .btn.gray,
#customerScreen .btn.gray {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
}

#appScreen input,
#appScreen select,
#appScreen textarea,
#customerScreen input,
#customerScreen select,
#customerScreen textarea {
  border-color: var(--border-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
}

#appScreen .pill,
#customerScreen .pill {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface-soft);
  color: var(--text-muted);
}

#appScreen .dash-card,
#appScreen .stat,
#appScreen .yard-stat {
  border-radius: 8px;
  border-color: var(--border-soft);
  background: var(--surface);
  color: var(--text-main);
}

#appScreen .dash-card.active,
#appScreen .stat.active,
#appScreen .yard-stat.active {
  border-color: rgba(22, 119, 210, 0.38);
  background: #eef7ff;
}

.header-icon-btn,
.header-user-btn {
  color: var(--text-main);
  border-color: var(--border-soft);
  background: var(--surface-soft);
}

.header-icon-btn:hover,
.header-user-btn:hover,
.header-icon-btn[aria-expanded="true"],
.header-user-btn[aria-expanded="true"] {
  border-color: rgba(22, 119, 210, 0.35);
  background: #eef7ff;
}

@media (max-width: 1020px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: sticky;
    top: 68px;
    z-index: 60;
    height: auto;
    max-height: 44vh;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .app-nav {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .nav-group {
    margin-bottom: 8px;
  }
}

@media (max-width: 720px) {
  #appScreen > .top,
  #customerScreen > .top {
    position: static;
  }

  .app-sidebar {
    position: static;
    max-height: none;
  }

  .staff-content.wrap {
    padding: 12px;
  }

  .app-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  .app-sidebar,
  .app-page-heading,
  .staff-layout > .app-sidebar {
    display: none !important;
  }

  .staff-layout {
    display: block !important;
  }
}

/* === UI-1 Visual Polish: compact shell correction === */
html,
body,
#appScreen,
#customerScreen {
  background: var(--app-bg) !important;
}

#appScreen > .top,
#customerScreen > .top {
  min-height: 64px;
  padding: 9px 18px;
  gap: 14px;
}

#appScreen .brand,
#customerScreen .brand {
  min-width: 240px;
  gap: 12px;
}

#appScreen .brand h1,
#customerScreen .brand h1 {
  display: block;
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

#appScreen .top .logo,
#customerScreen .top .logo {
  flex: 0 0 52px;
  width: 52px;
  height: 38px;
  box-shadow: none;
}

#appScreen .top-actions,
#customerScreen .top-actions {
  gap: 7px;
  margin-left: auto;
}

#appScreen .header-icon-btn,
#appScreen .header-user-btn {
  min-height: 38px;
  border-radius: 8px;
}

.staff-layout {
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  background: var(--app-bg);
}

.app-sidebar {
  top: 64px;
  height: calc(100vh - 64px);
  padding: 14px 12px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
}

.sidebar-brand-block {
  gap: 2px;
  padding: 0 8px 11px;
  margin-bottom: 10px;
}

.sidebar-brand-block strong {
  font-size: 15px;
  line-height: 1.2;
}

.nav-group {
  gap: 6px;
  margin-bottom: 13px;
}

.nav-group-title {
  padding: 0 9px;
  font-size: 10px;
  letter-spacing: 0.07em;
  opacity: 0.82;
}

.app-nav-link,
#appScreen .app-nav-link.tab,
#appScreen .app-nav-link.case-subtab {
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 13px;
  line-height: 1.2;
}

#appScreen .app-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

#appScreen .app-nav-link.active {
  background: rgba(22, 119, 210, 0.22);
  border-color: rgba(84, 176, 255, 0.46);
  color: #ffffff;
  box-shadow: inset 4px 0 0 var(--primary-blue);
}

.staff-content.wrap {
  padding: 14px;
  background: var(--app-bg);
}

.app-page-heading {
  min-height: 0;
  align-items: center;
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: none;
}

.app-page-heading h2 {
  margin: 1px 0 2px;
  font-size: 19px;
  line-height: 1.15;
}

.app-page-heading p {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.25;
}

.page-eyebrow {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
  line-height: 1.1;
}

#appScreen .main {
  background: transparent;
}

#appScreen .work-area {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  min-width: 0;
}

#dashboardPanel #syncStatusPill {
  display: none !important;
}

#appScreen .work-area > .tabs {
  display: none !important;
}

@media (max-width: 1020px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    top: 64px;
    height: auto;
    max-height: 38vh;
  }
}

@media (max-width: 720px) {
  #appScreen > .top,
  #customerScreen > .top {
    min-height: 0;
    padding: 10px 12px;
  }

  #appScreen .brand,
  #customerScreen .brand {
    min-width: 0;
  }

  #appScreen .brand h1,
  #customerScreen .brand h1 {
    white-space: normal;
    font-size: 16px;
  }

  .app-page-heading {
    padding: 9px 11px;
  }
}

@media print {
  #dashboardPanel #syncStatusPill {
    display: none !important;
  }
}

/* === Harbor Light Exact Visual Fix: authoritative live skin === */
:root {
  --hl-navy: #0c2941;
  --hl-navy-2: #163b59;
  --hl-canvas: #EAF2F8;
  --hl-surface: #ffffff;
  --hl-border: #D5E1EB;
  --hl-ink: #102033;
  --hl-muted: #6d7f92;
  --hl-blue: #1677d2;
  --hl-teal: #0FA88F;
  --hl-amber: #D88A00;
  --hl-red: #D84D5D;
  --hl-violet: #7458D7;
  --hl-shadow: 0 18px 42px rgba(16, 32, 51, 0.08);
  --hl-card-shadow: 0 12px 30px rgba(16, 32, 51, 0.07);
  --hl-radius: 14px;
}

html,
body {
  background: var(--hl-canvas) !important;
  color: var(--hl-ink) !important;
}

body,
button,
input,
select,
textarea,
table {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

#appScreen,
#appScreen .screen,
#appScreen .work-area,
#appScreen .app-main,
#appScreen .page-body {
  background: var(--hl-canvas) !important;
  color: var(--hl-ink) !important;
}

#appScreen .app-shell,
#appScreen .staff-shell {
  background: var(--hl-canvas) !important;
}

#appScreen .staff-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 72px !important;
  height: 72px !important;
  padding: 0 28px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid var(--hl-border) !important;
  box-shadow: 0 10px 28px rgba(16, 32, 51, 0.04) !important;
  backdrop-filter: blur(16px);
  color: var(--hl-ink) !important;
}

#appScreen .staff-topbar *,
#appScreen .topbar-brand,
#appScreen .topbar-actions,
#appScreen .status-pill,
#appScreen .admin-menu-button {
  color: var(--hl-ink) !important;
}

#appScreen .topbar-actions .status-pill,
#appScreen .topbar-actions button,
#appScreen .admin-menu-button {
  background: #0f2135 !important;
  color: #ffffff !important;
  border: 1px solid #173f61 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

#appScreen .topbar-actions .status-pill *,
#appScreen .topbar-actions button *,
#appScreen .admin-menu-button * {
  color: #ffffff !important;
}

#appScreen .staff-layout {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) !important;
  min-height: calc(100vh - 72px) !important;
  background: var(--hl-canvas) !important;
}

#appScreen .app-sidebar,
#appScreen .staff-layout > .app-sidebar {
  position: sticky !important;
  top: 72px !important;
  align-self: start !important;
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
  height: calc(100vh - 72px) !important;
  padding: 14px 10px !important;
  overflow-x: visible !important;
  overflow-y: auto !important;
  background: var(--hl-navy) !important;
  border: 0 !important;
  box-shadow: 12px 0 28px rgba(12, 41, 65, 0.12) !important;
  color: #ffffff !important;
  scrollbar-width: thin;
}

#appScreen .sidebar-brand-block {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 56px !important;
  min-height: 52px !important;
  margin: 0 auto 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#appScreen .sidebar-logo {
  width: 48px !important;
  height: 42px !important;
  border-radius: 9px !important;
  background: #0b1d30 !important;
  border: 1px solid #244e70 !important;
  box-shadow: none !important;
}

#appScreen .sidebar-brand-block > div:not(.sidebar-logo),
#appScreen .sidebar-kicker,
#appScreen .sidebar-brand-block strong,
#appScreen .sidebar-brand-block small,
#appScreen .nav-group-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#appScreen .app-nav,
#appScreen .nav-group {
  display: grid !important;
  justify-items: center !important;
  gap: 8px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
}

#appScreen .app-nav-link,
#appScreen .app-nav-link.tab,
#appScreen .app-nav-link.case-subtab {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 13px !important;
  border: 1px solid rgba(157, 182, 201, 0.22) !important;
  background: transparent !important;
  color: #9db6c9 !important;
  box-shadow: none !important;
  text-align: center !important;
  font-size: 0 !important;
  line-height: 1 !important;
  overflow: visible !important;
}

#appScreen .app-nav-link .nav-icon {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  color: currentColor !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
}

#appScreen .app-nav-link .nav-label {
  pointer-events: none !important;
  position: absolute !important;
  left: 58px !important;
  top: 50% !important;
  transform: translateY(-50%) translateX(-4px) !important;
  z-index: 200 !important;
  display: block !important;
  max-width: 220px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1px solid var(--hl-border) !important;
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  box-shadow: 0 12px 30px rgba(16, 32, 51, 0.16) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease !important;
}

#appScreen .app-nav-link:hover,
#appScreen .app-nav-link:focus-visible {
  background: var(--hl-navy-2) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.24) !important;
  transform: translateY(-1px) !important;
}

#appScreen .app-nav-link:hover .nav-label,
#appScreen .app-nav-link:focus-visible .nav-label {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(0) !important;
}

#appScreen .app-nav-link.active,
#appScreen .app-nav-link.tab.active,
#appScreen .app-nav-link.case-subtab.active {
  background: #ffffff !important;
  color: var(--hl-navy) !important;
  border-color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

#appScreen main,
#appScreen .app-content,
#appScreen .workspace,
#appScreen .panel-area {
  min-width: 0 !important;
  background: var(--hl-canvas) !important;
  color: var(--hl-ink) !important;
}

#appScreen .app-page,
#appScreen .module-panel,
#appScreen .panel,
#appScreen section.panel,
#appScreen .screen > section,
#appScreen .tab-panel,
#appScreen .content-panel {
  background: transparent !important;
  color: var(--hl-ink) !important;
}

#appScreen .section-head,
#appScreen .panel-head,
#appScreen .module-head,
#appScreen .app-page-heading {
  background: transparent !important;
  color: var(--hl-ink) !important;
  border: 0 !important;
  box-shadow: none !important;
}

#appScreen .app-page-heading,
#appScreen .app-page-heading *,
#appScreen .section-head,
#appScreen .section-head *,
#appScreen .panel-head,
#appScreen .panel-head *,
#appScreen .module-head,
#appScreen .module-head * {
  color: var(--hl-ink) !important;
}

#appScreen .page-eyebrow,
#appScreen .section-kicker,
#appScreen .eyebrow {
  color: var(--hl-blue) !important;
  letter-spacing: .08em !important;
}

#appScreen .muted,
#appScreen .helper,
#appScreen .hint,
#appScreen .small-note,
#appScreen p {
  color: var(--hl-muted) !important;
}

#appScreen .card,
#appScreen .stat-card,
#appScreen .record-card,
#appScreen .form-card,
#appScreen .list-card,
#appScreen .workflow-card,
#appScreen .photo-card,
#appScreen .media-card,
#appScreen .history-stage-card,
#appScreen .repair-cycle-card,
#appScreen .rate-list-card,
#appScreen .report-card,
#appScreen .dashboard-history-card,
#appScreen .dashboard-history-summary-bar,
#appScreen .dashboard-history-container,
#appScreen .dashboard-history-visit,
#appScreen .dashboard-history-legacy,
#appScreen .dashboard-history-subsection,
#appScreen .dashboard-history-media,
#appScreen .dashboard-history-technical,
#appScreen .table-wrap,
#appScreen .grid-card,
#appScreen .admin-card,
#appScreen .settings-card {
  background: var(--hl-surface) !important;
  color: var(--hl-ink) !important;
  border: 1px solid var(--hl-border) !important;
  border-radius: var(--hl-radius) !important;
  box-shadow: var(--hl-card-shadow) !important;
}

#appScreen .card *,
#appScreen .record-card *,
#appScreen .form-card *,
#appScreen .list-card *,
#appScreen .dashboard-history-card *,
#appScreen .dashboard-history-container *,
#appScreen .dashboard-history-visit *,
#appScreen .dashboard-history-summary-bar *,
#appScreen .dashboard-history-media *,
#appScreen .table-wrap *,
#appScreen .rate-list-card *,
#appScreen .report-card * {
  color: inherit;
}

#appScreen h1,
#appScreen h2,
#appScreen h3,
#appScreen h4,
#appScreen h5,
#appScreen h6,
#appScreen label,
#appScreen strong,
#appScreen b,
#appScreen th,
#appScreen .title,
#appScreen .card-title,
#appScreen .field-label,
#appScreen .metric-label {
  color: var(--hl-ink) !important;
}

#appScreen .dashboard-history-help,
#appScreen .dashboard-history-container-head span,
#appScreen .dashboard-history-visit-head span,
#appScreen .dashboard-history-table td,
#appScreen .dashboard-history-table th,
#appScreen .dashboard-history-media b {
  color: var(--hl-ink) !important;
}

#dashboardPanel,
#dashboardPanel *:not(button):not(.btn):not(.primary):not(.status-pill):not(.badge) {
  color: var(--hl-ink);
}

#dashboardPanel .section-head h2 {
  color: var(--hl-ink) !important;
}

#dashboardPanel .section-head p,
#dashboardPanel .dashboard-history-help {
  color: var(--hl-muted) !important;
}

#dashboardPanel .module-panel,
#dashboardPanel .panel,
#dashboardPanel .screen-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#appScreen .dash-grid {
  gap: 14px !important;
}

#appScreen .dash-card,
#dashboardPanel .dash-card {
  position: relative !important;
  overflow: hidden !important;
  min-height: 104px !important;
  padding: 22px 18px 18px !important;
  background: #ffffff !important;
  color: var(--hl-muted) !important;
  border: 1px solid var(--hl-border) !important;
  border-top: 4px solid var(--hl-blue) !important;
  border-radius: 14px !important;
  box-shadow: var(--hl-card-shadow) !important;
  text-align: left !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

#appScreen .dash-card::before,
#appScreen .dash-card::after,
#dashboardPanel .dash-card::before,
#dashboardPanel .dash-card::after {
  display: none !important;
  content: none !important;
}

#appScreen .dash-card b,
#dashboardPanel .dash-card b {
  display: block !important;
  margin-top: 12px !important;
  color: var(--hl-ink) !important;
  font-size: 27px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

#appScreen .dash-card:hover,
#dashboardPanel .dash-card:hover {
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  border-color: #c9d7e5 !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 20px 42px rgba(16, 32, 51, 0.12) !important;
}

#appScreen .dash-card:nth-child(2),
#dashboardPanel .dash-card:nth-child(2) { border-top-color: var(--hl-teal) !important; }
#appScreen .dash-card:nth-child(3),
#dashboardPanel .dash-card:nth-child(3) { border-top-color: var(--hl-amber) !important; }
#appScreen .dash-card:nth-child(4),
#dashboardPanel .dash-card:nth-child(4) { border-top-color: var(--hl-red) !important; }
#appScreen .dash-card:nth-child(6),
#dashboardPanel .dash-card:nth-child(6) { border-top-color: var(--hl-violet) !important; }
#appScreen .dash-card:nth-child(7),
#dashboardPanel .dash-card:nth-child(7) { border-top-color: var(--hl-amber) !important; }
#appScreen .dash-card:nth-child(8),
#dashboardPanel .dash-card:nth-child(8) { border-top-color: var(--hl-violet) !important; }
#appScreen .dash-card:nth-child(9),
#dashboardPanel .dash-card:nth-child(9) { border-top-color: var(--hl-teal) !important; }
#appScreen .dash-card:nth-child(10),
#dashboardPanel .dash-card:nth-child(10) { border-top-color: var(--hl-blue) !important; }
#appScreen .dash-card:nth-child(11),
#dashboardPanel .dash-card:nth-child(11) { border-top-color: var(--hl-amber) !important; }

#dashboardPanel .dashboard-history-card {
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  border: 1px solid var(--hl-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--hl-card-shadow) !important;
}

#dashboardPanel .dashboard-history-card h3,
#dashboardPanel .dashboard-history-card h4,
#dashboardPanel .dashboard-history-card p,
#dashboardPanel .dashboard-history-card label,
#dashboardPanel .dashboard-history-card span,
#dashboardPanel .dashboard-history-card b {
  color: var(--hl-ink) !important;
}

#dashboardPanel .dashboard-history-card p,
#dashboardPanel .dashboard-history-help {
  color: var(--hl-muted) !important;
}

#appScreen input,
#appScreen select,
#appScreen textarea,
#appScreen .input,
#appScreen .search-input {
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  border: 1px solid #cfdce8 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

#appScreen input::placeholder,
#appScreen textarea::placeholder {
  color: #8aa0b5 !important;
}

#appScreen table {
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  border-color: var(--hl-border) !important;
}

#appScreen thead,
#appScreen th {
  background: #eef4fa !important;
  color: var(--hl-ink) !important;
}

#appScreen td {
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  border-color: var(--hl-border) !important;
}

#appScreen .btn,
#appScreen button:not(.app-nav-link):not(.dash-card),
#appScreen .tab:not(.app-nav-link),
#appScreen .case-subtab:not(.app-nav-link) {
  border-radius: 10px !important;
  border: 1px solid #c8d8e6 !important;
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  box-shadow: none !important;
}

#appScreen .btn.primary,
#appScreen button.primary,
#appScreen .primary,
#appScreen .save-btn,
#appScreen .action-primary,
#appScreen button[type="submit"] {
  background: var(--hl-navy) !important;
  color: #ffffff !important;
  border-color: var(--hl-navy) !important;
}

#appScreen .btn.primary *,
#appScreen button.primary *,
#appScreen .primary *,
#appScreen .save-btn *,
#appScreen .action-primary * {
  color: #ffffff !important;
}

#appScreen .badge,
#appScreen .pill,
#appScreen .status-badge {
  border-radius: 999px !important;
  border: 1px solid #cddceb !important;
  background: #f7fbff !important;
  color: var(--hl-ink) !important;
}

#appScreen .modal,
#appScreen .modal-card,
#appScreen .dialog,
#appScreen .popup {
  background: #ffffff !important;
  color: var(--hl-ink) !important;
  border: 1px solid var(--hl-border) !important;
  box-shadow: 0 24px 70px rgba(16, 32, 51, 0.18) !important;
}

#appScreen .hidden,
.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  #appScreen .staff-layout {
    grid-template-columns: 64px minmax(0, 1fr) !important;
  }

  #appScreen .app-sidebar,
  #appScreen .staff-layout > .app-sidebar {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    padding: 10px 8px !important;
  }

  #appScreen .app-nav-link,
  #appScreen .app-nav-link.tab,
  #appScreen .app-nav-link.case-subtab {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
  }

  #appScreen .app-nav-link .nav-label {
    display: none !important;
  }

  #appScreen .staff-topbar {
    padding: 0 14px !important;
  }
}

@media print {
  #appScreen .staff-topbar,
  #appScreen .app-sidebar,
  #appScreen .no-print {
    display: none !important;
  }

  #appScreen,
  #appScreen .staff-layout,
  #appScreen .work-area,
  body {
    background: #ffffff !important;
    color: #111827 !important;
  }
}



/* === Harbor Light Icon Rail: real icons and safe flyouts === */
.nav-icon-sprite {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

#appScreen .sidebar-brand-block {
  border: 0 !important;
  cursor: pointer !important;
}

#appScreen .sidebar-logo .nav-icon {
  width: 28px !important;
  height: 28px !important;
  stroke: #ffffff !important;
}

#appScreen .rail-menu-item {
  position: relative !important;
  width: 48px !important;
  height: 48px !important;
  overflow: visible !important;
}

#appScreen .rail-menu-item > .app-nav-link {
  position: absolute !important;
  inset: 0 !important;
}

#appScreen .app-nav-link .nav-icon,
#appScreen .sidebar-brand-block .nav-icon {
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  color: currentColor !important;
}

#appScreen .app-nav-link .nav-label {
  background: #102033 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  box-shadow: 0 10px 24px rgba(16, 32, 51, .22) !important;
}

#appScreen .rail-menu-item:hover > .app-nav-link .nav-label,
#appScreen .rail-menu-item:focus-within > .app-nav-link .nav-label {
  opacity: 0 !important;
  visibility: hidden !important;
}

#appScreen .rail-flyout {
  position: absolute !important;
  left: 58px !important;
  top: -8px !important;
  z-index: 260 !important;
  width: 210px !important;
  padding: 8px !important;
  background: #ffffff !important;
  border: 1px solid #d8e2ec !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 28px rgba(28,55,80,.14) !important;
  color: #102033 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateX(-6px) !important;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease !important;
}

#appScreen .rail-flyout::before {
  content: "" !important;
  position: absolute !important;
  left: -14px !important;
  top: 0 !important;
  width: 14px !important;
  height: 100% !important;
}

#appScreen .rail-menu-item:hover > .rail-flyout,
#appScreen .rail-menu-item:focus-within > .rail-flyout,
#appScreen .rail-flyout:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
}

#appScreen .rail-flyout-title {
  padding: 8px 10px 10px !important;
  margin: 0 0 4px !important;
  color: #102033 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  border-bottom: 1px solid #e4edf5 !important;
}

#appScreen .rail-flyout-item {
  display: block !important;
  width: 100% !important;
  padding: 9px 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #102033 !important;
  text-align: left !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

#appScreen .rail-flyout-item:hover,
#appScreen .rail-flyout-item:focus-visible {
  background: #f1f7fc !important;
  color: #1677d2 !important;
  outline: none !important;
}

#appScreen .nav-group:nth-of-type(4) {
  margin-top: 8px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(157, 182, 201, .22) !important;
}

#appScreen .app-sidebar {
  overflow-x: visible !important;
  scrollbar-color: rgba(157,182,201,.45) transparent !important;
}

#appScreen .app-sidebar::-webkit-scrollbar {
  width: 5px !important;
}

#appScreen .app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(157,182,201,.45) !important;
  border-radius: 999px !important;
}

@media (max-width: 900px) {
  #appScreen .rail-flyout {
    left: 52px !important;
    width: 205px !important;
  }
}

@media print {
  .nav-icon-sprite,
  #appScreen .rail-flyout {
    display: none !important;
  }
}


/* === Harbor Light Global Soft Blue + Case Workflow Group === */
:root {
  --hl-canvas: #EAF2F8;
  --hl-surface: #FFFFFF;
  --hl-secondary: #F6F9FC;
  --hl-field: #FBFDFF;
  --hl-border: #D5E1EB;
  --hl-strong-border: #BED0DF;
  --hl-ink: #102033;
  --hl-muted: #6D7F92;
  --hl-blue: #1677D2;
  --hl-teal: #0FA88F;
  --hl-amber: #D88A00;
  --hl-red: #D84D5D;
  --hl-violet: #7458D7;
}

html,
body,
#appScreen,
#appScreen .screen,
#appScreen .work-area,
#appScreen .app-shell,
#appScreen .staff-shell,
#appScreen .staff-layout,
#appScreen main,
#appScreen .app-content,
#appScreen .workspace,
#appScreen .panel-area,
#appScreen .page-body {
  background: #EAF2F8 !important;
  color: #102033 !important;
}

#appScreen .module-panel,
#appScreen .panel,
#appScreen .screen > section,
#appScreen .tab-panel,
#appScreen .content-panel {
  background: transparent !important;
  color: #102033 !important;
}

#appScreen .card,
#appScreen .stat-card,
#appScreen .record-card,
#appScreen .form-card,
#appScreen .list-card,
#appScreen .workflow-card,
#appScreen .photo-card,
#appScreen .media-card,
#appScreen .history-stage-card,
#appScreen .repair-cycle-card,
#appScreen .rate-list-card,
#appScreen .report-card,
#appScreen .dashboard-history-card,
#appScreen .dashboard-history-summary-bar,
#appScreen .dashboard-history-container,
#appScreen .dashboard-history-visit,
#appScreen .dashboard-history-legacy,
#appScreen .dashboard-history-subsection,
#appScreen .dashboard-history-media,
#appScreen .dashboard-history-technical,
#appScreen .table-wrap,
#appScreen .grid-card,
#appScreen .admin-card,
#appScreen .settings-card,
#appScreen fieldset,
#appScreen .field-row,
#appScreen .case-summary-card,
#appScreen .case-proof-card,
#appScreen .warning-card,
#appScreen .empty-state {
  background: #FFFFFF !important;
  color: #102033 !important;
  border: 1px solid #D5E1EB !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 30px rgba(16,32,51,.07) !important;
}

#appScreen label.field,
#appScreen .field,
#appScreen .meta-field,
#appScreen .info-field,
#appScreen .summary-field,
#appScreen .detail-field,
#appScreen .form-field,
#casePanel .field,
#casePanel label,
#casePanel .case-meta,
#casePanel .case-detail,
#casePanel .case-status,
#casePanel .approval-summary,
#casePanel .estimate-summary {
  background: #F6F9FC !important;
  color: #102033 !important;
  border-color: #D5E1EB !important;
}

#appScreen label,
#appScreen .field-label,
#appScreen .muted,
#appScreen .helper,
#appScreen .hint,
#appScreen small {
  color: #6D7F92 !important;
}

#appScreen input,
#appScreen select,
#appScreen textarea,
#appScreen .input,
#appScreen .search-input {
  background: #FBFDFF !important;
  color: #102033 !important;
  border: 1px solid #D5E1EB !important;
}

#appScreen table {
  background: #FFFFFF !important;
  color: #102033 !important;
  border-color: #E1E9F0 !important;
}

#appScreen thead,
#appScreen th {
  background: #F5F8FB !important;
  color: #102033 !important;
  border-color: #E1E9F0 !important;
}

#appScreen td {
  background: #FFFFFF !important;
  color: #102033 !important;
  border-color: #E1E9F0 !important;
}

#appScreen tr:hover td {
  background: #F6FAFD !important;
}

#appScreen .btn,
#appScreen button:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
#appScreen .tab:not(.app-nav-link),
#appScreen .case-subtab:not(.app-nav-link):not(.rail-flyout-item) {
  background: #FFFFFF !important;
  color: #102033 !important;
  border: 1px solid #CBD8E4 !important;
}

#appScreen .btn.primary,
#appScreen button.primary,
#appScreen #saveCaseBtn,
#appScreen .save-btn,
#appScreen .action-primary {
  background: #1677D2 !important;
  color: #FFFFFF !important;
  border-color: #1677D2 !important;
}

#appScreen .btn.red,
#appScreen button.btn.red,
#appScreen #deleteCaseBtn,
#appScreen .danger,
#appScreen .btn.danger {
  background: #FFFFFF !important;
  color: #D84D5D !important;
  border-color: #E8BFC5 !important;
}

#appScreen .stats .card,
#appScreen .card.stat {
  background: #FFFFFF !important;
  color: #6D7F92 !important;
  border: 1px solid #D5E1EB !important;
  border-top: 4px solid #1677D2 !important;
  border-radius: 14px !important;
}

#appScreen .stats .card b,
#appScreen .card.stat b {
  color: #102033 !important;
}

#appScreen .stats .card:nth-child(2) { border-top-color: #D88A00 !important; }
#appScreen .stats .card:nth-child(3) { border-top-color: #0FA88F !important; }
#appScreen .stats .card:nth-child(4) { border-top-color: #7458D7 !important; }
#appScreen .stats .card:nth-child(5) { border-top-color: #0FA88F !important; }

#appScreen .app-sidebar,
#appScreen .staff-layout > .app-sidebar {
  background: #0C2941 !important;
}

#appScreen .rail-case-group {
  position: relative !important;
}

#appScreen .case-rail-flyout .rail-flyout-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

#appScreen .rail-flyout-icon {
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

#appScreen .rail-flyout-item.active,
#appScreen .rail-flyout-item[aria-current="page"] {
  background: #e9f3fc !important;
  color: #0e63af !important;
}

@media print {
  html,
  body,
  #appScreen,
  #appScreen .screen,
  #appScreen .work-area,
  #appScreen .staff-layout,
  #appScreen main {
    background: #FFFFFF !important;
    color: #111827 !important;
  }
}


/* === Full Blue Theme + Navigation Cleanup: authoritative visual layer === */
:root {
  --mtl-app-bg: #0E3A5B;
  --mtl-app-bg-2: #124A70;
  --mtl-header: #08263D;
  --mtl-rail: #0A2F4B;
  --mtl-rail-hover: #154D72;
  --mtl-rail-active: #FFFFFF;
  --mtl-card: #12314D;
  --mtl-card-2: #163B59;
  --mtl-field: #102B44;
  --mtl-table-head: #163A56;
  --mtl-border: #2B5D83;
  --mtl-border-strong: #3B729B;
  --mtl-text: #F4F8FC;
  --mtl-text-2: #C7D8E7;
  --mtl-muted: #A8BED1;
  --mtl-blue: #2F9EF5;
  --mtl-blue-hover: #1686DC;
  --mtl-teal: #20C997;
  --mtl-amber: #E5A72C;
  --mtl-red: #E06472;
  --mtl-violet: #8C7AE6;
  --hl-canvas: #0E3A5B;
  --hl-surface: #12314D;
  --hl-secondary: #163B59;
  --hl-field: #102B44;
  --hl-border: #2B5D83;
  --hl-strong-border: #3B729B;
  --hl-ink: #F4F8FC;
  --hl-muted: #A8BED1;
  --hl-blue: #2F9EF5;
  --hl-teal: #20C997;
  --hl-amber: #E5A72C;
  --hl-red: #E06472;
  --hl-violet: #8C7AE6;
}

html,
body,
#appScreen,
#appScreen .screen,
#appScreen .work-area,
#appScreen .app-shell,
#appScreen .staff-shell,
#appScreen .staff-layout,
#appScreen main,
#appScreen .app-content,
#appScreen .workspace,
#appScreen .panel-area,
#appScreen .page-body,
#appScreen .staff-content,
#appScreen .wrap {
  background: var(--mtl-app-bg) !important;
  color: var(--mtl-text) !important;
}

#loginScreen,
.login-screen {
  background: radial-gradient(circle at top, #155985 0%, var(--mtl-app-bg) 42%, #08263D 100%) !important;
  color: var(--mtl-text) !important;
}

.login-card,
#loginScreen .login-card {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.24) !important;
}

.login-card label,
.login-card h1,
.login-card .login-company,
.login-card p,
.login-card span,
.login-card b {
  color: var(--mtl-text) !important;
}

.login-tab,
.login-card .login-tab {
  background: var(--mtl-field) !important;
  color: var(--mtl-text-2) !important;
  border: 1px solid var(--mtl-border) !important;
}

.login-tab.active,
.login-card .login-tab.active {
  background: var(--mtl-blue) !important;
  color: #FFFFFF !important;
  border-color: var(--mtl-blue) !important;
}

#appScreen .staff-topbar {
  background: var(--mtl-header) !important;
  color: var(--mtl-text) !important;
  border-bottom: 1px solid var(--mtl-border) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.16) !important;
}

#appScreen .staff-topbar *,
#appScreen .topbar-brand,
#appScreen .header-user-label,
#appScreen .header-caret {
  color: var(--mtl-text) !important;
}

#appScreen .topbar-actions .status-pill,
#appScreen .topbar-actions button,
#appScreen .header-icon-btn,
#appScreen .admin-menu-button,
#appScreen .header-user-btn {
  background: var(--mtl-field) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border) !important;
}

#appScreen .topbar-actions .status-pill:hover,
#appScreen .topbar-actions button:hover,
#appScreen .header-icon-btn:hover,
#appScreen .admin-menu-button:hover,
#appScreen .header-user-btn:hover {
  background: var(--mtl-rail-hover) !important;
}

#appScreen .app-sidebar,
#appScreen .staff-layout > .app-sidebar {
  background: var(--mtl-rail) !important;
  color: #FFFFFF !important;
  border-right: 1px solid rgba(255,255,255,.08) !important;
}

#appScreen .app-nav-link,
#appScreen .app-nav-link.tab,
#appScreen .app-nav-link.case-subtab {
  background: transparent !important;
  color: #AFC6D8 !important;
  border-color: rgba(175,198,216,.18) !important;
}

#appScreen .app-nav-link:hover,
#appScreen .app-nav-link:focus-visible {
  background: var(--mtl-rail-hover) !important;
  color: #FFFFFF !important;
  border-color: rgba(255,255,255,.24) !important;
}

#appScreen .app-nav-link.active,
#appScreen .app-nav-link.tab.active,
#appScreen .app-nav-link.case-subtab.active {
  background: var(--mtl-rail-active) !important;
  color: var(--mtl-rail) !important;
  border-color: var(--mtl-rail-active) !important;
}

#appScreen .app-nav-link .nav-label {
  background: #081D30 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}

#appScreen .module-panel,
#appScreen .panel,
#appScreen .screen > section,
#appScreen .tab-panel,
#appScreen .content-panel {
  background: transparent !important;
  color: var(--mtl-text) !important;
}

#appScreen .app-page-heading,
#appScreen .section-head,
#appScreen .panel-head,
#appScreen .module-head {
  background: transparent !important;
  color: var(--mtl-text) !important;
  border: 0 !important;
}

#appScreen .app-page-heading *,
#appScreen .section-head *,
#appScreen .panel-head *,
#appScreen .module-head *,
#appScreen h1,
#appScreen h2,
#appScreen h3,
#appScreen h4,
#appScreen h5,
#appScreen h6,
#appScreen strong,
#appScreen b,
#appScreen label,
#appScreen .title,
#appScreen .card-title,
#appScreen .field-label,
#appScreen .metric-label {
  color: var(--mtl-text) !important;
}

#appScreen .page-eyebrow,
#appScreen .section-kicker,
#appScreen .eyebrow {
  color: var(--mtl-blue) !important;
}

#appScreen .muted,
#appScreen .helper,
#appScreen .hint,
#appScreen .small-note,
#appScreen small,
#appScreen p {
  color: var(--mtl-muted) !important;
}

#appScreen .card,
#appScreen .stat-card,
#appScreen .record-card,
#appScreen .form-card,
#appScreen .list-card,
#appScreen .workflow-card,
#appScreen .photo-card,
#appScreen .media-card,
#appScreen .history-stage-card,
#appScreen .repair-cycle-card,
#appScreen .rate-list-card,
#appScreen .report-card,
#appScreen .dashboard-history-card,
#appScreen .dashboard-history-summary-bar,
#appScreen .dashboard-history-container,
#appScreen .dashboard-history-visit,
#appScreen .dashboard-history-legacy,
#appScreen .dashboard-history-subsection,
#appScreen .dashboard-history-media,
#appScreen .dashboard-history-technical,
#appScreen .table-wrap,
#appScreen .grid-card,
#appScreen .admin-card,
#appScreen .settings-card,
#appScreen fieldset,
#appScreen .field-row,
#appScreen .case-summary-card,
#appScreen .case-proof-card,
#appScreen .warning-card,
#appScreen .empty-state,
#appScreen .kanban-column,
#appScreen .queue-card,
#appScreen .proof-card,
#appScreen .detail-card,
#appScreen .summary-card,
#appScreen .report-section,
#appScreen .header-dropdown,
#appScreen .rail-flyout {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 38px rgba(0,0,0,.18) !important;
}

#appScreen label.field,
#appScreen .field,
#appScreen .meta-field,
#appScreen .info-field,
#appScreen .summary-field,
#appScreen .detail-field,
#appScreen .form-field,
#appScreen .filter-bar,
#appScreen .search-panel,
#appScreen .toolbar,
#appScreen .photo-slot,
#appScreen .photo-drop,
#casePanel .field,
#casePanel label,
#casePanel .case-meta,
#casePanel .case-detail,
#casePanel .case-status,
#casePanel .approval-summary,
#casePanel .estimate-summary {
  background: var(--mtl-card-2) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen input,
#appScreen select,
#appScreen textarea,
#appScreen .input,
#appScreen .search-input,
#loginScreen input,
#loginScreen select,
#loginScreen textarea {
  background: var(--mtl-field) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border-strong) !important;
  box-shadow: none !important;
}

#appScreen input::placeholder,
#appScreen textarea::placeholder,
#loginScreen input::placeholder,
#loginScreen textarea::placeholder {
  color: #9DB4C8 !important;
}

#appScreen input:focus,
#appScreen select:focus,
#appScreen textarea:focus,
#loginScreen input:focus,
#loginScreen select:focus,
#loginScreen textarea:focus {
  border-color: var(--mtl-blue) !important;
  box-shadow: 0 0 0 3px rgba(47,158,245,.16) !important;
  outline: none !important;
}

#appScreen table,
#appScreen .table {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen thead,
#appScreen th {
  background: var(--mtl-table-head) !important;
  color: var(--mtl-text-2) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen tbody,
#appScreen tr,
#appScreen td {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen tr:hover td {
  background: #194664 !important;
}

#appScreen .dash-card,
#dashboardPanel .dash-card,
#appScreen .stats .card,
#appScreen .card.stat {
  background: var(--mtl-card) !important;
  color: var(--mtl-text-2) !important;
  border: 1px solid var(--mtl-border) !important;
  border-top: 4px solid var(--mtl-blue) !important;
  box-shadow: 0 16px 38px rgba(0,0,0,.18) !important;
}

#appScreen .dash-card b,
#dashboardPanel .dash-card b,
#appScreen .stats .card b,
#appScreen .card.stat b {
  color: var(--mtl-text) !important;
}

#appScreen .dash-card:nth-child(2), #dashboardPanel .dash-card:nth-child(2) { border-top-color: var(--mtl-teal) !important; }
#appScreen .dash-card:nth-child(3), #dashboardPanel .dash-card:nth-child(3) { border-top-color: var(--mtl-amber) !important; }
#appScreen .dash-card:nth-child(4), #dashboardPanel .dash-card:nth-child(4) { border-top-color: var(--mtl-red) !important; }
#appScreen .dash-card:nth-child(6), #dashboardPanel .dash-card:nth-child(6) { border-top-color: var(--mtl-violet) !important; }
#appScreen .dash-card:nth-child(7), #dashboardPanel .dash-card:nth-child(7) { border-top-color: var(--mtl-amber) !important; }
#appScreen .dash-card:nth-child(8), #dashboardPanel .dash-card:nth-child(8) { border-top-color: var(--mtl-violet) !important; }
#appScreen .dash-card:nth-child(9), #dashboardPanel .dash-card:nth-child(9) { border-top-color: var(--mtl-teal) !important; }
#appScreen .dash-card:nth-child(10), #dashboardPanel .dash-card:nth-child(10) { border-top-color: var(--mtl-blue) !important; }
#appScreen .dash-card:nth-child(11), #dashboardPanel .dash-card:nth-child(11) { border-top-color: var(--mtl-amber) !important; }
#appScreen .stats .card:nth-child(2) { border-top-color: var(--mtl-amber) !important; }
#appScreen .stats .card:nth-child(3) { border-top-color: var(--mtl-teal) !important; }
#appScreen .stats .card:nth-child(4) { border-top-color: var(--mtl-violet) !important; }
#appScreen .stats .card:nth-child(5) { border-top-color: var(--mtl-teal) !important; }

#appScreen .btn,
#appScreen button:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
#appScreen .tab:not(.app-nav-link),
#appScreen .case-subtab:not(.app-nav-link):not(.rail-flyout-item),
#loginScreen .btn,
#loginScreen button {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border-strong) !important;
}

#appScreen .btn:hover,
#appScreen button:hover:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
#loginScreen button:hover {
  background: var(--mtl-rail-hover) !important;
  color: #FFFFFF !important;
}

#appScreen .btn.primary,
#appScreen button.primary,
#appScreen #saveCaseBtn,
#appScreen .save-btn,
#appScreen .action-primary,
#loginScreen .btn.primary,
#loginScreen button[type="submit"] {
  background: var(--mtl-blue) !important;
  color: #FFFFFF !important;
  border-color: var(--mtl-blue) !important;
}

#appScreen .btn.primary:hover,
#appScreen button.primary:hover,
#appScreen #saveCaseBtn:hover,
#loginScreen .btn.primary:hover,
#loginScreen button[type="submit"]:hover {
  background: var(--mtl-blue-hover) !important;
  border-color: var(--mtl-blue-hover) !important;
}

#appScreen .btn.red,
#appScreen button.btn.red,
#appScreen #deleteCaseBtn,
#appScreen .danger,
#appScreen .btn.danger {
  background: #4A1E2A !important;
  color: #FFCDD3 !important;
  border-color: var(--mtl-red) !important;
}

#appScreen .tab:not(.app-nav-link).active,
#appScreen .case-subtab:not(.app-nav-link).active,
#appScreen .mode-btn.active,
#appScreen .filter-pill.active,
#appScreen .rail-flyout-item.active,
#appScreen .rail-flyout-item[aria-current="page"] {
  background: #1A5E8F !important;
  color: #FFFFFF !important;
  border-color: var(--mtl-blue) !important;
}

#appScreen .rail-flyout-item {
  background: transparent !important;
  color: var(--mtl-text) !important;
  border: 0 !important;
  box-shadow: none !important;
}

#appScreen .rail-flyout-item:hover,
#appScreen .rail-flyout-item:focus-visible {
  background: var(--mtl-rail-hover) !important;
  color: #FFFFFF !important;
}

#appScreen .badge,
#appScreen .pill,
#appScreen .status-badge,
#appScreen .history-status-badge {
  border: 1px solid rgba(199,216,231,.2) !important;
  background: rgba(47,158,245,.12) !important;
  color: var(--mtl-text-2) !important;
}

#appScreen .approved,
#appScreen .sound,
#appScreen .completed,
#appScreen .status-approved,
#appScreen .status-completed {
  color: #7EE7C6 !important;
  background: rgba(32,201,151,.14) !important;
}

#appScreen .pending,
#appScreen .dirty,
#appScreen .warning,
#appScreen .status-pending {
  color: #FFD27D !important;
  background: rgba(229,167,44,.14) !important;
}

#appScreen .damage,
#appScreen .error,
#appScreen .danger,
#appScreen .status-error {
  color: #FF9EAA !important;
  background: rgba(224,100,114,.14) !important;
}

#appScreen .repair,
#appScreen .status-repair {
  color: #C5B9FF !important;
  background: rgba(140,122,230,.14) !important;
}

#appScreen .record-card:hover,
#appScreen .list-card:hover,
#appScreen .queue-card:hover,
#appScreen .dashboard-history-visit:hover,
#appScreen .dashboard-history-container:hover {
  background: #194664 !important;
}

#appScreen .record-card.active,
#appScreen .record-card.selected,
#appScreen .list-card.active,
#appScreen .selected {
  border-color: var(--mtl-blue) !important;
  box-shadow: inset 3px 0 0 var(--mtl-blue), 0 16px 38px rgba(0,0,0,.18) !important;
}

@media print {
  html,
  body,
  #appScreen,
  #appScreen .screen,
  #appScreen .work-area,
  #appScreen .staff-layout,
  #appScreen main,
  #appScreen .wrap,
  #appScreen .panel,
  #appScreen .module-panel,
  #appScreen .card,
  #appScreen table,
  #appScreen th,
  #appScreen td {
    background: #FFFFFF !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
  }
}


/* === Blue UI Final Cleanup: white leak, tooltip, and overflow fix === */
:root {
  --mtl-app-bg: #0E3A5B;
  --mtl-app-bg-2: #124A70;
  --mtl-header: #08263D;
  --mtl-rail: #0A2F4B;
  --mtl-rail-hover: #154D72;
  --mtl-card: #12314D;
  --mtl-card-2: #163B59;
  --mtl-field: #102B44;
  --mtl-table-head: #163A56;
  --mtl-border: #2B5D83;
  --mtl-border-strong: #3B729B;
  --mtl-text: #F4F8FC;
  --mtl-text-2: #C7D8E7;
  --mtl-muted: #A8BED1;
  --mtl-blue: #2F9EF5;
}

html,
body {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  background: var(--mtl-app-bg) !important;
  color: var(--mtl-text) !important;
}

#appScreen,
#appScreen .app-shell,
#appScreen .staff-shell,
#appScreen .screen,
#appScreen .work-area,
#appScreen .staff-layout,
#appScreen .staff-content,
#appScreen .wrap,
#appScreen main,
#appScreen .main,
#appScreen .page-body,
#appScreen .panel-area,
#appScreen .workspace {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  background: var(--mtl-app-bg) !important;
  color: var(--mtl-text) !important;
}

#appScreen .staff-layout {
  grid-template-columns: 76px minmax(0, 1fr) !important;
  box-sizing: border-box !important;
}

#appScreen .staff-topbar,
#appScreen header.staff-topbar,
body #appScreen .staff-topbar {
  background: var(--mtl-header) !important;
  color: var(--mtl-text) !important;
  border-bottom: 1px solid var(--mtl-border) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,.22) !important;
}

#appScreen .staff-topbar *,
#appScreen .topbar-brand,
#appScreen .topbar-brand *,
#appScreen .header-user-label,
#appScreen .header-caret,
#appScreen .brand-text,
#appScreen .brand-name {
  color: var(--mtl-text) !important;
}

#appScreen .topbar-actions .status-pill,
#appScreen .topbar-actions button,
#appScreen .header-icon-btn,
#appScreen .header-user-btn,
#appScreen .admin-menu-button {
  background: var(--mtl-field) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border) !important;
}

#appScreen .topbar-actions .status-pill:hover,
#appScreen .topbar-actions button:hover,
#appScreen .header-icon-btn:hover,
#appScreen .header-user-btn:hover,
#appScreen .admin-menu-button:hover {
  background: var(--mtl-rail-hover) !important;
  color: #FFFFFF !important;
}

#appScreen .app-sidebar,
#appScreen .staff-layout > .app-sidebar {
  background: var(--mtl-rail) !important;
  overflow-y: visible !important;
  overflow-x: visible !important;
  scrollbar-width: none !important;
}

#appScreen .app-sidebar::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

#appScreen .sidebar-brand-block {
  cursor: default !important;
  pointer-events: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#appScreen .sidebar-brand-block .sidebar-logo {
  pointer-events: none !important;
  background: #081D30 !important;
  border: 1px solid rgba(175,198,216,.22) !important;
}

#appScreen .app-nav,
#appScreen .nav-group,
#appScreen .rail-menu-item {
  overflow: visible !important;
  max-width: 76px !important;
}

#appScreen .app-nav-link .nav-label {
  left: 60px !important;
  top: 50% !important;
  background: #123F61 !important;
  color: #FFFFFF !important;
  border: 1px solid #3B729B !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.20) !important;
  z-index: 9999 !important;
  white-space: nowrap !important;
  max-width: calc(100vw - 96px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-50%) translateX(-8px) !important;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease !important;
}

#appScreen .app-nav-link:hover .nav-label,
#appScreen .app-nav-link:focus-visible .nav-label {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(0) !important;
}

#appScreen .rail-menu-item:hover > .app-nav-link .nav-label,
#appScreen .rail-menu-item:focus-within > .app-nav-link .nav-label {
  opacity: 0 !important;
  visibility: hidden !important;
}

#appScreen .rail-flyout {
  left: 60px !important;
  max-width: calc(100vw - 98px) !important;
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border: 1px solid var(--mtl-border-strong) !important;
  box-shadow: 0 14px 32px rgba(0,0,0,.24) !important;
  z-index: 9998 !important;
}

#appScreen .module-panel,
#appScreen .panel,
#appScreen .screen > section,
#appScreen .card,
#appScreen .record-card,
#appScreen .form-card,
#appScreen .list-card,
#appScreen .workflow-card,
#appScreen .dashboard-history-card,
#appScreen .table-wrap,
#appScreen .admin-card,
#appScreen .settings-card,
#appScreen .detail-card,
#appScreen .summary-card,
#appScreen .report-section,
#appScreen .photo-card,
#appScreen .media-card,
#appScreen .rate-list-card,
#appScreen .repair-cycle-card,
#appScreen .case-proof-card,
#appScreen .warning-card,
#appScreen .empty-state {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen .field,
#appScreen label.field,
#appScreen .field-row,
#appScreen .meta-field,
#appScreen .info-field,
#appScreen .summary-field,
#appScreen .filter-bar,
#appScreen .toolbar,
#appScreen .search-panel,
#appScreen .photo-slot,
#appScreen .photo-drop,
#appScreen fieldset {
  background: var(--mtl-card-2) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen input,
#appScreen select,
#appScreen textarea,
#loginScreen input,
#loginScreen select,
#loginScreen textarea {
  background: var(--mtl-field) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border-strong) !important;
}

#appScreen table,
#appScreen tbody,
#appScreen tr,
#appScreen td {
  background: var(--mtl-card) !important;
  color: var(--mtl-text) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen thead,
#appScreen th {
  background: var(--mtl-table-head) !important;
  color: var(--mtl-text-2) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen .table-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
}

#appScreen .dash-card,
#dashboardPanel .dash-card,
#appScreen .stats .card,
#appScreen .card.stat {
  background: var(--mtl-card) !important;
  color: var(--mtl-text-2) !important;
  border-color: var(--mtl-border) !important;
}

#appScreen .dash-card b,
#dashboardPanel .dash-card b,
#appScreen .stats .card b,
#appScreen .card.stat b {
  color: var(--mtl-text) !important;
}

@media print {
  html,
  body,
  #appScreen,
  #appScreen .app-shell,
  #appScreen .screen,
  #appScreen .work-area,
  #appScreen .staff-layout,
  #appScreen main,
  #appScreen .wrap,
  #appScreen .panel,
  #appScreen .module-panel,
  #appScreen .card,
  #appScreen table,
  #appScreen th,
  #appScreen td {
    background: #FFFFFF !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
}


/* Blue UI final legacy tab visibility fix */
#appScreen .legacy-top-tabs {
  display: none !important;
}

#appScreen .work-area,
#appScreen .app-work-area,
#appScreen .staff-content,
#appScreen .main,
#appScreen .panel,
#appScreen .module-panel {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* === Ocean Pro UI Redesign: final visual-only layer === */
:root {
  --ocean-page: #eaf2f8;
  --ocean-page-soft: #f5f9fc;
  --ocean-surface: #ffffff;
  --ocean-surface-2: #f7fbff;
  --ocean-line: #d5e3ee;
  --ocean-line-strong: #b8cde0;
  --ocean-text: #102033;
  --ocean-muted: #63778d;
  --ocean-rail: #08263d;
  --ocean-rail-2: #0e3958;
  --ocean-ink: #0d2135;
  --ocean-blue: #1769aa;
  --ocean-blue-2: #2388d5;
  --ocean-green: #15845f;
  --ocean-warn: #b66b12;
  --ocean-danger: #b12b3c;
}

html,
body {
  overflow-x: hidden !important;
}

body {
  background: var(--ocean-page) !important;
  color: var(--ocean-text) !important;
}

#loginScreen.login-screen {
  background:
    radial-gradient(circle at 50% 0%, rgba(35, 136, 213, 0.22), transparent 40%),
    linear-gradient(135deg, #071d31 0%, #0a2f4b 48%, #eaf2f8 49%, #f6fafc 100%) !important;
}

#loginScreen .login-card,
#customerPortal .customer-card,
.customer-auth-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(184, 205, 224, 0.95) !important;
  box-shadow: 0 24px 60px rgba(8, 38, 61, 0.18) !important;
  color: var(--ocean-text) !important;
}

#loginScreen input,
#loginScreen select,
#loginScreen textarea,
#customerPortal input,
#customerPortal select,
#customerPortal textarea {
  background: #ffffff !important;
  border-color: var(--ocean-line-strong) !important;
  color: var(--ocean-text) !important;
}

#appScreen {
  background: var(--ocean-page) !important;
  color: var(--ocean-text) !important;
}

#appScreen .app-shell {
  background: var(--ocean-page) !important;
  color: var(--ocean-text) !important;
  min-width: 0 !important;
}

#appScreen .topbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--ocean-line) !important;
  box-shadow: 0 8px 24px rgba(8, 38, 61, 0.08) !important;
  color: var(--ocean-text) !important;
}

#appScreen .brand-title,
#appScreen .topbar h1,
#appScreen .topbar strong {
  color: #f3f8fc !important;
}

#appScreen .topbar .brand-title,
#appScreen .topbar .brand-name {
  color: #0d2135 !important;
  text-shadow: none !important;
}

#appScreen .topbar .btn,
#appScreen .topbar .status-pill,
#appScreen .topbar .topbar-icon,
#appScreen .topbar .user-menu-button {
  background: var(--ocean-ink) !important;
  border-color: #173e5f !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(8, 38, 61, 0.12) !important;
}

#appScreen .staff-layout {
  grid-template-columns: 76px minmax(0, 1fr) !important;
  background: var(--ocean-page) !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#appScreen .staff-sidebar {
  width: 76px !important;
  background: linear-gradient(180deg, var(--ocean-rail) 0%, #0a304d 100%) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 10px 0 24px rgba(8, 38, 61, 0.15) !important;
  overflow: visible !important;
}

#appScreen .sidebar-brand-block {
  width: 52px !important;
  height: 52px !important;
  margin: 14px auto 18px !important;
  padding: 0 !important;
  justify-content: center !important;
  background: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: var(--ocean-rail) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18) !important;
}

#appScreen .sidebar-brand-block .sidebar-kicker,
#appScreen .sidebar-brand-block strong,
#appScreen .nav-group-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

#appScreen .app-nav {
  align-items: center !important;
  gap: 12px !important;
  overflow: visible !important;
  padding: 0 0 18px !important;
}

#appScreen .nav-group {
  align-items: center !important;
  gap: 10px !important;
  overflow: visible !important;
  width: 100% !important;
}

#appScreen .app-nav-link,
#appScreen .app-nav-link.tab,
#appScreen .app-nav-link.case-subtab {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: #d9ecfb !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

#appScreen .app-nav-link:hover,
#appScreen .app-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px) !important;
}

#appScreen .app-nav-link.active,
#appScreen .app-nav-link.tab.active,
#appScreen .app-nav-link.case-subtab.active {
  background: #ffffff !important;
  color: var(--ocean-rail) !important;
  border-color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18) !important;
}

#appScreen .app-nav-link .nav-icon {
  width: 22px !important;
  height: 22px !important;
}

#appScreen .app-nav-link .nav-label {
  position: absolute !important;
  left: 62px !important;
  top: 50% !important;
  transform: translate(0, -50%) !important;
  z-index: 2000 !important;
  width: max-content !important;
  max-width: 240px !important;
  padding: 8px 11px !important;
  background: #0d2f4c !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 10px !important;
  box-shadow: 0 14px 32px rgba(8, 38, 61, 0.28) !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#appScreen .app-nav-link:hover .nav-label,
#appScreen .app-nav-link:focus-visible .nav-label {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(8px, -50%) !important;
}

#appScreen .rail-menu-item:hover > .app-nav-link .nav-label,
#appScreen .rail-menu-item:focus-within > .app-nav-link .nav-label {
  opacity: 0 !important;
  visibility: hidden !important;
}

#appScreen .rail-flyout {
  left: 70px !important;
  top: 50% !important;
  transform: translate(10px, -50%) !important;
  background: #ffffff !important;
  color: var(--ocean-text) !important;
  border: 1px solid var(--ocean-line-strong) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 42px rgba(8, 38, 61, 0.20) !important;
}

#appScreen .rail-flyout-title {
  color: var(--ocean-muted) !important;
}

#appScreen .rail-flyout-item {
  background: transparent !important;
  color: var(--ocean-text) !important;
  border-color: transparent !important;
}

#appScreen .rail-flyout-item:hover,
#appScreen .rail-flyout-item:focus-visible,
#appScreen .rail-flyout-item.active,
#appScreen .rail-flyout-item[aria-current="page"] {
  background: #e8f3fb !important;
  color: var(--ocean-rail) !important;
  border-color: #c8ddea !important;
}

#appScreen .staff-content,
#appScreen .wrap,
#appScreen .work-area,
#appScreen .module-panel,
#appScreen .panel {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

#appScreen .staff-content {
  background: var(--ocean-page) !important;
  color: var(--ocean-text) !important;
}

#appScreen .app-page-heading {
  background: linear-gradient(120deg, rgba(8, 38, 61, 0.94), rgba(23, 105, 170, 0.88)), var(--ocean-rail) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 0 !important;
  box-shadow: 0 16px 34px rgba(8, 38, 61, 0.14) !important;
  color: #ffffff !important;
}

#appScreen .app-page-heading h1,
#appScreen .app-page-heading p,
#appScreen .app-page-heading .eyebrow {
  color: #ffffff !important;
}

#appScreen .panel,
#appScreen .card,
#appScreen .data-card,
#appScreen .form-card,
#appScreen .section-card,
#appScreen .customer-result-section,
#appScreen .table-section,
#appScreen .dashboard-search-panel,
#appScreen .glass-panel {
  background: var(--ocean-surface) !important;
  color: var(--ocean-text) !important;
  border: 1px solid var(--ocean-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(8, 38, 61, 0.08) !important;
}

#appScreen .dash-card {
  background: linear-gradient(135deg, #102a43 0%, #0e3958 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  box-shadow: 0 16px 30px rgba(8, 38, 61, 0.18) !important;
}

#appScreen .dash-card strong,
#appScreen .dash-card span,
#appScreen .dash-card .stat-value {
  color: #ffffff !important;
}

#appScreen h1,
#appScreen h2,
#appScreen h3,
#appScreen h4,
#appScreen label,
#appScreen .section-title,
#appScreen .field-label,
#appScreen .muted {
  color: var(--ocean-text) !important;
}

#appScreen .muted,
#appScreen small,
#appScreen .hint {
  color: var(--ocean-muted) !important;
}

#appScreen input,
#appScreen select,
#appScreen textarea {
  background: #ffffff !important;
  color: var(--ocean-text) !important;
  border-color: var(--ocean-line-strong) !important;
  box-shadow: none !important;
}

#appScreen input::placeholder,
#appScreen textarea::placeholder {
  color: #8ba0b3 !important;
}

#appScreen table {
  background: #ffffff !important;
  color: var(--ocean-text) !important;
}

#appScreen th {
  background: #e9f2f8 !important;
  color: #0d2f4c !important;
  border-color: var(--ocean-line) !important;
}

#appScreen td {
  border-color: var(--ocean-line) !important;
  color: var(--ocean-text) !important;
}

#appScreen tr:hover td {
  background: #f1f7fb !important;
}

#appScreen .table-scroll,
#appScreen .responsive-table,
#appScreen .table-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
}

#appScreen button:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
#appScreen .btn,
#appScreen .tab:not(.app-nav-link),
#appScreen .case-subtab:not(.app-nav-link):not(.rail-flyout-item) {
  background: var(--ocean-ink) !important;
  color: #ffffff !important;
  border: 1px solid #173e5f !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 18px rgba(8, 38, 61, 0.12) !important;
}

#appScreen button:hover:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
#appScreen .btn:hover,
#appScreen .tab:not(.app-nav-link):hover,
#appScreen .case-subtab:not(.app-nav-link):not(.rail-flyout-item):hover {
  background: #15496f !important;
  border-color: #267fbd !important;
}

#appScreen .btn.primary,
#appScreen button.primary,
#appScreen .primary {
  background: linear-gradient(135deg, var(--ocean-blue), var(--ocean-blue-2)) !important;
  border-color: #1f7fc2 !important;
  color: #ffffff !important;
}

#appScreen .btn.red,
#appScreen button.red,
#appScreen .danger,
#appScreen .btn.danger {
  background: var(--ocean-danger) !important;
  border-color: #c64a58 !important;
  color: #ffffff !important;
}

#appScreen .pill,
#appScreen .badge,
#appScreen .status-badge {
  background: #e6f2fa !important;
  border-color: #c7ddea !important;
  color: #0d3a5a !important;
}

#appScreen .legacy-top-tabs {
  display: none !important;
}

@media (max-width: 820px) {
  #appScreen .staff-layout {
    grid-template-columns: 64px minmax(0, 1fr) !important;
  }

  #appScreen .staff-sidebar {
    width: 64px !important;
  }

  #appScreen .app-nav-link,
  #appScreen .app-nav-link.tab,
  #appScreen .app-nav-link.case-subtab {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
  }

  #appScreen .app-nav-link .nav-label,
  #appScreen .rail-flyout {
    left: 58px !important;
  }
}

/* === Option 1 Final Nav Tooltip Color Cleanup: screen-only authoritative layer === */
@media screen {
  :root {
    --option1-app-bg: #0B2D46;
    --option1-nav: #08263B;
    --option1-header: #0E3751;
    --option1-card: #123A55;
    --option1-record: #0F344E;
    --option1-info: #163F5C;
    --option1-field: #0D3049;
    --option1-button: #103953;
    --option1-border: #2D6383;
    --option1-text: #F3F8FC;
    --option1-muted: #B8CAD8;
    --option1-accent: #38A9FF;
    --option1-danger: #D54A5C;
    --option1-success: #39C58A;
    --option1-warning: #F0A943;
  }

  html,
  body {
    overflow-x: hidden !important;
    background: var(--option1-app-bg) !important;
    color: var(--option1-text) !important;
  }

  #loginScreen.login-screen {
    background:
      radial-gradient(circle at 50% 0%, rgba(56, 169, 255, 0.22), transparent 38%),
      linear-gradient(135deg, #061A2A 0%, var(--option1-app-bg) 100%) !important;
  }

  #loginScreen .login-card,
  #customerPortal .customer-card,
  .customer-auth-card {
    background: var(--option1-card) !important;
    border: 1px solid var(--option1-border) !important;
    color: var(--option1-text) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28) !important;
  }

  #appScreen,
  #appScreen .app-shell,
  #appScreen .staff-layout,
  #appScreen .staff-content,
  #appScreen .wrap,
  #appScreen .work-area {
    background: var(--option1-app-bg) !important;
    color: var(--option1-text) !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #appScreen .topbar {
    background: var(--option1-header) !important;
    border-bottom: 1px solid var(--option1-border) !important;
    color: var(--option1-text) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.20) !important;
  }

  #appScreen .brand-title,
  #appScreen .topbar .brand-title,
  #appScreen .topbar .brand-name,
  #appScreen .topbar h1,
  #appScreen .topbar strong {
    color: var(--option1-text) !important;
    text-shadow: none !important;
  }

  #appScreen .topbar .btn,
  #appScreen .topbar .status-pill,
  #appScreen .topbar .topbar-icon,
  #appScreen .topbar .user-menu-button,
  #appScreen .header-actions button {
    background: var(--option1-button) !important;
    border: 1px solid var(--option1-border) !important;
    color: var(--option1-text) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
  }

  #appScreen .staff-layout {
    grid-template-columns: 76px minmax(0, 1fr) !important;
    width: 100% !important;
    overflow: visible !important;
  }

  #appScreen .staff-sidebar {
    width: 76px !important;
    background: var(--option1-nav) !important;
    border-right: 1px solid var(--option1-border) !important;
    box-shadow: 10px 0 24px rgba(0, 0, 0, 0.22) !important;
    overflow: visible !important;
    z-index: 2000 !important;
    isolation: isolate !important;
  }

  #appScreen .sidebar-brand-block {
    display: none !important;
  }

  #appScreen .app-nav {
    padding: 16px 0 18px !important;
    gap: 12px !important;
    align-items: center !important;
    overflow: visible !important;
  }

  #appScreen .nav-group {
    width: 100% !important;
    align-items: center !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  #appScreen .nav-group-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  #appScreen .rail-menu-item {
    position: relative !important;
    overflow: visible !important;
    z-index: 2100 !important;
  }

  #appScreen .rail-menu-item::after {
    content: "" !important;
    position: absolute !important;
    left: 54px !important;
    top: 0 !important;
    width: 28px !important;
    height: 100% !important;
    pointer-events: auto !important;
  }

  #appScreen .app-nav-link,
  #appScreen .app-nav-link.tab,
  #appScreen .app-nav-link.case-subtab {
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center !important;
    background: var(--option1-button) !important;
    color: var(--option1-text) !important;
    border: 1px solid var(--option1-border) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #appScreen .app-nav-link:hover,
  #appScreen .app-nav-link:focus-visible {
    background: var(--option1-info) !important;
    color: #FFFFFF !important;
    border-color: var(--option1-accent) !important;
    transform: translateY(-1px) !important;
  }

  #appScreen .app-nav-link.active,
  #appScreen .app-nav-link.tab.active,
  #appScreen .app-nav-link.case-subtab.active {
    background: var(--option1-accent) !important;
    color: #061A2A !important;
    border-color: var(--option1-accent) !important;
    box-shadow: 0 12px 24px rgba(56, 169, 255, 0.22) !important;
  }

  #appScreen .app-nav-link .nav-icon {
    width: 22px !important;
    height: 22px !important;
  }

  #appScreen .app-nav-link .nav-label {
    position: absolute !important;
    left: 58px !important;
    top: 50% !important;
    transform: translate(8px, -50%) !important;
    z-index: 6000 !important;
    width: max-content !important;
    max-width: 240px !important;
    padding: 7px 10px !important;
    background: var(--option1-accent) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #appScreen .app-nav-link:hover .nav-label,
  #appScreen .app-nav-link:focus-visible .nav-label {
    opacity: 1 !important;
    visibility: visible !important;
  }

  #appScreen .rail-menu-item:hover > .app-nav-link .nav-label,
  #appScreen .rail-menu-item:focus-within > .app-nav-link .nav-label {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  #appScreen .rail-flyout {
    position: absolute !important;
    left: 70px !important;
    top: 50% !important;
    transform: translate(8px, -50%) !important;
    z-index: 5000 !important;
    background: var(--option1-card) !important;
    color: var(--option1-text) !important;
    border: 1px solid var(--option1-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32) !important;
    overflow: visible !important;
  }

  #appScreen .rail-flyout::before {
    content: "" !important;
    position: absolute !important;
    left: -18px !important;
    top: 0 !important;
    width: 18px !important;
    height: 100% !important;
  }

  #appScreen .rail-flyout-title {
    color: var(--option1-muted) !important;
  }

  #appScreen .rail-flyout-item {
    background: transparent !important;
    color: var(--option1-text) !important;
    border-color: transparent !important;
  }

  #appScreen .rail-flyout-item:hover,
  #appScreen .rail-flyout-item:focus-visible,
  #appScreen .rail-flyout-item.active,
  #appScreen .rail-flyout-item[aria-current="page"] {
    background: var(--option1-info) !important;
    color: #FFFFFF !important;
    border-color: var(--option1-border) !important;
  }

  #appScreen .app-page-heading,
  #appScreen .module-panel,
  #appScreen .panel,
  #appScreen .card,
  #appScreen .data-card,
  #appScreen .form-card,
  #appScreen .section-card,
  #appScreen .customer-result-section,
  #appScreen .table-section,
  #appScreen .dashboard-search-panel,
  #appScreen .glass-panel,
  #appScreen .list-card,
  #appScreen .queue-card,
  #appScreen .history-card,
  #appScreen .detail-card,
  #appScreen .modal-content,
  #appScreen .dialog,
  #appScreen .popover,
  #appScreen .dropdown-menu {
    background: var(--option1-card) !important;
    color: var(--option1-text) !important;
    border: 1px solid var(--option1-border) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
  }

  #appScreen .app-page-heading {
    background: var(--option1-header) !important;
    border-radius: 0 !important;
  }

  #appScreen .app-page-heading h1,
  #appScreen .app-page-heading h2,
  #appScreen .app-page-heading p,
  #appScreen .app-page-heading .eyebrow,
  #appScreen .app-page-heading .muted {
    color: var(--option1-text) !important;
  }

  #appScreen .dash-card,
  #appScreen .stat-card,
  #appScreen .metric-card {
    background: var(--option1-card) !important;
    border: 1px solid var(--option1-border) !important;
    color: var(--option1-text) !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.20) !important;
  }

  #appScreen .dash-card strong,
  #appScreen .dash-card span,
  #appScreen .dash-card .stat-value,
  #appScreen .stat-card strong,
  #appScreen .metric-card strong {
    color: var(--option1-text) !important;
  }

  #appScreen h1,
  #appScreen h2,
  #appScreen h3,
  #appScreen h4,
  #appScreen label,
  #appScreen .section-title,
  #appScreen .field-label,
  #appScreen .card-title,
  #appScreen .title {
    color: var(--option1-text) !important;
  }

  #appScreen .muted,
  #appScreen small,
  #appScreen .hint,
  #appScreen .subtle,
  #appScreen .help-text {
    color: var(--option1-muted) !important;
  }

  #appScreen input,
  #appScreen select,
  #appScreen textarea,
  #loginScreen input,
  #loginScreen select,
  #loginScreen textarea,
  #customerPortal input,
  #customerPortal select,
  #customerPortal textarea {
    background: var(--option1-field) !important;
    color: var(--option1-text) !important;
    border: 1px solid var(--option1-border) !important;
    box-shadow: none !important;
  }

  #appScreen input::placeholder,
  #appScreen textarea::placeholder,
  #loginScreen input::placeholder,
  #customerPortal input::placeholder {
    color: var(--option1-muted) !important;
  }

  #appScreen table,
  #appScreen .table,
  #appScreen .list,
  #appScreen .record-list {
    background: var(--option1-record) !important;
    color: var(--option1-text) !important;
  }

  #appScreen th,
  #appScreen .table-header {
    background: var(--option1-info) !important;
    color: var(--option1-text) !important;
    border-color: var(--option1-border) !important;
  }

  #appScreen td,
  #appScreen tr,
  #appScreen .record-row,
  #appScreen .list-row {
    border-color: var(--option1-border) !important;
    color: var(--option1-text) !important;
  }

  #appScreen tr:hover td,
  #appScreen .record-row:hover,
  #appScreen .list-row:hover {
    background: var(--option1-info) !important;
  }

  #appScreen .table-scroll,
  #appScreen .responsive-table,
  #appScreen .table-wrap {
    overflow-x: auto !important;
    max-width: 100% !important;
  }

  #appScreen button:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  #appScreen .btn,
  #appScreen .tab:not(.app-nav-link),
  #appScreen .case-subtab:not(.app-nav-link):not(.rail-flyout-item) {
    background: var(--option1-button) !important;
    color: var(--option1-text) !important;
    border: 1px solid var(--option1-border) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16) !important;
  }

  #appScreen button:hover:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  #appScreen .btn:hover,
  #appScreen .tab:not(.app-nav-link):hover,
  #appScreen .case-subtab:not(.app-nav-link):not(.rail-flyout-item):hover {
    background: var(--option1-info) !important;
    border-color: var(--option1-accent) !important;
  }

  #appScreen .btn.primary,
  #appScreen button.primary,
  #appScreen .primary {
    background: var(--option1-accent) !important;
    border-color: var(--option1-accent) !important;
    color: #061A2A !important;
  }

  #appScreen .btn.red,
  #appScreen button.red,
  #appScreen .danger,
  #appScreen .btn.danger {
    background: var(--option1-danger) !important;
    border-color: #F06B7A !important;
    color: #FFFFFF !important;
  }

  #appScreen .pill,
  #appScreen .badge,
  #appScreen .status-badge,
  #appScreen .chip {
    background: var(--option1-info) !important;
    border-color: var(--option1-border) !important;
    color: var(--option1-text) !important;
  }

  #appScreen .legacy-top-tabs {
    display: none !important;
  }

  #appScreen * {
    scrollbar-color: var(--option1-border) transparent;
  }

  @media (max-width: 820px) {
    #appScreen .staff-layout {
      grid-template-columns: 64px minmax(0, 1fr) !important;
    }

    #appScreen .staff-sidebar {
      width: 64px !important;
    }

    #appScreen .app-nav-link,
    #appScreen .app-nav-link.tab,
    #appScreen .app-nav-link.case-subtab {
      width: 44px !important;
      height: 44px !important;
      min-width: 44px !important;
    }

    #appScreen .app-nav-link .nav-label,
    #appScreen .rail-flyout {
      left: 58px !important;
    }
  }
}

/* === Nav Tooltip Front Layer Portal: screen-only final overlay === */
@media screen {
  #appScreen .app-nav-link .nav-label,
  #appScreen .rail-menu-item > .rail-flyout {
    display: none !important;
  }

  #navTooltipLayer,
  #navFlyoutLayer {
    position: fixed !important;
    inset: auto !important;
    pointer-events: none !important;
    z-index: 50000 !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    max-width: calc(100vw - 96px) !important;
  }

  #navTooltipLayer.is-visible,
  #navFlyoutLayer.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
  }

  #navTooltipLayer {
    background: #1677D2 !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    padding: 7px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28) !important;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease !important;
  }

  #navTooltipLayer.is-visible {
    transform: translateY(-50%) translateX(0) !important;
  }

  #navFlyoutLayer {
    z-index: 40000 !important;
    transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease !important;
  }

  #navFlyoutLayer.is-visible {
    transform: translateY(-50%) translateX(0) !important;
  }

  #navFlyoutLayer .nav-portal-flyout-panel {
    pointer-events: auto !important;
    min-width: 218px !important;
    max-width: min(320px, calc(100vw - 104px)) !important;
    padding: 10px !important;
    background: #123A55 !important;
    color: #F3F8FC !important;
    border: 1px solid #2D6383 !important;
    border-radius: 14px !important;
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34) !important;
  }

  #navFlyoutLayer .nav-portal-flyout-panel::before {
    content: "" !important;
    position: absolute !important;
    left: -22px !important;
    top: 0 !important;
    width: 22px !important;
    height: 100% !important;
  }

  #navFlyoutLayer .nav-portal-flyout-title {
    margin: 2px 2px 8px !important;
    color: #B8CAD8 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
  }

  #navFlyoutLayer .rail-flyout-item,
  #navFlyoutLayer .case-subtab.rail-flyout-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 0 4px !important;
    padding: 9px 10px !important;
    background: transparent !important;
    color: #F3F8FC !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    text-align: left !important;
    justify-content: flex-start !important;
    white-space: nowrap !important;
  }

  #navFlyoutLayer .rail-flyout-item:hover,
  #navFlyoutLayer .rail-flyout-item:focus-visible,
  #navFlyoutLayer .case-subtab.rail-flyout-item:hover,
  #navFlyoutLayer .case-subtab.rail-flyout-item:focus-visible {
    background: #163F5C !important;
    color: #FFFFFF !important;
    border-color: #38A9FF !important;
    outline: none !important;
  }

  #navFlyoutLayer .rail-flyout-icon {
    width: 17px !important;
    height: 17px !important;
    flex: 0 0 auto !important;
  }
}

/* === Remove Sidebar Hover Tooltips: icon-only navigation final layer === */
@media screen {
  #navTooltipLayer,
  #navFlyoutLayer,
  #appScreen .app-nav-link .nav-label,
  #appScreen .rail-flyout,
  #appScreen .rail-menu-item::after,
  .nav-tooltip,
  .tooltip,
  .hover-label,
  .floating-label {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  #appScreen .app-nav-link,
  #appScreen .app-nav-link.tab,
  #appScreen .app-nav-link.case-subtab {
    position: relative !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    justify-content: center !important;
    background: #103953 !important;
    color: #F3F8FC !important;
    border: 1px solid #2D6383 !important;
    border-radius: 14px !important;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease !important;
    overflow: hidden !important;
  }

  #appScreen .app-nav-link:hover,
  #appScreen .app-nav-link:focus-visible {
    background: #174B69 !important;
    color: #FFFFFF !important;
    border-color: #38A9FF !important;
    transform: translateY(-1px) !important;
    outline: none !important;
  }

  #appScreen .app-nav-link.active,
  #appScreen .app-nav-link.tab.active,
  #appScreen .app-nav-link.case-subtab.active {
    background: #FFFFFF !important;
    color: #08263B !important;
    border-color: #FFFFFF !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22) !important;
  }

  #appScreen .staff-sidebar,
  #appScreen .app-nav,
  #appScreen .nav-group {
    overflow-x: hidden !important;
  }
}

/* === Header Brand Name Contrast Fix: visual-only === */
@media screen {
  #appScreen .topbar .brand-name,
  #appScreen .topbar .brand-title,
  #appScreen .topbar .brand h1,
  #appScreen .topbar h1.brand-name {
    color: #102033 !important;
    background: transparent !important;
    text-shadow: none !important;
  }
}

/* === Header Brand Text Final Dark Fix: exact staff header selector === */
@media screen {
  #appScreen > header.top > .brand h1 {
    color: #0B2D46 !important;
    -webkit-text-fill-color: #0B2D46 !important;
    opacity: 1 !important;
    background: transparent !important;
    text-shadow: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
  }
}

/* === Header Brand Text Final Dark Fix v2: dedicated exact brand class === */
@media screen {
  body #appScreen.app-screen > header.top > div.brand > div > h1.mtl-header-brand-name,
  body #customerScreen.app-screen > header.top > div.brand > div > h1.mtl-header-brand-name {
    color: #0B2D46 !important;
    -webkit-text-fill-color: #0B2D46 !important;
    opacity: 1 !important;
    background-color: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
  }
}

/* === Option 1 Remaining White Strip Fix: case context toolbar and live strips === */
@media screen {
  #appScreen .work-area > .case-subtabs.context-tabs,
  #appScreen .case-subtabs.context-tabs,
  #appScreen .context-tabs,
  #appScreen .module-panel > .case-subtabs,
  #appScreen .panel > .case-subtabs {
    background: #123A55 !important;
    background-image: none !important;
    border: 1px solid #2D6383 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
    padding: 9px !important;
    gap: 8px !important;
  }

  #appScreen .case-subtabs.context-tabs::before,
  #appScreen .case-subtabs.context-tabs::after,
  #appScreen .context-tabs::before,
  #appScreen .context-tabs::after {
    background: transparent !important;
    background-image: none !important;
  }

  #appScreen .case-subtabs.context-tabs .case-subtab,
  #appScreen .context-tabs .case-subtab,
  #appScreen .work-area > .case-subtabs .case-subtab {
    background: #103953 !important;
    background-image: none !important;
    color: #F3F8FC !important;
    border: 1px solid #2D6383 !important;
    border-radius: 9px !important;
    box-shadow: none !important;
  }

  #appScreen .case-subtabs.context-tabs .case-subtab:hover,
  #appScreen .case-subtabs.context-tabs .case-subtab:focus-visible,
  #appScreen .context-tabs .case-subtab:hover,
  #appScreen .context-tabs .case-subtab:focus-visible {
    background: #174B69 !important;
    color: #FFFFFF !important;
    border-color: #38A9FF !important;
  }

  #appScreen .case-subtabs.context-tabs .case-subtab.active,
  #appScreen .context-tabs .case-subtab.active,
  #appScreen .work-area > .case-subtabs .case-subtab.active {
    background: #1C5C82 !important;
    color: #FFFFFF !important;
    border-color: #38A9FF !important;
  }

  #appScreen .module-panel,
  #appScreen .panel,
  #appScreen .screen-case,
  #appScreen .screen-estimate,
  #appScreen .screen-repair,
  #appScreen .screen-rates,
  #appScreen .screen-reports,
  #appScreen .screen-program,
  #appScreen .screen-yard,
  #appScreen .screen-eir,
  #appScreen .screen-history {
    background: #123A55 !important;
    background-image: none !important;
    border-color: #2D6383 !important;
  }

  #appScreen .module-panel > .panel,
  #appScreen .module-panel > .card,
  #appScreen .module-panel > .section-card,
  #appScreen .module-panel > .table-section,
  #appScreen .module-panel > .form-card {
    background: #123A55 !important;
    background-image: none !important;
    border-color: #2D6383 !important;
  }
}

/* Damage Estimate local row override layout */
#damageTable th:nth-child(3),
#damageTable td:nth-child(3) {
  min-width: 320px;
  width: 32%;
}

#damageTable td:nth-child(3) input {
  min-width: 300px;
}

#damageTable th:nth-child(5),
#damageTable td:nth-child(5),
#damageTable th:nth-child(6),
#damageTable td:nth-child(6),
#damageTable th:nth-child(7),
#damageTable td:nth-child(7),
#damageTable th:nth-child(8),
#damageTable td:nth-child(8),
#damageTable th:nth-child(9),
#damageTable td:nth-child(9) {
  width: 92px;
}

#damageTable input[type="number"] {
  min-width: 74px;
}

/* Approval commercial adjustment summary */
.approval-commercial-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--border, #2D6383);
  border-radius: 14px;
  background: rgba(13, 42, 62, 0.72);
}

.approval-commercial-summary .span-4 {
  grid-column: 1 / -1;
}

.approval-commercial-summary input[readonly] {
  font-weight: 800;
}

@media (max-width: 900px) {
  .approval-commercial-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .approval-commercial-summary {
    grid-template-columns: 1fr;
  }
}

/* === CSP-safe professional PDF/print templates for isolated Estimate and Repair documents === */
@page { size: A4 portrait; margin: 9mm 8mm 10mm; }
body.mtl-print-document,
body.mtl-repair-print-document {
  background: #ffffff !important;
  color: #111111 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.mtl-print-document .damage-estimate-print-report,
body.mtl-repair-print-document .repair-completion-print-report {
  width: 100% !important;
  max-width: 100% !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

body.mtl-print-document .damage-estimate-print-page-main,
body.mtl-repair-print-document .repair-completion-print-report {
  border: 1px solid #111111 !important;
  padding: 12px !important;
  margin: 0 auto 12px !important;
  background: #ffffff !important;
}

body.mtl-print-document .damage-estimate-section,
body.mtl-print-document .damage-estimate-print-page-photos,
body.mtl-print-document .damage-estimate-evidence-section,
body.mtl-print-document .damage-estimate-evidence-group {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 12px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.mtl-print-document .damage-estimate-photo-card,
body.mtl-repair-print-document .repair-print-photo-card {
  border: 1px solid #222222 !important;
  background: #ffffff !important;
  color: #111111 !important;
  padding: 6px !important;
  margin: 0 !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

body.mtl-print-document .damage-estimate-photo-frame,
body.mtl-repair-print-document .repair-print-photo-frame {
  border: 0 !important;
  width: 100% !important;
  height: auto !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

body.mtl-print-document .damage-estimate-photo-card img,
body.mtl-print-document .damage-estimate-photo-frame img,
body.mtl-repair-print-document .repair-print-photo-frame img {
  display: block !important;
  width: 100% !important;
  height: 210px !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #ffffff !important;
  border: 0 !important;
}

body.mtl-print-document .damage-estimate-brand-header,
body.mtl-repair-print-document .repair-print-brand {
  min-height: 72px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 30px !important;
  padding: 12px 18px !important;
  background: #06101a !important;
  color: #ffffff !important;
  border: 2px solid #06101a !important;
  border-bottom: 5px solid #16bdd2 !important;
  text-align: center !important;
}

body.mtl-print-document .damage-estimate-brand-line {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 30px !important;
  width: 100% !important;
}

body.mtl-print-document .estimateLogo,
body.mtl-repair-print-document .repair-print-brand img {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.mtl-print-document .estimateLogo img,
body.mtl-repair-print-document .repair-print-brand img {
  display: block !important;
  max-width: 160px !important;
  max-height: 52px !important;
  object-fit: contain !important;
}

body.mtl-print-document .damage-estimate-brand-line strong,
body.mtl-repair-print-document .repair-print-brand strong {
  color: #ffffff !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

body.mtl-print-document .damage-estimate-report-title,
body.mtl-repair-print-document .repair-print-title {
  margin: 0 0 16px !important;
  padding: 10px 12px !important;
  background: #f2f2f2 !important;
  color: #000000 !important;
  border: 2px solid #111111 !important;
  border-top: 0 !important;
  text-align: center !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

body.mtl-print-document .damage-estimate-meta-table,
body.mtl-print-document .damage-estimate-table,
body.mtl-repair-print-document .repair-print-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin: 0 0 16px !important;
  background: #ffffff !important;
  color: #111111 !important;
}

body.mtl-print-document .damage-estimate-meta-table th,
body.mtl-print-document .damage-estimate-meta-table td,
body.mtl-print-document .damage-estimate-table th,
body.mtl-print-document .damage-estimate-table td,
body.mtl-repair-print-document .repair-print-table th,
body.mtl-repair-print-document .repair-print-table td {
  border: 1.5px solid #111111 !important;
  background: #ffffff !important;
  color: #111111 !important;
  padding: 7px 8px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
  vertical-align: top !important;
  overflow-wrap: anywhere !important;
}

body.mtl-print-document .damage-estimate-meta-table th,
body.mtl-print-document .damage-estimate-table th,
body.mtl-repair-print-document .repair-print-table th {
  background: #eeeeee !important;
  color: #000000 !important;
  font-weight: 900 !important;
  text-align: center !important;
}

body.mtl-print-document .damage-estimate-meta-table th {
  text-align: left !important;
  width: 125px !important;
}

body.mtl-print-document .damage-estimate-meta-table td,
body.mtl-repair-print-document .repair-print-meta .value {
  font-weight: 800 !important;
}

body.mtl-print-document .damage-estimate-table th:nth-child(1),
body.mtl-print-document .damage-estimate-table td:nth-child(1) { width: 7%; text-align: center !important; }
body.mtl-print-document .damage-estimate-table th:nth-child(2),
body.mtl-print-document .damage-estimate-table td:nth-child(2) { width: 34%; text-align: left !important; }
body.mtl-print-document .damage-estimate-table th:nth-child(3),
body.mtl-print-document .damage-estimate-table td:nth-child(3) { width: 11%; text-align: center !important; }
body.mtl-print-document .damage-estimate-table th:nth-child(4),
body.mtl-print-document .damage-estimate-table td:nth-child(4) { width: 15%; text-align: center !important; }
body.mtl-print-document .damage-estimate-table th:nth-child(5),
body.mtl-print-document .damage-estimate-table td:nth-child(5),
body.mtl-print-document .damage-estimate-table th:nth-child(6),
body.mtl-print-document .damage-estimate-table td:nth-child(6),
body.mtl-print-document .damage-estimate-table th:nth-child(7),
body.mtl-print-document .damage-estimate-table td:nth-child(7) { width: 7%; text-align: right !important; }
body.mtl-print-document .damage-estimate-table th:nth-child(8),
body.mtl-print-document .damage-estimate-table td:nth-child(8) { width: 12%; text-align: right !important; }

body.mtl-print-document .damage-estimate-table tfoot td,
body.mtl-repair-print-document .repair-print-table tfoot td {
  background: #eeeeee !important;
  color: #000000 !important;
  font-weight: 900 !important;
  font-size: 15px !important;
}

body.mtl-print-document .damage-estimate-blank-row td {
  height: 28px !important;
}

body.mtl-print-document .damage-estimate-section,
body.mtl-print-document .damage-estimate-print-page-photos,
body.mtl-repair-print-document .repair-print-photo-section,
body.mtl-repair-print-document .repair-print-notes {
  border: 0 !important;
  background: transparent !important;
  color: #111111 !important;
  padding: 0 !important;
  margin: 0 0 14px !important;
  break-inside: auto !important;
  page-break-inside: auto !important;
}

body.mtl-print-document .damage-estimate-section h2,
body.mtl-print-document .damage-estimate-print-page-photos h2,
body.mtl-repair-print-document .repair-print-photo-section h3,
body.mtl-repair-print-document .repair-print-notes h3 {
  margin: 0 0 12px !important;
  padding: 8px 10px !important;
  background: #eeeeee !important;
  color: #000000 !important;
  border: 1.5px solid #111111 !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  text-transform: uppercase !important;
}

body.mtl-print-document .damage-estimate-evidence-section,
body.mtl-print-document .damage-estimate-evidence-group {
  display: block !important;
}

body.mtl-print-document .damage-estimate-evidence-group {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 14px !important;
  break-inside: auto !important;
  page-break-inside: auto !important;
}

body.mtl-print-document .damage-estimate-evidence-meta,
body.mtl-repair-print-document .repair-print-meta {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border-top: 1.5px solid #111111 !important;
  border-left: 1.5px solid #111111 !important;
  margin: 0 0 12px !important;
}

body.mtl-repair-print-document .repair-print-meta {
  grid-template-columns: 125px minmax(0, 1fr) 125px minmax(0, 1fr) !important;
}

body.mtl-print-document .damage-estimate-evidence-meta div,
body.mtl-repair-print-document .repair-print-meta .label,
body.mtl-repair-print-document .repair-print-meta .value {
  border-right: 1.5px solid #111111 !important;
  border-bottom: 1.5px solid #111111 !important;
  background: #ffffff !important;
  color: #111111 !important;
  padding: 7px 8px !important;
  min-height: 34px !important;
}

body.mtl-print-document .damage-estimate-evidence-meta span,
body.mtl-print-document .damage-estimate-evidence-meta b {
  display: block !important;
  color: #111111 !important;
}

body.mtl-print-document .damage-estimate-evidence-meta span,
body.mtl-repair-print-document .repair-print-meta .label {
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body.mtl-print-document .damage-estimate-evidence-meta b,
body.mtl-repair-print-document .repair-print-meta .value {
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.mtl-print-document .damage-estimate-photo-grid,
body.mtl-repair-print-document .repair-print-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  align-items: start !important;
}

body.mtl-print-document .damage-estimate-photo-card,
body.mtl-repair-print-document .repair-print-photo-card {
  border: 1px solid #222222 !important;
  background: #ffffff !important;
  color: #111111 !important;
  padding: 6px !important;
  margin: 0 !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

body.mtl-print-document .damage-estimate-photo-frame,
body.mtl-repair-print-document .repair-print-photo-frame {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  background: #ffffff !important;
  border: 0 !important;
  overflow: hidden !important;
}

body.mtl-print-document .damage-estimate-photo-card img,
body.mtl-print-document .damage-estimate-photo-frame img,
body.mtl-repair-print-document .repair-print-photo-frame img {
  display: block !important;
  width: 100% !important;
  height: 210px !important;
  max-width: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #ffffff !important;
  border: 0 !important;
}

body.mtl-print-document .damage-estimate-photo-card figcaption,
body.mtl-repair-print-document .repair-print-photo-card figcaption {
  margin-top: 7px !important;
  color: #111111 !important;
  background: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  text-align: center !important;
}

@media print {
  body.mtl-print-document .damage-estimate-print-page,
  body.mtl-repair-print-document .repair-completion-print-report {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  body.mtl-repair-print-document .repair-print-photo-section {
    break-before: page !important;
    page-break-before: always !important;
  }

  body.mtl-repair-completion-document .repairCompletionPhotoGrid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: 58mm !important;
    gap: 3mm !important;
  }

  body.mtl-repair-completion-document .repairCompletionPhotoCard {
    min-height: 0 !important;
    height: 58mm !important;
    max-height: 58mm !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
  }

  body.mtl-repair-completion-document .repairCompletionPhotoFrame {
    min-height: 0 !important;
    height: 48mm !important;
    max-height: 48mm !important;
    overflow: hidden !important;
  }

  body.mtl-repair-completion-document .repairCompletionPhotoFrame img {
    width: 100% !important;
    height: 48mm !important;
    max-width: 100% !important;
    max-height: 48mm !important;
    object-fit: contain !important;
    transform: none !important;
  }
}

/* === CSP-safe EIR/Yard isolated print document === */
body.mtl-yard-print-document {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 9pt !important;
  line-height: 1.2 !important;
  overflow: visible !important;
}

body.mtl-yard-print-document .estimateSheet,
body.mtl-yard-print-document .programPrintSheet {
  width: 194mm !important;
  max-width: 194mm !important;
  min-width: 194mm !important;
  margin: 0 auto !important;
  padding: 4mm !important;
  border: 0.35mm solid #111111 !important;
  background: #ffffff !important;
  color: #111111 !important;
  box-sizing: border-box !important;
}

body.mtl-yard-print-document .standardReportHeader {
  width: 100% !important;
  margin: 0 0 3mm !important;
  border: 0.35mm solid #06101a !important;
  background: #06101a !important;
  display: block !important;
  box-sizing: border-box !important;
}

body.mtl-yard-print-document .estimateBrand {
  min-height: 23mm !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8mm !important;
  padding: 2.5mm 5mm !important;
  background: #06101a !important;
  color: #ffffff !important;
  border: 0 !important;
  border-bottom: 1.6mm solid #16bdd2 !important;
  box-sizing: border-box !important;
}

body.mtl-yard-print-document .estimateLogo {
  min-width: 44mm !important;
  height: 17mm !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.mtl-yard-print-document .estimateLogo img {
  display: block !important;
  max-width: 44mm !important;
  max-height: 16mm !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  filter: none !important;
}

body.mtl-yard-print-document .estimateBrand strong {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  font-size: 20pt !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

body.mtl-yard-print-document .estimateTitle {
  margin: 0 !important;
  padding: 2.5mm 2mm !important;
  border: 0 !important;
  background: #eef3f7 !important;
  color: #111111 !important;
  text-align: center !important;
  font-size: 15pt !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

body.mtl-yard-print-document .standardReportSubtitle { display: none !important; }

body.mtl-yard-print-document .estimateMeta,
body.mtl-yard-print-document .programPrintMeta {
  display: grid !important;
  grid-template-columns: 28mm minmax(0, 1fr) 28mm minmax(0, 1fr) !important;
  width: 100% !important;
  margin: 0 0 3mm !important;
  border-top: 1.2px solid #334e68 !important;
  border-left: 1.2px solid #334e68 !important;
  background: #ffffff !important;
}

body.mtl-yard-print-document .estimateMeta .label,
body.mtl-yard-print-document .estimateMeta .value {
  min-width: 0 !important;
  min-height: 7mm !important;
  display: flex !important;
  align-items: center !important;
  padding: 1.3mm 1.8mm !important;
  border-right: 1.2px solid #334e68 !important;
  border-bottom: 1.2px solid #334e68 !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-size: 8pt !important;
  line-height: 1.15 !important;
  overflow-wrap: anywhere !important;
}

body.mtl-yard-print-document .estimateMeta .label {
  background: #eef3f7 !important;
  color: #173d5c !important;
  font-weight: 900 !important;
}

body.mtl-yard-print-document .estimateMeta .value { font-weight: 800 !important; }
body.mtl-yard-print-document .estimateMeta .yardMetaWide { grid-column: span 3 !important; }

body.mtl-yard-print-document .estimateTable,
body.mtl-yard-print-document .programPrintTable {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  margin: 0 !important;
  border: 1.4px solid #243b53 !important;
  background: #ffffff !important;
  color: #111111 !important;
}

body.mtl-yard-print-document .estimateTable th,
body.mtl-yard-print-document .estimateTable td {
  min-width: 0 !important;
  border: 1.05px solid #465b70 !important;
  padding: 1.2mm 1mm !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-size: 7.8pt !important;
  line-height: 1.16 !important;
  vertical-align: middle !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  white-space: normal !important;
}

body.mtl-yard-print-document .estimateTable:not(.eirChecklistTable):not(.eirDetailedPrintTable) th:nth-child(2),
body.mtl-yard-print-document .estimateTable:not(.eirChecklistTable):not(.eirDetailedPrintTable) td:nth-child(2),
body.mtl-yard-print-document .estimateTable .yard-print-cno {
  width: 32mm !important;
  min-width: 32mm !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  word-wrap: normal !important;
  font-family: "Courier New", Courier, monospace !important;
  font-size: 8pt !important;
  letter-spacing: 0 !important;
}

body.mtl-yard-print-document .estimateTable th {
  background: #dfe8f0 !important;
  color: #102a43 !important;
  font-weight: 900 !important;
  text-align: center !important;
  border-color: #243b53 !important;
}

body.mtl-yard-print-document .estimatePhotos {
  width: 100% !important;
  margin-top: 5mm !important;
  break-inside: auto !important;
  page-break-inside: auto !important;
}

body.mtl-yard-print-document .estimatePhotos h3,
body.mtl-yard-print-document .eirPrintSectionTitle,
body.mtl-yard-print-document .eirPrintRemarks h3 {
  margin: 0 0 2mm !important;
  padding: 1.8mm 2mm !important;
  border: 0.3mm solid #334e68 !important;
  background: #eef3f7 !important;
  color: #102a43 !important;
  font-size: 11pt !important;
  line-height: 1.12 !important;
  font-weight: 900 !important;
  break-after: avoid !important;
  page-break-after: avoid !important;
}

body.mtl-yard-print-document .reportPhotos,
body.mtl-yard-print-document .eirPrintPhotoGrid,
body.mtl-yard-print-document .programPrintPhotos,
body.mtl-yard-print-document .repairCyclePrintPhotos .reportPhotos {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4mm !important;
  width: 100% !important;
  align-items: start !important;
}

body.mtl-yard-print-document .photo-report-card {
  min-width: 0 !important;
  min-height: 88mm !important;
  margin: 0 !important;
  padding: 2mm !important;
  border: 0.35mm solid #111111 !important;
  background: #ffffff !important;
  color: #111111 !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
  overflow: hidden !important;
}

body.mtl-yard-print-document .photo-report-card img {
  display: block !important;
  width: 100% !important;
  height: 78mm !important;
  max-width: 100% !important;
  max-height: 78mm !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #ffffff !important;
  transform: none !important;
}

body.mtl-yard-print-document .photo-report-card b {
  display: block !important;
  margin-top: 1.4mm !important;
  color: #111111 !important;
  font-size: 8.5pt !important;
  line-height: 1.15 !important;
  text-align: center !important;
  overflow-wrap: anywhere !important;
}

body.mtl-yard-print-document .eir-row-print-photos {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 2mm !important;
  width: 100% !important;
  margin-top: 2mm !important;
}
body.mtl-yard-print-document .photo-report-card.eir-row-print-photo {
  min-height: 0 !important;
  width: 100% !important;
  padding: 1mm !important;
}
body.mtl-yard-print-document .eir-row-print-photo img {
  width: 100% !important;
  height: 42mm !important;
  max-height: 42mm !important;
  object-fit: contain !important;
}
body.mtl-yard-print-document .eirChecklistTable td,
body.mtl-yard-print-document .eirDetailedPrintTable td {
  color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important;
  font-size: 9pt !important;
}
body.mtl-yard-print-document .eirChecklistTable th,
body.mtl-yard-print-document .eirDetailedPrintTable th,
body.mtl-yard-print-document .eirPrintSectionTitle {
  color: #000000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 900 !important;
}
body.mtl-yard-print-document .eirPrintSignatures,
body.mtl-yard-print-document .eirPrintRemarks {
  margin-top: 4mm !important;
  border: 0.25mm solid #64748b !important;
  padding: 2mm !important;
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

@media print {
  body.mtl-yard-print-document,
  body.mtl-yard-print-document .estimateSheet,
  body.mtl-yard-print-document .programPrintSheet,
  body.mtl-yard-print-document .standardReportHeader,
  body.mtl-yard-print-document .estimateMeta,
  body.mtl-yard-print-document .estimateTable,
  body.mtl-yard-print-document .photo-report-card {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
/* === Approved Ocean mockup restyle (Login / Dashboard / Gate-In) - visual only, screen-only === */
@media screen {
  :root {
    --ocean-bg: #101820;
    --ocean-panel: #17212C;
    --ocean-panel-2: #1E2A37;
    --ocean-ink: #EDEFF2;
    --ocean-muted: #8B96A3;
    --ocean-line: #2B3846;
    --ocean-steel: #3E7BC4;
    --ocean-steel-dim: #3E7BC41c;
    --ocean-teal: #2FA396;
    --ocean-teal-dim: #2FA39620;
    --ocean-amber: #D9A441;
    --ocean-amber-dim: #D9A44120;
    --ocean-rust: #D2685A;
    --ocean-rust-dim: #D2685A1c;
    --ocean-green: #4FA87C;
    --ocean-green-dim: #4FA87C1c;
    --ocean-radius: 11px;
  }

  html,
  body {
    background: var(--ocean-bg) !important;
    color: var(--ocean-ink) !important;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif !important;
  }

  #loginScreen,
  #loginScreen.login-screen,
  .login-screen {
    background: var(--ocean-bg) !important;
    color: var(--ocean-ink) !important;
    font-family: "IBM Plex Sans", sans-serif !important;
  }

  #loginScreen .login-card,
  .login-card,
  #loginScreen .customer-card {
    background: var(--ocean-panel) !important;
    color: var(--ocean-ink) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: var(--ocean-radius) !important;
    box-shadow: 0 24px 48px -16px #000000a0 !important;
  }

  #loginScreen .login-company,
  #loginScreen .login-card label,
  #loginScreen .login-card p,
  #loginScreen .login-card span,
  #loginScreen .login-card b,
  #loginScreen .login-card h1 {
    color: var(--ocean-ink) !important;
    font-family: "IBM Plex Sans", sans-serif !important;
  }

  #loginScreen .login-company {
    font-family: "Space Grotesk", sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
  }

  #loginScreen .login-tab,
  #loginScreen .login-card .login-tab {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-muted) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
  }

  #loginScreen .login-tab.active,
  #loginScreen .login-card .login-tab.active {
    background: var(--ocean-steel) !important;
    color: #ffffff !important;
    border-color: var(--ocean-steel) !important;
  }

  #loginScreen input,
  #loginScreen select,
  #loginScreen textarea {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-ink) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: 8px !important;
  }

  #loginScreen .btn.primary,
  #loginScreen button.btn.primary {
    background: var(--ocean-steel) !important;
    border-color: var(--ocean-steel) !important;
    color: #ffffff !important;
  }

  #loginScreen .link-btn {
    color: var(--ocean-teal) !important;
  }

  #appScreen,
  #appScreen .screen,
  #appScreen .work-area,
  #appScreen .app-work-area,
  #appScreen .staff-layout,
  #appScreen main,
  #appScreen .staff-content,
  #appScreen .wrap,
  #appScreen .panel-area,
  #appScreen .page-body {
    background: var(--ocean-bg) !important;
    color: var(--ocean-ink) !important;
    font-family: "IBM Plex Sans", sans-serif !important;
  }

  #appScreen .top,
  #appScreen header.top,
  #appScreen .staff-topbar {
    background: var(--ocean-bg) !important;
    color: var(--ocean-ink) !important;
    border-bottom: 1px solid var(--ocean-line) !important;
    box-shadow: none !important;
  }

  #appScreen .top h1,
  #appScreen .mtl-header-brand-name,
  #appScreen .app-page-heading h2,
  #appScreen #appShellTitle,
  #dashboardPanel .section-head h2,
  #yardPanel .section-head h2 {
    font-family: "Space Grotesk", sans-serif !important;
    font-weight: 600 !important;
    color: var(--ocean-ink) !important;
  }

  #appScreen .app-page-heading p,
  #appScreen #appShellHelp,
  #appScreen .page-eyebrow,
  #appScreen #appShellBreadcrumb {
    color: var(--ocean-muted) !important;
  }

  #appScreen .staff-layout {
    display: grid !important;
    grid-template-columns: 220px minmax(0, 1fr) !important;
    background: var(--ocean-bg) !important;
    min-height: calc(100vh - 72px) !important;
  }

  #appScreen .app-sidebar,
  #appScreen .staff-layout > .app-sidebar {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    height: auto !important;
    min-height: calc(100vh - 72px) !important;
    padding: 18px 12px !important;
    background: var(--ocean-panel) !important;
    border-right: 1px solid var(--ocean-line) !important;
    color: var(--ocean-ink) !important;
    box-shadow: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    top: 0 !important;
  }

  #appScreen .sidebar-brand-block {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 0 20px !important;
    padding: 6px 8px !important;
    place-items: unset !important;
  }

  #appScreen .sidebar-logo {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    background: linear-gradient(135deg, var(--ocean-steel), var(--ocean-teal)) !important;
    border: 0 !important;
    flex-shrink: 0 !important;
  }

  #appScreen .sidebar-brand-block > div:not(.sidebar-logo),
  #appScreen .sidebar-kicker,
  #appScreen .sidebar-brand-block strong,
  #appScreen .nav-group-title {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
  }

  #appScreen .sidebar-kicker {
    display: block !important;
    font-size: 9.5px !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: var(--ocean-muted) !important;
  }

  #appScreen .sidebar-brand-block strong {
    display: block !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: var(--ocean-ink) !important;
    line-height: 1.3 !important;
  }

  #appScreen .app-nav,
  #appScreen .nav-group {
    display: block !important;
    justify-items: stretch !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
  }

  #appScreen .nav-group-title {
    display: block !important;
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--ocean-muted) !important;
    font-weight: 600 !important;
    padding: 0 10px !important;
    margin: 0 0 7px !important;
  }

  #appScreen .app-nav-link,
  #appScreen .app-nav-link.tab,
  #appScreen .app-nav-link.case-subtab {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 10px !important;
    margin: 0 0 1px !important;
    border-radius: 7px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--ocean-muted) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #appScreen .app-nav-link .nav-icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
    color: currentColor !important;
  }

  #appScreen .app-nav-link .nav-link-text {
    display: inline !important;
    font-size: 13px !important;
    font-family: "IBM Plex Sans", sans-serif !important;
    font-weight: inherit !important;
    color: inherit !important;
    white-space: nowrap !important;
  }

  #appScreen .app-nav-link .nav-label {
    display: none !important;
  }

  #appScreen .app-nav-link:hover,
  #appScreen .app-nav-link:focus-visible {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-ink) !important;
  }

  #appScreen .app-nav-link.active,
  #appScreen .app-nav-link.tab.active,
  #appScreen .app-nav-link.case-subtab.active {
    background: var(--ocean-steel-dim) !important;
    color: var(--ocean-steel) !important;
    font-weight: 600 !important;
  }

  #appScreen .header-icon-btn,
  #appScreen .header-user-btn {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-ink) !important;
    border: 1px solid var(--ocean-line) !important;
  }

  #appScreen .header-avatar {
    background: var(--ocean-steel) !important;
    color: #ffffff !important;
  }

  #appScreen .panel,
  #appScreen .module-panel,
  #appScreen .card,
  #appScreen .dashboard-history-card,
  #appScreen .ui-list-pane,
  #appScreen .ui-detail-pane,
  #appScreen .intake-queue,
  #appScreen .intake-step-panel,
  #appScreen .inbound-batch-list-pane,
  #appScreen .inbound-batch-detail-pane {
    background: var(--ocean-panel) !important;
    color: var(--ocean-ink) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: var(--ocean-radius) !important;
  }

  #appScreen .section-head h2,
  #appScreen .section-head h3,
  #appScreen .section-subhead,
  #appScreen .card h2,
  #appScreen .card h3 {
    color: var(--ocean-ink) !important;
    font-family: "Space Grotesk", sans-serif !important;
  }

  #appScreen input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  #appScreen select,
  #appScreen textarea,
  #appScreen .search {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-ink) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: 8px !important;
  }

  #appScreen input:read-only,
  #yardPanel #yardStatus {
    color: var(--ocean-muted) !important;
    background: #1a232c !important;
  }

  #appScreen .btn.primary {
    background: var(--ocean-steel) !important;
    border-color: var(--ocean-steel) !important;
    color: #ffffff !important;
  }

  #appScreen .btn.gray,
  #appScreen .btn.ghost {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-ink) !important;
    border: 1px solid var(--ocean-line) !important;
  }

  #appScreen .btn.red,
  #appScreen .btn.danger,
  #yardPanel #deleteGateInIntakeBtn {
    background: var(--ocean-rust-dim) !important;
    color: var(--ocean-rust) !important;
    border: 1px solid #D2685A40 !important;
  }

  #appScreen .btn.green {
    background: var(--ocean-green-dim) !important;
    color: var(--ocean-green) !important;
    border: 1px solid #4FA87C40 !important;
  }

  #appScreen .pill {
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-muted) !important;
    border: 1px solid var(--ocean-line) !important;
  }

  #appScreen .mono-data,
  #appScreen #yardContainerNo,
  #appScreen .yard-card-head b,
  #appScreen .record-card b {
    font-family: "IBM Plex Mono", ui-monospace, monospace !important;
  }

  /* Reusable info tooltip */
  .info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 5px;
    z-index: 1;
  }

  .info-tip-icon {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid var(--ocean-muted);
    color: var(--ocean-muted);
    font-size: 9px;
    font-weight: 700;
    font-style: normal;
    font-family: "IBM Plex Sans", sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: default;
    flex-shrink: 0;
  }

  .info-tip-bubble {
    display: none;
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    width: 260px;
    background: var(--ocean-panel-2);
    border: 1px solid var(--ocean-steel);
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 400;
    color: var(--ocean-muted);
    line-height: 1.5;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    z-index: 140;
    box-shadow: 0 12px 28px -8px #000000a0, 0 0 0 1px #00000040;
    pointer-events: none;
    white-space: normal;
  }

  .info-tip-bubble::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 14px;
    width: 9px;
    height: 9px;
    background: var(--ocean-panel-2);
    border-left: 1px solid var(--ocean-steel);
    border-top: 1px solid var(--ocean-steel);
    transform: rotate(45deg);
  }

  .info-tip-bubble b {
    display: block;
    color: var(--ocean-ink);
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 700;
  }

  .info-tip:hover,
  .info-tip:focus-within {
    z-index: 150;
  }

  .info-tip:hover .info-tip-bubble,
  .info-tip:focus-within .info-tip-bubble {
    display: block;
  }

  #yardPanel label.field:has(.info-tip) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px 8px !important;
  }

  #yardPanel label.field:has(.info-tip) > input,
  #yardPanel label.field:has(.info-tip) > select,
  #yardPanel label.field:has(.info-tip) > textarea,
  #yardPanel label.field:has(.info-tip) > small {
    flex: 1 0 100% !important;
    width: 100% !important;
  }

  /* Dashboard groups */
  #dashboardPanel {
    overflow: visible !important;
    overflow-x: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #dashboardPanel .dash-stat-groups {
    display: block;
  }

  #dashboardPanel .ocean-group-label {
    font-size: 11px !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--ocean-muted) !important;
    font-weight: 600 !important;
    margin: 22px 0 10px !important;
    font-family: "IBM Plex Sans", sans-serif !important;
  }

  #dashboardPanel .dash-stat-groups > .ocean-group-label:first-child {
    margin-top: 0 !important;
  }

  #dashboardPanel .dash-grid,
  #dashboardPanel .dashboard-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
    overflow: visible !important;
  }

  #dashboardPanel .dash-grid-export {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 1fr)) !important;
  }

  #dashboardPanel .dash-grid-export .dash-card {
    grid-column: 1 / 2;
  }

  #dashboardPanel .dash-card,
  #appScreen #dashboardPanel .dash-card {
    position: relative !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    background: var(--ocean-panel) !important;
    color: var(--ocean-muted) !important;
    border: 1px solid var(--ocean-line) !important;
    border-top: 1px solid var(--ocean-line) !important;
    border-radius: var(--ocean-radius) !important;
    padding: 15px 16px !important;
    box-shadow: none !important;
    text-align: left !important;
  }

  #dashboardPanel .dash-card:hover {
    border-color: var(--ocean-steel) !important;
    transform: translateY(-1px);
    z-index: 40 !important;
  }

  #dashboardPanel .dash-card[data-yard-print-report],
  #dashboardPanel .dash-card[data-eir-print-report],
  #dashboardPanel .dash-card[data-case-print-report],
  #dashboardPanel .dash-card[data-repair-print-report],
  #dashboardPanel .dash-card[data-repair-completed-menu],
  #dashboardPanel .dash-card[data-export-cro-menu] {
    cursor: pointer !important;
  }

  #dashboardPanel .dash-card[data-yard-print-report]:hover,
  #dashboardPanel .dash-card[data-eir-print-report]:hover,
  #dashboardPanel .dash-card[data-case-print-report]:hover,
  #dashboardPanel .dash-card[data-repair-print-report]:hover,
  #dashboardPanel .dash-card[data-repair-completed-menu]:hover,
  #dashboardPanel .dash-card[data-export-cro-menu]:hover {
    border-color: var(--ocean-steel) !important;
    box-shadow: 0 2px 8px rgba(6, 16, 26, 0.12) !important;
  }

  #dashboardPanel .dash-card[data-yard-print-report] .info-tip,
  #dashboardPanel .dash-card[data-yard-print-report] .info-tip-icon,
  #dashboardPanel .dash-card[data-eir-print-report] .info-tip,
  #dashboardPanel .dash-card[data-eir-print-report] .info-tip-icon,
  #dashboardPanel .dash-card[data-case-print-report] .info-tip,
  #dashboardPanel .dash-card[data-case-print-report] .info-tip-icon,
  #dashboardPanel .dash-card[data-repair-print-report] .info-tip,
  #dashboardPanel .dash-card[data-repair-print-report] .info-tip-icon,
  #dashboardPanel .dash-card[data-repair-completed-menu] .info-tip,
  #dashboardPanel .dash-card[data-repair-completed-menu] .info-tip-icon,
  #dashboardPanel .dash-card[data-export-cro-menu] .info-tip,
  #dashboardPanel .dash-card[data-export-cro-menu] .info-tip-icon {
    cursor: help !important;
  }

  #dashboardPanel .dash-card-label {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 11.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    color: var(--ocean-muted) !important;
    margin-bottom: 8px !important;
  }

  #dashboardPanel .dash-card > b {
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 27px !important;
    font-weight: 600 !important;
    color: var(--ocean-ink) !important;
  }

  #dashboardPanel .dash-card.dash-tone-green > b { color: var(--ocean-green) !important; }
  #dashboardPanel .dash-card.dash-tone-amber > b { color: var(--ocean-amber) !important; }
  #dashboardPanel .dash-card.dash-tone-rust > b { color: var(--ocean-rust) !important; }
  #dashboardPanel .dash-card.dash-tone-teal > b { color: var(--ocean-teal) !important; }
  #dashboardPanel .dash-card.dash-tone-steel > b { color: var(--ocean-ink) !important; }

  #dashboardPanel .dash-card .info-tip {
    position: relative !important;
  }

  #dashboardPanel .dash-card .info-tip-bubble {
    top: calc(100% + 6px);
    left: 0;
    width: 200px;
  }

  #dashboardPanel .dash-card:hover .info-tip-bubble {
    display: block;
  }

  #dashboardPanel .dashboard-history-card {
    margin-top: 22px !important;
    padding: 18px !important;
  }

  #dashboardPanel .dashboard-history-help {
    color: var(--ocean-muted) !important;
    font-size: 12.5px !important;
  }

  #appScreen .staff-content,
  #appScreen .wrap,
  #appScreen .work-area,
  #appScreen .app-work-area {
    overflow: visible !important;
  }
  #yardPanel {
    overflow: visible !important;
    overflow-x: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #yardPanel .mode-selector {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
  }

  #yardPanel .mode-btn {
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-muted) !important;
    border: 1px solid var(--ocean-line) !important;
  }

  #yardPanel .mode-btn.active {
    background: var(--ocean-steel) !important;
    color: #ffffff !important;
    border-color: var(--ocean-steel) !important;
  }

  #yardPanel .yard-stats,
  #yardPanel .module-kpi-row {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }

  #yardPanel .yard-stat {
    flex: 1 !important;
    background: var(--ocean-panel) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: var(--ocean-radius) !important;
    padding: 13px 16px !important;
    text-align: left !important;
    color: var(--ocean-ink) !important;
  }

  #yardPanel .yard-stat .kpi-label {
    display: block !important;
    font-size: 11px !important;
    color: var(--ocean-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
  }

  #yardPanel .yard-stat b {
    display: block !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    margin-top: 3px !important;
    color: var(--ocean-ink) !important;
  }

  #yardPanel .yard-stat.active {
    border-color: var(--ocean-steel) !important;
    background: var(--ocean-steel-dim) !important;
  }

  #yardPanel .intake-stepper {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
  }

  #yardPanel .intake-step {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    border-radius: 9px !important;
    border: 1px solid var(--ocean-line) !important;
    background: var(--ocean-panel) !important;
    color: var(--ocean-ink) !important;
  }

  #yardPanel .intake-step.active {
    border-color: var(--ocean-steel) !important;
    background: var(--ocean-steel-dim) !important;
  }

  #yardPanel .intake-step b {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--ocean-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-family: "IBM Plex Mono", monospace !important;
    font-weight: 500 !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    color: var(--ocean-ink) !important;
  }

  #yardPanel .intake-step.active b {
    background: var(--ocean-steel) !important;
    border-color: var(--ocean-steel) !important;
    color: #ffffff !important;
  }

  #yardPanel .intake-step span {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--ocean-ink) !important;
  }

  #yardPanel .yard-layout,
  #yardPanel .inbound-batch-layout {
    gap: 16px !important;
  }

  #yardPanel .yard-list-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #yardPanel .yard-list-filters .btn {
    grid-column: 1 / -1;
  }

  #yardPanel .case-item,
  #yardPanel .record-card,
  #yardPanel .yard-case-item {
    background: transparent !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: 8px !important;
    padding: 10px 11px !important;
    margin-bottom: 7px !important;
  }

  #yardPanel .case-item.active,
  #yardPanel .yard-case-item.active {
    border-color: var(--ocean-steel) !important;
    background: var(--ocean-steel-dim) !important;
  }

  #yardPanel .yard-condition-badge {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 9px !important;
    text-transform: uppercase !important;
  }

  #yardPanel .yard-condition-badge.sound,
  #yardPanel .yard-case-item.sound .yard-condition-badge {
    background: var(--ocean-green-dim) !important;
    color: var(--ocean-green) !important;
  }

  #yardPanel .yard-condition-badge.damage,
  #yardPanel .yard-case-item.damage .yard-condition-badge,
  #yardPanel .yard-condition-badge.damaged {
    background: var(--ocean-rust-dim) !important;
    color: var(--ocean-rust) !important;
  }

  #yardPanel .yard-condition-badge.dirty,
  #yardPanel .yard-case-item.dirty .yard-condition-badge {
    background: var(--ocean-amber-dim) !important;
    color: var(--ocean-amber) !important;
  }

  #yardPanel .filter-row .btn {
    border-radius: 14px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    background: var(--ocean-panel-2) !important;
    color: var(--ocean-muted) !important;
    border: 1px solid var(--ocean-line) !important;
  }

  #yardPanel .filter-row .btn.active {
    background: var(--ocean-steel) !important;
    color: #ffffff !important;
    border-color: var(--ocean-steel) !important;
  }

  #yardPanel .inbound-progress-grid > *,
  #yardPanel .progress-cell {
    background: var(--ocean-panel-2) !important;
    border: 1px solid var(--ocean-line) !important;
    border-radius: 9px !important;
  }

  #appScreen .stats .card,
  #appScreen .card.stat {
    background: var(--ocean-panel) !important;
    color: var(--ocean-muted) !important;
    border: 1px solid var(--ocean-line) !important;
    border-top: 1px solid var(--ocean-line) !important;
    border-radius: var(--ocean-radius) !important;
  }

  #appScreen .stats .card b,
  #appScreen .card.stat b {
    color: var(--ocean-ink) !important;
    font-family: "Space Grotesk", sans-serif !important;
  }

  @media (max-width: 900px) {
    #dashboardPanel .dash-grid,
    #dashboardPanel .dashboard-kpi-grid,
    #dashboardPanel .dash-grid-export {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #dashboardPanel .dash-grid-export .dash-card {
      grid-column: auto;
    }
  }

  @media (max-width: 820px) {
    #appScreen .staff-layout {
      grid-template-columns: 220px minmax(0, 1fr) !important;
    }
  }
}

@media print {
  .info-tip,
  .info-tip-bubble {
    display: none !important;
  }
}

/* Sidebar labels were clipped by leftover 76px rail rules; active item was forced white. */
@media screen {
  html body #appScreen .staff-layout {
    grid-template-columns: 240px minmax(0, 1fr) !important;
  }

  html body #appScreen .app-sidebar,
  html body #appScreen .staff-layout > .app-sidebar {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    overflow-x: visible !important;
    overflow-y: auto !important;
    background: #17212C !important;
  }

  html body #appScreen .sidebar-brand-block {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    background: transparent !important;
  }

  html body #appScreen .sidebar-brand-block .sidebar-logo,
  html body #appScreen .sidebar-logo {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    background: linear-gradient(135deg, #3E7BC4, #2FA396) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  html body #appScreen .app-nav,
  html body #appScreen .nav-group,
  html body #appScreen .rail-menu-item {
    max-width: none !important;
    width: 100% !important;
    overflow: visible !important;
  }

  html body #appScreen .nav-group-title {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  html body #appScreen .app-sidebar .app-nav-link,
  html body #appScreen .app-sidebar .app-nav-link.tab,
  html body #appScreen .app-sidebar .app-nav-link.case-subtab,
  html body #appScreen button.app-nav-link.tab {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 36px !important;
    margin: 0 0 2px !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: #8B96A3 !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: none !important;
    font-size: 13px !important;
  }

  html body #appScreen .app-sidebar .app-nav-link .nav-icon {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
  }

  html body #appScreen .app-sidebar .nav-link-text {
    display: inline-block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    color: inherit !important;
  }

  html body #appScreen .app-sidebar .app-nav-link:hover,
  html body #appScreen .app-sidebar .app-nav-link:focus-visible {
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .app-sidebar .app-nav-link.active,
  html body #appScreen .app-sidebar .app-nav-link.tab.active,
  html body #appScreen .app-sidebar .app-nav-link.case-subtab.active,
  html body #appScreen button.app-nav-link.tab.active {
    background: #3E7BC41c !important;
    color: #3E7BC4 !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

@media screen {
  html body #appScreen .info-tip-bubble,
  html body #appScreen .dash-card .info-tip-bubble,
  html body #dashboardPanel .dash-card-label .info-tip-bubble {
    width: 196px !important;
    max-width: min(196px, calc(100vw - 24px)) !important;
    padding: 7px 9px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    color: #8B96A3 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: "IBM Plex Sans", sans-serif !important;
  }

  html body #appScreen .info-tip-bubble b,
  html body #appScreen .dash-card .info-tip-bubble b,
  html body #dashboardPanel .dash-card-label .info-tip-bubble b,
  html body #dashboardPanel .dash-card.dash-tone-rust .info-tip-bubble b,
  html body #dashboardPanel .dash-card.dash-tone-green .info-tip-bubble b,
  html body #dashboardPanel .dash-card.dash-tone-amber .info-tip-bubble b,
  html body #dashboardPanel .dash-card.dash-tone-teal .info-tip-bubble b {
    display: block !important;
    margin: 0 0 3px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #EDEFF2 !important;
    font-family: "IBM Plex Sans", sans-serif !important;
    text-transform: none !important;
  }

  html body #appScreen .dashboard-history-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
    gap: 12px !important;
  }

  html body #appScreen .dashboard-history-media {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .dashboard-history-media img,
  html body #appScreen .dashboard-history-file {
    width: 100% !important;
    height: 110px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
    background: #101820 !important;
  }

  html body #appScreen .dashboard-history-media-name,
  html body #appScreen .dashboard-history-media > b {
    display: block !important;
    min-height: 2.6em !important;
    max-height: 2.6em !important;
    overflow: hidden !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .dashboard-history-media-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: auto !important;
  }

  html body #appScreen .dashboard-history-media-actions .photo-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
  }
}

@media screen {
  html body #appScreen #eirPanel {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  html body #appScreen #eirPanel .section-head .pill {
    display: none !important;
  }

  html body #appScreen #eirPanel .yard-stats,
  html body #appScreen #eirPanel .module-kpi-row {
    display: flex !important;
    gap: 12px !important;
  }

  html body #appScreen #eirPanel .yard-stat {
    flex: 1 1 180px !important;
    min-width: 0 !important;
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    padding: 13px 16px !important;
    text-align: left !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #eirPanel .yard-stat .kpi-label {
    display: block !important;
    font-size: 11px !important;
    color: #8B96A3 !important;
    text-transform: uppercase !important;
  }

  html body #appScreen #eirPanel .yard-stat b {
    display: block !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #eirPanel .eir-size-summary {
    display: block !important;
    margin-top: 4px !important;
    color: #AEB7C2 !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  html body #appScreen #eirPanel .eir-size-summary strong {
    color: #EDEFF2 !important;
    font-weight: 600 !important;
  }

  html body #appScreen #eirPanel .eir-size-summary i {
    margin: 0 5px !important;
    color: #536274 !important;
    font-style: normal !important;
  }

  html body #appScreen #eirPanel .intake-stepper {
    display: flex !important;
    gap: 10px !important;
    margin: 16px 0 !important;
  }

  html body #appScreen #eirPanel .intake-step {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    border-radius: 9px !important;
    border: 1px solid #2B3846 !important;
    background: #17212C !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #eirPanel .intake-step.active {
    border-color: #3E7BC4 !important;
    background: #3E7BC41c !important;
  }

  html body #appScreen #eirPanel .eir-record-card {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 8px 10px !important;
    align-items: start !important;
    padding: 10px 11px !important;
    border: 1px solid #2B3846 !important;
    border-radius: 8px !important;
    background: transparent !important;
    margin-bottom: 7px !important;
  }

  html body #appScreen #eirPanel .eir-record-card.active {
    border-color: #3E7BC4 !important;
    background: #3E7BC41c !important;
  }

  html body #appScreen #eirPanel .eir-record-cno {
    display: block !important;
    font-family: "IBM Plex Mono", monospace !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #eirPanel .eir-record-line {
    display: block !important;
    font-size: 11.5px !important;
    color: #8B96A3 !important;
    line-height: 1.45 !important;
  }

  html body #appScreen #eirPanel .eir-k {
    display: inline-block !important;
    min-width: 32px !important;
    margin-right: 6px !important;
    color: #8B96A3 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
  }

  html body #appScreen #eirPanel .eir-empty-damage {
    padding: 16px 14px !important;
    border: 1px dashed #2B3846 !important;
    border-radius: 9px !important;
    background: #1E2A37 !important;
    color: #8B96A3 !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  html body #appScreen #eirPanel .eir-area-card {
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
  }

  html body #appScreen #eirPanel .eir-area-actions .btn {
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
  }

  html body #appScreen #eirPanel .eir-area-actions .btn.primary {
    background: #3E7BC4 !important;
    border-color: #3E7BC4 !important;
    color: #fff !important;
  }

  html body #appScreen #eirPhotoGrid,
  html body #appScreen #eirPhotoGrid .photos {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
    gap: 12px !important;
  }

  html body #appScreen #eirPhotoGrid .photo-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #eirPhotoGrid .photo-card > b {
    display: block !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #EDEFF2 !important;
    line-height: 1.3 !important;
  }

  html body #appScreen #eirPhotoGrid .photo-card img {
    width: 100% !important;
    height: 110px !important;
    object-fit: contain !important;
    background: #101820 !important;
    border: 0 !important;
    transform: none !important;
  }

  html body #appScreen #eirPhotoGrid .photo-empty-hint {
    min-height: 72px !important;
    display: grid !important;
    place-items: center !important;
    color: #8B96A3 !important;
    font-size: 12px !important;
    background: #101820 !important;
    border-radius: 8px !important;
  }

  html body #appScreen #eirPhotoGrid .photo-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: auto !important;
  }

  html body #appScreen #eirPhotoGrid .photo-actions .photo-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11.5px !important;
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
  }

  html body #appScreen #eirPhotoGrid .photo-actions .photo-action-btn.danger {
    grid-column: 1 / -1;
    color: #D2685A !important;
    border-color: #D2685A40 !important;
    background: #D2685A1c !important;
  }

  html body #appScreen #eirPhotoGrid .photo-upload-control {
    display: block !important;
    margin-top: auto !important;
  }

  html body #appScreen #eirPhotoGrid .photo-upload-control span {
    display: block !important;
    padding: 7px 8px !important;
    text-align: center !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    background: #3E7BC4 !important;
    color: #fff !important;
    border-radius: 8px !important;
    cursor: pointer !important;
  }

  html body #appScreen #eirPhotoGrid .photo-upload-control input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
  }
}

/* Remaining screens Ocean restyle — high specificity so leftover button/status rules cannot wash Pending to white. */
@media screen {
  html body #appScreen main.wrap,
  html body #appScreen .staff-content,
  html body #appScreen .stats {
    overflow: visible !important;
  }

  html body #appScreen .stats {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin: 0 0 16px !important;
    align-items: stretch !important;
  }

  html body #appScreen .stats button.card.stat:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen button.card.stat:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block) {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow: visible !important;
    min-height: 84px !important;
    height: auto !important;
    padding: 12px 14px 14px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    font-family: "IBM Plex Sans", sans-serif !important;
    letter-spacing: 0.02em !important;
    text-align: left !important;
    text-transform: none !important;
    white-space: normal !important;
    color: #8B96A3 !important;
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-top: 3px solid #3E7BC4 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    transform: none !important;
  }

  html body #appScreen .stats button.card.stat:not(.app-nav-link):not(.dash-card) > b,
  html body #appScreen button.card.stat:not(.app-nav-link):not(.dash-card) > b {
    display: block !important;
    margin: 0 !important;
    overflow: visible !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Pending Approval"]:not(.app-nav-link):not(.dash-card),
  html body #appScreen .stats button.card.stat:nth-child(2):not(.app-nav-link):not(.dash-card) {
    color: #D9A441 !important;
    background: #D9A44114 !important;
    border-color: #D9A44155 !important;
    border-top-color: #D9A441 !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Pending Approval"]:not(.app-nav-link):not(.dash-card) > b,
  html body #appScreen .stats button.card.stat:nth-child(2):not(.app-nav-link):not(.dash-card) > b {
    color: #D9A441 !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Approved"]:not(.app-nav-link):not(.dash-card),
  html body #appScreen .stats button.card.stat:nth-child(3):not(.app-nav-link):not(.dash-card) {
    border-top-color: #4FA87C !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Approved"]:not(.app-nav-link):not(.dash-card) > b,
  html body #appScreen .stats button.card.stat:nth-child(3):not(.app-nav-link):not(.dash-card) > b {
    color: #4FA87C !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="In Repair"]:not(.app-nav-link):not(.dash-card),
  html body #appScreen .stats button.card.stat:nth-child(4):not(.app-nav-link):not(.dash-card) {
    border-top-color: #3E7BC4 !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="In Repair"]:not(.app-nav-link):not(.dash-card) > b,
  html body #appScreen .stats button.card.stat:nth-child(4):not(.app-nav-link):not(.dash-card) > b {
    color: #3E7BC4 !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Repair Completed / Legacy Final Cleared"]:not(.app-nav-link):not(.dash-card),
  html body #appScreen .stats button.card.stat:nth-child(5):not(.app-nav-link):not(.dash-card) {
    border-top-color: #2FA396 !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Repair Completed / Legacy Final Cleared"]:not(.app-nav-link):not(.dash-card) > b,
  html body #appScreen .stats button.card.stat:nth-child(5):not(.app-nav-link):not(.dash-card) > b {
    color: #2FA396 !important;
  }

  html body #appScreen .stats button.card.stat.active:not(.app-nav-link):not(.dash-card) {
    box-shadow: inset 0 0 0 1px #3E7BC4 !important;
    background: #3E7BC41c !important;
  }

  html body #appScreen .stats button.card.stat[data-case-filter="Pending Approval"].active:not(.app-nav-link):not(.dash-card) {
    box-shadow: inset 0 0 0 1px #D9A441 !important;
    background: #D9A44120 !important;
  }

  html body #appScreen .status-badge,
  html body #appScreen em.status-badge,
  html body #appScreen .history-status-badge,
  html body #appScreen .pill.status-badge {
    display: inline-block !important;
    font-style: normal !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
    border: 1px solid #2B3846 !important;
    background: #1E2A37 !important;
    color: #8B96A3 !important;
  }

  html body #appScreen .status-pending,
  html body #appScreen .status-estimate,
  html body #appScreen .pending,
  html body #appScreen .pill.pending,
  html body #appScreen .dirty {
    color: #D9A441 !important;
    background: #D9A44120 !important;
    border-color: #D9A44155 !important;
  }

  html body #appScreen .status-approved,
  html body #appScreen .status-completed,
  html body #appScreen .status-cleared,
  html body #appScreen .approved,
  html body #appScreen .sound,
  html body #appScreen .completed {
    color: #4FA87C !important;
    background: #4FA87C1c !important;
    border-color: #4FA87C55 !important;
  }

  html body #appScreen .status-repair {
    color: #3E7BC4 !important;
    background: #3E7BC41c !important;
    border-color: #3E7BC455 !important;
  }

  html body #appScreen .status-new {
    color: #8B96A3 !important;
    background: #1E2A37 !important;
    border-color: #2B3846 !important;
  }

  html body #appScreen .damage,
  html body #appScreen .status-error {
    color: #D2685A !important;
    background: #D2685A1c !important;
    border-color: #D2685A55 !important;
  }

  html body #appScreen .history-status-badge.active {
    color: #3E7BC4 !important;
    background: #3E7BC41c !important;
    border-color: #3E7BC455 !important;
  }

  html body #appScreen .history-status-badge.out {
    color: #D9A441 !important;
    background: #D9A44120 !important;
    border-color: #D9A44155 !important;
  }

  html body #appScreen .history-status-badge.repair {
    color: #3E7BC4 !important;
    background: #3E7BC41c !important;
    border-color: #3E7BC455 !important;
  }

  html body #appScreen .history-status-badge.complete,
  html body #appScreen .history-status-badge.final {
    color: #4FA87C !important;
    background: #4FA87C1c !important;
    border-color: #4FA87C55 !important;
  }

  html body #appScreen .left-queue-pane,
  html body #appScreen aside.card.workflow {
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    padding: 14px !important;
  }

  html body #appScreen .left-queue-pane h2,
  html body #appScreen aside.card.workflow h2 {
    margin: 0 0 10px !important;
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #caseList .case-record-card,
  html body #appScreen .case-record-card {
    display: grid !important;
    gap: 4px !important;
    padding: 10px 11px !important;
    margin-bottom: 7px !important;
    background: transparent !important;
    border: 1px solid #2B3846 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  html body #appScreen #caseList .case-record-card.active,
  html body #appScreen .case-record-card.active {
    border-color: #3E7BC4 !important;
    background: #3E7BC41c !important;
  }

  html body #appScreen #caseList .case-record-cno,
  html body #appScreen .case-record-card > b,
  html body #appScreen .case-record-card .case-record-cno {
    display: block !important;
    font-family: "IBM Plex Mono", ui-monospace, monospace !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen #caseList .case-record-line,
  html body #appScreen .case-record-card > span,
  html body #appScreen .case-record-card .case-record-line {
    display: block !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    color: #8B96A3 !important;
  }

  html body #appScreen .empty-list {
    padding: 16px 14px !important;
    border: 1px dashed #2B3846 !important;
    border-radius: 9px !important;
    background: #1E2A37 !important;
    color: #8B96A3 !important;
    font-size: 13px !important;
    text-align: center !important;
  }

  html body #appScreen .case-subtabs.context-tabs,
  html body #appScreen .work-area > .case-subtabs.context-tabs,
  html body #appScreen .context-tabs {
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
    padding: 8px !important;
    gap: 8px !important;
  }

  html body #appScreen button.case-subtab:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .case-subtabs.context-tabs .case-subtab:not(.app-nav-link):not(.dash-card) {
    background: #1E2A37 !important;
    color: #8B96A3 !important;
    border: 1px solid #2B3846 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
  }

  html body #appScreen button.case-subtab.active:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .case-subtabs.context-tabs .case-subtab.active:not(.app-nav-link) {
    background: #3E7BC4 !important;
    color: #ffffff !important;
    border-color: #3E7BC4 !important;
  }

  html body #appScreen #casePanel,
  html body #appScreen #estimatePanel,
  html body #appScreen #repairPanel,
  html body #appScreen #ratesPanel,
  html body #appScreen #reportPanel,
  html body #appScreen #programPanel,
  html body #appScreen #historyPanel,
  html body #appScreen #usersPanel,
  html body #appScreen #customerAccountsPanel,
  html body #appScreen #optionsPanel,
  html body #appScreen #approvalCenterPanel,
  html body #appScreen #notificationPanel,
  html body #appScreen #mediaIntegrityPanel {
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  html body #appScreen #casePanel h2,
  html body #appScreen #estimatePanel h2,
  html body #appScreen #estimatePanel h3,
  html body #appScreen #repairPanel h2,
  html body #appScreen #repairPanel h3,
  html body #appScreen #ratesPanel h2,
  html body #appScreen #programPanel h2,
  html body #appScreen #historyPanel h2,
  html body #appScreen #reportPanel h2,
  html body #appScreen .section-head h2,
  html body #appScreen .section-head h3 {
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .section-subhead {
    color: #8B96A3 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
  }

  html body #appScreen #casePanel label.field,
  html body #appScreen #estimatePanel label.field,
  html body #appScreen #repairPanel label.field,
  html body #appScreen #programPanel label.field,
  html body #appScreen #ratesPanel label.field,
  html body #appScreen #historyPanel label.field,
  html body #appScreen #reportPanel label.field,
  html body #appScreen .smart-help label,
  html body #appScreen .quick-add label,
  html body #appScreen label.field,
  html body #appScreen .field {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #8B96A3 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
  }

  html body #appScreen #casePanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen #casePanel select,
  html body #appScreen #casePanel textarea,
  html body #appScreen #estimatePanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen #estimatePanel select,
  html body #appScreen #estimatePanel textarea,
  html body #appScreen #repairPanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen #repairPanel select,
  html body #appScreen #repairPanel textarea,
  html body #appScreen #ratesPanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen #ratesPanel select,
  html body #appScreen #programPanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen #programPanel select,
  html body #appScreen #programPanel textarea,
  html body #appScreen #historyPanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen #reportPanel input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen .estimate-picker input,
  html body #appScreen .estimate-picker select,
  html body #appScreen .rate-form input,
  html body #appScreen .rate-form select,
  html body #appScreen .search,
  html body #appScreen input.search {
    font-family: "IBM Plex Sans", sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
    min-height: 36px !important;
    height: auto !important;
    padding: 7px 10px !important;
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  html body #appScreen #containerNo,
  html body #appScreen #repairContainerNo,
  html body #appScreen #estimateCaseSearch {
    font-family: "IBM Plex Mono", ui-monospace, monospace !important;
    font-size: 13px !important;
    font-weight: 600 !important;
  }

  html body #appScreen #casePanel input:read-only,
  html body #appScreen #repairPanel input:read-only,
  html body #appScreen #estimatePanel input:read-only,
  html body #appScreen #status,
  html body #appScreen #repairStatus,
  html body #appScreen #estimateCaseSize {
    color: #8B96A3 !important;
    background: #1a232c !important;
  }

  html body #appScreen #casePanel textarea,
  html body #appScreen #estimatePanel textarea,
  html body #appScreen #repairPanel textarea,
  html body #appScreen #programPanel textarea {
    min-height: 64px !important;
  }

  html body #appScreen button.btn:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .btn:not(.app-nav-link):not(.dash-card) {
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
  }

  html body #appScreen button.btn.primary:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .btn.primary:not(.app-nav-link) {
    background: #3E7BC4 !important;
    border-color: #3E7BC4 !important;
    color: #ffffff !important;
  }

  html body #appScreen button.btn.gray:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen button.btn.ghost:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .btn.gray,
  html body #appScreen .btn.ghost {
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
  }

  html body #appScreen button.btn.red:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen button.btn.danger:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .btn.red,
  html body #appScreen .btn.danger {
    background: #D2685A1c !important;
    color: #D2685A !important;
    border: 1px solid #D2685A40 !important;
  }

  html body #appScreen button.btn.green:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .btn.green {
    background: #4FA87C1c !important;
    color: #4FA87C !important;
    border: 1px solid #4FA87C40 !important;
  }

  html body #appScreen .pill:not(.status-badge):not(.status-pending):not(.status-approved):not(.status-repair) {
    background: #1E2A37 !important;
    color: #8B96A3 !important;
    border: 1px solid #2B3846 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
  }

  html body #appScreen .hint {
    color: #8B96A3 !important;
    font-size: 12.5px !important;
    font-weight: 400 !important;
  }

  html body #appScreen .ui-list-pane,
  html body #appScreen .ui-detail-pane,
  html body #appScreen .program-list-pane,
  html body #appScreen .program-detail-pane,
  html body #appScreen .smart-help,
  html body #appScreen .part-guide,
  html body #appScreen .user-management-card,
  html body #appScreen .media-summary-card {
    background: #17212C !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    box-shadow: none !important;
  }

  html body #appScreen .program-record-card,
  html body #appScreen #programList .case-item {
    display: grid !important;
    gap: 4px !important;
    padding: 10px 11px !important;
    margin-bottom: 7px !important;
    background: transparent !important;
    border: 1px solid #2B3846 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }

  html body #appScreen .program-record-card.active,
  html body #appScreen #programList .case-item.active {
    border-color: #3E7BC4 !important;
    background: #3E7BC41c !important;
  }

  html body #appScreen .program-record-card > b,
  html body #appScreen #programList .case-item > b {
    font-family: "IBM Plex Sans", sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .program-record-card > span,
  html body #appScreen #programList .case-item > span {
    font-size: 11.5px !important;
    color: #8B96A3 !important;
    line-height: 1.45 !important;
  }

  html body #appScreen .cro-expiry-badge {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 999px !important;
  }

  html body #appScreen .cro-expiry-valid {
    color: #4FA87C !important;
    background: #4FA87C1c !important;
    border-color: #4FA87C55 !important;
  }

  html body #appScreen .cro-expiry-soon {
    color: #D9A441 !important;
    background: #D9A44120 !important;
    border-color: #D9A44155 !important;
  }

  html body #appScreen .cro-expiry-expired,
  html body #appScreen .program-expiry-warning {
    color: #D2685A !important;
    background: #D2685A1c !important;
    border-color: #D2685A55 !important;
  }

  html body #appScreen .cro-expiry-not-set {
    color: #8B96A3 !important;
    background: #1E2A37 !important;
    border-color: #2B3846 !important;
  }

  html body #appScreen .program-counters {
    color: #8B96A3 !important;
    font-size: 12.5px !important;
  }

  html body #appScreen .program-counters b {
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 14px !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen table,
  html body #appScreen .table-scroll,
  html body #appScreen .module-table-wrap {
    background: #17212C !important;
    color: #EDEFF2 !important;
    border-color: #2B3846 !important;
    border-radius: 11px !important;
  }

  html body #appScreen thead,
  html body #appScreen th {
    background: #1E2A37 !important;
    color: #8B96A3 !important;
    border-color: #2B3846 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
  }

  html body #appScreen tbody,
  html body #appScreen tr,
  html body #appScreen td {
    background: transparent !important;
    color: #EDEFF2 !important;
    border-color: #2B3846 !important;
    font-size: 13px !important;
  }

  html body #appScreen tr:hover td {
    background: #1E2A37 !important;
  }

  html body #appScreen table input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  html body #appScreen table select,
  html body #appScreen #damageTable input,
  html body #appScreen #damageTable select {
    font-size: 13px !important;
    font-weight: 500 !important;
    min-height: 32px !important;
    padding: 5px 8px !important;
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
  }

  html body #appScreen .total,
  html body #appScreen .totalBox,
  html body #appScreen .approval-total-strip {
    background: #17212C !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
  }

  html body #appScreen .totalBox {
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
  }

  html body #appScreen .estimate-picker,
  html body #appScreen .rate-form,
  html body #appScreen .report-search-panel,
  html body #appScreen .quick-add {
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    padding: 12px !important;
  }

  html body #appScreen .smart-help b,
  html body #appScreen #selectedRateTitle {
    color: #EDEFF2 !important;
    font-size: 14px !important;
  }

  html body #appScreen #selectedRateMeta,
  html body #appScreen .small-title {
    color: #8B96A3 !important;
    font-size: 12.5px !important;
  }

  html body #appScreen #photoGrid,
  html body #appScreen #photoGrid.photos,
  html body #appScreen #repairPhotoGrid,
  html body #appScreen .photos {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
    gap: 12px !important;
  }

  html body #appScreen #photoGrid .photo-card,
  html body #appScreen #repairPhotoGrid .photo-card,
  html body #appScreen .photo-card,
  html body #appScreen .eir-linked-photo-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 10px !important;
    overflow: hidden !important;
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    color: #EDEFF2 !important;
    box-shadow: none !important;
  }

  html body #appScreen #photoGrid .photo-card > b,
  html body #appScreen #repairPhotoGrid .photo-card > b,
  html body #appScreen .photo-card > b {
    display: block !important;
    min-height: 2.4em !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #EDEFF2 !important;
    overflow-wrap: anywhere !important;
  }

  html body #appScreen #photoGrid .photo-card img,
  html body #appScreen #repairPhotoGrid .photo-card img,
  html body #appScreen .photo-card img {
    width: 100% !important;
    height: 110px !important;
    object-fit: contain !important;
    background: #101820 !important;
    border: 0 !important;
    transform: none !important;
    border-radius: 8px !important;
  }

  html body #appScreen .photo-card .hint,
  html body #appScreen .photo-empty-hint {
    min-height: 72px !important;
    display: grid !important;
    place-items: center !important;
    color: #8B96A3 !important;
    font-size: 12px !important;
    background: #101820 !important;
    border-radius: 8px !important;
  }

  html body #appScreen .photo-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: auto !important;
  }

  html body #appScreen button.photo-action-btn:not(.app-nav-link):not(.dash-card):not(.rail-flyout-item):not(.sidebar-brand-block),
  html body #appScreen .photo-actions .photo-action-btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 7px 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    background: #1E2A37 !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
    box-shadow: none !important;
  }

  html body #appScreen button.photo-action-btn.danger:not(.app-nav-link):not(.dash-card),
  html body #appScreen .photo-actions .photo-action-btn.danger {
    grid-column: 1 / -1;
    color: #D2685A !important;
    border-color: #D2685A40 !important;
    background: #D2685A1c !important;
  }

  html body #appScreen .photo-card input[type="file"] {
    width: 100% !important;
    min-height: 34px !important;
    padding: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #EDEFF2 !important;
    background: #3E7BC4 !important;
    border: 0 !important;
    border-radius: 8px !important;
  }

  html body #appScreen .report,
  html body #appScreen .report .estimateSheet,
  html body #appScreen .report .estimateMeta,
  html body #appScreen .report .reportInfo {
    background: #17212C !important;
    color: #EDEFF2 !important;
    border-color: #2B3846 !important;
  }

  html body #appScreen .report h2,
  html body #appScreen .report h3,
  html body #appScreen .report b {
    color: #EDEFF2 !important;
  }

  html body #appScreen .estimate-version-history,
  html body #appScreen .case-proof-list,
  html body #appScreen .repair-section,
  html body #appScreen .approval-commercial-summary {
    background: #17212C !important;
    color: #EDEFF2 !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
  }

  html body #appScreen .media-summary-card b {
    font-family: "Space Grotesk", sans-serif !important;
    font-size: 22px !important;
    color: #EDEFF2 !important;
  }

  html body #appScreen .part-buttons .btn,
  html body #appScreen .damage-buttons .btn {
    font-size: 12px !important;
    padding: 7px 10px !important;
  }

  html body #appScreen #casePanel .grid,
  html body #appScreen #repairPanel .compact-grid,
  html body #appScreen #estimatePanel .estimate-case-search,
  html body #appScreen #programPanel .program-detail-pane .grid {
    background: #17212C !important;
    border: 1px solid #2B3846 !important;
    border-radius: 11px !important;
    padding: 14px !important;
    gap: 12px !important;
  }

  html body #appScreen #casePanel .actions,
  html body #appScreen #repairPanel .actions,
  html body #appScreen #programPanel .actions,
  html body #appScreen .workflow-actions {
    gap: 8px !important;
    margin-top: 14px !important;
  }

  @media (max-width: 980px) {
    html body #appScreen .stats {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
  }
}

html body #appScreen #yardPanel .actions.yard-print-actions {
  grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
  gap: 8px !important;
}

html body #appScreen #programPanel .program-sticky-actions {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 0 12px;
  background: #17212C;
  border-bottom: 1px solid #2B3846;
}

html body #appScreen .stats.hidden,
html body #appScreen section.stats.hidden {
  display: none !important;
}

.photo-viewer .photo-viewer-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  position: relative !important;
}

.photo-viewer .photo-viewer-head strong {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  padding-right: 8px !important;
}

.photo-viewer .photo-viewer-head-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex: 0 0 auto !important;
  position: relative !important;
}

.photo-viewer .photo-viewer-head-actions .photo-action-btn {
  width: auto !important;
  min-width: 148px !important;
  height: 36px !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  white-space: nowrap !important;
  font-weight: 700 !important;
}

.photo-viewer .photo-viewer-head-actions .photo-viewer-close,
.photo-viewer #programGateOutPhotoClose {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  margin: 0 !important;
  position: static !important;
}

html body #appScreen .program-row-photo-thumbs,
.program-row-photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

html body #appScreen .program-row-photo-thumbs img,
.program-row-photo-thumbs img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #2B3846;
  background: #1E2A37;
}

html body #appScreen .program-row-photo-empty,
.program-row-photo-empty {
  font-size: 11px;
  color: #8B96A3;
}

html body #appScreen #repairPhotoGrid .photo-actions,
html body #appScreen #repairPhotoGrid .repair-photo-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
  align-items: stretch !important;
}

html body #appScreen #repairPhotoGrid .photo-actions .photo-action-btn,
html body #appScreen #repairPhotoGrid .repair-photo-actions .photo-action-btn {
  width: 100% !important;
  min-width: 0 !important;
  grid-column: auto !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

html body #appScreen #repairPhotoGrid .photo-actions .photo-action-btn.danger,
html body #appScreen #repairPhotoGrid .repair-photo-actions .photo-action-btn.danger {
  grid-column: auto !important;
}

@media screen {
  html body #appScreen.app-screen > header.top > div.brand > div > h1.mtl-header-brand-name,
  html body #customerScreen.app-screen > header.top > div.brand > div > h1.mtl-header-brand-name,
  html body #appScreen header.top .mtl-header-brand-name,
  html body #appScreen header.top .brand h1 {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    opacity: 1 !important;
    background: transparent !important;
    text-shadow: none !important;
    filter: none !important;
    mix-blend-mode: normal !important;
  }
}



/* appended by current visit operational separation */
.queue-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.queue-pane-head h2,
.queue-pane-head .section-subhead {
  margin: 0;
}

.visit-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin: 0.15rem 0 0.35rem;
}

.visit-badge-current {
  background: #1b5e20;
  color: #e8f5e9;
  border: 1px solid #66bb6a;
}

.visit-badge-historical {
  background: #5d4037;
  color: #ffe0b2;
  border: 1px solid #ffb74d;
}

#appScreen .visit-badge,
html body #appScreen .visit-badge {
  color: inherit;
}

#appScreen .visit-badge-current,
html body #appScreen .visit-badge-current,
html body #appScreen #eirPanel .visit-badge-current,
html body #appScreen #casePanel .visit-badge-current {
  background: #1a4d2e !important;
  color: #b8f5c8 !important;
  border: 1px solid #3d9960 !important;
}

#appScreen .visit-badge-historical,
html body #appScreen .visit-badge-historical,
html body #appScreen #eirPanel .visit-badge-historical,
html body #appScreen #casePanel .visit-badge-historical,
html body #appScreen #dashboardPanel .visit-badge-historical {
  background: #4a3520 !important;
  color: #ffd9a0 !important;
  border: 1px solid #b8860b !important;
}

.visit-historical-banner {
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #5d4037;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

#appScreen .visit-historical-banner {
  background: #3d3420 !important;
  border-color: #8a7020 !important;
  color: #f5e6c8 !important;
}

.app-page-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.app-shell-back-btn {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
}

.visit-historical-banner.hidden {
  display: none !important;
}

.link-btn.view-history-btn {
  margin-top: 0.5rem;
  background: transparent;
  border: none;
  color: var(--accent, #1565c0);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.eir-record-body .visit-badge,
.case-record-card .visit-badge {
  display: inline-block;
}

/* ============================================================
   Gate-In Intake UI Redesign — layout / visual only
   Scoped to #yardPanel Single Intake + BL Batch Intake
   ============================================================ */

#yardPanel #gateInIdentityForm .gate-in-form-grid,
#yardPanel #inboundBatchView .gate-in-form-grid {
  display: grid;
  gap: 14px 16px;
  margin-bottom: 16px;
}

#yardPanel #gateInIdentityForm .gate-in-form-grid--row1 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
}

#yardPanel #gateInIdentityForm .gate-in-form-grid--row2,
#yardPanel #gateInIdentityForm .gate-in-form-grid--row3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#yardPanel #gateInIdentityForm .gate-in-form-grid--row3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr);
}

#yardPanel #inboundBatchView .inbound-shipment-grid--row1 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#yardPanel #inboundBatchView .inbound-shipment-grid--row2 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#yardPanel #inboundBatchView .inbound-shipment-grid--row3 {
  grid-template-columns: minmax(0, 1fr);
}

#yardPanel #gateInIdentityForm label.gate-in-field,
#yardPanel #inboundBatchView label.gate-in-field {
  display: grid !important;
  grid-template-rows: auto minmax(42px, auto);
  gap: 6px !important;
  align-content: start;
  align-items: stretch !important;
  flex-wrap: unset !important;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--ocean-muted, #8b9cb3);
  line-height: 1.35;
}

#yardPanel .field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
}

#yardPanel #gateInIdentityForm label.gate-in-field:has(.field-label-row),
#yardPanel #inboundBatchView label.gate-in-field:has(.field-label-row) {
  grid-template-rows: auto minmax(42px, auto);
}

#yardPanel #gateInIdentityForm label.gate-in-field > input:not([type="checkbox"]):not([type="radio"]),
#yardPanel #gateInIdentityForm label.gate-in-field > select,
#yardPanel #gateInIdentityForm label.gate-in-field > textarea,
#yardPanel #inboundBatchView label.gate-in-field > input:not([type="checkbox"]):not([type="radio"]),
#yardPanel #inboundBatchView label.gate-in-field > select,
#yardPanel #inboundBatchView label.gate-in-field > textarea {
  width: 100%;
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--ocean-line, #2b3846);
  background: var(--ocean-panel-2, #17212c);
  color: var(--ocean-ink, #e8eef5);
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

#yardPanel #gateInIdentityForm label.gate-in-field > textarea,
#yardPanel #inboundBatchView label.gate-in-field > textarea {
  height: auto;
  min-height: 42px;
  resize: vertical;
  line-height: 1.45;
  padding-top: 10px;
  padding-bottom: 10px;
}

#yardPanel #gateInIdentityForm .gate-in-field--remarks > textarea {
  min-height: 42px;
  max-height: 96px;
}

#yardPanel #inboundBatchView .gate-in-field--full > textarea {
  min-height: 80px;
  max-height: 120px;
}

#yardPanel #gateInIdentityForm label.gate-in-field > small,
#yardPanel #inboundBatchView label.gate-in-field > small {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ocean-muted, #8b9cb3);
  background: transparent;
  border: 0;
}

#yardPanel #gateInIdentityForm label.gate-in-field .shipping-line-other,
#yardPanel #inboundBatchView label.gate-in-field .shipping-line-other {
  margin-top: 0;
}

#yardPanel #gateInIdentityForm label.gate-in-field:has(.shipping-line-other:not(.hidden)) > select,
#yardPanel #inboundBatchView label.gate-in-field:has(.shipping-line-other:not(.hidden)) > select {
  margin-bottom: 8px;
}

#yardPanel #gateInIdentityForm label.gate-in-field:has(.shipping-line-other:not(.hidden)),
#yardPanel #inboundBatchView label.gate-in-field:has(.shipping-line-other:not(.hidden)) {
  grid-template-rows: auto auto auto auto;
}

#yardPanel #gateInIdentityForm label.gate-in-field:has(small:not(.hidden)),
#yardPanel #gateInIdentityForm label.gate-in-field--container {
  grid-template-rows: auto auto auto;
}

#yardPanel #gateInIdentityForm label.gate-in-field:has(small:not(.hidden)) > input,
#yardPanel #gateInIdentityForm label.gate-in-field--container > input {
  grid-row: 2;
}

#yardPanel .yard-print-actions.gate-in-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 20px !important;
}

#yardPanel .gate-in-actions .gate-in-btn {
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}

#yardPanel .gate-in-btn--new {
  background: transparent !important;
  color: var(--ocean-steel, #2eaadc) !important;
  border: 1px solid var(--ocean-steel, #2eaadc) !important;
}

#yardPanel .gate-in-btn--delete {
  background: transparent !important;
  color: var(--ocean-rust, #d2685a) !important;
  border: 1px solid #d2685a80 !important;
}

#yardPanel .gate-in-btn--print {
  background: transparent !important;
  color: var(--ocean-green, #4fa87c) !important;
  border: 1px solid #4fa87c80 !important;
}

#yardPanel .gate-in-btn--new:hover,
#yardPanel .gate-in-btn--delete:hover,
#yardPanel .gate-in-btn--print:hover {
  filter: brightness(1.08);
}

#yardPanel .intake-queue .search,
#yardPanel .inbound-batch-list-pane .search {
  min-height: 42px;
  margin-bottom: 4px;
}

#yardPanel .yard-list-filters label.field {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ocean-muted, #8b9cb3);
}

#yardPanel .yard-list-filters label.field > input,
#yardPanel .yard-list-filters label.field > select {
  min-height: 42px;
  height: 42px;
  box-sizing: border-box;
}

#yardPanel .yard-list-filters .btn {
  min-height: 42px;
}

#yardPanel #inboundBatchView .inbound-shipment-form {
  margin-bottom: 4px;
}

#yardPanel .inbound-batch-save-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 20px;
}

#yardPanel .inbound-batch-save-row .gate-in-btn--save {
  min-height: 44px;
  min-width: 200px;
}

  #yardPanel .inbound-batch-status-pill {
    margin-left: 0;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    width: auto;
    flex: 0 0 auto;
  }

#yardPanel .inbound-progress-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

#yardPanel .inbound-progress-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 88px;
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

#yardPanel .inbound-progress-card b {
  order: -1;
  display: block;
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ocean-ink, #e8eef5);
}

#yardPanel .gate-in-unit-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px !important;
  max-width: 420px;
  margin-bottom: 12px !important;
}

#yardPanel .gate-in-unit-actions .gate-in-btn {
  min-height: 44px;
  font-weight: 600;
}

#yardPanel .gate-in-btn--add {
  background: transparent !important;
  color: var(--ocean-steel, #2eaadc) !important;
  border: 1px solid var(--ocean-steel, #2eaadc) !important;
}

#yardPanel .gate-in-btn--save-containers {
  min-height: 44px;
}

#yardPanel .inbound-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

#yardPanel .inbound-filter-pills .btn {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

#yardPanel .inbound-batch-list-pane .btn.wide {
  min-height: 44px;
  margin-bottom: 4px;
}

#yardPanel .inbound-record-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 96px;
  padding: 12px 14px !important;
  text-align: left;
  cursor: pointer;
}

#yardPanel .inbound-record-card.active {
  border-color: var(--ocean-steel, #2eaadc) !important;
  background: var(--ocean-steel-dim, rgba(46, 170, 220, 0.12)) !important;
  box-shadow: inset 0 0 0 1px var(--ocean-steel, #2eaadc);
}

#yardPanel .inbound-batch-card-bl {
  font-size: 15px;
  font-weight: 700;
  color: var(--ocean-ink, #e8eef5);
}

#yardPanel .inbound-batch-card-meta,
#yardPanel .inbound-batch-card-stats {
  font-size: 12px;
  font-weight: 500;
  color: var(--ocean-muted, #8b9cb3);
  line-height: 1.4;
}

#yardPanel .inbound-batch-card-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--ocean-muted, #8b9cb3);
  margin-top: 2px;
}

#yardPanel .inbound-record-card[data-inbound-status="cancelled"] .inbound-batch-card-status {
  color: var(--ocean-rust, #d2685a);
}

#yardPanel .inbound-record-card[data-inbound-status="completed"] .inbound-batch-card-status {
  color: var(--ocean-green, #4fa87c);
}

#yardPanel #inboundUnitsGrid .empty-list,
#yardPanel #inboundUnitsGrid .inbound-units-empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--ocean-line, #2b3846);
  border-radius: 8px;
  padding: 24px 20px;
  color: var(--ocean-muted, #8b9cb3);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

#yardPanel #inboundBatchView .inbound-batch-detail-pane > .section-subhead {
  margin-top: 4px;
  margin-bottom: 12px;
}

@media (max-width: 1100px) {
  #yardPanel #gateInIdentityForm .gate-in-form-grid--row1,
  #yardPanel #gateInIdentityForm .gate-in-form-grid--row2,
  #yardPanel #gateInIdentityForm .gate-in-form-grid--row3,
  #yardPanel #inboundBatchView .inbound-shipment-grid--row1,
  #yardPanel #inboundBatchView .inbound-shipment-grid--row2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #yardPanel #gateInIdentityForm .gate-in-form-grid--row3 .gate-in-field--remarks,
  #yardPanel #inboundBatchView .inbound-shipment-grid--row3 .gate-in-field--full {
    grid-column: 1 / -1;
  }

  #yardPanel .inbound-progress-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #yardPanel #gateInIdentityForm .gate-in-form-grid--row1,
  #yardPanel #gateInIdentityForm .gate-in-form-grid--row2,
  #yardPanel #gateInIdentityForm .gate-in-form-grid--row3,
  #yardPanel #inboundBatchView .inbound-shipment-grid--row1,
  #yardPanel #inboundBatchView .inbound-shipment-grid--row2 {
    grid-template-columns: minmax(0, 1fr);
  }

  #yardPanel .inbound-progress-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #yardPanel .gate-in-unit-actions {
    max-width: none;
  }

  #yardPanel .inbound-batch-status-pill {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   Gate-In Intake UI Polish — alignment + refinements
   Scoped to #yardPanel Single Intake + BL Batch Intake
   ============================================================ */

#yardPanel label.field.gate-field:has(.info-tip),
#yardPanel label.field.gate-in-field:has(.info-tip) {
  display: grid !important;
  flex-wrap: unset !important;
  align-items: stretch !important;
}

#yardPanel .field-label {
  display: block;
  min-height: 18px;
  line-height: 18px;
}

#yardPanel #gateInIdentityForm label.gate-field,
#yardPanel #gateInIdentityForm label.gate-in-field,
#yardPanel #inboundBatchView label.gate-field,
#yardPanel #inboundBatchView label.gate-in-field {
  grid-template-rows: 18px 42px;
}

#yardPanel #gateInIdentityForm label.gate-field:has(.field-label-row),
#yardPanel #inboundBatchView label.gate-field:has(.field-label-row) {
  grid-template-rows: 18px 42px;
}

#yardPanel .field-label-row {
  min-height: 18px;
  height: 18px;
  line-height: 18px;
}

#yardPanel #gateInIdentityForm label.gate-in-field--container,
#yardPanel #gateInIdentityForm label.gate-field--container {
  grid-template-rows: 18px 42px auto;
}

#yardPanel #gateInIdentityForm label.gate-in-field--container > input,
#yardPanel #gateInIdentityForm label.gate-field--container > input {
  grid-row: 2;
}

#yardPanel #gateInIdentityForm label.gate-in-field--container > small,
#yardPanel #gateInIdentityForm label.gate-field--container > small {
  grid-row: 3;
  margin-top: 4px;
}

#yardPanel #gateInIdentityForm label.gate-in-field > input:not([type="checkbox"]):not([type="radio"]),
#yardPanel #gateInIdentityForm label.gate-in-field > select,
#yardPanel #gateInIdentityForm label.gate-field > input:not([type="checkbox"]):not([type="radio"]),
#yardPanel #gateInIdentityForm label.gate-field > select,
#yardPanel #inboundBatchView label.gate-in-field > input:not([type="checkbox"]):not([type="radio"]),
#yardPanel #inboundBatchView label.gate-in-field > select,
#yardPanel #inboundBatchView label.gate-field > input:not([type="checkbox"]):not([type="radio"]),
#yardPanel #inboundBatchView label.gate-field > select {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
}

#yardPanel #gateInIdentityForm label.gate-in-field > select,
#yardPanel #gateInIdentityForm label.gate-field > select,
#yardPanel #inboundBatchView label.gate-in-field > select,
#yardPanel #inboundBatchView label.gate-field > select {
  padding-right: 32px;
}

#yardPanel #gateInIdentityForm .gate-in-field--remarks > textarea,
#yardPanel #gateInIdentityForm .gate-field--remarks > textarea {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  resize: none;
  overflow-y: auto;
  padding-top: 9px;
  padding-bottom: 9px;
}

#yardPanel #inboundBatchView .gate-in-field--full > textarea {
  min-height: 84px;
  max-height: 96px;
  height: 84px;
  resize: vertical;
}

#yardPanel #gateInIdentityForm .gate-in-form-grid,
#yardPanel #gateInIdentityForm .gate-intake-form-grid,
#yardPanel #inboundBatchView .gate-in-form-grid,
#yardPanel #inboundBatchView .gate-intake-form-grid {
  align-items: start;
}

#yardPanel .gate-intake-queue-filters label.gate-field {
  display: grid;
  grid-template-rows: 18px 42px;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ocean-muted, #8b9cb3);
}

#yardPanel .gate-intake-queue-filters label.gate-field > input,
#yardPanel .gate-intake-queue-filters label.gate-field > select {
  height: 42px;
  min-height: 42px;
}

#yardPanel .gate-intake-queue .case-list,
#yardPanel .inbound-batch-list-pane .case-list {
  max-height: min(560px, calc(100vh - 380px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--ocean-line, #2b3846) transparent;
  padding-right: 4px;
}

#yardPanel .gate-intake-queue .case-list::-webkit-scrollbar,
#yardPanel .inbound-batch-list-pane .case-list::-webkit-scrollbar {
  width: 8px;
}

#yardPanel .gate-intake-queue .case-list::-webkit-scrollbar-thumb,
#yardPanel .inbound-batch-list-pane .case-list::-webkit-scrollbar-thumb {
  background: var(--ocean-line, #2b3846);
  border-radius: 999px;
}

#yardPanel .gate-intake-queue .yard-case-item,
#yardPanel .gate-intake-queue .record-card {
  padding: 11px 12px !important;
}

#yardPanel .bl-save-row {
  justify-content: flex-start;
}

#yardPanel .bl-save-row .gate-in-btn--save {
  flex: 0 0 auto;
}

#appScreen #blDocumentsModal {
  position: fixed;
  inset: 0;
  z-index: 50001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
  background: rgba(12, 24, 38, 0.58) !important;
}
.bl-documents-modal-card { width: min(440px, calc(100vw - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; padding: 20px; border-radius: 8px; }
#appScreen #blDocumentsModal .bl-documents-modal-card,
#appScreen #blDocumentsModal .bl-documents-modal-card :not(button) { color: #17263a !important; }
.bl-documents-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 8px 12px; margin: 12px 0 18px; }
.bl-documents-meta b { overflow-wrap: anywhere; }
.bl-documents-options { display: grid; gap: 8px; margin: 10px 0 20px; }
.bl-documents-option { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--hl-border, #d5dee8); border-radius: 6px; }
.bl-documents-option input[type="checkbox"] { flex: 0 0 18px; width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; margin: 0; }
.bl-documents-option span { flex: 1 1 auto; min-width: 0; }
.bl-documents-option b { flex: 0 0 auto; font-size: 12px; }
.bl-documents-option:has(input:disabled) { opacity: 0.55; }

#yardPanel .inbound-progress-grid.bl-progress-grid {
  grid-auto-rows: 1fr;
}

#yardPanel .inbound-progress-grid .inbound-progress-card {
  min-height: 92px;
  height: 100%;
}

#yardPanel .bl-batch-card,
#yardPanel .inbound-record-card {
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#yardPanel .bl-batch-card:hover:not(.active),
#yardPanel .inbound-record-card:hover:not(.active) {
  border-color: var(--ocean-steel, #2eaadc) !important;
}

#yardPanel .bl-batch-card[data-inbound-status="cancelled"]:not(.active),
#yardPanel .inbound-record-card[data-inbound-status="cancelled"]:not(.active) {
  border-color: #d2685a55 !important;
}

#yardPanel .bl-batch-card[data-inbound-status="completed"]:not(.active),
#yardPanel .inbound-record-card[data-inbound-status="completed"]:not(.active) {
  border-color: #4fa87c55 !important;
}

#yardPanel .gate-actions-grid {
  max-width: 100%;
}

#yardPanel #inboundUnitsGrid .inbound-units-empty {
  min-height: 120px;
}

@media (max-width: 1100px) {
  #yardPanel #gateInIdentityForm .gate-intake-form-grid--row1,
  #yardPanel #gateInIdentityForm .gate-intake-form-grid--row2,
  #yardPanel #gateInIdentityForm .gate-intake-form-grid--row3,
  #yardPanel #inboundBatchView .bl-shipment-grid--row1,
  #yardPanel #inboundBatchView .bl-shipment-grid--row2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #yardPanel #gateInIdentityForm .gate-intake-form-grid--row1,
  #yardPanel #gateInIdentityForm .gate-intake-form-grid--row2,
  #yardPanel #gateInIdentityForm .gate-intake-form-grid--row3,
  #yardPanel #inboundBatchView .bl-shipment-grid--row1,
  #yardPanel #inboundBatchView .bl-shipment-grid--row2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.estimate-discount-controls {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) minmax(180px, 2fr);
  gap: 12px;
  align-items: end;
  margin: 12px 0 18px;
}
.estimate-discount-amounts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.estimate-discount-amounts span { display: inline-flex; gap: 10px; }
.estimate-frozen-quote { grid-column: 1 / -1; border-left: 3px solid #14877d; padding: 8px 12px; background: #edf8f5; color: #163e39; }
@media (max-width: 650px) {
  .estimate-discount-controls { grid-template-columns: minmax(0, 1fr); }
  .estimate-discount-amounts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .estimate-discount-amounts span { display: block; line-height: 1.3; }
  .estimate-discount-amounts strong { display: block; white-space: nowrap; }
  html body #appScreen:has(#estimatePanel.active-panel) .staff-layout { display: block !important; }
  html body #appScreen:has(#estimatePanel.active-panel) .app-sidebar {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 5px 8px !important;
    overflow-x: auto !important;
  }
  #appScreen:has(#estimatePanel.active-panel) .sidebar-brand-block,
  #appScreen:has(#estimatePanel.active-panel) .nav-group-title { display: none !important; }
  #appScreen:has(#estimatePanel.active-panel) .app-nav,
  #appScreen:has(#estimatePanel.active-panel) .nav-group {
    display: flex !important;
    flex-direction: row !important;
    gap: 5px !important;
    width: max-content !important;
  }
  #appScreen:has(#estimatePanel.active-panel) .app-nav-link {
    width: auto !important;
    min-width: max-content !important;
    padding: 7px 10px !important;
    white-space: nowrap !important;
  }
  #appScreen:has(#estimatePanel.active-panel) .staff-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
  }
}
