:root {
  --admin-navy-950: #06172f;
  --admin-navy-900: #0d1b33;
  --admin-navy-800: #172b4d;
  --admin-gold-600: #b98224;
  --admin-gold-500: #c99a3d;
  --admin-ink: #172033;
  --admin-muted: #687385;
  --admin-line: #dce2e8;
  --admin-line-strong: #c9d1da;
  --admin-surface: #f4f6f8;
  --admin-white: #ffffff;
  --admin-danger: #b53a36;
  font-family: "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--admin-ink);
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--admin-surface);
  color: var(--admin-ink);
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.admin-authenticated {
  padding-bottom: 96px;
}

body.dialog-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.admin-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 18px;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.admin-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.admin-button svg {
  width: 17px;
  height: 17px;
}

.admin-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-button-primary {
  border-color: var(--admin-gold-600);
  background: var(--admin-gold-600);
  color: var(--admin-white);
}

.admin-button-primary:hover:not(:disabled) {
  border-color: #9e6e1d;
  background: #9e6e1d;
}

.admin-button-block {
  width: 100%;
}

.admin-button-ghost {
  border-color: var(--admin-line-strong);
  background: var(--admin-white);
  color: var(--admin-navy-800);
}

.admin-button-ghost:hover:not(:disabled) {
  border-color: var(--admin-navy-800);
}

.admin-button-danger {
  border-color: #dcc3c2;
  background: var(--admin-white);
  color: var(--admin-danger);
}

.admin-button-danger:hover {
  border-color: var(--admin-danger);
  background: #fff8f7;
}

.admin-button-danger-filled {
  border-color: var(--admin-danger);
  background: var(--admin-danger);
  color: var(--admin-white);
}

.admin-login {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
  background: var(--admin-white);
}

.login-brand {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 64px 72px;
  background: var(--admin-navy-900);
  color: var(--admin-white);
}

.login-brand::after {
  position: absolute;
  right: -100px;
  bottom: -110px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(201, 154, 61, 0.18);
  content: "";
  transform: rotate(32deg);
}

.login-brand > a {
  position: relative;
  z-index: 1;
  display: flex;
  width: 250px;
  min-height: 74px;
  align-items: center;
  border-radius: 4px;
  padding: 8px 14px;
  background: var(--admin-white);
}

.login-brand > div {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.login-brand > div > p {
  color: var(--admin-gold-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.login-brand h1 {
  margin-top: 15px;
  font-size: 42px;
  line-height: 1.25;
}

.login-brand span {
  display: block;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

.login-form {
  align-self: center;
  width: min(430px, calc(100% - 64px));
  margin-inline: auto;
}

.login-form > label {
  display: block;
  margin: 20px 0 8px;
  color: var(--admin-navy-900);
  font-size: 12px;
  font-weight: 700;
}

.admin-input-with-icon {
  position: relative;
}

.admin-input-with-icon > svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #8993a1;
  transform: translateY(-50%);
}

.admin-input-with-icon input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  outline: 0;
  padding: 0 48px;
  background: var(--admin-white);
  color: var(--admin-ink);
  font-size: 14px;
}

.admin-input-with-icon input:focus {
  border-color: var(--admin-navy-800);
  box-shadow: 0 0 0 3px rgba(23, 43, 77, 0.1);
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #697586;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.login-form .admin-button-primary {
  min-height: 52px;
  margin-top: 26px;
}

.login-error {
  margin-top: 10px;
  color: var(--admin-danger);
  font-size: 12px;
}

.back-link {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  margin: 22px auto 0;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.admin-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 70px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.admin-header-inner {
  display: grid;
  width: min(calc(100% - 48px), 1480px);
  height: 100%;
  margin-inline: auto;
  grid-template-columns: 225px 1fr auto;
  align-items: center;
  gap: 24px;
}

.admin-brand {
  display: flex;
  width: 205px;
  height: 54px;
  align-items: center;
}

.admin-brand img {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
}

.admin-product-name {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--admin-line-strong);
  padding-left: 20px;
}

.admin-product-name span {
  border-radius: 3px;
  padding: 3px 7px;
  background: var(--admin-navy-900);
  color: var(--admin-white);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.admin-product-name strong {
  color: var(--admin-navy-900);
  font-size: 14px;
}

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

.admin-icon-link {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--admin-line);
  border-radius: 4px;
  background: var(--admin-white);
  color: var(--admin-navy-800);
  cursor: pointer;
}

.admin-icon-link:hover {
  border-color: var(--admin-gold-600);
  color: var(--admin-gold-600);
}

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

.admin-main {
  width: min(calc(100% - 48px), 1480px);
  margin-inline: auto;
  padding: 50px 0 34px;
}

.admin-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 30px;
}

.admin-page-heading > div:first-child > p {
  color: var(--admin-gold-600);
  font-size: 11px;
  font-weight: 800;
}

.admin-page-heading h1 {
  margin-top: 5px;
  color: var(--admin-navy-950);
  font-size: 34px;
  line-height: 1.3;
}

.admin-page-heading > div:first-child > span {
  display: block;
  margin-top: 8px;
  color: var(--admin-muted);
  font-size: 13px;
}

.save-state {
  display: flex;
  min-width: 240px;
  align-items: center;
  gap: 11px;
  border-left: 3px solid var(--admin-gold-500);
  padding: 8px 0 8px 15px;
}

.save-state > svg {
  width: 23px;
  height: 23px;
  color: var(--admin-navy-700, #24436f);
}

.save-state > span {
  display: flex;
  flex-direction: column;
}

.save-state small {
  color: var(--admin-muted);
  font-size: 9px;
}

.save-state strong {
  color: var(--admin-navy-900);
  font-size: 12px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  align-items: start;
  gap: 28px;
}

.rate-editor {
  overflow: hidden;
  border: 1px solid var(--admin-line-strong);
  border-radius: 6px;
  background: var(--admin-white);
}

.rate-editor-header {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--admin-line-strong);
  padding: 18px 26px;
  background: #fbfcfd;
}

.rate-editor-header h2,
.admin-preview h2 {
  color: var(--admin-navy-950);
  font-size: 18px;
}

.rate-editor-header p {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 11px;
}

.rate-group {
  border-bottom: 1px solid var(--admin-line-strong);
}

.rate-group:last-child {
  border-bottom: 0;
}

.rate-group-heading {
  display: grid;
  min-height: 82px;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--admin-line);
  padding: 15px 26px;
  background: #f7f9fa;
}

.rate-group-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 4px;
  background: var(--admin-navy-900);
  color: var(--admin-white);
  font-size: 11px;
  font-weight: 800;
}

.rate-group-heading h3 {
  color: var(--admin-navy-900);
  font-size: 15px;
}

.rate-group-heading p {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: 11px;
}

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

.rate-field {
  display: grid;
  min-height: 96px;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
  border-right: 1px solid var(--admin-line);
  border-bottom: 1px solid var(--admin-line);
  padding: 18px 26px;
}

.rate-field:nth-child(even) {
  border-right: 0;
}

.rate-field:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.rate-field:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: 0;
}

.rate-field > span {
  min-width: 0;
}

.rate-field strong {
  display: block;
  color: var(--admin-navy-900);
  font-size: 13px;
}

.rate-field small {
  display: block;
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 10px;
}

.rate-input {
  display: grid;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--admin-white);
}

.rate-input:focus-within {
  border-color: var(--admin-navy-800);
  box-shadow: 0 0 0 3px rgba(23, 43, 77, 0.08);
}

.rate-input input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 12px;
  color: var(--admin-navy-950);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  -moz-appearance: textfield;
}

.rate-input input::-webkit-inner-spin-button,
.rate-input input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.rate-input span {
  display: flex;
  min-width: 50px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--admin-line);
  padding: 0 9px;
  background: #f5f7f9;
  color: var(--admin-muted);
  font-size: 10px;
  white-space: nowrap;
}

.rate-input.has-error {
  border-color: var(--admin-danger);
  box-shadow: 0 0 0 3px rgba(181, 58, 54, 0.08);
}

.admin-preview {
  position: sticky;
  top: 98px;
  overflow: hidden;
  border: 1px solid var(--admin-line-strong);
  border-radius: 6px;
  background: var(--admin-white);
  box-shadow: 0 16px 38px rgba(13, 27, 51, 0.08);
}

.preview-heading {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: var(--admin-navy-900);
  color: var(--admin-white);
}

.preview-heading > div > span {
  color: var(--admin-gold-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.preview-heading h2 {
  margin-top: 3px;
  color: var(--admin-white);
}

.preview-live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 9px;
}

.preview-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4cd79f;
  box-shadow: 0 0 0 5px rgba(76, 215, 159, 0.12);
}

.preview-scenario {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--admin-line);
  padding: 20px 22px;
}

.preview-scenario label {
  display: grid;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 700;
}

.preview-scenario input,
.preview-scenario select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--admin-line);
  border-radius: 4px;
  outline: 0;
  padding: 0 10px;
  background: var(--admin-white);
  color: var(--admin-navy-900);
  font-size: 11px;
  font-weight: 700;
}

.preview-scenario input:focus,
.preview-scenario select:focus {
  border-color: var(--admin-navy-800);
}

.preview-result {
  padding: 24px 22px 20px;
  background: #f8f6f1;
}

.preview-result > span {
  color: var(--admin-navy-900);
  font-size: 11px;
  font-weight: 800;
}

.preview-result > span small {
  margin-left: 5px;
  color: var(--admin-muted);
  font-size: 8px;
  font-weight: 500;
}

.preview-result p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
}

.preview-result strong {
  color: var(--admin-navy-950);
  font-size: 22px;
  line-height: 1.25;
}

.preview-result p i {
  color: var(--admin-gold-600);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.preview-result > small {
  display: block;
  margin-top: 7px;
  color: var(--admin-muted);
  font-size: 9px;
}

.preview-breakdown {
  padding: 0 22px;
}

.preview-breakdown > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--admin-line);
  padding: 12px 0;
}

.preview-breakdown dt {
  color: var(--admin-muted);
  font-size: 10px;
}

.preview-breakdown dd {
  color: var(--admin-navy-900);
  font-size: 11px;
  font-weight: 800;
}

.preview-main-link {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 22px 22px;
  border: 1px solid var(--admin-navy-900);
  border-radius: 4px;
  color: var(--admin-navy-900);
  font-size: 11px;
  font-weight: 800;
}

.preview-main-link:hover {
  background: var(--admin-navy-900);
  color: var(--admin-white);
}

.preview-main-link svg {
  width: 15px;
  height: 15px;
}

.admin-save-bar {
  position: fixed;
  z-index: 45;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--admin-line-strong);
  padding: 14px max(24px, calc((100% - 1480px) / 2));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(13, 27, 51, 0.08);
  backdrop-filter: blur(12px);
}

.admin-save-bar > div:first-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dirty-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7fa38a;
  box-shadow: 0 0 0 5px rgba(127, 163, 138, 0.12);
}

.dirty-indicator.is-dirty {
  background: var(--admin-gold-500);
  box-shadow: 0 0 0 5px rgba(201, 154, 61, 0.15);
}

.admin-save-bar p {
  display: flex;
  flex-direction: column;
}

.admin-save-bar strong {
  color: var(--admin-navy-900);
  font-size: 12px;
}

.admin-save-bar small {
  color: var(--admin-muted);
  font-size: 9px;
}

.save-bar-actions {
  display: flex;
  gap: 9px;
}

.admin-dialog {
  width: min(440px, calc(100% - 36px));
  border: 0;
  border-radius: 6px;
  padding: 36px;
  box-shadow: 0 28px 90px rgba(5, 16, 33, 0.32);
  text-align: center;
}

.admin-dialog::backdrop {
  background: rgba(5, 16, 33, 0.64);
  backdrop-filter: blur(4px);
}

.admin-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--admin-muted);
  cursor: pointer;
}

.admin-dialog-close svg {
  width: 18px;
  height: 18px;
}

.dialog-warning {
  width: 42px;
  height: 42px;
  color: var(--admin-danger);
}

.admin-dialog h2 {
  margin-top: 15px;
  color: var(--admin-navy-950);
  font-size: 20px;
}

.admin-dialog p {
  margin-top: 9px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.7;
}

.admin-dialog > div {
  display: grid;
  margin-top: 25px;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.admin-toast {
  position: fixed;
  z-index: 100;
  top: 88px;
  right: 24px;
  display: flex;
  min-width: 260px;
  align-items: center;
  gap: 10px;
  border-left: 3px solid #4c956c;
  border-radius: 4px;
  padding: 14px 16px;
  background: var(--admin-white);
  box-shadow: 0 18px 45px rgba(13, 27, 51, 0.18);
  color: var(--admin-navy-900);
  font-size: 12px;
  font-weight: 700;
}

.admin-toast svg {
  width: 19px;
  height: 19px;
  color: #4c956c;
}

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

  .admin-preview {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .preview-heading {
    grid-column: 1 / -1;
  }

  .preview-scenario {
    border-right: 1px solid var(--admin-line);
    border-bottom: 0;
  }

  .preview-result,
  .preview-breakdown,
  .preview-main-link {
    grid-column: 2;
  }

  .preview-result {
    grid-row: 2;
  }

  .preview-breakdown {
    grid-row: 3;
  }

  .preview-main-link {
    grid-row: 4;
  }
}

@media (max-width: 760px) {
  body.admin-authenticated {
    padding-bottom: 150px;
  }

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

  .login-brand {
    min-height: 250px;
    padding: 30px 24px;
  }

  .login-brand > a {
    width: 205px;
    min-height: 58px;
  }

  .login-brand h1 {
    margin-top: 10px;
    font-size: 30px;
  }

  .login-form {
    width: calc(100% - 40px);
    padding: 28px 0 42px;
  }

  .admin-header-inner {
    width: calc(100% - 28px);
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-brand {
    width: 175px;
  }

  .admin-product-name {
    display: none;
  }

  .admin-main {
    width: calc(100% - 28px);
    padding-top: 32px;
  }

  .admin-page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .admin-page-heading h1 {
    font-size: 28px;
  }

  .save-state {
    min-width: 0;
  }

  .rate-editor-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .rate-group-heading {
    padding-inline: 18px;
  }

  .rate-grid {
    grid-template-columns: 1fr;
  }

  .rate-field,
  .rate-field:nth-child(even),
  .rate-field:nth-last-child(-n + 2) {
    min-height: 108px;
    grid-template-columns: 1fr;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
    padding: 18px;
  }

  .rate-field:last-child {
    border-bottom: 0;
  }

  .rate-input {
    width: 100%;
  }

  .admin-preview {
    display: block;
  }

  .preview-scenario {
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

  .admin-save-bar {
    min-height: 132px;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .save-bar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-toast {
    top: 82px;
    right: 14px;
    left: 14px;
    min-width: 0;
  }
}

/* v27 separated detailed pricing sheet and customer report builder */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.detail-pricing-page {
  max-width: 100%;
}

.detailed-rate-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 20px;
  border: 1px solid var(--admin-line-strong);
  border-top: 3px solid var(--admin-navy-800);
  background: var(--admin-white);
}

.detailed-rate-overview > div {
  min-width: 0;
  padding: 19px 22px;
}

.detailed-rate-overview > div + div {
  border-left: 1px solid var(--admin-line);
}

.detailed-rate-overview span,
.detailed-rate-overview small {
  display: block;
  color: var(--admin-muted);
  font-size: 10px;
}

.detailed-rate-overview strong {
  display: block;
  margin: 3px 0;
  color: var(--admin-navy-900);
  font-size: 24px;
  line-height: 1.2;
}

.quote-report-panel.is-detail-sheet {
  gap: 0;
  margin-top: 0;
  padding: 0;
}

.quote-sheet-heading {
  align-items: center;
  margin: 0;
  border-bottom: 1px solid var(--admin-line);
  padding: 24px;
}

.quote-sheet-heading h2 {
  margin-top: 5px;
  color: var(--admin-navy-950);
  font-size: 25px;
}

.quote-sheet-heading > div > span {
  display: block;
  margin-top: 7px;
  color: var(--admin-muted);
  font-size: 12px;
}

.quote-client-section,
.quote-rate-section {
  padding: 22px 24px 24px;
}

.quote-rate-section {
  border-top: 1px solid var(--admin-line);
}

.quote-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.quote-section-title > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  background: var(--admin-navy-900);
  color: var(--admin-white);
  font-size: 10px;
  font-weight: 800;
}

.quote-section-title strong,
.quote-section-title small {
  display: block;
}

.quote-section-title strong {
  color: var(--admin-navy-900);
  font-size: 14px;
}

.quote-section-title small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 10px;
}

.quote-client-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quote-client-grid label {
  gap: 8px;
  font-size: 11px;
}

.quote-client-grid input {
  min-height: 42px;
  padding-inline: 12px;
  font-size: 12px;
}

.quote-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quote-search-field {
  position: relative;
  display: block;
  width: min(440px, 100%);
}

.quote-search-field svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--admin-muted);
  transform: translateY(-50%);
}

.quote-search-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  outline: 0;
  padding: 0 12px 0 38px;
  background: #fff;
  color: var(--admin-ink);
  font-size: 12px;
}

.quote-search-field input:focus {
  border-color: var(--admin-gold-600);
  box-shadow: 0 0 0 3px rgba(185, 130, 36, 0.1);
}

.quote-quantity-filter {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  padding: 0 13px;
  background: #fff;
  color: #4f5d72;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.quote-quantity-filter svg {
  width: 16px;
  height: 16px;
}

.quote-quantity-filter.is-active {
  border-color: var(--admin-gold-500);
  background: #fff7df;
  color: #76510e;
}

.quote-filter-row {
  margin-bottom: 12px;
}

.is-detail-sheet .quote-rate-table-wrap {
  max-height: 620px;
  border-color: var(--admin-line-strong);
  background: #fff;
}

.is-detail-sheet .quote-rate-table {
  min-width: 1360px;
}

.is-detail-sheet .quote-rate-table th {
  top: -1px;
  height: 42px;
  padding-inline: 9px;
}

.is-detail-sheet .quote-rate-table td {
  padding: 7px;
  background: #fff;
}

.is-detail-sheet .quote-rate-table tr:nth-child(even) td {
  background: #fafbfc;
}

.is-detail-sheet .quote-rate-table tr.has-quantity td {
  background: #fffaf0;
}

.is-detail-sheet .quote-rate-table td:nth-child(1),
.is-detail-sheet .quote-rate-table th:nth-child(1) {
  width: 48px;
  text-align: center;
}

.is-detail-sheet .quote-rate-table td:nth-child(5),
.is-detail-sheet .quote-rate-table th:nth-child(5) {
  width: 82px;
}

.is-detail-sheet .quote-rate-table td:nth-child(6),
.is-detail-sheet .quote-rate-table th:nth-child(6),
.is-detail-sheet .quote-rate-table td:nth-child(7),
.is-detail-sheet .quote-rate-table th:nth-child(7) {
  width: 104px;
}

.is-detail-sheet .quote-rate-table td:nth-child(8),
.is-detail-sheet .quote-rate-table th:nth-child(8) {
  width: 112px;
}

.is-detail-sheet .quote-rate-table td:nth-child(10),
.is-detail-sheet .quote-rate-table th:nth-child(10) {
  width: 48px;
  text-align: center;
}

.is-detail-sheet .quote-rate-table input:focus {
  border-color: var(--admin-gold-600);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(185, 130, 36, 0.1);
}

.quote-row-delete {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #8993a2;
  cursor: pointer;
}

.quote-row-delete:hover {
  border-color: #e4c8c6;
  background: #fff5f4;
  color: var(--admin-danger);
}

.quote-row-delete svg {
  width: 15px;
  height: 15px;
}

.quote-empty-row td {
  height: 150px;
  color: var(--admin-muted);
  text-align: center;
}

.quote-summary-bar {
  position: sticky;
  z-index: 4;
  bottom: 0;
  align-items: stretch;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--admin-line-strong);
  padding: 16px 24px;
  background: rgba(248, 249, 250, 0.97);
  box-shadow: 0 -8px 18px rgba(13, 27, 51, 0.05);
  backdrop-filter: blur(8px);
}

.quote-summary-metrics {
  display: grid;
  min-width: min(680px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--admin-line);
  background: #fff;
}

.quote-summary-metrics > div {
  min-width: 0;
  padding: 10px 13px;
}

.quote-summary-metrics > div + div {
  border-left: 1px solid var(--admin-line);
}

.quote-summary-metrics span {
  font-size: 9px;
}

.quote-summary-metrics strong {
  overflow: hidden;
  margin-top: 2px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-summary-metrics .is-total {
  background: var(--admin-navy-900);
}

.quote-summary-metrics .is-total span {
  color: rgba(255, 255, 255, 0.62);
}

.quote-summary-metrics .is-total strong {
  color: #e4ba60;
}

@media (max-width: 1180px) {
  .detailed-rate-overview {
    grid-template-columns: 1fr 1fr;
  }

  .detailed-rate-overview > div:nth-child(3) {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }

  .detailed-rate-overview > div:nth-child(4) {
    border-top: 1px solid var(--admin-line);
  }

  .quote-summary-bar {
    align-items: stretch;
  }

  .quote-summary-metrics {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .detailed-rate-overview {
    grid-template-columns: 1fr 1fr;
  }

  .detailed-rate-overview > div {
    padding: 15px;
  }

  .detailed-rate-overview strong {
    font-size: 19px;
  }

  .quote-sheet-heading,
  .quote-client-section,
  .quote-rate-section,
  .quote-summary-bar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .quote-sheet-heading {
    align-items: flex-start;
  }

  .quote-sheet-heading h2 {
    font-size: 22px;
  }

  .quote-client-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quote-table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-search-field,
  .quote-quantity-filter {
    width: 100%;
  }

  .quote-quantity-filter {
    justify-content: center;
  }

  .quote-summary-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .quote-summary-metrics > div:nth-child(3) {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }

  .quote-summary-metrics > div:nth-child(4) {
    border-top: 1px solid var(--admin-line);
  }

  .quote-report-actions {
    width: 100%;
  }

  .quote-report-actions .admin-button {
    flex: 1 1 150px;
  }
}

@media (max-width: 480px) {
  .detailed-rate-overview,
  .quote-client-grid {
    grid-template-columns: 1fr;
  }

  .detailed-rate-overview > div + div {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }

  .quote-summary-metrics {
    grid-template-columns: 1fr;
  }

  .quote-summary-metrics > div + div,
  .quote-summary-metrics > div:nth-child(4) {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }
}

@media (max-width: 420px) {
  .preview-scenario {
    grid-template-columns: 1fr;
  }

  .preview-result p {
    display: grid;
  }

  .preview-result p i {
    display: none;
  }

  .preview-result strong:last-child::before {
    margin-right: 5px;
    color: var(--admin-gold-600);
    content: "~";
  }

  .save-bar-actions {
    gap: 7px;
  }

  .save-bar-actions .admin-button {
    padding-inline: 9px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* v16 integrated client approval and CS administration */
body.admin-record-view {
  padding-bottom: 0;
}

.admin-view-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--admin-line-strong);
}

.admin-view-tabs button {
  position: relative;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 0 22px;
  background: transparent;
  color: var(--admin-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-view-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--admin-gold-600);
  content: "";
  opacity: 0;
}

.admin-view-tabs button.is-active {
  color: var(--admin-navy-950);
}

.admin-view-tabs button.is-active::after {
  opacity: 1;
}

.admin-view-tabs svg {
  width: 18px;
  height: 18px;
}

.admin-view-tabs button > span {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 10px;
  padding: 0 6px;
  background: #bd3e38;
  color: #fff;
  font-size: 9px;
}

.admin-data-panel {
  min-height: 560px;
}

.admin-data-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 28px;
}

.admin-data-heading > div > p {
  color: var(--admin-gold-600);
  font-size: 11px;
  font-weight: 800;
}

.admin-data-heading h1 {
  margin-top: 5px;
  color: var(--admin-navy-950);
  font-size: 34px;
}

.admin-data-heading > div > span {
  display: block;
  margin-top: 8px;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  border: 1px solid var(--admin-line-strong);
  background: var(--admin-white);
}

.admin-summary-grid > div {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
}

.admin-summary-grid > div + div {
  border-left: 1px solid var(--admin-line);
}

.admin-summary-grid span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-summary-grid strong {
  color: var(--admin-navy-950);
  font-size: 29px;
}

.admin-record-list {
  display: grid;
  gap: 16px;
}

.admin-record {
  border: 1px solid var(--admin-line-strong);
  border-top: 3px solid var(--admin-navy-800);
  padding: 25px;
  background: var(--admin-white);
}

.admin-record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.admin-record-header span {
  color: var(--admin-gold-600);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-record-header h2 {
  margin-top: 5px;
  color: var(--admin-navy-950);
  font-size: 22px;
}

.admin-status {
  flex: 0 0 auto;
  border: 1px solid var(--admin-line-strong);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f3f5f7;
  color: #59677a;
  font-size: 10px;
}

.admin-status.is-approved {
  border-color: #a9d2c0;
  background: #eff9f5;
  color: #1f6f50;
}

.admin-status.is-received {
  border-color: #ddb65f;
  background: #fff7e2;
  color: #815b0d;
  font-weight: 800;
}

.admin-status.is-pending {
  border-color: #e3ca95;
  background: #fff8e9;
  color: #8a6117;
}

.admin-status.is-rejected {
  border-color: #e2bbb9;
  background: #fff3f2;
  color: #9b332e;
}

.admin-record-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  background: var(--admin-line);
}

.admin-record-meta > div {
  min-width: 0;
  padding: 13px 15px;
  background: #f8f9fa;
}

.admin-record-meta dt {
  color: #8993a1;
  font-size: 9px;
}

.admin-record-meta dd {
  overflow: hidden;
  margin-top: 5px;
  color: #364256;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--admin-line);
  margin-top: 22px;
  padding-top: 18px;
}

.admin-record-note {
  margin-right: auto;
  color: var(--admin-muted);
  font-size: 11px;
}

.admin-request-description {
  margin-top: 20px;
  border-left: 3px solid var(--admin-gold-500);
  padding: 14px 16px;
  background: #f7f8fa;
  color: #465367;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.admin-response-editor {
  display: grid;
  grid-template-columns: 180px minmax(280px, 1fr) minmax(230px, 0.7fr) auto;
  align-items: end;
  gap: 14px;
  border-top: 1px solid var(--admin-line);
  margin-top: 22px;
  padding-top: 20px;
}

.admin-response-editor label {
  display: grid;
  gap: 7px;
  color: #3f4b5e;
  font-size: 10px;
  font-weight: 700;
}

.admin-response-editor select,
.admin-response-editor textarea,
.admin-response-editor input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  padding: 0 11px;
  background: #fff;
  color: var(--admin-ink);
  font: inherit;
  font-size: 11px;
}

.admin-response-editor textarea {
  min-height: 88px;
  resize: vertical;
  padding-block: 10px;
}

.admin-response-editor input[type="file"] {
  padding: 8px;
}

.admin-response-editor small {
  color: var(--admin-muted);
  font-size: 9px;
  font-weight: 400;
}

.admin-empty-state {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px dashed var(--admin-line-strong);
  background: var(--admin-white);
  color: var(--admin-muted);
  text-align: center;
}

.admin-empty-state svg {
  width: 36px;
  height: 36px;
}

.quote-report-panel {
  display: grid;
  gap: 20px;
  margin-top: 28px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  padding: 24px;
  background: var(--admin-white);
}

.quote-report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.quote-client-grid label {
  display: grid;
  gap: 7px;
  color: #3f4b5e;
  font-size: 10px;
  font-weight: 700;
}

.quote-client-grid input,
.quote-rate-table input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  padding: 0 9px;
  background: #fff;
  color: var(--admin-ink);
  font: inherit;
  font-size: 11px;
}

.quote-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-filter-row button {
  min-height: 34px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 999px;
  padding: 0 13px;
  background: #fff;
  color: #4f5d72;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.quote-filter-row button.is-active {
  border-color: var(--admin-gold-500);
  background: #fff7df;
  color: #76510e;
}

.quote-rate-table-wrap {
  overflow: auto;
  border: 1px solid var(--admin-line);
}

.quote-rate-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 11px;
}

.quote-rate-table th,
.quote-rate-table td {
  border-bottom: 1px solid var(--admin-line);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.quote-rate-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #202938;
  color: #fff;
  font-size: 10px;
}

.quote-rate-table td:first-child {
  width: 48px;
  text-align: center;
}

.quote-rate-table td:first-child input {
  width: 18px;
  min-height: 18px;
}

.quote-rate-table td:nth-child(8) {
  white-space: nowrap;
}

.quote-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--admin-line);
  padding: 16px;
  background: #f8f9fa;
}

.quote-summary-bar span,
.quote-summary-bar small {
  display: block;
  color: var(--admin-muted);
  font-size: 10px;
}

.quote-summary-bar strong {
  display: block;
  margin-top: 4px;
  color: var(--admin-ink);
  font-size: 22px;
}

@media (max-width: 1080px) {
  .admin-record-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .quote-summary-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-response-message {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.admin-record-view {
    padding-bottom: 0;
  }

  .admin-view-tabs {
    overflow-x: auto;
  }

  .admin-view-tabs button {
    flex: 0 0 auto;
    padding-inline: 14px;
  }

  .admin-data-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .admin-data-heading h1 {
    font-size: 28px;
  }

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

  .admin-summary-grid > div {
    min-height: 66px;
  }

  .admin-summary-grid > div + div {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }

  .admin-record {
    padding: 20px 16px;
  }

  .admin-record-header {
    flex-direction: column;
  }

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

  .admin-record-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-record-actions .admin-button {
    width: 100%;
  }

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

  .quote-client-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quote-report-panel {
    padding: 18px 14px;
  }

  .admin-response-message {
    grid-column: auto;
  }
}

/* Keep the v27 detail sheet rules authoritative over legacy prototype styles. */
.is-detail-sheet .quote-client-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.is-detail-sheet .quote-client-grid label {
  gap: 8px;
  font-size: 11px;
}

.is-detail-sheet .quote-client-grid input {
  min-height: 42px;
  padding-inline: 12px;
  font-size: 12px;
}

.is-detail-sheet .quote-summary-bar {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--admin-line-strong);
  padding: 16px 24px;
  background: rgba(248, 249, 250, 0.97);
}

.is-detail-sheet .quote-summary-metrics strong {
  margin-top: 2px;
  font-size: 16px;
}

@media (max-width: 760px) {
  .is-detail-sheet .quote-client-grid {
    grid-template-columns: 1fr 1fr;
  }

  .is-detail-sheet .quote-summary-bar {
    padding-right: 14px;
    padding-left: 14px;
  }
}

@media (max-width: 480px) {
  .is-detail-sheet .quote-client-grid {
    grid-template-columns: 1fr;
  }
}

/* Contain the wide editor table without widening the admin document. */
.detail-pricing-page,
.quote-report-panel.is-detail-sheet,
.quote-report-panel.is-detail-sheet > *,
.is-detail-sheet .quote-section-title,
.is-detail-sheet .quote-client-grid,
.is-detail-sheet .quote-table-toolbar,
.is-detail-sheet .quote-rate-table-wrap,
.is-detail-sheet .quote-summary-bar {
  min-width: 0;
  max-width: 100%;
}

.quote-report-panel.is-detail-sheet {
  overflow: hidden;
}

.quote-report-panel.is-detail-sheet > * {
  width: 100%;
  box-sizing: border-box;
}

.is-detail-sheet .quote-sheet-heading,
.is-detail-sheet .quote-report-actions {
  flex-wrap: wrap;
}

.is-detail-sheet .quote-rate-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.quote-report-dialog {
  width: min(1120px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  border: 0;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  background: #eef1f5;
  box-shadow: 0 28px 80px rgba(13, 27, 51, 0.28);
}

.quote-report-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.quote-report-dialog::backdrop {
  background: rgba(9, 19, 36, 0.72);
  backdrop-filter: blur(3px);
}

.quote-report-dialog-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #d4dae3;
  padding: 14px 16px 14px 20px;
  background: #fff;
}

.quote-report-dialog-toolbar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.quote-report-dialog-toolbar > div:first-child {
  display: grid;
  gap: 2px;
}

.quote-report-dialog-toolbar span {
  color: var(--admin-gold-700);
  font-size: 9px;
  font-weight: 800;
}

.quote-report-dialog-toolbar strong {
  overflow: hidden;
  color: var(--admin-navy-900);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-report-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

@media (max-width: 600px) {
  .quote-report-dialog {
    width: calc(100vw - 14px);
    height: calc(100vh - 14px);
  }

  .quote-report-dialog-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .quote-report-dialog-toolbar > div:last-child {
    justify-content: space-between;
  }

  .quote-report-dialog-toolbar .admin-button {
    flex: 1 1 auto;
  }
}

/* v28: inbox-style work queues */
.admin-summary-grid.is-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-inbox-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.admin-inbox-tabs a {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 5px;
  padding: 14px 16px;
  background: #fff;
  color: #59677a;
  text-decoration: none;
}

.admin-inbox-tabs a:hover,
.admin-inbox-tabs a:focus-visible {
  border-color: var(--admin-gold-600);
}

.admin-inbox-tabs a.is-active {
  border-color: var(--admin-navy-800);
  background: var(--admin-navy-900);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--admin-gold-500);
}

.admin-inbox-tabs svg {
  width: 23px;
  height: 23px;
}

.admin-inbox-tabs span,
.admin-inbox-tabs small {
  display: block;
  min-width: 0;
}

.admin-inbox-tabs span {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
}

.admin-inbox-tabs small {
  margin-top: 3px;
  color: #8993a2;
  font-size: 9px;
  font-weight: 500;
}

.admin-inbox-tabs a.is-active small {
  color: rgba(255, 255, 255, 0.6);
}

.admin-inbox-tabs a > strong {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 17px;
  background: #eef1f5;
  color: var(--admin-navy-900);
  font-size: 13px;
}

.admin-inbox-tabs a.is-active > strong {
  background: var(--admin-gold-500);
  color: #fff;
}

.admin-response-editor.is-quote-response {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-response-editor.is-quote-response textarea {
  min-height: 96px;
}

.admin-completion-record {
  margin-top: 22px;
  border: 1px solid #b9d9ca;
  border-left: 4px solid #2f8a61;
  padding: 16px 18px;
  background: #f4faf7;
}

.admin-completion-record span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #246947;
  font-size: 10px;
  font-weight: 800;
}

.admin-completion-record span svg {
  width: 16px;
  height: 16px;
}

.admin-completion-record p {
  margin: 9px 0 0;
  color: #405246;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* v28: category-first detailed pricing editor */
.quote-category-tabs {
  display: grid;
  grid-template-columns: repeat(8, minmax(118px, 1fr));
  margin-bottom: 16px;
  overflow-x: auto;
  border: 1px solid var(--admin-line-strong);
  background: #f5f6f8;
  scrollbar-width: thin;
}

.quote-category-tabs button {
  display: grid;
  min-width: 118px;
  min-height: 96px;
  align-content: center;
  gap: 4px;
  border: 0;
  border-right: 1px solid var(--admin-line-strong);
  padding: 13px 12px;
  background: #fff;
  color: #667286;
  text-align: left;
  cursor: pointer;
}

.quote-category-tabs button:last-child {
  border-right: 0;
}

.quote-category-tabs button > span,
.quote-category-tabs button > strong,
.quote-category-tabs button > small {
  display: block;
}

.quote-category-tabs button > span {
  color: var(--admin-gold-600);
  font-size: 9px;
  font-weight: 900;
}

.quote-category-tabs button > strong {
  color: var(--admin-navy-900);
  font-size: 15px;
}

.quote-category-tabs button > small {
  overflow: hidden;
  color: #8b95a4;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-category-tabs button:hover,
.quote-category-tabs button:focus-visible {
  background: #fff9ec;
}

.quote-category-tabs button.is-active {
  background: var(--admin-navy-900);
  color: #fff;
  box-shadow: inset 0 -4px 0 var(--admin-gold-500);
}

.quote-category-tabs button.is-active > strong {
  color: #fff;
}

.quote-category-tabs button.is-active > small {
  color: rgba(255, 255, 255, 0.62);
}

.quote-category-tabs button.is-summary:not(.is-active) {
  background: #fff8e8;
}

.quote-category-editor {
  min-width: 0;
  border: 1px solid var(--admin-line-strong);
  background: #fff;
}

.quote-category-editor[hidden],
.quote-category-summary[hidden] {
  display: none;
}

.quote-category-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--admin-line);
  padding: 15px 16px;
  background: #f8f9fb;
}

.quote-category-heading > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.quote-category-heading > div > span {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  background: var(--admin-navy-900);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.quote-category-heading strong,
.quote-category-heading small {
  display: block;
}

.quote-category-heading strong {
  color: var(--admin-navy-900);
  font-size: 15px;
}

.quote-category-heading small {
  margin-top: 2px;
  color: var(--admin-muted);
  font-size: 9px;
}

.quote-category-heading .quote-search-field {
  width: min(400px, 44%);
  flex: 0 1 400px;
}

.is-detail-sheet .quote-category-editor .quote-rate-table-wrap {
  max-height: 590px;
  border: 0;
}

.is-detail-sheet .quote-category-editor .quote-rate-table {
  min-width: 1220px;
  table-layout: fixed;
}

.is-detail-sheet .quote-category-editor .quote-rate-table th,
.is-detail-sheet .quote-category-editor .quote-rate-table td {
  padding: 9px;
}

.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(1) { width: 58px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(2) { width: 125px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(3) { width: 140px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(4) { width: 165px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(5) { width: 80px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(6) { width: 105px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(7) { width: 105px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(8) { width: 118px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(9) { width: 245px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(10) { width: 48px; }

.is-detail-sheet .quote-category-editor .quote-rate-table td:nth-child(1),
.is-detail-sheet .quote-category-editor .quote-rate-table td:nth-child(10) {
  text-align: center;
}

.is-detail-sheet .quote-category-editor .quote-rate-table input,
.is-detail-sheet .quote-category-editor .quote-rate-table select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  padding: 0 9px;
  background: #fff;
  color: var(--admin-ink);
  font-size: 12px;
}

.is-detail-sheet .quote-category-editor .quote-rate-table select {
  color: var(--admin-navy-900);
  font-weight: 700;
}

.is-detail-sheet .quote-category-editor .quote-rate-table input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  accent-color: var(--admin-gold-600);
}

.quote-category-summary {
  border: 1px solid var(--admin-line-strong);
  background: #fff;
}

.quote-category-summary > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--admin-line);
  padding: 18px 20px;
  background: var(--admin-navy-900);
  color: #fff;
}

.quote-category-summary > header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-category-summary > header > div > span {
  color: var(--admin-gold-500);
  font-size: 11px;
  font-weight: 900;
}

.quote-category-summary > header strong,
.quote-category-summary > header small {
  display: block;
}

.quote-category-summary > header strong {
  font-size: 17px;
}

.quote-category-summary > header small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
}

.quote-category-summary > header > svg {
  width: 26px;
  height: 26px;
  color: var(--admin-gold-500);
}

.quote-category-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 20px;
  padding: 20px;
}

.quote-category-cost-list {
  display: grid;
  border: 1px solid var(--admin-line);
}

.quote-category-cost-list article {
  display: grid;
  min-height: 56px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 13px;
  background: #fff;
}

.quote-category-cost-list article + article {
  border-top: 1px solid var(--admin-line);
}

.quote-category-cost-list article > span {
  color: var(--admin-gold-600);
  font-size: 9px;
  font-weight: 900;
}

.quote-category-cost-list article strong,
.quote-category-cost-list article small {
  display: block;
}

.quote-category-cost-list article strong {
  color: var(--admin-navy-900);
  font-size: 12px;
}

.quote-category-cost-list article small {
  color: #8993a2;
  font-size: 9px;
}

.quote-category-cost-list article > b {
  color: #8993a2;
  font-size: 13px;
}

.quote-category-cost-list article.has-cost {
  background: #fffaf0;
}

.quote-category-cost-list article.has-cost > b {
  color: var(--admin-navy-900);
}

.quote-category-grand-total {
  align-self: start;
  border: 1px solid var(--admin-line-strong);
  background: #f8f9fb;
}

.quote-category-grand-total > div {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.quote-category-grand-total > div + div {
  border-top: 1px solid var(--admin-line);
}

.quote-category-grand-total span {
  color: var(--admin-muted);
  font-size: 10px;
}

.quote-category-grand-total strong {
  color: var(--admin-navy-900);
  font-size: 17px;
}

.quote-category-grand-total .is-grand {
  display: block;
  min-height: 104px;
  background: var(--admin-navy-900);
}

.quote-category-grand-total .is-grand span,
.quote-category-grand-total .is-grand strong {
  display: block;
}

.quote-category-grand-total .is-grand span {
  color: rgba(255, 255, 255, 0.64);
}

.quote-category-grand-total .is-grand strong {
  margin-top: 8px;
  color: var(--admin-gold-500);
  font-size: 26px;
}

@media (max-width: 900px) {
  .quote-category-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-inbox-tabs,
  .admin-summary-grid.is-two {
    grid-template-columns: 1fr;
  }

  .admin-summary-grid.is-two > div + div {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }

  .admin-inbox-tabs a {
    min-height: 70px;
  }

  .admin-response-editor.is-quote-response {
    grid-template-columns: 1fr;
  }

  .admin-response-editor.is-quote-response .admin-button {
    width: 100%;
  }

  .quote-category-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-category-heading .quote-search-field {
    width: 100%;
    flex-basis: auto;
  }

  .quote-category-summary-grid {
    padding: 12px;
  }
}

/* v31: ordered rate catalog and customer quote basket */
.is-detail-sheet .quote-category-editor .quote-rate-table {
  min-width: 1320px;
}

.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(1) { width: 76px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(2) { width: 124px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(3) { width: 142px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(4) { width: 170px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(5) { width: 78px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(6) { width: 108px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(7) { width: 300px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(8) { width: 136px; }
.is-detail-sheet .quote-category-editor .quote-rate-table th:nth-child(9) { width: 48px; }

.is-detail-sheet .quote-category-editor .quote-rate-table td:nth-child(1),
.is-detail-sheet .quote-category-editor .quote-rate-table td:nth-child(8),
.is-detail-sheet .quote-category-editor .quote-rate-table td:nth-child(9) {
  text-align: center;
}

.quote-order-controls {
  display: grid;
  width: 30px;
  min-height: 72px;
  margin: 0 auto;
  grid-template-rows: 24px 24px 24px;
  place-items: center;
}

.quote-order-controls button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--admin-line-strong);
  border-radius: 3px;
  padding: 0;
  background: #fff;
  color: var(--admin-navy-900);
  cursor: pointer;
}

.quote-order-controls button:hover:not(:disabled),
.quote-order-controls button:focus-visible {
  border-color: var(--admin-gold-600);
  background: #fff8e8;
  color: #8b6018;
}

.quote-order-controls button:disabled {
  opacity: 0.28;
  cursor: default;
}

.quote-order-controls button svg {
  width: 14px;
  height: 14px;
}

.quote-order-controls > span {
  color: var(--admin-muted);
  font-size: 10px;
  font-weight: 800;
}

.quote-add-to-draft {
  display: inline-flex;
  min-width: 112px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--admin-gold-600);
  border-radius: 4px;
  padding: 7px 9px;
  background: #fff8e8;
  color: #805711;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.quote-add-to-draft svg {
  width: 14px;
  height: 14px;
}

.quote-add-to-draft:hover:not(:disabled),
.quote-add-to-draft:focus-visible {
  background: var(--admin-gold-600);
  color: #fff;
}

.quote-add-to-draft.is-added {
  border-color: #9fc6b2;
  background: #eff9f4;
  color: #24704f;
  cursor: default;
}

.quote-draft-section {
  border-top: 1px solid var(--admin-line-strong);
  padding: 24px;
  background: #f7f8fa;
}

.quote-draft-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.quote-draft-heading .quote-section-title {
  padding: 0;
}

.quote-draft-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--admin-line-strong);
  background: #fff;
  overscroll-behavior-inline: contain;
}

.quote-draft-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.quote-draft-table th,
.quote-draft-table td {
  border-bottom: 1px solid var(--admin-line);
  padding: 9px;
  text-align: left;
  vertical-align: middle;
}

.quote-draft-table th {
  height: 42px;
  background: var(--admin-navy-900);
  color: #fff;
  font-size: 10px;
}

.quote-draft-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.quote-draft-table th:nth-child(1) { width: 76px; }
.quote-draft-table th:nth-child(2) { width: 92px; }
.quote-draft-table th:nth-child(3) { width: 112px; }
.quote-draft-table th:nth-child(4) { width: 220px; }
.quote-draft-table th:nth-child(5) { width: 72px; }
.quote-draft-table th:nth-child(6) { width: 118px; }
.quote-draft-table th:nth-child(7) { width: 100px; }
.quote-draft-table th:nth-child(8) { width: 124px; }
.quote-draft-table th:nth-child(9) { width: 48px; }

.quote-draft-table td:nth-child(1),
.quote-draft-table td:nth-child(9) {
  text-align: center;
}

.quote-draft-table td:nth-child(4) strong,
.quote-draft-table td:nth-child(4) small {
  display: block;
}

.quote-draft-table td:nth-child(4) strong {
  color: var(--admin-navy-900);
  font-size: 12px;
}

.quote-draft-table td:nth-child(4) small {
  margin-top: 3px;
  color: var(--admin-muted);
  font-size: 9px;
}

.quote-draft-table input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--admin-line-strong);
  border-radius: 4px;
  padding: 0 9px;
  background: #fff;
  color: var(--admin-ink);
  font-size: 11px;
}

.quote-draft-table input:focus {
  border-color: var(--admin-gold-600);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(185, 130, 36, 0.1);
}

.quote-rate-class {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid #c8d1df;
  border-radius: 3px;
  padding: 4px 7px;
  background: #f1f4f8;
  color: #45536a;
  font-size: 9px;
  font-weight: 800;
}

.quote-rate-class.is-option {
  border-color: #ddbd79;
  background: #fff8e8;
  color: #805711;
}

.quote-draft-table .quote-empty-row td {
  height: 150px;
  padding: 28px;
  color: var(--admin-muted);
  text-align: center;
}

.quote-draft-table .quote-empty-row svg,
.quote-draft-table .quote-empty-row strong,
.quote-draft-table .quote-empty-row span {
  display: block;
  margin: 0 auto;
}

.quote-draft-table .quote-empty-row svg {
  width: 28px;
  height: 28px;
  margin-bottom: 9px;
  color: var(--admin-gold-600);
}

.quote-draft-table .quote-empty-row strong {
  color: var(--admin-navy-900);
  font-size: 13px;
}

.quote-draft-table .quote-empty-row span {
  margin-top: 5px;
  font-size: 10px;
}

@media (max-width: 760px) {
  .quote-draft-section {
    padding: 18px 14px;
  }

  .quote-draft-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-draft-heading .admin-button {
    width: 100%;
  }
}
