:root {
  color-scheme: light;
  --navy: #142568;
  --navy-deep: #0c1748;
  --blue: #3e63d8;
  --ink: #17234f;
  --muted: #707b98;
  --line: #e3e8f2;
  --surface: #ffffff;
  --page: #f4f7fb;
  --green: #188458;
  --green-bg: #e9f8f1;
  --amber: #9d6810;
  --amber-bg: #fff6dd;
  --red: #b6423d;
  --red-bg: #fff0ef;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(103, 142, 255, 0.42),
      transparent 34%
    ),
    radial-gradient(
      circle at 85% 82%,
      rgba(44, 78, 187, 0.35),
      transparent 36%
    ),
    linear-gradient(145deg, #07123d, #142568 58%, #203a8e);
}
.login-card {
  width: min(100%, 470px);
  padding: 44px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}
.brand-logo {
  width: 152px;
  height: auto;
  display: block;
  margin-bottom: 32px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.login-card h1,
.hero-row h1 {
  margin: 0;
  color: var(--navy-deep);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
}
.login-copy {
  margin: 14px 0 30px;
  color: var(--muted);
  line-height: 1.6;
}
label {
  display: block;
  margin: 17px 0 8px;
  font-size: 13px;
  font-weight: 750;
  color: #485372;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #d7dfed;
  border-radius: 14px;
  background: #fbfcff;
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
input {
  height: 52px;
  padding: 0 15px;
}
select {
  height: 46px;
  padding: 0 38px 0 13px;
}
textarea {
  padding: 13px 15px;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(62, 99, 216, 0.12);
}
.primary-button,
.secondary-button,
.approve-button,
.reject-button,
.text-button,
.view-button {
  border: 0;
  border-radius: 13px;
  font-weight: 800;
}
.primary-button {
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  color: white;
  background: var(--navy);
}
.primary-button:disabled,
.approve-button:disabled,
.reject-button:disabled {
  cursor: wait;
  opacity: 0.62;
}
.form-message,
.dialog-message {
  min-height: 21px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  max-width: 1600px;
  min-height: 76px;
  margin: auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-group,
.account-group {
  display: flex;
  align-items: center;
  gap: 15px;
}
.brand-group {
  font-weight: 850;
}
.topbar-logo {
  width: 112px;
}
.account-group {
  color: var(--muted);
  font-size: 13px;
}
.account-identity {
  display: grid;
  gap: 2px;
  text-align: right;
}
.account-identity small {
  color: #8b94aa;
  font-size: 11px;
  text-transform: capitalize;
}
.text-button {
  padding: 10px 14px;
  color: var(--navy);
  background: #edf1fb;
}
.dashboard-main {
  max-width: 1600px;
  margin: auto;
  padding: 48px 28px 70px;
}
.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.hero-row p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
}
.secondary-button {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #ced6e8;
  color: var(--navy);
  background: white;
}
.portal-tabs {
  width: max-content;
  max-width: 100%;
  margin-top: 32px;
  padding: 5px;
  display: flex;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}
.portal-tab {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}
.portal-tab.active {
  color: white;
  background: var(--navy);
}
.portal-tab span {
  min-width: 21px;
  height: 21px;
  margin-left: 6px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--navy);
  background: white;
  font-size: 11px;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 34px 0 22px;
}
.warranty-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.summary-card {
  min-height: 104px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: white;
  color: var(--muted);
  box-shadow: 0 8px 28px rgba(27, 48, 96, 0.05);
}
.summary-card strong {
  display: block;
  width: 100%;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}
.summary-card.active {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
  color: var(--navy);
}
.summary-card[data-warranty-filter="extended"] {
  color: #806010;
  background: #fff9e7;
  border-color: #f0d98e;
}
.summary-card[data-warranty-filter="pending"] {
  color: #93620b;
  background: #fff7dc;
  border-color: #efd285;
}
.summary-card[data-warranty-filter="linked"] {
  color: #225b9d;
  background: #eff6ff;
  border-color: #bed6f3;
}
.summary-card[data-warranty-filter="expired"] {
  color: #b4433b;
  background: #fff1ef;
  border-color: #efc0bb;
}
.summary-card-valid {
  color: #178858;
  background: #eefaf4;
  border-color: #afe0c9;
}
.summary-card[data-warranty-filter].active {
  color: var(--navy);
  background: white;
  border-color: var(--navy);
}
.queue-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 42px rgba(27, 48, 96, 0.07);
}
.queue-toolbar {
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.queue-toolbar h2 {
  margin: 0 0 4px;
  font-size: 21px;
}
.queue-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.registry-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  align-items: end;
  gap: 12px;
  width: min(100%, 980px);
}
.period-field,
.search-field {
  margin: 0;
}
.period-field > span,
.search-field > span:not(.sr-only) {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.search-field {
  width: 100%;
}
.search-field input {
  height: 46px;
}
.period-field input {
  height: 46px;
}
.clear-filters {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid #ced6e8;
  border-radius: 13px;
  color: var(--navy);
  background: white;
  font-weight: 800;
}

.export-button {
  align-self: end;
  min-height: 48px;
  white-space: nowrap;
}
.table-wrap {
  position: relative;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
.registry-table {
  min-width: 1580px;
  table-layout: fixed;
}
.registry-table th:nth-child(1) { width: 170px; }
.registry-table th:nth-child(2) { width: 165px; }
.registry-table th:nth-child(3) { width: 105px; }
.registry-table th:nth-child(4) { width: 205px; }
.registry-table th:nth-child(5) { width: 150px; }
.registry-table th:nth-child(6) { width: 275px; }
.registry-table th:nth-child(7) { width: 175px; }
.registry-table th:nth-child(8) { width: 140px; }
.registry-table th:nth-child(9) { width: 155px; }
.registry-table th:nth-child(10) { width: 155px; }
.registry-table th:last-child,
.registry-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  padding-left: 22px;
  padding-right: 26px;
  background: white;
  box-shadow: -12px 0 18px rgba(27, 48, 96, 0.09);
}
.registry-table th:last-child {
  z-index: 3;
  background: #fafbfe;
}
th {
  padding: 14px 18px;
  text-align: left;
  color: #8791a9;
  background: #fafbfe;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
td {
  padding: 18px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cell-primary {
  display: block;
  color: var(--ink);
  font-weight: 800;
}
.cell-secondary {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.contact-email {
  overflow-wrap: anywhere;
}
.account-id {
  max-width: 220px;
  overflow-wrap: anywhere;
}
.address-cell {
  width: 275px;
  max-width: 275px;
  overflow: hidden;
}
.address-cell .cell-primary {
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.mobile-cell-label {
  display: none;
}
.status-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  text-transform: capitalize;
}
.status-pending {
  color: var(--amber);
  background: var(--amber-bg);
}
.status-approved,
.status-verified {
  color: var(--green);
  background: var(--green-bg);
}
.status-rejected,
.status-cancelled {
  color: var(--red);
  background: var(--red-bg);
}
.link-linked {
  color: var(--green);
  background: var(--green-bg);
}
.link-unlinked {
  color: var(--muted);
  background: #eef1f7;
}
.coverage-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  font-size: 11px;
  font-weight: 850;
}
.remove-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  color: var(--red);
  border: 1px solid #efb9b2;
  background: #fff2ef;
  font-weight: 850;
}
.removal-reason {
  max-width: 360px;
  white-space: normal;
}
.edit-field small {
  display: block;
  margin-top: 6px;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.4;
}
.coverage-standard {
  color: var(--navy);
  background: #edf1fb;
}
.coverage-extended {
  color: #77550d;
  background: #fff3c9;
}
.portal-panel {
  padding-top: 24px;
}
.view-button {
  min-height: 38px;
  padding: 0 15px;
  white-space: nowrap;
  color: var(--navy);
  background: #edf1fb;
}
.empty-state {
  padding: 70px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.empty-state strong {
  color: var(--ink);
  font-size: 18px;
}
.pagination {
  min-height: 70px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border-top: 1px solid var(--line);
}
.pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

dialog {
  width: min(92vw, 760px);
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(5, 13, 40, 0.4);
  overflow: hidden;
}
dialog::backdrop {
  background: rgba(6, 15, 47, 0.66);
  backdrop-filter: blur(5px);
}
.dialog-card {
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.dialog-heading {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 27px;
}
.close-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: #eef1f7;
  font-size: 25px;
  line-height: 1;
}
.dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 28px 24px;
  overflow-y: auto;
}
.dialog-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 24px 0 20px;
}
.dialog-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: white;
  box-shadow: 0 -10px 24px rgba(27, 48, 96, 0.06);
}
.removal-confirmation {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #efc0bb;
  border-radius: 16px;
  background: #fff7f5;
}
.removal-confirmation h3 {
  margin: 0 0 6px;
  color: #a43d36;
  font-size: 18px;
}
.removal-confirmation p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}
.removal-confirmation textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
}
.removal-confirmation-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.optional-label {
  display: inline;
  margin: 0 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: none;
}
.detail-item {
  min-width: 0;
  padding: 14px;
  border-radius: 13px;
  background: #f5f7fb;
}
.detail-item.wide {
  grid-column: 1 / -1;
}
.detail-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.detail-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.edit-field {
  margin: 0;
  display: grid;
  gap: 7px;
}
.edit-field.wide {
  grid-column: 1 / -1;
}
.edit-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.edit-field input,
.edit-field select {
  min-width: 0;
  height: 46px;
  background: white;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 0;
}
.approve-button,
.reject-button {
  min-height: 48px;
  padding: 0 19px;
}
.approve-button {
  color: white;
  background: var(--green);
}
.reject-button {
  color: var(--red);
  background: var(--red-bg);
}
.compact-button {
  width: auto;
  min-height: 46px;
  margin: 0;
  padding: 0 20px;
}
.fixed-access select {
  color: var(--muted);
  pointer-events: none;
}
.staff-card {
  margin-top: 32px;
}
.staff-toolbar {
  align-items: center;
}
.staff-toolbar p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.role-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--navy);
  background: #edf1fb;
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}
.role-owner {
  color: #6a470d;
  background: var(--amber-bg);
}
.permission-summary {
  max-width: 270px;
}
#staff-dialog {
  width: min(94vw, 920px);
}
.staff-dialog-card {
  width: 100%;
}
.staff-dialog-body {
  padding-top: 2px;
}
.staff-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.access-fieldset {
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.access-fieldset legend {
  padding: 0 7px;
  color: var(--ink);
  font-weight: 850;
}
.access-fieldset > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-option {
  margin: 0;
  padding: 13px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfcff;
}
.permission-option input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}
.permission-option span {
  display: grid;
  gap: 3px;
}
.permission-option strong {
  color: var(--ink);
  font-size: 13px;
}
.permission-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.status-option {
  margin-top: 18px;
}
.staff-dialog-actions {
  align-items: center;
  flex: 0 0 auto;
}

.hero-actions,
.inventory-toolbar-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
#inventory-panel {
  padding-top: 22px;
}
.inventory-rollout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 22px 26px;
  border: 1px solid #c9d5ef;
  border-radius: 22px;
  background: linear-gradient(135deg, #f8fbff 0%, #edf3ff 100%);
}
.inventory-rollout.enabled {
  border-color: #a9ddbf;
  background: linear-gradient(135deg, #f5fff9 0%, #eaf8f0 100%);
}
.inventory-rollout h2,
.inventory-rollout p {
  margin: 0;
}
.inventory-rollout .eyebrow {
  margin-bottom: 5px;
}
.inventory-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.inventory-available {
  border-color: #f0b8b8;
  background: #fff4f4;
}
.inventory-available.active {
  color: #9f2f35;
  border-color: #d8656a;
}
.inventory-registered {
  border-color: #a9ddbf;
  background: #effaf4;
}
.inventory-registered.active {
  color: #13724b;
  border-color: #46b77d;
}
.inventory-blocked {
  border-color: #efd18a;
  background: #fff9e8;
}
.inventory-toolbar {
  align-items: flex-end;
}
.inventory-toolbar-actions .period-field,
.inventory-toolbar-actions .search-field {
  min-width: 190px;
}
.inventory-table td,
.inventory-table th {
  min-width: 140px;
}
.inventory-table .inventory-select-column {
  width: 52px;
  min-width: 52px;
  text-align: center;
}
.inventory-select-column input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--navy);
}
.inventory-row-selected td {
  background: #f1f5ff;
}
.inventory-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 14px 18px;
  border: 1px solid #f0c2bf;
  border-radius: 14px;
  background: #fff6f5;
}
.inventory-selection-bar > div {
  display: grid;
  gap: 3px;
}
.inventory-selection-bar strong {
  color: var(--red);
}
.inventory-selection-bar span,
.inventory-selection-message {
  color: var(--muted);
  font-size: 12px;
}
.inventory-selection-message {
  min-height: 18px;
  margin: -4px 0 10px;
}
.danger-button {
  border: 1px solid #c84e48;
  color: #fff;
  background: #b6423d;
}
.danger-button:hover:not(:disabled) {
  background: #96332f;
}
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.inventory-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}
.inventory-status::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}
.inventory-status-available {
  color: #b33c43;
  background: #ffeded;
}
.inventory-status-registered {
  color: #177a51;
  background: #e8f8ef;
}
.inventory-status-blocked {
  color: #9b6a0b;
  background: #fff5d8;
}
.inventory-dialog-card,
.manual-warranty-card {
  max-width: 940px;
}
#inventory-import-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  box-sizing: border-box;
}
.inventory-dialog-card {
  width: 100%;
  max-width: none;
}
.inventory-entry-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid #d8e1f2;
  border-radius: 15px;
  background: #f4f7fc;
}
.inventory-entry-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  color: #63708d;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.inventory-entry-tabs button.active {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 4px 14px rgba(20, 37, 104, 0.09);
}
.inventory-entry-config,
.scan-field-grid,
.single-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.inventory-entry-config {
  margin-top: 20px;
}
.inventory-entry-panel {
  margin-top: 20px;
}
.scanner-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.scanner-step {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #dce3f1;
  border-radius: 14px;
  color: #7a86a0;
  background: #fff;
}
.scanner-step > b {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #506181;
  background: #edf1f8;
}
.scanner-step > span {
  display: grid;
  gap: 2px;
}
.scanner-step strong {
  color: inherit;
  font-size: 13px;
}
.scanner-step small {
  font-size: 11px;
}
.scanner-step.active {
  color: #1434a4;
  border-color: #9eb4f5;
  background: #f1f5ff;
}
.scanner-step.active > b {
  color: #fff;
  background: #1f4ecb;
}
.scanner-note {
  margin: 14px 0;
  color: #65728d;
  font-size: 13px;
  line-height: 1.55;
}
.scan-field {
  display: grid;
  gap: 8px;
  color: #35415d;
  font-weight: 800;
}
.scan-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.scan-field input {
  min-width: 0;
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #becae0;
  border-radius: 11px;
  color: var(--navy);
  background: #fff;
  font: inherit;
}
.scan-field input:focus {
  border-color: #2f5fd3;
  outline: 3px solid rgba(47, 95, 211, 0.12);
}
.scan-field input:disabled,
.scan-field input[readonly] {
  color: #69758e;
  background: #f3f5f9;
}
.camera-button {
  min-height: 46px;
  white-space: nowrap;
}
.camera-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}
.scan-feedback {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #27407d;
  background: #eef3ff;
  font-size: 13px;
  font-weight: 700;
}
.pending-inventory {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid #d8e1f2;
  border-radius: 15px;
}
.pending-inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  background: #f5f8fe;
}
.pending-inventory-heading > div,
.pending-inventory-row > span:nth-child(2) {
  display: grid;
  gap: 3px;
}
.pending-inventory-heading span,
.pending-inventory-row small {
  color: #75819a;
  font-size: 11px;
}
.pending-inventory-list {
  max-height: 260px;
  overflow: auto;
}
.pending-inventory-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid #edf0f6;
}
.pending-index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: #3455ae;
  background: #edf2ff;
  font-size: 11px;
  font-weight: 900;
}
.pending-inventory-row button {
  border: 0;
  color: #aa3d42;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.inventory-camera-panel {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: #0c1533;
}
.inventory-camera-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: #fff;
}
.inventory-camera-heading > div {
  display: grid;
  gap: 3px;
}
.inventory-camera-heading span {
  color: #bdc8e5;
  font-size: 12px;
  line-height: 1.45;
}
.inventory-camera-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.camera-photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#inventory-camera-reader {
  min-height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background: #05091a;
}
#inventory-camera-reader video {
  object-fit: contain !important;
}
.inventory-camera-fallback {
  min-height: 220px;
  padding: 28px;
  box-sizing: border-box;
  align-content: center;
  justify-items: center;
  gap: 10px;
  border: 1px dashed #64749d;
  border-radius: 14px;
  color: #fff;
  text-align: center;
  background: #111b3b;
}
.inventory-camera-fallback:not([hidden]) {
  display: grid;
}
.inventory-camera-fallback span {
  max-width: 50ch;
  color: #bdc8e5;
  font-size: 13px;
  line-height: 1.55;
}
.inventory-camera-panel.camera-failed #inventory-camera-reader {
  display: none;
}
.import-instructions,
.validation-note {
  padding: 18px 20px;
  border: 1px solid #d8e1f2;
  border-radius: 16px;
  background: #f5f8fe;
}
.import-instructions p {
  margin: 6px 0;
}
.inline-text-button {
  padding: 0;
  min-height: auto;
  text-decoration: underline;
}
.upload-field {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  font-weight: 800;
}
.upload-field input {
  width: 100%;
  padding: 18px;
  border: 1px dashed #9fb0d4;
  border-radius: 16px;
  background: #fbfcff;
}
.import-preview {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  color: #142568;
  background: #edf3ff;
  font-weight: 700;
}
.manual-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.manual-form-grid .wide {
  grid-column: 1 / -1;
}
.validation-note {
  margin-top: 20px;
  color: #586887;
  font-weight: 700;
}

@media (max-width: 820px) {
  body.inventory-camera-open {
    overflow: hidden;
  }
  .inventory-camera-panel:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    min-width: 0;
    min-height: 100dvh;
    margin: 0;
    padding:
      max(14px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    box-sizing: border-box;
    flex-direction: column;
    border-radius: 0;
    background: #05091a;
  }
  .inventory-camera-heading {
    align-items: flex-start;
    margin-bottom: 14px;
  }
  .inventory-camera-heading > div:first-child {
    min-width: 0;
  }
  .inventory-camera-heading strong {
    font-size: 18px;
  }
  .inventory-camera-heading span {
    max-width: 44ch;
  }
  .inventory-camera-actions {
    flex-direction: column;
  }
  .inventory-camera-actions .compact-button {
    width: 116px;
    min-height: 44px;
  }
  #inventory-camera-reader {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border-radius: 16px;
  }
  #inventory-camera-reader > div,
  #inventory-camera-reader video {
    width: 100% !important;
    height: 100% !important;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .warranty-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inventory-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-group span {
    display: none;
  }
  .account-identity small {
    display: none;
  }
  .queue-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .inventory-rollout {
    align-items: stretch;
    flex-direction: column;
  }
  .inventory-toolbar-actions {
    justify-content: stretch;
  }
  .inventory-toolbar-actions > * {
    flex: 1 1 220px;
  }
  .scanner-guide {
    grid-template-columns: 1fr;
  }
  .inventory-entry-config,
  .scan-field-grid,
  .single-entry-grid {
    grid-template-columns: 1fr;
  }
  .registry-controls {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .registry-controls .search-field {
    grid-column: 1 / -1;
  }
  .search-field {
    width: 100%;
  }
  .registry-table {
    min-width: 0;
  }
  .registry-table td:last-child {
    position: static;
    box-shadow: none;
  }
  table,
  tbody,
  tr,
  td {
    display: block;
  }
  thead {
    display: none;
  }
  tr {
    padding: 16px 18px;
    border-top: 1px solid var(--line);
  }
  td {
    padding: 6px 0;
    border: 0;
  }
  .mobile-cell-label {
    display: block;
    margin-bottom: 4px;
    color: #8791a9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .address-cell {
    width: auto;
    max-width: none;
  }
  td:last-child {
    padding-top: 12px;
  }
  .view-button {
    width: 100%;
  }
  .pagination {
    justify-content: center;
  }
}

@media (max-width: 540px) {
  #inventory-import-dialog {
    width: calc(100vw - 20px);
    max-height: 94dvh;
  }
  .login-card {
    padding: 32px 24px;
    border-radius: 22px;
  }
  .topbar-inner,
  .dashboard-main {
    padding-left: 18px;
    padding-right: 18px;
  }
  .brand-group span {
    display: none;
  }
  .hero-row {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .portal-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .portal-tab {
    min-width: 0;
    min-height: 54px;
    padding: 8px 7px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .summary-grid {
    gap: 10px;
  }
  .registry-controls {
    grid-template-columns: 1fr;
  }
  .registry-controls .search-field {
    grid-column: auto;
  }
  .summary-card {
    min-height: 86px;
    padding: 17px;
    flex-direction: column;
    align-items: flex-start;
  }
  .summary-card strong {
    font-size: 25px;
  }
  .dialog-card {
    max-height: 92vh;
  }
  .dialog-heading {
    padding: 20px 18px 15px;
  }
  .dialog-body {
    padding: 0 18px 20px;
  }
  .dialog-actions {
    padding: 14px 18px;
  }
  .dialog-details {
    grid-template-columns: 1fr;
  }
  .detail-item.wide {
    grid-column: auto;
  }
  .dialog-actions {
    flex-direction: column-reverse;
  }
  .removal-confirmation-actions {
    flex-direction: column-reverse;
  }
  .removal-confirmation-actions button {
    width: 100%;
  }
  .staff-form-grid,
  .permission-grid,
  .manual-form-grid {
    grid-template-columns: 1fr;
  }
  .manual-form-grid .wide {
    grid-column: auto;
  }
  .approve-button,
  .reject-button {
    width: 100%;
  }
  .inventory-entry-tabs {
    gap: 4px;
  }
  .inventory-entry-tabs button {
    padding: 8px 5px;
    font-size: 12px;
  }
  .scan-field > div {
    grid-template-columns: 1fr;
  }
  .inventory-camera-heading {
    display: grid;
  }
  .inventory-camera-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .inventory-camera-actions:has(#retry-inventory-camera:not([hidden])) {
    grid-template-columns: 1fr;
  }
  .inventory-camera-actions .compact-button {
    width: 100%;
  }
  .pending-inventory-heading {
    align-items: flex-start;
  }
  .pending-inventory-list {
    max-height: 42dvh;
  }
}
