/* [project]/app/globals.css [app-client] (css) */
:root {
  --ink: #17201f;
  --muted: #6d7a77;
  --line: #dbe1dd;
  --soft-line: #e9edea;
  --canvas: #eef1ed;
  --paper: #fffefb;
  --sidebar: #162a2a;
  --sidebar-soft: #203738;
  --teal: #147b73;
  --teal-dark: #0e625c;
  --teal-soft: #e5f2ed;
  --orange: #d4813b;
  --orange-soft: #fff0df;
  --red: #b34a42;
  --shadow: 0 18px 50px #1d2f2b17;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  scroll-behavior: smooth;
  font-family: Microsoft JhengHei, Noto Sans TC, system-ui, sans-serif;
}

body {
  background: radial-gradient(circle at 78% 4%, #cddcd475, transparent 28%),
    var(--canvas);
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

body:not(.backoffice-technical-warnings-enabled) nextjs-portal {
  display: none !important;
}

button, input, select, textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline-offset: 2px;
  outline: 2px solid #147b7373;
}

.backoffice-loading {
  color: #60706c;
  background: var(--canvas);
  justify-content: center;
  align-items: center;
  gap: 11px;
  min-height: 100vh;
  font-size: 10px;
  display: flex;
}

.access-gate {
  min-height: 100vh;
  color: var(--ink);
  background: #f4f6f2;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, .95fr);
  display: grid;
}

.access-brand-panel {
  color: #fff;
  background: radial-gradient(circle at 84% 14%, #2996884d, #0000 24%), radial-gradient(circle at 18% 82%, #d089401f, #0000 25%), linear-gradient(#ffffff07 1px, #0000 1px) 0 0 / 28px 28px, linear-gradient(90deg, #ffffff07 1px, #0000 1px) 0 0 / 28px 28px, #112c2d;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 68px);
  display: flex;
  position: relative;
  overflow: hidden;
}

.access-brand-panel:after {
  content: "";
  border: 1px solid #64c8b91f;
  border-radius: 50%;
  width: 430px;
  height: 430px;
  position: absolute;
  bottom: -180px;
  right: -120px;
  box-shadow: 0 0 0 55px #64c8b906, 0 0 0 110px #64c8b905;
}

.access-brand {
  z-index: 1;
  align-items: center;
  gap: 14px;
  display: flex;
  position: relative;
}

.access-brand img {
  object-fit: contain;
  background: #fffffff5;
  border-radius: 12px;
  width: 50px;
  height: 50px;
  padding: 4px;
  box-shadow: 0 10px 25px #0003;
}

.access-brand > span {
  flex-direction: column;
  display: flex;
}

.access-brand strong {
  letter-spacing: .16em;
  font-size: 16px;
}

.access-brand small {
  color: #73aaa2;
  letter-spacing: .16em;
  margin-top: 4px;
  font-size: 8px;
}

.access-hero {
  z-index: 1;
  width: min(570px, 100%);
  margin: auto 0;
  padding: 70px 0 55px;
  position: relative;
}

.access-kicker {
  color: #5ac0b0;
  letter-spacing: .2em;
  font-size: 9px;
  font-weight: 800;
}

.access-hero h1 {
  letter-spacing: .025em;
  margin: 23px 0 18px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 700;
  line-height: 1.25;
}

.access-hero p {
  color: #9fb7b5;
  max-width: 500px;
  margin: 0;
  font-size: 12px;
  line-height: 1.9;
}

.security-points {
  z-index: 1;
  border-top: 1px solid #ffffff1a;
  grid-template-columns: repeat(3, 1fr);
  display: grid;
  position: relative;
}

.security-points > div {
  color: #5fc0b1;
  gap: 10px;
  min-height: 82px;
  padding: 20px 16px 0 0;
  display: flex;
}

.security-points > div + div {
  border-left: 1px solid #ffffff14;
  padding-left: 18px;
}

.security-points span {
  flex-direction: column;
  display: flex;
}

.security-points strong {
  color: #d8e8e5;
  font-size: 9px;
}

.security-points small {
  color: #678985;
  margin-top: 5px;
  font-size: 7px;
  line-height: 1.5;
}

.access-login-panel {
  background: radial-gradient(circle at 55% 15%, #d5e2da8c, #0000 30%), #f3f5f1;
  place-items: center;
  min-height: 100vh;
  padding: 40px;
  display: grid;
  position: relative;
}

.login-card {
  background: #fffffcf0;
  border: 1px solid #dce3de;
  border-radius: 13px;
  width: min(430px, 100%);
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 26px 80px #1e312b1f;
}

.login-lock {
  width: 48px;
  height: 48px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 12px;
  place-items: center;
  display: grid;
  box-shadow: inset 0 0 0 1px #147b7314;
}

.login-heading {
  margin-top: 24px;
}

.login-heading > span {
  color: var(--teal);
  letter-spacing: .17em;
  font-size: 8px;
  font-weight: 800;
}

.login-heading h2 {
  margin: 8px 0;
  font-size: 24px;
}

.login-heading p {
  color: #7d8985;
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
}

.login-card form {
  margin-top: 28px;
}

.login-card form > label {
  color: #485652;
  margin-bottom: 8px;
  font-size: 9px;
  font-weight: 700;
  display: block;
}

.password-field {
  color: #7a8985;
  background: #fff;
  border: 1px solid #cfd8d3;
  border-radius: 7px;
  grid-template-columns: 22px 1fr 36px;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 5px 0 14px;
  transition: border-color .15s, box-shadow .15s;
  display: grid;
}

.password-field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px #147b7317;
}

.password-field input {
  min-width: 0;
  height: 100%;
  color: var(--ink);
  background: none;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.password-field input::placeholder {
  color: #a6afac;
}

.password-field button {
  color: #7d8b87;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 6px;
  place-items: center;
  width: 34px;
  height: 34px;
  display: grid;
}

.password-field button:hover {
  color: var(--teal);
  background: var(--teal-soft);
}

.login-error {
  color: #943c36;
  background: #f9e8e6;
  border-radius: 6px;
  margin: 10px 0 0;
  padding: 9px 11px;
  font-size: 9px;
}

.login-submit {
  border: 1px solid var(--teal);
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #17867c, #0f6f68);
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin-top: 14px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  box-shadow: 0 10px 24px #0f6f682e;
}

.login-submit:disabled {
  opacity: .65;
  cursor: wait;
}

.session-check {
  color: #74817d;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 100px;
  margin-top: 24px;
  font-size: 9px;
  display: flex;
}

.session-spinner {
  border: 2px solid #d7e5e0;
  border-top-color: var(--teal);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: .7s linear infinite session-spin;
  display: inline-block;
}

.session-spinner.small {
  border-color: #fff #ffffff59 #ffffff59;
  width: 15px;
  height: 15px;
}

@keyframes session-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-alert {
  color: #866328;
  background: #fff5df;
  border: 1px solid #e7d0a9;
  border-radius: 7px;
  gap: 10px;
  margin-top: 25px;
  padding: 13px;
  font-size: 9px;
  line-height: 1.6;
  display: flex;
}

.login-alert span {
  flex-direction: column;
  display: flex;
}

.login-alert strong {
  color: #685029;
}

.login-footnote {
  color: #929d99;
  border-top: 1px solid #e9edea;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 16px;
  font-size: 7px;
  line-height: 1.5;
  display: flex;
}

.access-copyright {
  color: #a0aaa7;
  text-align: center;
  margin: 0;
  font-size: 7px;
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
}

.quote-app {
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100vh;
  display: grid;
}

.app-sidebar {
  z-index: 10;
  color: #314b45;
  background: radial-gradient(circle at 26% 0, #ffffffd1, #0000 30%), #f4ede2 linear-gradient(#f7f2e9, #eee5d8);
  border-right: 1px solid #ddd3c4;
  flex-direction: column;
  height: 100vh;
  padding: 24px 14px 18px;
  display: flex;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.sidebar-brand {
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 7px;
  display: flex;
}

.sidebar-brand img {
  object-fit: contain;
  background: #fffffff2;
  border-radius: 11px;
  width: 42px;
  height: 42px;
  padding: 3px;
  box-shadow: 0 7px 16px #5546311f;
}

.sidebar-brand span, .sidebar-footer span:last-child {
  flex-direction: column;
  display: flex;
}

.sidebar-brand strong {
  color: #203b35;
  letter-spacing: .12em;
  font-size: 21px;
}

.sidebar-brand small {
  color: #687c76;
  letter-spacing: .08em;
  margin-top: 4px;
  font-size: 13.5px;
}

.new-quote-button {
  color: #fff;
  cursor: pointer;
  letter-spacing: .03em;
  background: linear-gradient(135deg, #19897f, #116d66);
  border: 1px solid #77c7b833;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  margin: 25px 0 24px;
  font-size: 16.5px;
  font-weight: 700;
  transition: transform .16s, filter .16s;
  display: inline-flex;
  box-shadow: 0 10px 20px #031a192e;
}

.new-quote-button:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.sidebar-section-label {
  color: #62766f;
  letter-spacing: .13em;
  background: none;
  border: 0;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 8px 12px;
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
}

.sidebar-drafts-toggle {
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
  min-height: 37px;
  transition: color .16s, background .16s;
}

.sidebar-drafts-toggle:hover, .sidebar-drafts-toggle:focus-visible {
  color: #24564c;
  background: #2a5c5112;
  outline: none;
}

.sidebar-section-meta {
  align-items: center;
  gap: 7px;
  display: inline-flex;
}

.sidebar-section-label em {
  color: #365f56;
  letter-spacing: 0;
  background: #2b5b5117;
  border-radius: 20px;
  place-items: center;
  min-width: 28px;
  height: 25px;
  padding: 0 6px;
  font-style: normal;
  display: grid;
}

.sidebar-fold-icon {
  color: #52756e;
  background: #2b5b5114;
  border-radius: 50%;
  place-items: center;
  width: 25px;
  height: 25px;
  display: grid;
}

.sidebar-fold-icon svg {
  transition: transform .18s;
}

.sidebar-drafts-toggle.expanded .sidebar-fold-icon svg {
  transform: rotate(90deg);
}

.quote-list {
  scrollbar-width: thin;
  scrollbar-color: #b8ac9b transparent;
  flex-direction: column;
  gap: 5px;
  min-height: 100px;
  margin: 0 -7px;
  padding: 0 7px 10px;
  display: flex;
  overflow-y: auto;
}

.quote-list[hidden] {
  display: none;
}

.quote-list-item {
  text-align: left;
  color: #3f5751;
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 7px;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  width: 100%;
  min-height: 88px;
  padding: 12px 25px 12px 11px;
  transition: background .16s, border-color .16s;
  display: grid;
  position: relative;
}

.quote-list-item:hover {
  background: #2a5c510f;
}

.quote-list-item.active {
  background: #e3ece6;
  border-color: #bfd1ca;
  box-shadow: inset 3px 0 #36a093;
}

.quote-list-icon {
  color: #56887e;
  background: #2b645914;
  border-radius: 7px;
  place-items: center;
  width: 31px;
  height: 31px;
  display: grid;
}

.quote-list-item.active .quote-list-icon {
  color: #28796d;
  background: #3194871f;
}

.quote-list-copy {
  flex-direction: column;
  min-width: 0;
  display: flex;
}

.quote-list-copy strong, .quote-list-copy small, .quote-list-copy em {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.quote-list-copy strong {
  color: #243c37;
  font-size: 15px;
  font-weight: 700;
}

.quote-list-copy small {
  color: #63766f;
  margin-top: 4px;
  font-size: 12px;
}

.quote-list-copy em {
  color: #7c847f;
  margin-top: 9px;
  font-size: 12px;
  font-style: normal;
}

.status-dot {
  background: #738582;
  border-radius: 50%;
  width: 7px;
  height: 7px;
  position: absolute;
  top: 15px;
  right: 11px;
}

.status-dot.sent {
  background: #d99a54;
  box-shadow: 0 0 0 3px #d99a541a;
}

.status-dot.accepted {
  background: #51ae79;
  box-shadow: 0 0 0 3px #51ae791a;
}

.sidebar-current-actions {
  border-top: 1px solid #d9cfc0;
  flex-direction: column;
  gap: 3px;
  padding: 13px 7px;
  display: flex;
}

.sidebar-current-actions button {
  color: #4e6962;
  cursor: pointer;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 5px;
  align-items: center;
  gap: 8px;
  height: 41px;
  padding: 0 7px;
  font-size: 13.5px;
  display: flex;
}

.sidebar-current-actions button:hover {
  color: #204e45;
  background: #2a5c5112;
}

.sidebar-current-actions button.danger-link:hover {
  color: #a33f38;
}

.sidebar-footer {
  border-top: 1px solid #d9cfc0;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 15px 8px 2px;
  display: flex;
}

.online-dot {
  background: #4bc18e;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px #4bc18e1a;
}

.online-dot.local-only {
  background: #d8a84b;
  box-shadow: 0 0 0 4px #d8a84b1f;
}

.sidebar-footer strong {
  color: #4d665f;
  font-size: 12px;
}

.sidebar-footer small {
  color: #7a827d;
  margin-top: 4px;
  font-size: 10.5px;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  z-index: 8;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: #f9faf7e0;
  border-bottom: 1px solid #cad3cecc;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 26px;
  height: 66px;
  padding: 0 clamp(20px, 3vw, 42px);
  display: grid;
  position: sticky;
  top: 0;
}

.topbar-title {
  color: #89928f;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 10px;
  display: flex;
}

.topbar-title strong {
  min-width: 0;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  overflow: hidden;
}

.topbar-save-state {
  color: #788480;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  display: flex;
}

.topbar-save-state.connected {
  color: #26745f;
}

.topbar-save-state.error {
  color: #9a5b36;
}

.save-check {
  color: #207d64;
  background: #dff0e8;
  border-radius: 50%;
  place-items: center;
  width: 20px;
  height: 20px;
  display: grid;
}

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

.topbar-actions button {
  color: #485753;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d6ddd9;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  font-size: 9px;
  font-weight: 700;
  transition: border-color .15s, transform .15s;
  display: inline-flex;
}

.topbar-actions button:hover {
  border-color: #9db7b1;
  transform: translateY(-1px);
}

.topbar-actions button:disabled {
  opacity: .58;
  cursor: wait;
  transform: none;
}

.topbar-actions .database-action {
  color: #176d62;
  background: #f2f8f5;
  border-color: #b7cdc6;
}

.topbar-actions .qd-export-action {
  color: #fff;
  background: linear-gradient(135deg, #ee7a2f, #c94d20);
  border-color: #c64f22;
  box-shadow: 0 6px 15px #c94d203d;
}

.topbar-actions .qd-export-action:hover {
  border-color: #a83b17;
  box-shadow: 0 8px 18px #c94d2052;
}

.topbar-actions .primary-action {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.topbar-actions .mobile-smart-fill-action {
  display: none;
}

.topbar-actions .date-search-action {
  color: #1f675c;
  background: linear-gradient(135deg, #f4faf7, #e9f5f0);
  border-color: #9fc5ba;
  box-shadow: 0 5px 14px #286f601a;
}

.topbar-actions .date-search-action:hover {
  color: #15574e;
  background: #e5f3ee;
  border-color: #65a394;
}

.topbar-actions .gantt-action {
  color: #304f78;
  background: linear-gradient(135deg, #f5f8fc, #e8eef7);
  border-color: #8da7c8;
  box-shadow: 0 5px 14px #304f781f;
}

.topbar-actions .gantt-action:hover {
  color: #233f65;
  background: #e4ebf5;
  border-color: #617fa8;
}

.topbar-actions .backoffice-action {
  color: #fff;
  background: linear-gradient(135deg, #1e5753, #123b39);
  border-color: #173d3b;
  box-shadow: 0 6px 16px #123b3938;
}

.topbar-actions .backoffice-action:hover {
  color: #fff;
  background: linear-gradient(135deg, #246660, #164642);
  border-color: #0d302e;
}

.workspace {
  grid-template-columns: minmax(680px, 1fr) 310px;
  align-items: start;
  gap: 24px;
  width: min(1680px, 100% - clamp(22px, 3.5vw, 56px));
  margin: 0 auto;
  padding: 34px 0 70px;
  display: grid;
}

.editor-shell {
  min-width: 0;
  box-shadow: var(--shadow);
  background: #f8f8f5;
  border: 1px solid #dce1dd;
  border-radius: 10px;
  overflow: hidden;
}

.editor-head {
  background: #fdfdfa;
  border-bottom: 1px solid #dfe4e0;
  justify-content: space-between;
  align-items: center;
  min-height: 80px;
  padding: 17px 22px;
  display: flex;
}

.editor-head > div {
  min-width: 0;
}

.editor-head h2 {
  color: #1d2826;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 720px;
  margin: 6px 0 2px;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
}

.editor-head p {
  color: #8a9491;
  margin: 0;
  font-size: 8px;
}

.quote-status {
  color: #6e7d79;
  letter-spacing: .08em;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 700;
  display: inline-flex;
}

.quote-status:before {
  content: "";
  background: #87938f;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.quote-status.sent {
  color: #ae6f2e;
}

.quote-status.sent:before {
  background: #dc974d;
}

.quote-status.accepted {
  color: #2b8056;
}

.quote-status.accepted:before {
  background: #4eae78;
}

.a4-label {
  color: #89938f;
  letter-spacing: .04em;
  background: #fff;
  border: 1px solid #dee4df;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 8px;
}

.quote-sheet {
  color: #151918;
  background: linear-gradient(#14282303 1px, transparent 1px),
    var(--paper);
  background-size: 100% 28px;
  width: calc(100% - 38px);
  max-width: 1100px;
  min-height: 1180px;
  margin: 19px auto 25px;
  padding: clamp(32px, 5vw, 60px) clamp(30px, 5vw, 64px);
  box-shadow: 0 9px 28px #2738321a;
}

.document-heading {
  grid-template-columns: 90px 1fr 130px;
  align-items: start;
  min-height: 94px;
  display: grid;
  position: relative;
}

.document-heading > img {
  object-fit: contain;
  width: 70px;
  height: 70px;
}

.document-heading > div:nth-child(2) {
  text-align: center;
}

.document-heading h1 {
  letter-spacing: .24em;
  white-space: nowrap;
  margin: 3px 0 6px;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  font-size: clamp(25px, 3.2vw, 37px);
  font-weight: 700;
}

.document-heading h2 {
  letter-spacing: .12em;
  margin: 0;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 400;
}

.document-number {
  flex-direction: column;
  align-items: flex-end;
  padding-top: 7px;
  display: flex;
}

.document-number span {
  color: #7a827f;
  letter-spacing: .08em;
  font-size: 8px;
}

.document-number .editable {
  text-align: right;
  border-bottom: 1px solid #c8ceca;
  width: 100%;
  margin-top: 5px;
  padding: 3px 0;
  font-size: 9px;
}

.editable {
  width: 100%;
  min-width: 0;
  height: 100%;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 2px;
  outline: none;
  padding: 2px 4px;
}

.editable::placeholder, .client-grid .editable::placeholder {
  color: #a8afac;
}

.editable:hover {
  background: #147b730a;
}

.editable:focus {
  background: #edf7f3;
  box-shadow: 0 0 0 1px #147b7359;
}

.company-grid {
  border-bottom: 3px double #29302e;
  grid-template-columns: 1fr .8fr .8fr;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  display: grid;
}

.company-grid p {
  align-items: center;
  min-height: 26px;
  margin: 0;
  padding: 3px 5px;
  font-size: 12px;
  display: flex;
}

.company-grid .wide {
  grid-column: 1;
}

.company-grid .editable {
  width: 115px;
  min-height: 22px;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}

.client-grid {
  border-bottom: 3px double #29302e;
  grid-template-columns: 1fr 1fr;
  display: grid;
}

.client-grid label {
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 31px;
  padding: 3px 4px;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  font-size: 12px;
  display: grid;
}

.client-grid label:nth-child(2n) {
  border-left: 1px solid #e1e4e0;
}

.client-grid span {
  white-space: nowrap;
}

.client-grid .editable {
  min-height: 25px;
  font-family: inherit;
  font-size: 12px;
}

.catalog-search {
  z-index: 8;
  background: #f8fbf9;
  border-bottom: 1px solid #dfe6e2;
  grid-template-columns: minmax(170px, .62fr) minmax(280px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 5px 11px;
  display: grid;
  position: relative;
}

.catalog-search-label {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  display: grid;
}

.catalog-search-label > span {
  width: 28px;
  height: 28px;
  color: var(--teal);
  background: #e1f0eb;
  border-radius: 7px;
  place-items: center;
  display: grid;
}

.catalog-search-label div {
  min-width: 0;
}

.catalog-search-label strong, .catalog-search-label small {
  display: block;
}

.catalog-search-label strong {
  color: #34443f;
  font-size: 9px;
}

.catalog-search-label small {
  color: #89948f;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  font-size: 7px;
  overflow: hidden;
}

.catalog-search-label em {
  color: #5e746e;
  font-size: 7px;
  font-style: normal;
}

.catalog-search-field {
  color: #82908b;
  background: #fff;
  border: 1px solid #cfdad5;
  border-radius: 6px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  display: flex;
  box-shadow: 0 3px 10px #20453d09;
}

.catalog-search-field:focus-within {
  border-color: #64a398;
  box-shadow: 0 0 0 3px #147b7317;
}

.catalog-search-field input {
  color: #35433f;
  background: none;
  border: 0;
  outline: none;
  flex: 1;
  min-width: 0;
  font-size: 9px;
}

.catalog-search-field input::placeholder {
  color: #a3aca8;
}

.catalog-search-field button {
  color: #87938f;
  cursor: pointer;
  background: #f0f3f1;
  border: 0;
  border-radius: 50%;
  place-items: center;
  width: 23px;
  height: 23px;
  display: grid;
}

.catalog-results {
  z-index: 20;
  background: #fff;
  border: 1px solid #ccd8d3;
  border-radius: 7px;
  width: min(430px, 100% - 10px);
  max-height: 325px;
  padding: 5px;
  position: absolute;
  top: calc(100% - 5px);
  right: 5px;
  overflow-y: auto;
  box-shadow: 0 15px 34px #1c3a332e;
}

.catalog-results > button {
  color: #3d4a47;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 5px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 10px 11px;
  display: flex;
}

.catalog-results > button:last-child {
  border-bottom: 0;
}

.catalog-results > button:hover, .catalog-results > button:focus-visible {
  background: #eef7f4;
  outline: none;
}

.catalog-result-copy, .catalog-result-price {
  flex-direction: column;
  min-width: 0;
  display: flex;
}

.catalog-result-copy {
  flex: 1;
}

.catalog-result-copy strong, .catalog-result-copy small {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.catalog-result-copy strong {
  font-size: 13px;
}

.catalog-result-copy small, .catalog-result-price small {
  color: #89938f;
  margin-top: 4px;
  font-size: 10.5px;
  line-height: 1.45;
}

.catalog-result-price {
  text-align: right;
  flex: none;
}

.catalog-result-price strong {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.catalog-empty {
  color: #8d9793;
  text-align: center;
  padding: 20px 12px;
  font-size: 8px;
}

.inline-catalog {
  width: 100%;
  height: 100%;
  position: relative;
}

.quote-table tbody td:has(.inline-catalog-results) {
  z-index: 25;
  position: relative;
}

.inline-catalog-results {
  z-index: 40;
  background: #fff;
  border: 1px solid #c9d7d2;
  border-radius: 6px;
  width: 390px;
  padding: 6px;
  position: absolute;
  top: calc(100% - 1px);
  left: -3px;
  box-shadow: 0 12px 28px #1b3a3333;
}

.inline-catalog-results button {
  color: #3d4a47;
  text-align: left;
  cursor: pointer;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 4px;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 62px;
  padding: 10px 11px;
  display: flex;
}

.inline-catalog-results button:last-child {
  border-bottom: 0;
}

.inline-catalog-results button:hover, .inline-catalog-results button:focus-visible {
  background: #edf7f3;
  outline: none;
}

.inline-catalog-results button > span {
  flex: 1;
  min-width: 0;
}

.inline-catalog-results strong, .inline-catalog-results small {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}

.inline-catalog-results strong {
  font-size: 15px;
  line-height: 1.4;
}

.inline-catalog-results small {
  color: #89938f;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
}

.inline-catalog-results em {
  color: var(--teal-dark);
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex: none;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
}

.inline-catalog-results em small {
  color: #8c9692;
  font-size: 11.5px;
  font-weight: 400;
}

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

.quote-pagination {
  color: #4d5d56;
  background: #f6f8f5;
  border: 1px solid #d7e1dc;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-family: Microsoft JhengHei, sans-serif;
  font-size: 12px;
  display: flex;
}

.quote-pagination-top {
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
}

.quote-pagination-bottom {
  border-top: 0;
  border-radius: 0 0 8px 8px;
  margin-bottom: 8px;
}

.quote-pagination > span {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.quote-pagination > div {
  align-items: center;
  gap: 6px;
  display: flex;
}

.quote-pagination button, .quote-pagination select {
  color: #234d42;
  min-height: 32px;
  font: inherit;
  background: #fff;
  border: 1px solid #c4d3cc;
  border-radius: 7px;
  padding: 5px 10px;
  font-weight: 700;
}

.quote-pagination button:not(:disabled):hover {
  border-color: var(--teal);
  background: #e9f5f1;
}

.quote-pagination button:disabled {
  color: #9ca7a2;
  cursor: not-allowed;
  background: #edf0ee;
}

.quote-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  font-size: 12px;
}

.col-no {
  width: 6%;
}

.col-part {
  width: 11%;
}

.col-name {
  width: 21%;
}

.col-spec {
  width: 18%;
}

.col-qty, .col-unit {
  width: 7%;
}

.col-price {
  width: 10%;
}

.col-total {
  width: 14%;
}

.col-actions {
  width: 6%;
}

.quote-table th, .quote-table td {
  vertical-align: middle;
  border-bottom: 1px solid #dfe2df;
  height: 30px;
  padding: 0 4px;
}

.quote-table thead th {
  text-align: center;
  letter-spacing: .06em;
  border-bottom: 1px solid #3e4442;
  height: 34px;
  font-weight: 400;
}

.quote-table thead th + th {
  border-left: 1px solid #e2e5e2;
}

.quote-table tbody td:first-child, .quote-table tbody td:nth-child(5), .quote-table tbody td:nth-child(6) {
  text-align: center;
}

.quote-table tbody td:nth-child(7), .quote-table .amount-cell {
  text-align: right;
}

.quote-table tbody tr:not(.section-row):hover {
  background: #147b7306;
}

.quote-table tbody tr.row-selected, .quote-table tbody tr.section-row.row-selected {
  color: #fff;
  background: #285f59;
  box-shadow: inset 4px 0 #efc66d;
}

.quote-table tbody tr.row-selected td {
  border-bottom-color: #ffffff47;
}

.quote-table tbody tr.row-selected .editable {
  color: #fff;
}

.quote-table tbody tr.row-selected .editable:hover {
  background: #ffffff1a;
}

.quote-table tbody tr.row-selected .editable:focus, .quote-table tbody tr.row-selected .inline-catalog-results, .quote-table tbody tr.row-selected .inline-catalog-results button {
  color: #17201f;
  background: #fff;
}

.quote-row-context-menu {
  z-index: 500;
  background: #fff;
  border: 1px solid #bdcbc6;
  border-radius: 8px;
  min-width: 205px;
  padding: 6px;
  position: fixed;
  box-shadow: 0 14px 35px #162a2740;
}

.quote-row-context-menu button {
  color: #a23e37;
  cursor: pointer;
  background: #fff;
  border: 0;
  border-radius: 6px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
}

.quote-row-context-menu button:hover, .quote-row-context-menu button:focus-visible {
  background: #fff1ee;
  outline: none;
}

.quote-table .numeric-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.quote-table input[type="number"] {
  appearance: textfield;
}

.quote-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quote-table input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quote-table .unit-input {
  text-align: center;
}

.amount-cell {
  font-variant-numeric: tabular-nums;
  padding-right: 7px !important;
}

.section-row {
  background: #f2f3ef;
  border-top: 1px solid #9ba29f;
  border-bottom: 1px solid #afb5b2;
  font-weight: 700;
}

.section-row td {
  border-bottom-color: #aeb5b1;
}

.calculated-row td {
  background: #edf4ef59;
}

.fixed-fee-row td {
  background: #dfeee47a;
}

.fixed-fee-row .editable[readonly] {
  color: #365647;
  cursor: default;
  font-weight: 700;
}

.rate-input {
  align-items: center;
  width: 100%;
  display: flex;
}

.rate-input span {
  color: #69736f;
  padding-right: 3px;
  font-size: 9px;
}

.row-actions-cell {
  background: var(--paper) !important;
  border-bottom-color: #0000 !important;
  padding: 0 !important;
}

.row-actions {
  justify-content: center;
  align-items: center;
  width: 100%;
  display: flex;
}

.row-actions-cell button {
  color: #a3aaa7;
  cursor: pointer;
  opacity: 0;
  background: none;
  border: 0;
  border-radius: 5px;
  place-items: center;
  width: 18px;
  height: 25px;
  transition: opacity .14s, color .14s, background .14s;
  display: grid;
}

.row-actions-cell .row-drag-handle {
  touch-action: none;
  color: #577d70;
  cursor: grab;
  opacity: .62;
}

.row-actions-cell .row-drag-handle:hover {
  color: var(--teal);
  background: #e5f1ed;
}

.quote-table.is-row-dragging, .quote-table.is-row-dragging .row-drag-handle {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}

.quote-table tr.row-dragging {
  opacity: .52;
}

.quote-table tr.row-drag-before td {
  border-top: 3px solid var(--teal) !important;
}

.quote-table tr.row-drag-after td {
  border-bottom: 3px solid var(--teal) !important;
}

.quote-table tr:hover .row-actions-cell button, .row-actions-cell button:focus-visible {
  opacity: 1;
}

.row-actions-cell button:hover {
  color: var(--red);
  background: #f9eae8;
}

.row-actions-cell button:disabled, .row-actions-cell button:disabled:hover {
  color: #547462;
  cursor: not-allowed;
  opacity: .78;
  background: #e5f0e9;
}

.quote-table tfoot td, .quote-table tfoot th {
  border-top: 3px double #2b302e;
  border-bottom: 3px double #2b302e;
  height: 38px;
}

.quote-table tfoot th {
  text-align: right;
  font-size: 11px;
  font-weight: 400;
}

.quote-table tfoot td:nth-last-child(2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-right: 8px;
  font-family: Microsoft JhengHei, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.editor-toolbar {
  border-bottom: 1px dashed #d8ddda;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 3px;
  display: flex;
}

.editor-toolbar button {
  color: #53615d;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d8dfdb;
  border-radius: 5px;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  font-size: 8px;
  font-weight: 700;
  display: inline-flex;
}

.editor-toolbar button:hover {
  color: var(--teal);
  border-color: #9bb8b1;
}

.editor-toolbar > span {
  color: #98a09d;
  margin-left: auto;
  font-size: 7px;
}

.quote-notes {
  grid-template-columns: 72px 1fr;
  padding: 10px 4px 7px;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  font-size: 10px;
  display: grid;
}

.quote-notes > strong {
  padding-top: 4px;
  font-weight: 400;
}

.quote-notes ol {
  margin: 0;
  padding-left: 18px;
}

.quote-notes li {
  padding-left: 2px;
}

.quote-notes textarea {
  resize: vertical;
  width: 100%;
  min-height: 24px;
  color: inherit;
  background: none;
  border: 0;
  border-radius: 3px;
  outline: none;
  padding: 3px 4px;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.65;
  overflow: hidden;
}

.quote-notes textarea:hover, .quote-notes textarea:focus {
  background: #f0f7f3;
}

.signature-area {
  grid-template-columns: 1fr 230px 1fr;
  align-items: start;
  gap: 20px;
  min-height: 190px;
  padding: 25px 4px 0;
  font-family: DFKai-SB, BiauKai, 標楷體, serif;
  font-size: 11px;
  display: grid;
}

.signature-area p {
  margin: 0 0 8px;
}

.signature-area img {
  object-fit: contain;
  mix-blend-mode: multiply;
  width: 170px;
  max-height: 145px;
  margin: -4px auto 0;
}

.signature-area .responsible {
  align-items: flex-end;
  gap: 7px;
  display: flex;
}

.signature-area .responsible span {
  border-bottom: 1px solid #323735;
  flex: 1;
  height: 22px;
}

.tool-panel {
  flex-direction: column;
  gap: 15px;
  display: flex;
  position: sticky;
  top: 90px;
}

.tool-card {
  background: #fffffcf0;
  border: 1px solid #dce2de;
  border-radius: 9px;
  padding: 18px;
  box-shadow: 0 10px 30px #2636310e;
}

.tool-card-heading {
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  display: grid;
}

.tool-icon {
  width: 34px;
  height: 34px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  place-items: center;
  display: grid;
}

.tool-icon.warm {
  color: #a96129;
  background: var(--orange-soft);
}

.tool-card-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.tool-card-heading p {
  color: #8e9895;
  margin: 3px 0 0;
  font-size: 10px;
}

.tool-card-heading em {
  color: #64726e;
  background: #f0f2ef;
  border-radius: 20px;
  place-items: center;
  min-width: 25px;
  height: 23px;
  font-size: 10px;
  font-style: normal;
  display: grid;
}

.status-control {
  color: #73807c;
  border-top: 1px solid #ecefec;
  border-bottom: 1px solid #ecefec;
  justify-content: space-between;
  align-items: center;
  margin-top: 17px;
  padding: 10px 0;
  font-size: 10px;
  display: flex;
}

.status-control select {
  color: #35433f;
  background: #fff;
  border: 1px solid #d8dfdb;
  border-radius: 5px;
  outline: none;
  height: 29px;
  padding: 0 24px 0 9px;
  font-size: 11px;
  font-weight: 700;
}

.summary-lines {
  margin: 14px 0 0;
}

.summary-lines > div {
  color: #788480;
  justify-content: space-between;
  align-items: center;
  min-height: 27px;
  font-size: 11px;
  display: flex;
}

.summary-lines dt, .summary-lines dd {
  margin: 0;
}

.summary-lines dd {
  color: #34413e;
  font-variant-numeric: tabular-nums;
}

.summary-lines .summary-total {
  border-top: 1px solid #dfe5e1;
  min-height: 46px;
  margin-top: 6px;
}

.summary-lines .summary-total dt {
  color: #3b4a46;
  font-weight: 700;
}

.summary-lines .summary-total dd {
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 800;
}

.summary-actions {
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
  display: grid;
}

.summary-actions button {
  color: #53615d;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d8dfdb;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
}

.summary-actions button:disabled {
  opacity: .65;
  cursor: wait;
}

.summary-actions .qd-export-action {
  color: #fff;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #f18735, #c94d20);
  border-color: #c64f22;
  grid-column: 1 / -1;
  min-height: 42px;
  font-size: 11px;
  box-shadow: 0 7px 16px #c94d2038;
}

.summary-actions .gantt-summary-action {
  color: #fff;
  background: linear-gradient(135deg, #5f7fa8, #385c89);
  border-color: #718eb4;
  grid-column: 1 / -1;
  min-height: 40px;
  font-size: 11px;
  box-shadow: 0 6px 15px #32527c33;
}

.summary-actions .solid-action {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.attachment-drop {
  color: #75837f;
  cursor: pointer;
  background: #f4f8f5;
  border: 1px dashed #adc7c0;
  border-radius: 7px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 115px;
  margin-top: 16px;
  transition: border-color .15s, background .15s;
  display: flex;
}

.attachment-drop:hover, .attachment-drop.dragging {
  border-color: var(--teal);
  background: #eaf5f1;
}

.attachment-drop > span {
  width: 35px;
  height: 35px;
  color: var(--teal);
  background: #fff;
  border-radius: 50%;
  place-items: center;
  display: grid;
  box-shadow: 0 6px 16px #1a4b4317;
}

.attachment-drop strong {
  color: #43514d;
  margin-top: 8px;
  font-size: 11px;
}

.attachment-drop small {
  color: #929c99;
  margin-top: 4px;
  font-size: 9px;
}

.attachment-list {
  max-height: 270px;
  margin-top: 11px;
  overflow-y: auto;
}

.empty-attachments {
  color: #a3aba8;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 70px;
  font-size: 10px;
  display: flex;
}

.attachment-item {
  border-bottom: 1px solid #edf0ed;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  display: grid;
}

.attachment-name {
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  flex-direction: column;
  min-width: 0;
  padding: 5px 0;
  display: flex;
}

.attachment-name strong, .attachment-name small {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.attachment-name strong {
  color: #44514e;
  font-size: 10px;
}

.attachment-name small {
  color: #9aa29f;
  margin-top: 3px;
  font-size: 9px;
}

.attachment-name:hover strong {
  color: var(--teal);
}

.attachment-item-actions, .archive-file-actions {
  align-items: center;
  gap: 2px;
  display: flex;
}

.attachment-item-actions button, .archive-file-actions button {
  color: #70817c;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 5px;
  place-items: center;
  width: 23px;
  height: 23px;
  display: grid;
}

.attachment-item-actions button:hover, .archive-file-actions button:hover {
  color: var(--teal-dark);
  background: #e8f2ee;
}

.attachment-delete {
  color: #a0a9a6;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 5px;
  place-items: center;
  width: 23px;
  height: 23px;
  display: grid;
}

.attachment-delete:hover {
  color: var(--red);
  background: #f8e9e7;
}

.archive-storage-state {
  background: #edf7f3;
  border: 1px solid #cfe2da;
  border-radius: 7px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px;
  display: grid;
}

.archive-storage-state.pending {
  background: #fff8e9;
  border-color: #ead8b6;
}

.archive-storage-state > span {
  width: 30px;
  height: 30px;
  color: var(--teal);
  background: #fff;
  border-radius: 50%;
  place-items: center;
  display: grid;
}

.archive-storage-state.pending > span {
  color: #93662d;
}

.archive-storage-state strong, .archive-storage-state small {
  display: block;
}

.archive-storage-state strong {
  color: #36544d;
  font-size: 10px;
}

.archive-storage-state small {
  color: #75857f;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  font-size: 8px;
  overflow: hidden;
}

.archive-search {
  color: #7e8c87;
  background: #fff;
  border: 1px solid #d8e0dc;
  border-radius: 6px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin-top: 10px;
  padding: 0 10px;
  display: flex;
}

.archive-search:focus-within {
  border-color: #7dafa4;
  box-shadow: 0 0 0 2px #327e7014;
}

.archive-search input {
  color: #3d4d48;
  min-width: 0;
  font: inherit;
  background: none;
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 10px;
}

.archive-file-list {
  max-height: 390px;
  margin-top: 9px;
  overflow-y: auto;
}

.archive-file-item {
  border-bottom: 1px solid #edf0ed;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 6px 0;
  display: grid;
}

.archive-file-details {
  min-width: 0;
}

.archive-file-details strong, .archive-file-details small {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}

.archive-file-details strong {
  color: #3f4f4a;
  font-size: 10px;
}

.archive-file-details small {
  color: #8b9692;
  margin-top: 3px;
  font-size: 8px;
}

.archive-file-details mark {
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 7px;
  font-weight: 800;
}

.archive-file-details mark.synced {
  color: #246d5e;
  background: #e1f1eb;
}

.archive-file-details mark.pending {
  color: #8c622d;
  background: #f9edd8;
}

.archive-empty {
  color: #929d99;
  text-align: center;
  margin: 0;
  padding: 20px 8px;
  font-size: 10px;
}

.archive-expand {
  color: #446b62;
  cursor: pointer;
  background: #f4f8f6;
  border: 1px solid #d7e1dd;
  border-radius: 6px;
  width: 100%;
  min-height: 31px;
  margin-top: 8px;
  font-size: 9px;
  font-weight: 800;
}

.archive-expand:hover {
  background: #eaf4f0;
  border-color: #8eb5ac;
}

.local-database-backdrop {
  z-index: 98;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: #0d1c1ab8;
  place-items: center;
  padding: 22px;
  display: grid;
  position: fixed;
  inset: 0;
}

.local-database-dialog {
  color: #263732;
  background: #fff;
  border: 1px solid #d3dcd8e6;
  border-radius: 15px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(880px, 100%);
  height: min(780px, 100vh - 44px);
  display: grid;
  overflow: hidden;
  box-shadow: 0 30px 90px #0719156b;
}

.local-database-heading {
  background: radial-gradient(circle at 7% 0, #3589771c, #0000 34%), #fbfcfa;
  border-bottom: 1px solid #e2e8e4;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 15px 19px;
  display: grid;
}

.local-database-heading-icon {
  color: #1d7466;
  background: #e2f2ed;
  border-radius: 11px;
  place-items: center;
  width: 44px;
  height: 44px;
  display: grid;
}

.local-database-heading h2, .local-database-heading p {
  margin: 0;
}

.local-database-heading h2 {
  font-size: 19px;
}

.local-database-heading p {
  color: #73827d;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.55;
}

.local-database-heading > button {
  color: #75837f;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 9px;
  place-items: center;
  width: 38px;
  height: 38px;
  display: grid;
}

.local-database-heading > button:hover, .local-database-heading > button:focus-visible {
  color: #a7443c;
  background: #f7e8e6;
  outline: none;
}

.local-database-body {
  background: #f3f6f3;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.local-database-body .local-archive-card {
  height: 100%;
  box-shadow: none;
  flex-direction: column;
  padding: 20px;
  display: flex;
}

.local-database-body .tool-card-heading h3 {
  font-size: 17px;
}

.local-database-body .tool-card-heading p {
  font-size: 11px;
}

.local-database-body .archive-storage-state {
  padding: 12px;
}

.local-database-body .archive-storage-state strong {
  font-size: 13px;
}

.local-database-body .archive-storage-state small {
  font-size: 10px;
}

.local-database-body .archive-search {
  min-height: 44px;
}

.local-database-body .archive-search input {
  font-size: 13px;
}

.local-database-body .archive-file-list {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.local-database-body .archive-file-item {
  min-height: 76px;
}

.local-database-body .archive-file-details strong {
  font-size: 13px;
}

.local-database-body .archive-file-details small {
  font-size: 10px;
}

.local-database-body .archive-file-actions button {
  width: 38px;
  height: 38px;
}

.local-database-body .archive-empty {
  font-size: 13px;
}

.local-database-body .archive-expand {
  min-height: 38px;
  font-size: 11px;
}

.local-database-footer {
  background: #fbfcfa;
  border-top: 1px solid #e1e7e4;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 18px;
  display: flex;
}

.local-database-footer > span {
  color: #3c6a5f;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
}

.local-database-footer > div {
  gap: 8px;
  display: flex;
}

.local-database-footer button {
  color: #53635e;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d3ddd8;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 88px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
}

.local-database-footer .local-database-save {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.local-database-footer button:disabled {
  opacity: .55;
  cursor: wait;
}

.date-search-backdrop {
  z-index: 95;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: #0d1c1ab3;
  place-items: center;
  padding: 22px;
  display: grid;
  position: fixed;
  inset: 0;
}

.date-search-dialog {
  color: #263732;
  background: #fff;
  border: 1px solid #d3dcd8e6;
  border-radius: 15px;
  flex-direction: column;
  width: min(1080px, 100%);
  height: min(820px, 100vh - 44px);
  display: flex;
  overflow: hidden;
  box-shadow: 0 30px 90px #07191566;
}

.date-search-heading {
  background: radial-gradient(circle at 7% 0, #3589771a, #0000 34%), #fbfcfa;
  border-bottom: 1px solid #e2e8e4;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  padding: 15px 19px;
  display: grid;
}

.date-search-heading-icon {
  color: #1d7466;
  background: #e2f2ed;
  border-radius: 11px;
  place-items: center;
  width: 42px;
  height: 42px;
  display: grid;
}

.date-search-heading h2, .date-search-heading p {
  margin: 0;
}

.date-search-heading h2 {
  font-size: 18px;
}

.date-search-heading p {
  color: #7c8985;
  margin-top: 4px;
  font-size: 10px;
}

.date-search-heading > button {
  color: #7a8884;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 9px;
  place-items: center;
  width: 36px;
  height: 36px;
  display: grid;
}

.date-search-heading > button:hover, .date-search-heading > button:focus-visible {
  color: #a7443c;
  background: #f7e8e6;
  outline: none;
}

.date-search-body {
  background: #f6f8f5;
  grid-template-columns: minmax(0, 1fr) 345px;
  gap: 17px;
  min-height: 0;
  padding: 19px;
  display: grid;
  overflow: auto;
}

.date-calendar-panel, .date-search-results {
  background: #fff;
  border: 1px solid #dde5e1;
  border-radius: 11px;
  min-width: 0;
  overflow: hidden;
}

.date-calendar-panel {
  padding: 15px;
}

.date-calendar-toolbar {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  display: grid;
}

.date-month-step {
  color: #42675f;
  cursor: pointer;
  background: #f6faf8;
  border: 1px solid #d4dfda;
  border-radius: 8px;
  place-items: center;
  width: 38px;
  height: 38px;
  display: grid;
}

.date-month-step:hover, .date-month-step:focus-visible {
  color: #155e53;
  background: #eaf5f1;
  border-color: #7ca99f;
  outline: none;
}

.date-month-step.previous svg {
  transform: rotate(180deg);
}

.date-calendar-toolbar label {
  background: #fff;
  border: 1px solid #d7e0dc;
  border-radius: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 5px 10px;
  display: grid;
}

.date-calendar-toolbar label > span {
  color: #344b45;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
}

.date-calendar-toolbar input[type="month"] {
  color: #52716a;
  width: 126px;
  min-width: 0;
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  outline: none;
  font-size: 10px;
}

.date-calendar-summary {
  color: #6f7e79;
  background: #f4f7f5;
  border-radius: 7px;
  justify-content: space-between;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 7px;
  font-size: 10px;
  display: flex;
}

.date-calendar-summary strong {
  color: #286c60;
  font-size: 11px;
}

.date-calendar-weekdays, .date-calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  display: grid;
}

.date-calendar-weekdays {
  margin-top: 13px;
}

.date-calendar-weekdays span {
  color: #82908b;
  text-align: center;
  padding: 4px 0;
  font-size: 9px;
  font-weight: 800;
}

.date-calendar-grid {
  margin-top: 4px;
}

.date-calendar-empty, .date-calendar-day {
  border-radius: 8px;
  min-width: 0;
  min-height: 62px;
}

.date-calendar-day {
  color: #52625d;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e3e9e6;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 7px;
  font-size: 11px;
  font-weight: 800;
  transition: border-color .15s, background .15s, transform .15s;
  display: flex;
  position: relative;
}

.date-calendar-day:hover, .date-calendar-day:focus-visible {
  background: #eff7f4;
  border-color: #7daea2;
  outline: none;
  transform: translateY(-1px);
}

.date-calendar-day.today:after {
  content: "今";
  color: #9d7138;
  font-size: 8px;
  position: absolute;
  bottom: 5px;
  right: 6px;
}

.date-calendar-day.has-quotes {
  color: #185f54;
  background: #f1f8f5;
  border-color: #acd0c6;
}

.date-calendar-day.selected {
  color: #fff;
  background: #18796c;
  border-color: #18796c;
  box-shadow: 0 6px 14px #18796c33;
}

.date-calendar-day em {
  color: #fff;
  background: #288b7d;
  border-radius: 20px;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 8px;
  font-style: normal;
  display: grid;
  position: absolute;
  top: 6px;
  right: 6px;
}

.date-calendar-day.selected em {
  color: #17685d;
  background: #fff;
}

.date-search-results {
  flex-direction: column;
  display: flex;
}

.date-search-results > header {
  background: #fbfcfa;
  border-bottom: 1px solid #e5eae7;
  min-height: 92px;
  padding: 14px 15px;
}

.date-search-results > header span, .date-search-results > header strong, .date-search-results > header small {
  display: block;
}

.date-search-results > header span {
  color: #7d8985;
  letter-spacing: .08em;
  font-size: 9px;
  font-weight: 800;
}

.date-search-results > header strong {
  color: #2e423c;
  margin-top: 7px;
  font-size: 15px;
}

.date-search-results > header small {
  color: #83908c;
  margin-top: 4px;
  font-size: 9px;
}

.date-mobile-calendar-back {
  display: none;
}

.date-search-result-list {
  min-height: 0;
  padding: 9px;
  overflow-y: auto;
}

.date-search-empty {
  color: #929d99;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 250px;
  margin: 0;
  padding: 28px;
  font-size: 10px;
  line-height: 1.6;
  display: flex;
}

.date-search-empty svg {
  color: #77a79d;
}

.date-search-result-item {
  color: #42534e;
  cursor: pointer;
  text-align: left;
  background: #fff;
  border: 1px solid #e0e6e3;
  border-radius: 9px;
  grid-template-columns: auto minmax(0, 1fr) auto 17px;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 102px;
  padding: 11px;
  display: grid;
}

.date-search-result-item + .date-search-result-item {
  margin-top: 8px;
}

.date-search-result-item:hover, .date-search-result-item:focus-visible {
  background: #f4f9f7;
  border-color: #7eafa4;
  outline: none;
}

.date-search-result-item > .quote-status {
  align-self: start;
}

.date-search-result-copy {
  min-width: 0;
}

.date-search-result-copy strong, .date-search-result-copy small, .date-search-result-copy em {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}

.date-search-result-copy strong {
  color: #30443e;
  font-size: 11px;
}

.date-search-result-copy small {
  color: #6f7d79;
  margin-top: 5px;
  font-size: 9px;
}

.date-search-result-copy em {
  color: #96a09d;
  margin-top: 7px;
  font-size: 8px;
  font-style: normal;
}

.date-search-result-total {
  text-align: right;
  white-space: nowrap;
}

.date-search-result-total small, .date-search-result-total strong {
  display: block;
}

.date-search-result-total small {
  color: #929d99;
  font-size: 8px;
}

.date-search-result-total strong {
  color: #1f6b5f;
  margin-top: 4px;
  font-size: 11px;
}

.date-quote-detail {
  background: #f6f8f5;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 17px 19px 19px;
  display: flex;
  overflow: hidden;
}

.date-quote-detail-toolbar {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  display: flex;
}

.date-quote-detail-toolbar > button {
  color: #34685e;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d3dfda;
  border-radius: 8px;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
}

.date-quote-detail-toolbar > button:hover, .date-quote-detail-toolbar > button:focus-visible {
  background: #edf6f3;
  border-color: #7aa89e;
  outline: none;
}

.back-chevron {
  display: grid;
  transform: rotate(180deg);
}

.date-quote-detail-summary {
  background: #dfe6e2;
  border: 1px solid #dfe6e2;
  border-radius: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 10px 12px;
  display: grid;
  overflow: hidden;
}

.date-quote-detail-summary > div {
  background: #fff;
  min-width: 0;
  min-height: 57px;
  padding: 9px 10px;
}

.date-quote-detail-summary span, .date-quote-detail-summary strong {
  display: block;
}

.date-quote-detail-summary span {
  color: #87928f;
  font-size: 8px;
}

.date-quote-detail-summary strong {
  color: #354640;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 6px;
  font-size: 10px;
  overflow: hidden;
}

.date-quote-detail-rows {
  background: #fff;
  border: 1px solid #dce4e0;
  border-radius: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.date-quote-detail-row {
  border-bottom: 1px solid #e8ece9;
  grid-template-columns: 48px minmax(0, 1fr) 90px 125px;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 12px;
  display: grid;
}

.date-quote-row-number {
  color: #6f7e79;
  font-size: 10px;
  font-weight: 800;
}

.date-quote-row-copy {
  min-width: 0;
}

.date-quote-row-copy strong, .date-quote-row-copy small {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}

.date-quote-row-copy strong {
  color: #344640;
  font-size: 11px;
}

.date-quote-row-copy small {
  color: #899590;
  margin-top: 5px;
  font-size: 8px;
}

.date-quote-row-quantity {
  color: #586a64;
  text-align: right;
  font-size: 10px;
}

.date-quote-row-amount {
  text-align: right;
  white-space: nowrap;
}

.date-quote-row-amount small, .date-quote-row-amount strong {
  display: block;
}

.date-quote-row-amount small {
  color: #939d99;
  font-size: 8px;
}

.date-quote-row-amount strong {
  color: #1f6c60;
  margin-top: 5px;
  font-size: 11px;
}

.date-quote-detail-section {
  color: #344b45;
  background: #edf2ef;
  border-bottom: 1px solid #d4ddd9;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 10px;
  display: grid;
}

.date-quote-detail-total {
  color: #48605a;
  background: #edf6f2;
  border: 1px solid #c9d9d4;
  border-radius: 9px;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 15px;
  font-size: 10px;
  display: flex;
}

.date-quote-detail-total strong {
  color: #155f54;
  font-size: 17px;
}

.attachment-preview-backdrop {
  z-index: 110;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  background: #0f1d1ab8;
  place-items: center;
  padding: 22px;
  display: grid;
  position: fixed;
  inset: 0;
}

.attachment-preview-dialog {
  background: #fff;
  border-radius: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1050px, 100%);
  height: min(760px, 100vh - 44px);
  display: grid;
  overflow: hidden;
  box-shadow: 0 28px 80px #09171461;
}

.attachment-preview-dialog > header {
  background: #fbfcfa;
  border-bottom: 1px solid #e1e7e4;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 13px 17px;
  display: grid;
}

.attachment-preview-dialog h2, .attachment-preview-dialog p {
  margin: 0;
}

.attachment-preview-dialog h2 {
  color: #283b35;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  overflow: hidden;
}

.attachment-preview-dialog header p {
  color: #83908c;
  margin-top: 4px;
  font-size: 10px;
}

.attachment-preview-dialog header > button {
  color: #6e7b77;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 7px;
  place-items: center;
  width: 34px;
  height: 34px;
  display: grid;
}

.attachment-preview-dialog header > button:hover {
  color: #a2463f;
  background: #f7e9e7;
}

.attachment-preview-body {
  background: #28332f;
  place-items: center;
  min-height: 0;
  display: grid;
  overflow: auto;
}

.attachment-preview-body img {
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

.attachment-preview-body iframe {
  background: #fff;
  border: 0;
  width: 100%;
  height: 100%;
}

.attachment-preview-unsupported {
  color: #fff;
  text-align: center;
  max-width: 430px;
  padding: 32px;
}

.attachment-preview-unsupported strong {
  margin-top: 14px;
  font-size: 15px;
  display: block;
}

.attachment-preview-unsupported p {
  color: #c2cbc7;
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.7;
}

.attachment-preview-dialog > footer {
  background: #fbfcfa;
  border-top: 1px solid #e1e7e4;
  justify-content: flex-end;
  gap: 8px;
  min-height: 62px;
  padding: 10px 17px;
  display: flex;
}

.attachment-preview-dialog > footer button {
  color: #53635e;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d3ddd8;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 90px;
  min-height: 38px;
  padding: 0 14px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
}

.attachment-preview-dialog > footer .preview-download {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.history-drop {
  width: 100%;
  min-height: 70px;
  color: var(--teal);
  text-align: left;
  cursor: pointer;
  background: #f2f8f5;
  border: 1px dashed #a8c5bd;
  border-radius: 7px;
  align-items: center;
  gap: 11px;
  margin-top: 15px;
  padding: 12px;
  display: flex;
}

.history-drop:hover, .history-drop.dragging {
  border-color: var(--teal);
  background: #e8f4f0;
}

.history-drop:disabled {
  opacity: .65;
  cursor: wait;
}

.history-drop span, .history-drop strong, .history-drop small {
  display: block;
}

.history-drop strong {
  color: #40514c;
  font-size: 11px;
}

.history-drop small {
  color: #889590;
  margin-top: 4px;
  font-size: 9px;
}

.history-upload-actions {
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
  display: grid;
}

.history-upload-actions button {
  color: #50625d;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d4ded9;
  border-radius: 5px;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
}

.history-upload-actions button:hover {
  color: var(--teal);
  border-color: #84afa5;
}

.catalog-stat {
  border-top: 1px solid #e7ece9;
  border-bottom: 1px solid #e7ece9;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 0;
  display: flex;
}

.catalog-stat span {
  color: #53635e;
  white-space: nowrap;
  font-size: 10px;
}

.catalog-stat span strong {
  color: var(--teal-dark);
  margin-right: 3px;
  font-size: 16px;
}

.catalog-stat small {
  color: #8b9592;
  text-align: right;
  font-size: 9px;
  line-height: 1.45;
}

.import-history {
  max-height: 210px;
  margin-top: 7px;
  overflow-y: auto;
}

.import-history > div {
  border-bottom: 1px solid #eef1ef;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 46px;
  display: grid;
}

.import-history > div > span:last-child {
  min-width: 0;
}

.import-history strong, .import-history small {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}

.import-history strong {
  color: #465550;
  font-size: 10px;
}

.import-history small {
  color: #919a97;
  margin-top: 3px;
  font-size: 9px;
}

.import-empty {
  color: #9aa3a0;
  text-align: center;
  margin: 0;
  padding: 14px 0 4px;
  font-size: 9px;
}

.tool-tip {
  color: #766e5d;
  background: #fffaeedb;
  border: 1px solid #e2ded1;
  border-radius: 8px;
  grid-template-columns: 27px 1fr;
  gap: 9px;
  padding: 13px 14px;
  display: grid;
}

.tool-tip > span {
  color: #9a763d;
  background: #f6ead1;
  border-radius: 50%;
  place-items: center;
  width: 27px;
  height: 27px;
  display: grid;
}

.tool-tip p {
  margin: 0;
  font-size: 9px;
  line-height: 1.6;
}

.tool-tip strong {
  color: #5c574c;
  font-size: 10px;
  display: block;
}

.tool-tip.secure-tip {
  color: #54716b;
  background: #eff8f4e6;
  border-color: #cfe2dc;
}

.tool-tip.secure-tip > span {
  color: #2c8376;
  background: #dcefe9;
}

.tool-tip.secure-tip strong {
  color: #315d55;
}

.tool-icon.assistant {
  color: #6a4f9d;
  background: #eee8f8;
}

.requirement-card {
  background: radial-gradient(circle at 100% 0, #7453a81a, #0000 44%), #fffffcf7;
  border-color: #dcd2ee;
}

.requirement-card-copy {
  color: #66726f;
  margin: 15px 0 12px;
  font-size: 11px;
  line-height: 1.65;
}

.requirement-open-button {
  color: #fff;
  cursor: pointer;
  background: #7759a6;
  border: 1px solid #7759a6;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  box-shadow: 0 8px 18px #5b3f8929;
}

.requirement-open-button:hover {
  background: #684a97;
  border-color: #63458f;
}

.requirement-dialog-backdrop {
  z-index: 80;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background: #101d1c94;
  place-items: center;
  padding: 24px;
  display: grid;
  position: fixed;
  inset: 0;
}

.requirement-dialog {
  color: #25332f;
  background: #fff;
  border: 1px solid #d8dedb;
  border-radius: 14px;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(820px, 100vh - 48px);
  display: flex;
  overflow: hidden;
  box-shadow: 0 28px 80px #0f25224d;
}

.requirement-dialog-heading {
  background: #fbfbf8;
  border-bottom: 1px solid #e4e8e5;
  grid-template-columns: 40px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 17px 20px;
  display: grid;
}

.requirement-dialog-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.requirement-dialog-heading p {
  color: #7d8884;
  margin: 5px 0 0;
  font-size: 11px;
}

.requirement-dialog-heading > button {
  color: #7f8986;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 8px;
  place-items: center;
  width: 34px;
  height: 34px;
  display: grid;
}

.requirement-dialog-heading > button:hover {
  color: #a2463f;
  background: #f7e9e7;
}

.requirement-dialog-heading > button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.requirement-dialog-body {
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
}

.requirement-input-heading {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  display: flex;
}

.requirement-input-heading label {
  font-size: 13px;
  font-weight: 800;
}

.speech-button {
  color: #315f56;
  cursor: pointer;
  background: #f3f8f6;
  border: 1px solid #ccd9d5;
  border-radius: 7px;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
}

.speech-button:hover:not(:disabled) {
  color: var(--teal-dark);
  background: #e8f4f0;
  border-color: #73a69b;
}

.speech-button.listening {
  color: #fff;
  background: #c9564d;
  border-color: #c9564d;
  animation: 1.4s ease-in-out infinite speech-pulse;
}

.speech-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

@keyframes speech-pulse {
  50% {
    box-shadow: 0 0 0 6px #c9564d21;
  }
}

.requirement-dialog textarea {
  resize: vertical;
  color: #2f3d39;
  width: 100%;
  min-height: 180px;
  font: inherit;
  background: #fff;
  border: 1px solid #ccd6d2;
  border-radius: 9px;
  outline: none;
  margin-top: 10px;
  padding: 13px 14px;
  font-size: 13px;
  line-height: 1.65;
}

.requirement-dialog textarea:focus {
  border-color: #6e9f94;
  box-shadow: 0 0 0 3px #327e701a;
}

.requirement-dialog textarea::placeholder {
  color: #9ca6a2;
}

.requirement-dialog textarea:disabled {
  color: #6e7875;
  background: #f4f6f4;
}

.requirement-source-upload {
  grid-template-columns: repeat(2, minmax(0, 150px)) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  display: grid;
}

.requirement-source-upload > input {
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
}

.requirement-source-upload > button {
  color: #67458f;
  cursor: pointer;
  background: #f5f0fb;
  border: 1px solid #7759a6;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
}

.requirement-source-upload > button:hover:not(:disabled) {
  color: #fff;
  background: #7759a6;
}

.requirement-source-upload > button.camera-source-button {
  color: #27695d;
  background: #ebf6f2;
  border-color: #318171;
}

.requirement-source-upload > button.camera-source-button:hover:not(:disabled) {
  color: #fff;
  background: #318171;
}

.requirement-source-upload > button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.requirement-source-upload > span {
  color: #7f8b87;
  font-size: 10px;
  line-height: 1.45;
}

.requirement-analysis-status {
  color: #315f56;
  background: #eef7f4;
  border: 1px solid #cfe1db;
  border-radius: 8px;
  margin-top: 9px;
  padding: 9px 11px;
}

.requirement-analysis-status.working {
  color: #60458a;
  background: #f5f1fa;
  border-color: #d9cdeb;
}

.requirement-analysis-status > div {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  display: grid;
}

.requirement-analysis-status strong {
  font-size: 10px;
  line-height: 1.45;
}

.requirement-analysis-status span {
  font-size: 10px;
  font-weight: 800;
}

.requirement-analysis-status progress {
  accent-color: #7759a6;
  border: 0;
  border-radius: 10px;
  width: 100%;
  height: 7px;
  margin-top: 7px;
  display: block;
  overflow: hidden;
}

.requirement-analysis-warnings {
  color: #855329;
  background: #fff4e5;
  border-radius: 7px;
  gap: 3px;
  margin-top: 7px;
  padding: 8px 10px;
  font-size: 10px;
  line-height: 1.5;
  display: grid;
}

.requirement-example-row {
  color: #71807b;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  display: flex;
}

.requirement-example-row button {
  color: #326d62;
  cursor: pointer;
  background: #f1f7f4;
  border: 1px solid #cbdad5;
  border-radius: 6px;
  min-height: 29px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 800;
}

.requirement-example-row button:hover {
  background: #e8f3ef;
  border-color: #8bb3a9;
}

.requirement-example-row .all-trades-example {
  color: #fff;
  background: linear-gradient(135deg, #8a69bd, #664a96);
  border-color: #775da8;
  box-shadow: 0 5px 12px #664a9633;
}

.requirement-example-row .all-trades-example:hover {
  color: #fff;
  background: linear-gradient(135deg, #7b5bae, #593d87);
  border-color: #60438f;
}

.requirement-input-help {
  color: #87918e;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.45;
  display: flex;
}

.speech-error {
  color: #98463f;
  background: #f9eae8;
  border-radius: 7px;
  margin: 10px 0 0;
  padding: 9px 11px;
  font-size: 11px;
}

.requirement-preview {
  border: 1px solid #e0e5e2;
  border-radius: 10px;
  margin-top: 17px;
  overflow: hidden;
}

.requirement-preview-heading {
  background: #f7f8f5;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 57px;
  padding: 10px 13px;
  display: flex;
}

.requirement-preview-heading strong, .requirement-preview-heading small {
  display: block;
}

.requirement-preview-heading strong {
  font-size: 12px;
}

.requirement-preview-heading small {
  color: #84908c;
  margin-top: 3px;
  font-size: 10px;
}

.requirement-preview-heading em {
  color: #9a6331;
  white-space: nowrap;
  background: #f8ead9;
  border-radius: 20px;
  padding: 5px 8px;
  font-size: 9px;
  font-style: normal;
}

.requirement-fields-preview {
  background: #fcfcfa;
  border-top: 1px solid #e8ece9;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 13px;
  display: flex;
}

.requirement-fields-preview span {
  color: #50605b;
  background: #edf2ef;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
}

.requirement-engineering-notice {
  color: #70552e;
  background: #fff8ea;
  border-top: 1px solid #ead9b9;
  padding: 10px 13px;
}

.requirement-engineering-notice strong {
  font-size: 10px;
  display: block;
}

.requirement-engineering-notice ul {
  margin: 5px 0 0;
  padding-left: 16px;
  font-size: 9px;
  line-height: 1.55;
}

.requirement-preview-list {
  max-height: 230px;
  overflow-y: auto;
}

.requirement-preview-list > div {
  border-top: 1px solid #edf0ee;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 13px;
  display: grid;
}

.requirement-preview-list > div > span:nth-child(2) {
  min-width: 0;
}

.requirement-preview-list strong, .requirement-preview-list small {
  display: block;
}

.requirement-preview-list strong {
  color: #34423e;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  display: flex;
  overflow: hidden;
}

.requirement-preview-list strong > span {
  text-overflow: ellipsis;
  min-width: 0;
  overflow: hidden;
}

.requirement-preview-list strong mark {
  color: #936026;
  white-space: nowrap;
  background: #f9ead2;
  border-radius: 4px;
  flex: none;
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 800;
}

.requirement-preview-list small {
  color: #8a9591;
  white-space: normal;
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.45;
}

.requirement-preview-list small > span {
  display: block;
}

.requirement-preview-spec {
  color: #536c65;
  margin-top: 2px;
  font-weight: 700;
}

.requirement-preview-list em {
  color: #2c544d;
  white-space: nowrap;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.requirement-preview-list > p {
  color: #8b9692;
  text-align: center;
  margin: 0;
  padding: 20px 14px;
  font-size: 11px;
}

.requirement-preview-list > .requirement-preview-limit {
  color: #315e55;
  background: #f3f8f5;
  border-top: 1px solid #e4ebe7;
  font-weight: 800;
  line-height: 1.55;
}

.requirement-match {
  text-align: center;
  border-radius: 5px;
  padding: 5px 4px;
  font-size: 9px;
  font-weight: 800;
}

.requirement-match.matched {
  color: #276d60;
  background: #e1f0eb;
}

.requirement-match.new {
  color: #8d693a;
  background: #f7ecd9;
}

.requirement-dialog-actions {
  background: #fbfbf8;
  border-top: 1px solid #e2e7e4;
  justify-content: flex-end;
  gap: 9px;
  min-height: 66px;
  padding: 12px 20px;
  display: flex;
}

.requirement-dialog-actions button {
  color: #596661;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d2dad6;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 94px;
  min-height: 40px;
  padding: 0 15px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
}

.requirement-dialog-actions .apply-requirement {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
  min-width: 220px;
}

.requirement-dialog-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.gantt-dialog-backdrop {
  z-index: 98;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  background: #0c1820bd;
  place-items: center;
  padding: 20px;
  display: grid;
  position: fixed;
  inset: 0;
}

.gantt-dialog {
  color: #26343d;
  background: #fff;
  border: 1px solid #d3dce1e6;
  border-radius: 16px;
  flex-direction: column;
  width: min(1320px, 100%);
  height: min(900px, 100dvh - 40px);
  display: flex;
  overflow: hidden;
  box-shadow: 0 32px 100px #04101875;
}

.gantt-dialog-heading {
  background: radial-gradient(circle at 8% 0, #4d729b26, #0000 38%), #fafcfd;
  border-bottom: 1px solid #dfe6eb;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 18px;
  display: grid;
}

.gantt-heading-icon {
  color: #3b628f;
  background: #e7eef7;
  border-radius: 12px;
  place-items: center;
  width: 44px;
  height: 44px;
  display: grid;
}

.gantt-dialog-heading h2, .gantt-dialog-heading p {
  margin: 0;
}

.gantt-dialog-heading h2 {
  color: #263d59;
  letter-spacing: .04em;
  font-size: 19px;
}

.gantt-dialog-heading p {
  color: #71808b;
  margin-top: 4px;
  font-size: 11px;
}

.gantt-dialog-heading > button {
  color: #6c7a84;
  cursor: pointer;
  background: #edf1f3;
  border: 0;
  border-radius: 50%;
  place-items: center;
  width: 36px;
  height: 36px;
  display: grid;
}

.gantt-dialog-heading > button:hover {
  color: #2e465d;
  background: #e0e7ec;
}

.gantt-dialog-controls {
  background: #f7f9fb;
  border-bottom: 1px solid #e2e8ec;
  grid-template-columns: 190px minmax(240px, 1fr) auto auto auto;
  align-items: end;
  gap: 9px;
  padding: 11px 18px;
  display: grid;
}

.gantt-dialog-controls label, .gantt-control-note {
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  display: flex;
}

.gantt-dialog-controls label > span, .gantt-control-note strong {
  color: #546671;
  font-size: 10px;
  font-weight: 800;
}

.gantt-dialog-controls input {
  color: #30414c;
  height: 36px;
  font: inherit;
  background: #fff;
  border: 1px solid #cbd6dd;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
}

.gantt-control-note span {
  color: #788690;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.45;
  overflow: hidden;
}

.gantt-dialog-controls > button {
  color: #52646f;
  cursor: pointer;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #cbd5dc;
  border-radius: 7px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
}

.gantt-dialog-controls > button:hover {
  color: #304e68;
  border-color: #8ea4b5;
}

.gantt-dialog-controls .gantt-translation-action {
  color: #315a7d;
  background: #edf3fa;
  border-color: #7a94b5;
}

.gantt-dialog-controls .gantt-translation-action:hover {
  color: #244b6e;
  background: #e2edf8;
  border-color: #4d739e;
}

.gantt-dialog-controls .gantt-translation-action.active {
  color: #fff;
  background: #397e75;
  border-color: #397e75;
}

.gantt-dialog-controls .gantt-translation-action.active:hover {
  color: #fff;
  background: #2f6e66;
  border-color: #2f6e66;
}

.gantt-dialog-controls .gantt-print-action {
  color: #fff;
  background: #466c98;
  border-color: #4c6f99;
}

.gantt-dialog-controls .gantt-print-action:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.gantt-summary-strip {
  background: #fff;
  border-bottom: 1px solid #e2e8ec;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 18px;
  display: grid;
}

.gantt-summary-strip > span {
  background: #fafbfc;
  border: 1px solid #e2e8ec;
  border-radius: 8px;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  display: flex;
}

.gantt-summary-strip small {
  color: #7e8a92;
  font-size: 9px;
}

.gantt-summary-strip strong {
  color: #365877;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  overflow: hidden;
}

.gantt-dialog-body {
  background: #f5f7f8;
  flex: 1;
  min-height: 0;
  padding: 0 18px 16px;
  overflow: auto;
}

.gantt-chart {
  background: #fff;
  border: 1px solid #dce4e8;
  border-radius: 10px;
  width: 100%;
  margin-top: 12px;
  overflow: hidden;
}

.gantt-chart-head, .gantt-task-row {
  grid-template-columns: minmax(330px, 38%) minmax(0, 1fr);
  display: grid;
}

.gantt-chart-head {
  color: #536671;
  background: #edf2f5;
  border-bottom: 1px solid #dce4e8;
  align-items: stretch;
  min-height: 43px;
  font-size: 10px;
  font-weight: 800;
}

.gantt-chart-head > span {
  border-right: 1px solid #d6e0e5;
  align-items: center;
  padding: 0 13px;
  display: flex;
}

.gantt-ruler {
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.gantt-ruler > span {
  color: #657984;
  white-space: nowrap;
  border-left: 1px solid #cad7de;
  padding: 13px 0 0 5px;
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-1px);
}

.gantt-task-row {
  border-bottom: 1px solid #e5eaed;
  min-height: 72px;
}

.gantt-task-row:last-child {
  border-bottom: 0;
}

.gantt-task-copy {
  border-right: 1px solid #e1e7ea;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  display: grid;
}

.gantt-task-number {
  color: #58728a;
  background: #e9eff4;
  border-radius: 50%;
  place-items: center;
  width: 25px;
  height: 25px;
  font-size: 9px;
  font-weight: 900;
  display: grid;
}

.gantt-task-copy > div {
  min-width: 0;
}

.gantt-task-copy strong, .gantt-task-copy small, .gantt-task-copy em {
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  overflow: hidden;
}

.gantt-task-copy strong {
  color: #2e414d;
  font-size: 11px;
}

.gantt-task-copy small {
  color: #71808a;
  margin-top: 3px;
  font-size: 8px;
}

.gantt-task-copy em {
  color: #466986;
  margin-top: 4px;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.gantt-task-copy > label {
  color: #71808a;
  grid-template-columns: auto 46px auto;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  display: grid;
}

.gantt-task-copy input {
  color: #304c62;
  width: 46px;
  height: 30px;
  font: inherit;
  text-align: center;
  background: #fff;
  border: 1px solid #cbd7dd;
  border-radius: 6px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 800;
}

.gantt-track {
  background: linear-gradient(#eef3f694, #ffffffb8), repeating-linear-gradient(90deg, #0000 0 19px, #4f6c800b 20px);
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.gantt-track > i {
  z-index: 1;
  background: #647e8e2b;
  width: 1px;
  position: absolute;
  top: 0;
  bottom: 0;
}

.gantt-task-bar {
  z-index: 2;
  color: #fff;
  background: var(--gantt-color, #4c7394);
  min-width: 6px;
  height: 29px;
  box-shadow: 0 4px 11px color-mix(in srgb, var(--gantt-color, #4c7394) 30%, transparent);
  border-radius: 6px;
  align-items: center;
  padding: 0 7px;
  display: flex;
  position: absolute;
  top: 22px;
  overflow: hidden;
}

.gantt-task-bar b {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  overflow: hidden;
}

.gantt-empty {
  color: #80909a;
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 260px;
  display: flex;
}

.gantt-empty strong {
  color: #435b6c;
  font-size: 14px;
}

.gantt-empty span {
  font-size: 10px;
}

.gantt-dialog-footer {
  color: #72818a;
  background: #fafbfb;
  border-top: 1px solid #dfe6ea;
  align-items: center;
  min-height: 48px;
  padding: 9px 18px;
  font-size: 9px;
  line-height: 1.45;
  display: flex;
}

.price-entry {
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  display: flex;
}

.price-origin {
  white-space: nowrap;
  border-radius: 10px;
  align-self: center;
  padding: 2px 5px;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
}

.price-origin.web {
  color: #76531e;
  background: #f8e9c9;
}

.price-origin.gpt {
  color: #2f548a;
  background: #e4eefc;
}

.price-origin.missing {
  color: #98463f;
  background: #f9e5e2;
}

.toast {
  z-index: 30;
  color: #f0faf7;
  background: #244b45;
  border: 1px solid #50867340;
  border-radius: 7px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  font-size: 9px;
  animation: .2s both toast-in;
  display: flex;
  position: fixed;
  bottom: 25px;
  right: 26px;
  box-shadow: 0 13px 36px #1a363140;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 900px) {
  .access-gate {
    grid-template-columns: 1fr;
  }

  .access-brand-panel {
    min-height: auto;
    padding: 22px 24px;
  }

  .access-brand-panel:after, .access-hero, .security-points {
    display: none;
  }

  .access-login-panel {
    min-height: calc(100vh - 94px);
    padding: 30px 20px 70px;
  }
}

@media (max-width: 1400px) {
  .quote-app {
    grid-template-columns: 208px minmax(0, 1fr);
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 17px;
    width: min(1240px, 100% - 20px);
  }

  .quote-sheet {
    width: calc(100% - 26px);
    padding-inline: 34px;
  }

  .tool-panel {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    display: grid;
    position: static;
  }

  .tool-tip {
    grid-column: 1 / -1;
  }
}

.quote-sheet, .quote-sheet .document-heading h1, .quote-sheet .document-heading h2, .quote-sheet .company-grid p, .quote-sheet .client-grid label, .quote-sheet .quote-table, .quote-sheet .quote-notes, .quote-sheet .signature-area {
  font-family: PMingLiU, 新細明體, MingLiU, 細明體, serif;
}

@media (max-width: 1020px) {
  .quote-app {
    display: block;
  }

  .app-sidebar {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: auto;
    min-height: 76px;
    padding: 12px 18px;
    display: grid;
    position: relative;
  }

  .sidebar-brand {
    min-height: 50px;
  }

  .new-quote-button {
    width: 148px;
    margin: 0;
  }

  .sidebar-section-label, .quote-list, .sidebar-current-actions, .sidebar-footer {
    display: none;
  }

  .app-topbar {
    top: 0;
  }

  .workspace {
    grid-template-columns: 1fr;
    width: min(940px, 100% - 34px);
  }

  .tool-panel {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    display: grid;
    position: static;
  }

  .tool-tip {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 760px) {
  .app-sidebar .sidebar-current-actions {
    border-top: 1px solid #d9cfc0;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 9px 0 0;
    display: grid;
  }

  .app-sidebar .sidebar-current-actions button {
    color: #315b52;
    text-align: center;
    background: #ffffffb8;
    border: 1px solid #cfd9d4;
    border-radius: 7px;
    justify-content: center;
    min-width: 0;
    height: 42px;
    padding: 0 10px;
    font-size: 13px;
    font-weight: 800;
  }

  .app-sidebar .sidebar-current-actions button.danger-link {
    color: #a13e36;
    background: #fff8f6;
    border-color: #e3bcb6;
  }

  .app-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    height: auto;
    min-height: 63px;
    padding: 10px 16px;
  }

  .topbar-save-state, .topbar-actions .database-action, .topbar-actions .export-action {
    display: none;
  }

  .topbar-actions .mobile-smart-fill-action {
    color: #fff;
    letter-spacing: .04em;
    background: linear-gradient(135deg, #8a5bc2, #673c9b);
    border: 2px solid #f3d477;
    min-width: 96px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    box-shadow: 0 0 0 3px #f3d47733, 0 7px 18px #5b3f8952;
  }

  .topbar-actions .mobile-smart-fill-action:hover {
    background: linear-gradient(135deg, #7949b4, #5b318e);
    border-color: #ebc858;
  }

  .workspace {
    width: calc(100% - 20px);
    padding-top: 15px;
  }

  .editor-head {
    min-height: 70px;
    padding: 13px 15px;
  }

  .quote-sheet {
    width: calc(100% - 8px);
    min-height: 0;
    margin-top: 4px;
    padding: 20px 13px 25px;
    overflow: visible;
  }

  .document-heading {
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 0;
  }

  .document-heading > img {
    width: 52px;
    height: 52px;
  }

  .document-heading h1 {
    letter-spacing: .13em;
    margin-top: 0;
    font-size: clamp(19px, 6vw, 26px);
  }

  .document-heading h2 {
    font-size: 15px;
  }

  .document-number {
    border-top: 1px solid #e3e7e4;
    flex-direction: row;
    grid-column: 1 / -1;
    align-items: center;
    gap: 9px;
    min-height: 35px;
    padding: 5px 0 7px;
  }

  .document-number span {
    flex: none;
  }

  .document-number .editable {
    text-align: left;
    margin-top: 0;
  }

  .company-grid, .client-grid, .catalog-search, .quote-table-wrap, .quote-notes, .signature-area, .editor-toolbar {
    min-width: 0;
  }

  .company-grid {
    grid-template-columns: 1fr;
    padding: 4px 0;
  }

  .company-grid .wide {
    grid-column: auto;
  }

  .company-grid p {
    min-height: 25px;
    padding: 2px 4px;
    font-family: Microsoft JhengHei, sans-serif;
    font-size: 10px;
  }

  .client-grid {
    grid-template-columns: 1fr;
    padding: 5px 0;
  }

  .client-grid label {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 37px;
    font-family: Microsoft JhengHei, sans-serif;
    font-size: 11px;
  }

  .client-grid label:nth-child(2n) {
    border-left: 0;
  }

  .client-grid .editable {
    min-height: 30px;
    font-family: inherit;
    font-size: 12px;
  }

  .catalog-search {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 9px 5px 11px;
  }

  .catalog-search-label strong {
    font-size: 11px;
  }

  .catalog-search-label small {
    font-size: 8px;
  }

  .catalog-search-field {
    height: 40px;
  }

  .catalog-search-field input {
    font-size: 12px;
  }

  .catalog-results {
    width: calc(100% - 10px);
    top: calc(100% - 6px);
  }

  .quote-table-wrap {
    overflow: visible;
  }

  .quote-table, .quote-table tbody, .quote-table tfoot {
    width: 100%;
    display: block;
  }

  .quote-table {
    font-family: Microsoft JhengHei, sans-serif;
    font-size: 12px;
  }

  .quote-table colgroup, .quote-table thead {
    display: none;
  }

  .quote-table tbody {
    padding: 9px 0;
  }

  .quote-table tbody tr {
    background: #fffffff0;
    border: 1px solid #dfe6e2;
    border-radius: 8px;
    grid-template-rows: auto auto auto auto;
    grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    margin-bottom: 8px;
    padding: 10px 32px 10px 10px;
    display: grid;
    position: relative;
    box-shadow: 0 3px 10px #1a322c09;
  }

  .quote-table tbody tr:has(.inline-catalog-results) {
    z-index: 30;
  }

  .quote-table tbody td {
    border: 0;
    min-width: 0;
    height: auto;
    min-height: 37px;
    padding: 0;
    text-align: left !important;
  }

  .quote-table tbody td:before {
    content: "";
    color: #87938f;
    letter-spacing: .04em;
    margin-bottom: 3px;
    font-size: 8px;
    font-weight: 700;
    display: block;
  }

  .quote-table tbody td:first-child {
    grid-area: 1 / 1 / span 2;
  }

  .quote-table tbody td:first-child:before {
    content: "項次";
  }

  .quote-table tbody td:nth-child(2) {
    grid-area: 2 / 2;
  }

  .quote-table tbody td:nth-child(2):before {
    content: "料號";
  }

  .quote-table tbody td:nth-child(3) {
    grid-area: 1 / 2 / auto / 4;
  }

  .quote-table tbody td:nth-child(3):before {
    content: "品名";
  }

  .quote-table tbody td:nth-child(4) {
    grid-area: 2 / 3;
  }

  .quote-table tbody td:nth-child(4):before {
    content: "規格";
  }

  .quote-table tbody td:nth-child(5) {
    grid-area: 3 / 1;
  }

  .quote-table tbody td:nth-child(5):before {
    content: "數量";
  }

  .quote-table tbody td:nth-child(6) {
    grid-area: 3 / 2;
  }

  .quote-table tbody td:nth-child(6):before {
    content: "單位";
  }

  .quote-table tbody td:nth-child(7) {
    grid-area: 3 / 3;
  }

  .quote-table tbody td:nth-child(7):before {
    content: "單價";
  }

  .quote-table tbody td:nth-child(8) {
    min-height: 31px;
    color: var(--teal-dark);
    border-top: 1px solid #e5eae7;
    grid-area: 4 / 1 / auto / 4;
    font-size: 15px;
    font-weight: 800;
    text-align: right !important;
    padding: 7px 3px 0 !important;
  }

  .quote-table tbody td:nth-child(8):before {
    content: "小計";
    float: left;
    margin: 3px 0 0;
  }

  .quote-table tbody td:nth-child(9) {
    min-height: 0;
    position: absolute;
    top: 7px;
    right: 5px;
  }

  .quote-table .editable {
    background: #fbfcfa;
    border: 1px solid #e2e7e4;
    border-radius: 5px;
    min-height: 31px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .quote-table .rate-input {
    background: #fbfcfa;
    border: 1px solid #e2e7e4;
    border-radius: 5px;
    min-height: 31px;
  }

  .quote-table .rate-input .editable {
    background: none;
    border: 0;
  }

  .quote-table .row-actions-cell {
    background: none !important;
  }

  .quote-table .row-actions-cell button {
    opacity: 1;
  }

  .quote-table .section-row {
    min-height: 50px;
    box-shadow: none;
    background: #eef2ef;
    border-color: #bdc8c3;
    grid-template-rows: auto;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 7px;
    padding: 8px 32px 8px 9px;
    display: grid;
  }

  .quote-table .section-row td:first-child {
    grid-area: 1 / 1;
  }

  .quote-table .section-row td:nth-child(2) {
    grid-area: 1 / 2;
  }

  .quote-table .section-row td:nth-child(2):before {
    content: "段落";
  }

  .quote-table .section-row .row-actions-cell {
    position: absolute;
    top: 7px;
    right: 5px;
  }

  .quote-table .section-row .row-actions-cell:before {
    content: none;
    display: none;
  }

  .inline-catalog {
    min-height: 31px;
  }

  .inline-catalog-results {
    width: min(360px, 100vw - 48px);
  }

  .quote-table td:nth-child(4) .inline-catalog-results {
    left: auto;
    right: 0;
  }

  .quote-table tfoot tr {
    border-top: 3px double #2b302e;
    border-bottom: 3px double #2b302e;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 9px 4px;
    display: grid;
  }

  .quote-table tfoot td, .quote-table tfoot th {
    border: 0;
    height: auto;
    min-height: 34px;
    padding: 5px 2px;
  }

  .quote-table tfoot td:first-child, .quote-table tfoot td:last-child {
    display: none;
  }

  .quote-table tfoot th {
    text-align: left;
    font-size: 12px;
  }

  .quote-table tfoot td:nth-child(3) {
    text-align: right;
    font-size: 17px;
  }

  .editor-toolbar {
    flex-wrap: wrap;
    min-height: 0;
    padding: 9px 2px;
  }

  .editor-toolbar button {
    min-height: 36px;
    font-size: 10px;
  }

  .editor-toolbar > span {
    width: 100%;
    margin-left: 0;
    font-size: 8px;
  }

  .quote-notes {
    grid-template-columns: 1fr;
    padding: 13px 2px;
    font-family: Microsoft JhengHei, sans-serif;
    font-size: 11px;
  }

  .quote-notes ol {
    margin-top: 5px;
  }

  .quote-notes textarea {
    min-height: 42px;
    font-family: inherit;
    font-size: 11px;
  }

  .signature-area {
    grid-template-columns: 1fr 115px;
    gap: 10px;
    min-height: 170px;
    padding-top: 15px;
    font-family: Microsoft JhengHei, sans-serif;
    font-size: 10px;
  }

  .signature-area img {
    width: 105px;
    max-height: 95px;
  }

  .signature-area .responsible {
    grid-column: 1 / -1;
  }

  .tool-panel {
    grid-template-columns: 1fr;
  }

  .tool-tip {
    grid-column: auto;
  }

  .local-database-backdrop {
    padding: 8px;
  }

  .local-database-dialog {
    border-radius: 11px;
    height: calc(100dvh - 16px);
  }

  .local-database-heading {
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    gap: 9px;
    min-height: 76px;
    padding: 12px 13px;
  }

  .local-database-heading-icon {
    width: 38px;
    height: 38px;
  }

  .local-database-heading h2 {
    font-size: 17px;
  }

  .local-database-heading p {
    font-size: 10px;
  }

  .local-database-heading > button {
    width: 34px;
    height: 34px;
  }

  .local-database-body {
    padding: 8px;
  }

  .local-database-body .local-archive-card {
    padding: 13px;
  }

  .local-database-body .tool-card-heading {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .local-database-body .tool-card-heading h3 {
    font-size: 15px;
  }

  .local-database-body .tool-card-heading p {
    font-size: 10px;
  }

  .local-database-body .archive-storage-state small {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .local-database-body .archive-file-item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .local-database-body .archive-file-details strong {
    font-size: 12px;
  }

  .local-database-body .archive-file-details small {
    font-size: 9px;
  }

  .local-database-body .archive-file-actions {
    flex-direction: column;
  }

  .local-database-body .archive-file-actions button {
    width: 34px;
    height: 32px;
  }

  .local-database-footer {
    min-height: 62px;
    padding: 8px 11px;
  }

  .local-database-footer > span {
    max-width: 130px;
    font-size: 9px;
    line-height: 1.4;
  }

  .local-database-footer button {
    min-width: 74px;
    min-height: 38px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .date-search-backdrop {
    padding: 8px;
  }

  .date-search-dialog {
    border-radius: 11px;
    height: calc(100dvh - 16px);
  }

  .date-search-heading {
    grid-template-columns: 36px minmax(0, 1fr) 32px;
    gap: 9px;
    min-height: 72px;
    padding: 12px 13px;
  }

  .date-search-heading-icon {
    width: 36px;
    height: 36px;
  }

  .date-search-heading h2 {
    font-size: 15px;
  }

  .date-search-heading p {
    font-size: 9px;
  }

  .date-search-heading > button {
    width: 32px;
    height: 32px;
  }

  .date-search-body {
    flex: 1;
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 10px;
    overflow: hidden;
  }

  .date-search-body.mobile-calendar .date-search-results, .date-search-body.mobile-results .date-calendar-panel {
    display: none;
  }

  .date-calendar-panel {
    height: 100%;
    padding: 10px;
    overflow-y: auto;
  }

  .date-calendar-toolbar {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
  }

  .date-month-step {
    width: 34px;
    height: 38px;
  }

  .date-calendar-toolbar label {
    padding-inline: 8px;
  }

  .date-calendar-toolbar label > span {
    font-size: 12px;
  }

  .date-calendar-toolbar input[type="month"] {
    width: 118px;
    font-size: 9px;
  }

  .date-calendar-weekdays, .date-calendar-grid {
    gap: 4px;
  }

  .date-calendar-empty, .date-calendar-day {
    border-radius: 6px;
    min-height: 46px;
  }

  .date-calendar-day {
    padding: 5px;
    font-size: 10px;
  }

  .date-calendar-day em {
    min-width: 17px;
    height: 17px;
    padding-inline: 4px;
    top: 4px;
    right: 4px;
  }

  .date-search-results {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .date-search-results > header {
    min-height: 0;
    padding: 11px 12px;
  }

  .date-mobile-calendar-back {
    color: #27695e;
    cursor: pointer;
    min-height: 34px;
    font: inherit;
    background: #eef7f3;
    border: 1px solid #cddbd6;
    border-radius: 8px;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
  }

  .date-mobile-calendar-back:hover, .date-mobile-calendar-back:focus-visible {
    background: #e1f1eb;
    border-color: #6fa397;
    outline: none;
  }

  .date-search-result-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
  }

  .date-search-empty {
    min-height: 165px;
  }

  .date-quote-detail {
    gap: 9px;
    padding: 10px;
  }

  .date-quote-detail-toolbar > button {
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 70px);
    overflow: hidden;
  }

  .date-quote-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1px;
  }

  .date-quote-detail-summary > div {
    min-height: 51px;
    padding: 7px 8px;
  }

  .date-quote-detail-row {
    grid-template-rows: auto auto;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 5px 8px;
    min-height: 70px;
    padding: 8px 9px;
  }

  .date-quote-row-number {
    grid-area: 1 / 1 / 3;
  }

  .date-quote-row-copy {
    grid-area: 1 / 2;
  }

  .date-quote-row-quantity {
    text-align: left;
    grid-area: 2 / 2;
    font-size: 9px;
  }

  .date-quote-row-amount {
    grid-area: 1 / 3 / 3;
  }

  .date-quote-detail-section {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
  }

  .date-quote-detail-total {
    gap: 10px;
    min-height: 49px;
    padding-inline: 10px;
  }

  .date-quote-detail-total strong {
    font-size: 15px;
  }

  .requirement-dialog-backdrop {
    padding: 8px;
  }

  .requirement-dialog {
    border-radius: 11px;
    max-height: calc(100vh - 16px);
  }

  .requirement-dialog-heading {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 9px;
    min-height: 72px;
    padding: 13px 14px;
  }

  .requirement-dialog-heading h2 {
    font-size: 15px;
  }

  .requirement-dialog-heading p {
    font-size: 9px;
  }

  .requirement-dialog-body {
    padding: 14px;
  }

  .requirement-dialog textarea {
    min-height: 150px;
    font-size: 12px;
  }

  .requirement-source-upload {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .requirement-source-upload > button {
    min-height: 42px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .requirement-source-upload > span {
    grid-column: 1 / -1;
    font-size: 10px;
  }

  .requirement-analysis-status strong, .requirement-analysis-status span, .requirement-analysis-warnings {
    font-size: 10px;
  }

  .requirement-input-help {
    flex-direction: column;
    gap: 3px;
  }

  .requirement-preview-list > div {
    grid-template-columns: 45px minmax(0, 1fr);
    padding-inline: 9px;
  }

  .requirement-preview-list > div > em {
    grid-column: 2;
    margin-top: -5px;
  }

  .requirement-dialog-actions {
    min-height: 60px;
    padding: 10px 14px;
  }

  .requirement-dialog-actions button {
    flex: 1;
    min-width: 0;
  }

  .requirement-dialog-actions .apply-requirement {
    min-width: 0;
  }

  .attachment-preview-backdrop {
    padding: 8px;
  }

  .attachment-preview-dialog {
    border-radius: 10px;
    height: calc(100vh - 16px);
  }

  .attachment-preview-dialog > header {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 8px;
    min-height: 64px;
    padding: 10px 11px;
  }

  .attachment-preview-dialog h2 {
    font-size: 13px;
  }

  .attachment-preview-dialog > footer {
    min-height: 58px;
    padding: 9px 11px;
  }

  .attachment-preview-dialog > footer button {
    flex: 1;
  }
}

@media (max-width: 520px) {
  .access-brand-panel {
    padding: 18px;
  }

  .access-brand img {
    width: 42px;
    height: 42px;
  }

  .access-brand strong {
    font-size: 13px;
  }

  .access-login-panel {
    padding: 18px 12px 60px;
  }

  .login-card {
    padding: 27px 22px;
  }

  .app-sidebar {
    grid-template-columns: 1fr 43px;
  }

  .new-quote-button {
    width: 43px;
    padding: 0;
    font-size: 0;
  }

  .sidebar-brand img {
    width: 38px;
    height: 38px;
  }

  .topbar-title > span, .topbar-title > svg {
    display: none;
  }

  .topbar-actions .primary-action {
    width: 38px;
    padding: 0;
    font-size: 0;
  }

  .topbar-actions .qd-export-action, .topbar-actions .date-search-action, .topbar-actions .gantt-action {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .topbar-actions .mobile-smart-fill-action {
    min-width: 94px;
    padding-inline: 7px;
  }

  .editor-head h2 {
    max-width: 250px;
  }

  .quote-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 7px;
  }

  .quote-pagination > div {
    grid-template-columns: 1fr minmax(112px, 1.25fr) 1fr;
    display: grid;
  }

  .quote-pagination button, .quote-pagination select {
    width: 100%;
    min-height: 36px;
    padding-inline: 6px;
  }

  .toast {
    justify-content: center;
    bottom: 12px;
    left: 12px;
    right: 12px;
  }
}

@media screen and (min-width: 761px) and (max-width: 1050px) {
  .gantt-dialog-controls {
    grid-template-columns: 190px minmax(0, 1fr) auto auto;
  }

  .gantt-control-note {
    grid-area: 2 / 1 / auto / -1;
  }
}

@media screen and (max-width: 760px) {
  .quote-sheet {
    width: calc(100% - 8px);
    padding: 16px 10px 22px;
    overflow: visible;
  }

  .document-heading {
    grid-template-columns: 48px minmax(0, 1fr) 74px;
    align-items: start;
    gap: 4px;
    min-width: 0;
    min-height: 66px;
  }

  .document-heading > img {
    width: 43px;
    height: 43px;
  }

  .document-heading h1 {
    letter-spacing: .12em;
    margin: 1px 0 4px;
    font-size: clamp(16px, 5vw, 21px);
  }

  .document-heading h2 {
    font-size: 12px;
  }

  .document-number {
    border-top: 0;
    flex-direction: column;
    grid-column: auto;
    align-items: flex-end;
    gap: 0;
    min-height: 0;
    padding-top: 2px;
  }

  .document-number span {
    font-size: 6px;
  }

  .document-number .editable {
    text-align: right;
    min-height: 23px;
    margin-top: 2px;
    padding: 2px 0;
    font-size: 7px;
  }

  .company-grid {
    grid-template-columns: 1fr .72fr .72fr;
    padding: 0;
  }

  .company-grid .wide {
    grid-column: 1;
  }

  .company-grid p {
    overflow-wrap: anywhere;
    min-width: 0;
    min-height: 22px;
    padding: 2px 3px;
    font-family: DFKai-SB, BiauKai, 標楷體, serif;
    font-size: 8px;
    line-height: 1.35;
  }

  .company-grid .editable {
    width: min(76px, 100%);
    min-height: 18px;
  }

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

  .client-grid label {
    grid-template-columns: 45px minmax(0, 1fr);
    min-height: 27px;
    padding: 2px 3px;
    font-family: DFKai-SB, BiauKai, 標楷體, serif;
    font-size: 8px;
  }

  .client-grid label:nth-child(2n) {
    border-left: 1px solid #e1e4e0;
  }

  .client-grid .editable {
    min-height: 22px;
    padding: 2px;
    font-family: inherit;
    font-size: 8px;
  }

  .catalog-search {
    grid-template-columns: minmax(92px, .42fr) minmax(0, 1fr);
    gap: 5px;
    padding: 7px 3px;
  }

  .catalog-search-label {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 5px;
  }

  .catalog-search-label > span {
    width: 22px;
    height: 22px;
  }

  .catalog-search-label strong {
    font-size: 7.5px;
  }

  .catalog-search-label small {
    display: none;
  }

  .catalog-search-label em {
    font-size: 6px;
  }

  .catalog-search-field {
    gap: 4px;
    height: 30px;
    padding: 0 7px;
  }

  .catalog-search-field input {
    font-size: 8px;
  }

  .catalog-results {
    width: calc(100% - 6px);
    top: calc(100% - 4px);
    right: 3px;
  }

  .quote-table-wrap {
    width: 100%;
    overflow: visible;
  }

  .quote-table {
    table-layout: fixed;
    border-collapse: collapse;
    width: 100%;
    font-family: DFKai-SB, BiauKai, 標楷體, serif;
    font-size: 8.5px;
    display: table;
  }

  .quote-table colgroup {
    display: table-column-group;
  }

  .quote-table .col-no {
    width: 5%;
  }

  .quote-table .col-part {
    width: 10%;
  }

  .quote-table .col-actions {
    width: 8%;
  }

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

  .quote-table tbody {
    width: auto;
    padding: 0;
    display: table-row-group;
  }

  .quote-table tfoot {
    width: auto;
    display: table-footer-group;
  }

  .quote-table thead th {
    letter-spacing: 0;
    height: 25px;
    padding: 0 1px;
    font-size: 7.5px;
  }

  .quote-table tbody tr, .quote-table .section-row, .quote-table tfoot tr {
    min-height: 0;
    box-shadow: none;
    background: none;
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: table-row;
    position: static;
  }

  .quote-table tbody tr:has(.inline-catalog-results) {
    z-index: 30;
    position: relative;
  }

  .quote-table tbody td, .quote-table .section-row td, .quote-table tfoot td, .quote-table tfoot th {
    vertical-align: middle;
    min-width: 0;
    height: 28px;
    min-height: 0;
    box-shadow: none;
    background: none;
    border: 0;
    border-bottom: 1px solid #dfe2df;
    border-radius: 0;
    padding: 0 2px;
    display: table-cell;
    position: static;
  }

  .quote-table tbody td:before, .quote-table .section-row td:before, .quote-table .row-actions-cell:before {
    content: none;
    display: none;
  }

  .quote-table tbody td:first-child, .quote-table tbody td:nth-child(5), .quote-table tbody td:nth-child(6) {
    text-align: center !important;
  }

  .quote-table tbody td:nth-child(7), .quote-table tbody td:nth-child(8) {
    color: inherit;
    font-size: inherit;
    font-weight: 400;
    text-align: right !important;
  }

  .quote-table tbody td:nth-child(8) {
    border-top: 0;
    padding: 0 3px !important;
  }

  .quote-table tbody td:nth-child(9), .quote-table .section-row .row-actions-cell {
    min-height: 0;
    position: static;
  }

  .quote-table .editable {
    background: none;
    border: 0;
    border-radius: 2px;
    min-height: 23px;
    padding: 2px;
    font-size: 8.5px;
  }

  .quote-table .numeric-input {
    padding-inline: 1px;
  }

  .quote-table .rate-input {
    background: none;
    border: 0;
    border-radius: 0;
    min-height: 23px;
  }

  .quote-table .rate-input .editable {
    border: 0;
  }

  .quote-table .rate-input span {
    padding-right: 0;
    font-size: 6px;
  }

  .quote-table .section-row {
    background: #f2f3ef;
    border-top: 1px solid #9ba29f;
    border-bottom: 1px solid #afb5b2;
  }

  .quote-table .section-row td {
    background: #f2f3ef;
    font-weight: 700;
  }

  .quote-table .row-actions-cell {
    position: static;
    background: var(--paper) !important;
  }

  .quote-table .row-actions-cell button {
    opacity: .62;
    width: 12px;
    height: 21px;
  }

  .quote-table .row-actions-cell .row-drag-handle {
    opacity: .82;
    width: 18px;
  }

  .quote-table .row-actions-cell button svg {
    width: 11px;
    height: 11px;
  }

  .inline-catalog {
    min-height: 23px;
  }

  .inline-catalog-results {
    width: min(320px, 100vw - 32px);
    font-family: Microsoft JhengHei, sans-serif;
  }

  .inline-catalog-results button {
    gap: 7px;
    padding: 9px;
  }

  .quote-table td:nth-child(4) .inline-catalog-results {
    left: auto;
    right: 0;
  }

  .quote-table tfoot tr {
    border-top: 3px double #2b302e;
    border-bottom: 3px double #2b302e;
  }

  .quote-table tfoot td, .quote-table tfoot th {
    border-top: 0;
    border-bottom: 0;
    height: 31px;
    min-height: 0;
    padding: 0 2px;
  }

  .quote-table tfoot td:first-child, .quote-table tfoot td:last-child {
    display: table-cell;
  }

  .quote-table tfoot th {
    text-align: right;
    font-size: 7px;
  }

  .quote-table tfoot td:nth-child(3) {
    text-align: right;
    font-size: 10px;
  }

  .editor-toolbar {
    flex-wrap: nowrap;
    min-height: 36px;
    padding: 5px 2px;
  }

  .editor-toolbar button {
    height: 27px;
    min-height: 27px;
    padding: 0 7px;
    font-size: 7px;
  }

  .editor-toolbar > span {
    width: auto;
    margin-left: auto;
    font-size: 6px;
  }

  .quote-notes {
    grid-template-columns: 53px 1fr;
    padding: 9px 2px 6px;
    font-family: DFKai-SB, BiauKai, 標楷體, serif;
    font-size: 8px;
  }

  .quote-notes ol {
    margin-top: 0;
  }

  .quote-notes textarea {
    min-height: 28px;
    font-family: inherit;
    font-size: 8px;
  }

  .signature-area {
    grid-template-columns: 1fr 92px 1fr;
    gap: 5px;
    min-height: 130px;
    padding-top: 13px;
    font-family: DFKai-SB, BiauKai, 標楷體, serif;
    font-size: 7.5px;
  }

  .signature-area img {
    width: 86px;
    max-height: 78px;
  }

  .signature-area .responsible {
    grid-column: auto;
  }

  .gantt-dialog-backdrop {
    align-items: stretch;
    padding: 8px;
  }

  .gantt-dialog {
    border-radius: 13px;
    width: 100%;
    height: calc(100dvh - 16px);
    max-height: none;
  }

  .gantt-dialog-heading {
    gap: 10px;
    min-height: 70px;
    padding: 12px 13px;
  }

  .gantt-heading-icon {
    width: 40px;
    height: 40px;
  }

  .gantt-dialog-heading h2 {
    font-size: 18px;
  }

  .gantt-dialog-heading p {
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100vw - 140px);
    font-size: 11px;
    overflow: hidden;
  }

  .gantt-dialog-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }

  .gantt-dialog-controls label, .gantt-control-note {
    min-width: 0;
  }

  .gantt-control-note {
    grid-area: 2 / 1 / auto / -1;
  }

  .gantt-dialog-controls > button {
    min-width: 0;
    padding-inline: 8px;
    font-size: 11px;
  }

  .gantt-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 9px 12px;
  }

  .gantt-summary-strip > span {
    min-height: 57px;
    padding: 8px 10px;
  }

  .gantt-summary-strip > span:last-child {
    grid-column: 1 / -1;
  }

  .gantt-dialog-body {
    padding: 8px;
  }

  .gantt-chart {
    background: none;
    border: 0;
    min-width: 0;
  }

  .gantt-chart-head {
    display: none;
  }

  .gantt-task-row {
    background: #fff;
    border: 1px solid #d9e4e1;
    border-radius: 10px;
    margin-bottom: 8px;
    display: block;
    overflow: hidden;
  }

  .gantt-task-row:last-child {
    border-bottom: 1px solid #d9e4e1;
  }

  .gantt-task-copy {
    border-bottom: 1px solid #e4ecea;
    border-right: 0;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-height: 82px;
    padding: 9px 10px;
  }

  .gantt-task-copy > label {
    align-self: center;
  }

  .gantt-task-copy input {
    width: 48px;
    height: 34px;
  }

  .gantt-track {
    border-left: 0;
    min-height: 48px;
  }

  .gantt-task-bar {
    min-width: 24px;
    height: 24px;
    top: 12px;
  }

  .gantt-dialog-footer {
    padding: 9px 12px 10px;
    font-size: 10px;
  }
}

@page gantt-chart {
  size: A4 landscape;
  margin: 8mm;
}

.backoffice-console-backdrop {
  z-index: 120;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  background: #0a1b1ab8;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
  display: grid;
  position: fixed;
  inset: 0;
}

.backoffice-console {
  width: min(1180px, 100%);
  max-height: calc(100vh - clamp(24px, 6vw, 68px));
  color: var(--ink);
  background: #f7f9f6;
  border: 1px solid #ffffff8c;
  border-radius: 18px;
  grid-template-rows: auto auto minmax(0, 1fr);
  display: grid;
  overflow: hidden;
  box-shadow: 0 28px 90px #05131261;
}

.backoffice-console-header {
  color: #f7fffc;
  background: radial-gradient(circle at 85% 0, #5ac4b13b, #0000 34%), linear-gradient(135deg, #173f3c, #102e2d);
  grid-template-columns: 46px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 16px 20px;
  display: grid;
}

.backoffice-console-icon, .backoffice-login-lock {
  color: #dff7ef;
  background: #ffffff1a;
  border: 1px solid #fff3;
  border-radius: 13px;
  place-items: center;
  width: 46px;
  height: 46px;
  display: grid;
}

.backoffice-console-header h2, .backoffice-console-header p, .backoffice-login-card h3, .backoffice-login-card p, .backoffice-account-create h3, .backoffice-account-create p {
  margin: 0;
}

.backoffice-console-header h2 {
  font-size: 21px;
  line-height: 1.35;
}

.backoffice-console-header p {
  color: #f0fcf8b8;
  margin-top: 3px;
  font-size: 14px;
}

.backoffice-current-user {
  justify-items: end;
  gap: 2px;
  display: grid;
}

.backoffice-current-user strong {
  font-size: 15px;
}

.backoffice-current-user small {
  color: #f0fcf8b8;
  font-size: 12px;
}

.backoffice-close {
  color: #fff;
  cursor: pointer;
  background: #ffffff14;
  border: 1px solid #ffffff2e;
  border-radius: 10px;
  place-items: center;
  width: 38px;
  height: 38px;
  display: grid;
}

.backoffice-close:hover {
  background: #ffffff2b;
}

.backoffice-session-loading {
  color: #5e6e69;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 250px;
  font-size: 16px;
  display: flex;
}

.backoffice-login-shell {
  background: radial-gradient(circle at 22% 18%, #5db09e21, #0000 32%), #eef3ef;
  place-items: center;
  min-height: min(560px, 100vh - 150px);
  padding: clamp(24px, 5vw, 58px) 18px;
  display: grid;
}

.backoffice-login-card {
  background: #fff;
  border: 1px solid #d4dfda;
  border-radius: 17px;
  gap: 17px;
  width: min(430px, 100%);
  padding: 32px;
  display: grid;
  box-shadow: 0 18px 50px #1e3c361f;
}

.backoffice-login-card .backoffice-login-lock {
  color: #236d62;
  background: #e7f4ef;
  border-color: #cce4db;
}

.backoffice-login-card h3 {
  font-size: 23px;
}

.backoffice-login-card > p {
  color: #62716d;
  font-size: 15px;
  line-height: 1.7;
}

.backoffice-login-card label, .backoffice-account-create label {
  color: #344541;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  display: grid;
}

.backoffice-login-card input, .backoffice-account-create input, .backoffice-account-create select, .backoffice-account-controls select, .backoffice-reset-password input {
  color: #1f302c;
  background: #fbfcfb;
  border: 1px solid #cbd7d2;
  border-radius: 9px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
}

.backoffice-password-field {
  display: block;
  position: relative;
}

.backoffice-password-field input {
  padding-right: 48px;
}

.backoffice-password-field button {
  color: #5c716b;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 7px;
  place-items: center;
  width: 36px;
  height: 36px;
  display: grid;
  position: absolute;
  top: 4px;
  right: 4px;
}

.backoffice-login-submit, .backoffice-account-create > button {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1d756a, #115c54);
  border: 0;
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  box-shadow: 0 8px 19px #115c5433;
}

.backoffice-login-submit:disabled, .backoffice-account-create > button:disabled {
  opacity: .58;
  cursor: wait;
}

.backoffice-error, .backoffice-alert, .backoffice-message {
  color: #8e3f36;
  background: #fff1ee;
  border: 1px solid #e4c8c1;
  border-radius: 9px;
  margin: 0;
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.55;
}

.backoffice-tabs {
  background: #fff;
  border-bottom: 1px solid #dce4e0;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 9px 18px;
  display: flex;
}

.backoffice-tabs button {
  color: #53645f;
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
}

.backoffice-tabs button.active {
  color: #155f56;
  background: #eaf5f1;
  border-color: #bdd9d1;
}

.backoffice-tabs em {
  min-width: 23px;
  height: 23px;
  color: inherit;
  background: #1c665c1a;
  border-radius: 12px;
  place-items: center;
  padding: 0 6px;
  font-size: 12px;
  font-style: normal;
  display: inline-grid;
}

.backoffice-tabs .backoffice-logout {
  color: #5b6965;
  background: #fafbfa;
  border-color: #d9e0dd;
  margin-left: auto;
}

.backoffice-console-body {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

.backoffice-console-body > .backoffice-message {
  color: #235f55;
  background: #edf8f4;
  border-color: #bddbd1;
  margin-bottom: 14px;
}

.backoffice-files-panel, .backoffice-account-layout {
  min-height: 0;
}

.backoffice-files-toolbar {
  gap: 10px;
  margin-bottom: 14px;
  display: flex;
}

.backoffice-files-toolbar label {
  color: #667570;
  background: #fff;
  border: 1px solid #cfdad5;
  border-radius: 9px;
  flex: 1;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  display: flex;
}

.backoffice-files-toolbar input {
  background: none;
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  font-size: 15px;
}

.backoffice-files-toolbar > button, .backoffice-trash-summary > button, .backoffice-file-actions button, .backoffice-account-controls button, .backoffice-reset-password button {
  color: #3e534d;
  cursor: pointer;
  background: #fff;
  border: 1px solid #cbd6d2;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
}

.backoffice-file-list, .backoffice-account-list {
  gap: 9px;
  display: grid;
}

.backoffice-file-list article {
  background: #fff;
  border: 1px solid #d8e0dc;
  border-radius: 11px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px 13px;
  display: grid;
}

.file-badge {
  color: #21685e;
  background: #e8f4ef;
  border-radius: 10px;
  place-items: center;
  width: 48px;
  height: 48px;
  font-size: 11px;
  font-weight: 900;
  display: grid;
}

.backoffice-file-copy, .backoffice-account-copy {
  gap: 3px;
  min-width: 0;
  display: grid;
}

.backoffice-file-copy strong, .backoffice-account-copy strong {
  color: #22332f;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  overflow: hidden;
}

.backoffice-file-copy small, .backoffice-account-copy small {
  color: #62716d;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  overflow: hidden;
}

.backoffice-file-copy em, .backoffice-account-copy em {
  color: #87928f;
  font-size: 12px;
  font-style: normal;
}

.backoffice-file-actions {
  gap: 7px;
  display: flex;
}

.backoffice-file-actions .backoffice-file-delete, .backoffice-account-controls .disable-account {
  color: #a14035;
  background: #fff7f5;
  border-color: #e1c4bd;
}

.backoffice-trash-summary {
  color: #594a2f;
  background: linear-gradient(135deg, #fffaf0, #f7f0df);
  border: 1px solid #dfcfae;
  border-radius: 11px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  display: grid;
}

.backoffice-trash-summary > span {
  color: #96672d;
  background: #fff;
  border-radius: 11px;
  place-items: center;
  width: 42px;
  height: 42px;
  display: grid;
  box-shadow: 0 5px 14px #60462017;
}

.backoffice-trash-summary strong, .backoffice-trash-summary small {
  display: block;
}

.backoffice-trash-summary strong {
  font-size: 15px;
}

.backoffice-trash-summary small {
  color: #786b55;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.file-badge.trash {
  color: #9b5147;
  background: #faece8;
}

.backoffice-file-actions .backoffice-file-restore {
  color: #17685b;
  background: #eef8f4;
  border-color: #9dcbbd;
}

.backoffice-file-actions .backoffice-file-restore:hover {
  background: #e2f2ec;
  border-color: #5aa18f;
}

.backoffice-empty {
  color: #6e7c78;
  text-align: center;
  background: #ffffffad;
  border: 1px dashed #cbd8d3;
  border-radius: 12px;
  margin: 0;
  padding: 70px 18px;
  font-size: 15px;
}

.backoffice-account-layout {
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  display: grid;
}

.backoffice-account-create {
  background: #fff;
  border: 1px solid #d5dfda;
  border-radius: 12px;
  gap: 14px;
  padding: 19px;
  display: grid;
}

.backoffice-account-create h3 {
  font-size: 18px;
}

.backoffice-account-create p {
  color: #6c7975;
  margin-top: 4px;
  font-size: 13px;
}

.backoffice-account {
  background: #fff;
  border: 1px solid #d7dfdb;
  border-radius: 11px;
  grid-template-columns: 42px minmax(150px, 1fr) minmax(240px, auto);
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 13px;
  display: grid;
}

.backoffice-account.disabled {
  opacity: .66;
  background: #f1f2f1;
}

.backoffice-account-avatar {
  color: #25695f;
  background: #e7f3ef;
  border-radius: 50%;
  place-items: center;
  width: 40px;
  height: 40px;
  display: grid;
}

.backoffice-account-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  display: flex;
}

.backoffice-account-controls select {
  width: auto;
  min-height: 38px;
  font-size: 13px;
}

.backoffice-account-controls .enable-account {
  color: #17665b;
  background: #eff8f5;
  border-color: #b9d8ce;
}

.backoffice-reset-password {
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px;
  width: 100%;
  display: grid;
}

.backoffice-reset-password input {
  min-height: 38px;
  font-size: 13px;
}

.backoffice-fixed-account {
  color: #70807b;
  text-align: right;
  font-size: 13px;
}

.backoffice-integration-layout {
  gap: 16px;
  display: grid;
}

.backoffice-integration-intro {
  background: linear-gradient(135deg, #f9fcfa, #eef7f3);
  border: 1px solid #cfe0da;
  border-radius: 13px;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 17px 19px;
  display: flex;
}

.backoffice-integration-kicker {
  color: #2d776b;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 900;
}

.backoffice-integration-intro h3, .backoffice-integration-card h3, .backoffice-integration-intro p, .backoffice-integration-card p, .backoffice-integration-actions p {
  margin: 0;
}

.backoffice-integration-intro h3 {
  color: #1c3f39;
  margin-top: 3px;
  font-size: 21px;
}

.backoffice-integration-intro p {
  color: #60726d;
  max-width: 760px;
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.65;
}

.backoffice-integration-state {
  border: 1px solid;
  border-radius: 999px;
  flex: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}

.backoffice-integration-state.ready {
  color: #17675b;
  background: #e5f6ef;
  border-color: #9fd0c1;
}

.backoffice-integration-state.pending {
  color: #7b6335;
  background: #fff8e9;
  border-color: #ddcfb4;
}

.backoffice-integration-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  display: grid;
}

.backoffice-integration-card {
  background: #fff;
  border: 1px solid #d5dfdb;
  border-radius: 13px;
  gap: 15px;
  min-width: 0;
  padding: 18px;
  display: grid;
  box-shadow: 0 7px 20px #1b40380d;
}

.backoffice-integration-card > header {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  display: grid;
}

.backoffice-integration-card h3 {
  color: #243d37;
  font-size: 17px;
}

.backoffice-integration-card header p {
  color: #71817c;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

.integration-channel-badge {
  border-radius: 11px;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 12px;
  font-weight: 950;
  display: grid;
}

.integration-channel-badge.line {
  color: #fff;
  background: #06c755;
}

.integration-channel-badge.email {
  color: #2a6180;
  background: #e4f2fa;
}

.integration-channel-badge.approval {
  color: #78531b;
  background: #fff0cd;
}

.integration-switch, .integration-check {
  color: #445a54;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
}

.integration-switch input, .integration-check input {
  accent-color: #167164;
  width: 17px;
  height: 17px;
}

.integration-fields, .integration-grid {
  gap: 12px;
  display: grid;
}

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

.integration-grid.three-columns {
  grid-template-columns: auto auto minmax(240px, 1fr);
  align-items: end;
}

.integration-grid label, .integration-fields label {
  color: #40524d;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  display: grid;
}

.integration-grid input, .integration-grid select, .integration-grid textarea, .integration-fields input {
  color: #22352f;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  font: inherit;
  background: #fbfcfb;
  border: 1px solid #cbd7d2;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 14px;
}

.integration-grid textarea {
  resize: vertical;
  min-height: 76px;
  line-height: 1.45;
}

.integration-grid .span-two {
  grid-column: 1 / -1;
}

.integration-provider-note, .integration-safety-note {
  color: #5b6b66;
  background: #f3f6f4;
  border-radius: 8px;
  padding: 10px 11px;
  font-size: 12px;
  line-height: 1.55;
}

.integration-safety-note {
  background: #fff9eb;
  border-left: 3px solid #c9973e;
}

.integration-test-button {
  color: #1f655b;
  cursor: pointer;
  background: #eff8f5;
  border: 1px solid #bcd5cd;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 41px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 850;
  display: inline-flex;
}

.integration-test-button:disabled {
  opacity: .52;
  cursor: not-allowed;
}

.backoffice-integration-actions {
  background: #f8faf8;
  border: 1px solid #d3dfda;
  border-radius: 11px;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  display: flex;
}

.backoffice-integration-actions p {
  color: #63736e;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
}

.backoffice-integration-actions button {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1d756a, #115c54);
  border: 0;
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
}

.backoffice-integration-actions button:disabled {
  opacity: .58;
  cursor: wait;
}

@media (max-width: 900px) {
  .backoffice-account-layout {
    grid-template-columns: 1fr;
  }

  .backoffice-account-create {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backoffice-account-create > div, .backoffice-account-create > button {
    grid-column: 1 / -1;
  }

  .backoffice-account {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .backoffice-account-controls, .backoffice-fixed-account {
    text-align: left;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .backoffice-integration-columns {
    grid-template-columns: 1fr;
  }

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

  .integration-grid.three-columns > label:last-of-type {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar-actions .backoffice-action {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .backoffice-console-backdrop {
    place-items: stretch stretch;
    padding: 0;
  }

  .backoffice-console {
    border: 0;
    border-radius: 0;
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
  }

  .backoffice-console-header {
    grid-template-columns: 40px minmax(0, 1fr) 38px;
    gap: 9px;
    min-height: 74px;
    padding: 12px;
  }

  .backoffice-console-icon {
    width: 40px;
    height: 40px;
  }

  .backoffice-console-header h2 {
    font-size: 19px;
  }

  .backoffice-console-header p {
    font-size: 12px;
  }

  .backoffice-current-user {
    display: none;
  }

  .backoffice-tabs {
    scrollbar-width: thin;
    min-height: 56px;
    padding: 8px;
    overflow-x: auto;
  }

  .backoffice-tabs button {
    flex: none;
    padding-inline: 8px;
    font-size: 14px;
  }

  .backoffice-tabs .backoffice-logout {
    flex: 0 0 42px;
    margin-left: 0;
    padding: 0;
    font-size: 0;
  }

  .backoffice-console-body {
    padding: 11px;
  }

  .backoffice-files-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    display: grid;
  }

  .backoffice-file-list article {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .file-badge {
    width: 42px;
    height: 42px;
  }

  .backoffice-file-actions {
    grid-column: 1 / -1;
  }

  .backoffice-file-actions button {
    flex: 1;
    min-height: 42px;
  }

  .backoffice-trash-summary {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 11px;
  }

  .backoffice-trash-summary > span {
    width: 38px;
    height: 38px;
  }

  .backoffice-trash-summary > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .backoffice-account-create {
    grid-template-columns: 1fr;
  }

  .backoffice-account-create > div, .backoffice-account-create > button {
    grid-column: auto;
  }

  .backoffice-integration-intro, .backoffice-integration-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .backoffice-integration-state {
    align-self: flex-start;
  }

  .backoffice-integration-card {
    padding: 14px;
  }

  .backoffice-integration-card > header {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .backoffice-integration-card > header .integration-switch {
    grid-column: 1 / -1;
  }

  .integration-grid, .integration-grid.three-columns {
    grid-template-columns: 1fr;
  }

  .integration-grid .span-two, .integration-grid.three-columns > label:last-of-type {
    grid-column: auto;
  }

  .backoffice-integration-actions button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .backoffice-login-card {
    padding: 24px 19px;
  }

  .backoffice-tabs button {
    gap: 5px;
  }

  .backoffice-tabs em {
    display: none;
  }

  .backoffice-files-toolbar {
    grid-template-columns: 1fr;
  }

  .backoffice-account-controls {
    grid-template-columns: 1fr 1fr;
    display: grid;
  }

  .backoffice-account-controls select, .backoffice-reset-password {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html, body {
    color: #000;
    background: #fff;
    width: 100%;
    min-width: 0;
  }

  .no-print, .app-sidebar, .app-topbar, .tool-panel, .editor-head, .toast {
    display: none !important;
  }

  .quote-app, .app-main, .workspace, .editor-shell {
    width: 100%;
    min-width: 0;
    min-height: 0;
    box-shadow: none;
    background: #fff;
    border: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: block;
    overflow: visible;
  }

  .quote-sheet {
    width: 100%;
    max-width: none;
    min-height: 0;
    box-shadow: none;
    background: #fff;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .document-heading {
    grid-template-columns: 25mm 1fr 34mm;
    min-width: 0;
    min-height: 22mm;
  }

  .document-heading > img {
    width: 20mm;
    height: 20mm;
  }

  .document-heading h1 {
    font-size: 21pt;
  }

  .document-heading h2 {
    font-size: 15pt;
  }

  .company-grid, .client-grid, .quote-table-wrap, .quote-notes, .signature-area, .editor-toolbar {
    min-width: 0;
  }

  .editable, .quote-notes textarea {
    color: #000;
    padding: 0;
    box-shadow: none !important;
    background: none !important;
  }

  input::placeholder, textarea::placeholder {
    color: #0000 !important;
  }

  input[type="date"] {
    appearance: none;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
  }

  .company-grid p, .client-grid label, .client-grid .editable {
    font-size: 9pt;
  }

  .company-grid p {
    min-height: 5.5mm;
  }

  .client-grid label {
    grid-template-columns: 22mm minmax(0, 1fr);
    min-height: 6.2mm;
  }

  .quote-table {
    font-size: 9pt;
  }

  .quote-table th, .quote-table td {
    height: 6.6mm;
    padding: 0 1mm;
  }

  .quote-table thead th {
    height: 7mm;
  }

  .quote-table tfoot td, .quote-table tfoot th {
    height: 8mm;
  }

  .quote-notes {
    grid-template-columns: 20mm 1fr;
    padding-top: 2mm;
    font-size: 8pt;
  }

  .quote-notes textarea {
    resize: none;
    min-height: 4.5mm;
    font-size: 8pt;
    line-height: 1.45;
  }

  .signature-area {
    break-inside: avoid;
    grid-template-columns: 1fr 45mm 1fr;
    min-height: 38mm;
    padding-top: 5mm;
    font-size: 8.5pt;
  }

  .signature-area img {
    width: 38mm;
    max-height: 33mm;
  }

  body.printing-gantt {
    page: gantt-chart;
  }

  body.printing-gantt .quote-app {
    display: none !important;
  }

  body.printing-gantt .gantt-dialog-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #fff;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    display: block;
    position: static;
  }

  body.printing-gantt .gantt-dialog {
    page: gantt-chart;
    width: 100%;
    height: auto;
    max-height: none;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  body.printing-gantt .gantt-dialog-heading {
    min-height: 15mm;
    padding: 2mm 0 3mm;
  }

  body.printing-gantt .gantt-dialog-heading > button, body.printing-gantt .gantt-dialog-controls {
    display: none !important;
  }

  body.printing-gantt .gantt-summary-strip {
    gap: 2mm;
    padding: 0 0 3mm;
  }

  body.printing-gantt .gantt-summary-strip > span {
    min-height: 13mm;
    padding: 2mm 3mm;
  }

  body.printing-gantt .gantt-dialog-body {
    padding: 0;
    overflow: visible;
  }

  body.printing-gantt .gantt-chart {
    border-color: #7d8b87;
    min-width: 0;
  }

  body.printing-gantt .gantt-chart-head, body.printing-gantt .gantt-task-row {
    grid-template-columns: 76mm minmax(0, 1fr);
  }

  body.printing-gantt .gantt-chart-head {
    min-height: 8mm;
  }

  body.printing-gantt .gantt-task-row {
    break-inside: avoid;
    min-height: 12mm;
  }

  body.printing-gantt .gantt-task-copy {
    grid-template-columns: 7mm minmax(0, 1fr) 17mm;
    min-height: 12mm;
    padding: 1mm 2mm;
  }

  body.printing-gantt .gantt-task-copy strong {
    font-size: 7.2pt;
  }

  body.printing-gantt .gantt-task-copy small, body.printing-gantt .gantt-task-copy em {
    font-size: 5.8pt;
  }

  body.printing-gantt .gantt-task-copy input {
    color: #000;
    background: none;
    border: 0;
    width: 9mm;
    height: 6mm;
    padding: 0;
    font-size: 7pt;
  }

  body.printing-gantt .gantt-track {
    min-height: 12mm;
  }

  body.printing-gantt .gantt-task-bar {
    color: #000;
    height: 6mm;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    top: 3mm;
  }

  body.printing-gantt .gantt-dialog-footer {
    padding: 3mm 0 0;
    font-size: 6.5pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, :before, :after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/*# sourceMappingURL=app_globals_0yg4wg8.css.map*/