﻿:root {
  --font-ui: "MiSans", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  --font-display: var(--font-ui);
  --bg: #f3f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --line: #d9e1e8;
  --line-strong: #c4d0da;
  --text: #17212b;
  --ink: #17212b;
  --muted: #627282;
  --blue: #1f5fbd;
  --primary: #1f5fbd;
  --blue-dark: #123353;
  --blue-soft: #edf4fb;
  --green: #15803d;
  --orange: #c96a1b;
  --amber: #b85f12;
  --red: #c93636;
  --shadow: 0 5px 16px rgba(22, 42, 61, 0.07);
  --shadow-soft: 0 2px 8px rgba(22, 42, 61, 0.05);
  --radius: 8px;
  --radius-sm: 6px;
  --ui-density-scale: 0.92;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 123, 142, 0.38) transparent;
}

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

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(107, 123, 142, 0.35);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(82, 98, 117, 0.52);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.side,
.excel-quote-drawer {
  scrollbar-color: rgba(218, 232, 247, 0.34) transparent;
}

.side::-webkit-scrollbar-thumb,
.excel-quote-drawer::-webkit-scrollbar-thumb {
  background: rgba(218, 232, 247, 0.28);
  background-clip: padding-box;
}

.side::-webkit-scrollbar-thumb:hover,
.excel-quote-drawer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.46);
  background-clip: padding-box;
}

/* Quote management workspace */
.quotes.quote-workspace-standard {
  grid-template-columns: 268px minmax(0, 1fr);
}

.quotes.quote-workspace-focus,
.quotes.quote-workspace-finance {
  grid-template-columns: minmax(0, 1fr);
}

.quoteedit.quoteedit-wide {
  grid-template-columns: minmax(0, 1fr);
}

.quoteedit.quoteedit-finance {
  grid-template-columns: minmax(0, 1fr) 286px;
}

.quote-list-panel {
  padding: 12px;
}

.quote-list-toolbar {
  margin-bottom: 10px;
}

.quote-list-toolbar .section-title {
  gap: 8px;
}

.quote-list-toolbar .section-leading-icon {
  width: 28px;
  height: 28px;
}

.quote-list-toolbar .actions {
  gap: 4px;
}

.quote-list-toolbar .btn.icon-only,
.searchbar-icon .btn.icon-only {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.quote-status-filter {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.quote-status-filter select {
  margin-top: 5px;
}

.quote-list-panel > .list {
  gap: 8px;
}

.quote-list-card {
  gap: 6px;
  padding: 10px !important;
}

.quote-list-card .pill {
  flex: 0 0 auto;
  padding: 2px 7px;
  font-size: 10px;
}

.quote-list-secondary {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 0 !important;
}

.quote-list-secondary > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0;
  color: #61758a;
  font-size: 11px;
}

.quote-list-secondary .ui-icon {
  width: 12px;
  height: 12px;
}

.quote-card-compact-total {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #f2f6f9;
}

.quote-card-actions {
  padding-top: 6px;
}

.quote-card-actions .ui-icon {
  width: 12px;
  height: 12px;
}

.quote-editor-head {
  padding: 12px 14px;
}

.quote-commandbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px 18px;
  align-items: start;
}

.quote-command-title {
  min-width: 0;
}

.quote-command-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #6a7d90;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.quote-command-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.quote-command-heading h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #111c2d;
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-command-heading > span:not(.pill) {
  min-width: 0;
  overflow: hidden;
  color: #30455a;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-command-heading .pill {
  flex: 0 0 auto;
}

.quote-context-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px 0;
  margin-top: 6px;
  color: #65798d;
  font-size: 11px;
}

.quote-context-meta span {
  display: inline-flex;
  align-items: center;
}

.quote-context-meta span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  margin: 0 8px;
  border-radius: 50%;
  background: #9cafc1;
}

.quote-command-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.quote-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid #d7e1ea;
  border-radius: 7px;
  background: #f1f5f8;
}

.quote-view-switch button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #5d7185;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.quote-view-switch button:hover {
  color: #17334e;
  background: rgba(255, 255, 255, 0.7);
}

.quote-view-switch button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 1px 4px rgba(22, 42, 61, 0.12);
}

.quote-view-switch .ui-icon {
  width: 14px;
  height: 14px;
}

.quote-actions {
  flex-wrap: nowrap;
}

.quote-actions .btn {
  min-height: 36px;
  padding: 7px 10px;
  white-space: nowrap;
}

.quote-more-menu > div {
  min-width: 168px;
  border-radius: 7px;
}

.quote-more-menu > div .btn {
  width: 100%;
  justify-content: flex-start;
}

.quote-owner-line {
  display: flex;
  min-height: 30px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #e3e9ef;
  color: #61758a;
  font-size: 11px;
}

.quote-owner-line > span,
.quote-owner-line label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.quote-owner-line label {
  flex: 0 1 260px;
}

.quote-owner-line select {
  min-height: 28px;
  padding: 3px 28px 3px 8px;
  font-size: 11px;
}

.quote-owner-line .ui-icon {
  width: 13px;
  height: 13px;
}

.quote-excel-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #cfe1ff;
  border-radius: 999px;
  background: #f7fbff;
  color: #466181;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.quote-excel-source .ui-icon {
  width: 14px;
  height: 14px;
  color: #2f6df2;
}

.quote-excel-source strong {
  color: #245de0;
  font-weight: 850;
}

.quote-excel-source em {
  color: #7a8da3;
  font-style: normal;
  font-weight: 750;
}

.quote-edit-state {
  margin-left: auto;
}

.quote-save-message:empty {
  display: none;
}

.quote-step-nav {
  gap: 4px;
  margin-top: 8px;
  padding: 3px;
  border-radius: 7px;
  background: #f1f5f8;
}

.quote-step-nav button {
  min-height: 34px;
  gap: 5px;
  border-radius: 5px;
  font-size: 11px;
}

.quote-step-nav button span {
  width: 18px;
  height: 18px;
}

.quote-step-nav button.active {
  box-shadow: 0 1px 4px rgba(22, 42, 61, 0.12);
}

.quote-financial-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr)) auto;
  align-items: stretch;
  margin-top: 8px;
  border-top: 1px solid #e3e9ef;
  border-bottom: 1px solid #e3e9ef;
}

.quote-financial-metric {
  min-width: 0;
  padding: 7px 10px;
}

.quote-financial-metric + .quote-financial-metric {
  border-left: 1px solid #e3e9ef;
}

.quote-financial-metric span {
  display: block;
  overflow: hidden;
  color: #687c90;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-financial-metric small {
  font-size: 9px;
  font-weight: 700;
}

.quote-financial-metric strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #182538;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-financial-metric.positive strong,
.quote-pricing-review .positive {
  color: #18794e;
}

.quote-financial-metric.negative strong,
.quote-pricing-review .negative {
  color: #c23b3b;
}

.quote-financial-open {
  display: inline-flex;
  min-width: 88px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: 0;
  border-left: 1px solid #e3e9ef;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.quote-financial-open:hover {
  background: var(--blue-soft);
}

.quote-financial-open .ui-icon {
  width: 14px;
  height: 14px;
}

.quote-side {
  padding-right: 2px;
}

.quote-pricing-review {
  padding: 0;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: none;
}

.quote-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #dfe7ee;
  background: #f6f8fa;
}

.quote-side-head span {
  display: block;
  margin-bottom: 2px;
  color: #73869a;
  font-size: 10px;
  font-weight: 800;
}

.quote-side-head h3 {
  margin: 0;
  font-size: 17px;
}

.pricing-review-section {
  padding: 13px 14px;
}

.pricing-review-section + .pricing-review-section {
  border-top: 1px solid #dfe7ee;
}

.pricing-review-section .side-card-title {
  margin-bottom: 8px;
}

.pricing-review-section .side-card-title h4 {
  margin: 0;
  color: #26394d;
  font-size: 12px;
}

.quote-pricing-review .price {
  gap: 0;
}

.quote-pricing-review .price .row {
  min-height: 34px;
  padding: 7px 0;
}

.quote-pricing-review .price .row + .row {
  border-top: 1px solid #edf1f4;
}

.quote-pricing-review .profit-result,
.quote-pricing-review .quote-total-row {
  margin: 6px -6px 0;
  padding: 9px 6px !important;
  border: 1px solid #dbe5ee !important;
  border-radius: 6px;
  background: #f6f8fa;
}

.quote-pricing-review .profit-result.positive {
  border-color: #c6e8d7 !important;
  background: #f1faf5;
}

.quote-pricing-review .profit-result.negative {
  border-color: #f1c5c5 !important;
  background: #fff5f5;
}

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

  .quote-command-controls {
    justify-content: space-between;
  }

  .quoteedit.quoteedit-finance {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
}

@media (max-width: 1120px) {
  .quotes.quote-workspace-standard {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .quote-view-switch button span {
    display: none;
  }

  .quote-view-switch button {
    width: 32px;
    padding: 5px;
  }

  .quoteedit.quoteedit-finance {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    overflow: visible;
  }

  .quoteedit.quoteedit-finance > div:first-child,
  .quoteedit.quoteedit-finance .quote-side {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 820px) {
  .quotes.quote-workspace-standard,
  .quotes.quote-workspace-focus,
  .quotes.quote-workspace-finance {
    grid-template-columns: minmax(0, 1fr);
  }

  .quotes.quote-workspace-standard {
    height: auto;
    overflow: visible;
  }

  .quotes.quote-workspace-standard > .quote-list-panel {
    max-height: 42vh;
  }

  .quote-command-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-view-switch,
  .quote-actions {
    width: 100%;
  }

  .quote-view-switch button {
    width: auto;
    flex: 1 1 0;
  }

  .quote-view-switch button span {
    display: inline;
  }

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

  .quote-actions .btn,
  .quote-more-menu,
  .quote-more-menu > summary {
    width: 100%;
  }

  .quote-financial-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-financial-metric:nth-child(3) {
    border-left: 0;
  }

  .quote-financial-metric:nth-child(n + 3) {
    border-top: 1px solid #e3e9ef;
  }

  .quote-financial-open {
    grid-column: 1 / -1;
    min-height: 34px;
    border-top: 1px solid #e3e9ef;
    border-left: 0;
  }

  .quote-step-nav {
    display: flex;
    overflow-x: auto;
  }

  .quote-step-nav button {
    flex: 0 0 auto;
    padding: 6px 10px;
  }
}

@media (max-width: 560px) {
  .quote-command-heading {
    flex-wrap: wrap;
  }

  .quote-command-heading h2 {
    flex: 1 1 100%;
  }

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

  .quote-owner-line label {
    flex-basis: 100%;
  }

  .quote-edit-state {
    margin-left: 0;
  }
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: calc(16px * var(--ui-density-scale));
  overflow: hidden;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
}
button { cursor: pointer; }
input, select, textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: calc(10px * var(--ui-density-scale)) calc(12px * var(--ui-density-scale));
  background: #fff;
  color: var(--text);
  min-height: calc(40px * var(--ui-density-scale));
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: #6f9fd4;
  box-shadow: 0 0 0 3px rgba(31, 95, 189, 0.11);
}
textarea { min-height: calc(86px * var(--ui-density-scale)); resize: vertical; line-height: 1.5; }
label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #06305a 0%, #eef5ff 58%, #fff 100%);
}
.login form {
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  background: rgba(255, 255, 255, 0.96);
  padding: 34px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: var(--shadow);
}
.login-logo { width: 150px; margin: 0 auto 8px; display: block; }
.login h1 { margin: 0; font-size: 22px; text-align: center; }
.login p { margin: 0 0 8px; color: var(--muted); line-height: 1.6; text-align: center; }
.login-language {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.login-language button {
  min-height: 34px;
  border: 1px solid #d8e4f0;
  border-radius: 6px;
  background: #f7faff;
  color: var(--muted);
  cursor: pointer;
}
.login-language button.active {
  border-color: #8bb8ff;
  background: #eaf3ff;
  color: var(--blue);
  font-weight: 800;
}

.app { display: grid; grid-template-columns: 60px 1fr; height: 100vh; min-height: 0; overflow: hidden; }
.app.sidebar-pinned { grid-template-columns: 220px 1fr; }
.side {
  position: relative;
  z-index: 20;
  width: 60px;
  background: linear-gradient(180deg, var(--blue-dark) 0%, #061d35 100%);
  color: #fff;
  padding: 18px 10px;
  box-shadow: 8px 0 28px rgba(7, 40, 75, 0.18);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .26s ease, padding .26s ease;
}
.app:not(.sidebar-pinned).sidebar-expanded .side { width: 220px; padding: 18px 14px; }
.app.sidebar-pinned .side { width: auto; padding: 22px 16px; }
.brand { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 20px; min-width: 188px; }
.brand img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 11px; padding: 4px; }
.brand strong { display: block; font-size: 18px; }
.brand span, .user span { display: block; color: #aac1d8; font-size: 12px; margin-top: 4px; }
.nav { display: grid; gap: 8px; }
.nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #dbeafe;
  text-align: left;
  padding: 10px;
  min-width: 40px;
  overflow: hidden;
}
.nav button.active, .nav button:hover { background: #2f6df6; color: #fff; }
.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  background: rgba(255,255,255,0.11);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.nav-label {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .14s ease;
}
.dock-pin {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: #dbeafe;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.dock-pin.active {
  background: #fff;
  color: var(--blue);
}
.dock-pin:hover { transform: translateY(-1px); }
.pin-icon { line-height: 1; }
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .brand > div,
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .dock-pin,
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav-label,
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .user {
  opacity: 0;
  pointer-events: none;
}
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .brand {
  grid-template-columns: 40px;
  min-width: 40px;
}
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button {
  justify-content: center;
}
.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  background: rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.user {
  margin-top: 28px;
  width: 188px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
  transition: opacity .14s ease;
}
.logout-button {
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: #fff;
  cursor: pointer;
}
.logout-button:hover { background: rgba(255,255,255,.16); }
.language-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
}
.language-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cfe1f5;
  font-size: 12px;
  font-weight: 800;
}
.language-switch button.active {
  background: #fff;
  color: var(--blue);
}

main { min-height: 0; overflow-y: auto; padding: calc(20px * var(--ui-density-scale)); min-width: 0; }
main > *,
.card,
.panel,
.summary,
.pdf,
.side-card,
.dashboard-info,
.invoice-card {
  min-width: 0;
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.top h1 { margin: 0; font-size: 28px; }
.top p { margin: 8px 0 0; color: var(--muted); }
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: var(--blue-soft); color: var(--blue); padding: 5px 10px; font-size: 12px; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card, .panel, .summary, .pdf {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.065);
  padding: calc(16px * var(--ui-density-scale));
  min-width: 0;
}
.card span { color: var(--muted); font-size: 13px; }
.card strong { display: block; margin-top: 8px; font-size: 24px; }
.card small { color: var(--green); }

.grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 16px; }
.bottom { display: grid; grid-template-columns: repeat(4, 1fr) 1.2fr; gap: 16px; margin-top: 16px; }
.dashboard-top { margin-bottom: 16px; }
.dashboard-stats .stat-card {
  min-height: 116px;
  display: grid;
  align-content: center;
}
.dashboard-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
  gap: 16px;
  align-items: stretch;
}
.panel-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  min-width: 0;
}
.panel-title > * { min-width: 0; }
.panel-title h2,
.panel-title h3 { margin: 0; }
.panel-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.section-title h2,
.section-title h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.2;
}
.section-title h2 {
  font-size: 25px;
}
.section-title h3 {
  font-size: 23px;
}
.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.section-icon {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, #d8e8ff, #2f6df2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 18px rgba(47,109,242,.16);
}
.section-icon::before,
.section-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
}
.section-icon::before { top: 10px; }
.section-icon::after { top: 17px; }
.quick-create {
  display: grid;
  gap: 10px;
}
.quick-actions {
  justify-content: flex-end;
  padding-top: 4px;
}
.recent-panel {
  display: grid;
  align-content: start;
}
.recent-list {
  display: grid;
  gap: 10px;
}
.recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid #e4edf7;
  border-radius: 12px;
  background: #fbfdff;
}
.recent-item strong { display: block; }
.recent-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.recent-meta { text-align: right; }
.recent-actions { grid-column: 1 / -1; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--blue);
  padding: 0;
  font-weight: 700;
}
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.dashboard-info {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
}
.dashboard-info > strong {
  font-size: 24px;
  color: var(--blue-dark);
}
.dashboard-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}
.todo-list {
  display: grid;
  gap: 10px;
}
.todo-list p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: #f7fbff;
  border-radius: 10px;
}
.todo-list p strong { color: var(--blue); font-size: 20px; }
.form6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.form4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form6 > *, .form4 > *, .form3 > *, .form2 > * { min-width: 0; }

:is(.panel, .card, .summary, .side-card, .quote-form-card, .customer-library-form, .settings-card) {
  container-type: inline-size;
}

@container (max-width: 760px) {
  .form4,
  .form3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 520px) {
  .form4,
  .form3,
  .form2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.wide { grid-column: 1 / -1; }
.days .form2[style] {
  border-top-color: #e8eef6 !important;
  padding-top: 14px !important;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #24415f;
  padding: calc(7px * var(--ui-density-scale)) calc(10px * var(--ui-density-scale));
  min-height: calc(32px * var(--ui-density-scale));
  font-size: 13px;
  line-height: 1.2;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08); }
.primary { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 700; }
.danger { border-color: #fecaca; color: var(--red); background: #fff7f7; }
.soft { background: var(--blue-soft); color: var(--blue); border-color: #cfe1ff; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.toolbar h2, .toolbar h3 { margin: 0; }
.toolbar > *,
.actions > * { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input { flex: 1; }
.searchbar button { width: 74px; }

.list { display: grid; gap: 10px; }
.list button {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
}
.list button.active { border-color: var(--blue); background: var(--blue-soft); }
.list span, .muted { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.quote-list-card {
  display: grid;
  gap: 8px;
}
.quote-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.quote-card-topline strong {
  min-width: 0;
  color: #07152b;
  font-size: 16px;
  line-height: 1.25;
}
.quote-list-card .quote-code {
  color: #38536f;
  font-weight: 700;
}
.quote-list-meta {
  line-height: 1.45;
}
.quote-card-compact-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f5f9ff, #eef5ff);
}
.quote-card-compact-total small {
  color: #60748d;
  font-size: 12px;
  font-weight: 800;
}
.quote-card-compact-total strong {
  color: var(--blue);
  font-size: 15px;
}
.quote-invoice-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  padding: 4px 8px;
  border: 1px solid #cfe1ff;
  border-radius: 999px;
  background: #f4f8ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}
.quote-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quote-card-metrics p {
  margin: 0;
  padding: 8px;
  border-radius: 9px;
  background: #f8fbff;
}
.quote-card-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}
.quote-card-metrics strong {
  font-size: 14px;
}
.quote-card-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
}
.quote-card-actions em {
  color: var(--blue);
  font-style: normal;
  font-size: 12px;
}
.pill { display: inline-flex; border-radius: 999px; padding: 3px 8px; font-size: 12px; background: #f1f5f9; color: #475569; }
.status-draft { background: #eef2ff; color: #4f46e5; }
.status-sent { background: #fff7ed; color: #ea580c; }
.status-confirmed { background: #ecfdf5; color: #059669; }

.quotes {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 14px;
  height: calc(100vh - 40px);
  min-height: 0;
  overflow: hidden;
}
.quotes.quotes-sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.quotes > .panel {
  min-height: 0;
  overflow-y: auto;
}
.quote-list-panel {
  position: relative;
}
.quote-list-toolbar {
  align-items: center;
  gap: 10px;
}
.quote-list-toolbar h2 {
  font-size: 24px;
}
.quote-list-toolbar .actions {
  flex-wrap: nowrap;
  margin-left: auto;
}
.quote-list-toggle {
  min-height: 36px;
  padding: 0 12px;
  justify-content: center;
  font-weight: 800;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}
.quote-list-show {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 800;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.settings-hero,
.settings-wide {
  grid-column: 1 / -1;
}
.settings-hero {
  padding: 22px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
}
.settings-hero h2 {
  margin: 8px 0 8px;
  font-size: 28px;
}
.settings-hero p {
  max-width: 920px;
  color: var(--muted);
  line-height: 1.7;
}
.settings-mode-note {
  display: grid;
  gap: 3px;
  max-width: 980px;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: #f4f8ff;
  color: var(--text);
  line-height: 1.55;
}
.settings-mode-note span {
  color: var(--muted);
}
.settings-card {
  display: grid;
  gap: 14px;
}
.permission-hidden { display: none !important; }
.account-section {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #dbe7f5;
}
.account-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.account-section-head h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}
.account-section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.account-section-mark,
.account-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--primary);
  background: #edf4ff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.account-section-mark {
  width: 32px;
  padding: 4px;
}
.account-create-section {
  padding: 14px 12px 12px;
  border: 1px solid #cfe0f7;
  background: #f7faff;
}
.account-existing-section {
  margin-top: 2px;
}
.account-create-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.2fr) minmax(150px, 1fr) 170px auto;
  gap: 8px;
  align-items: end;
}
.account-list {
  display: grid;
  gap: 8px;
}
.account-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.account-field > span,
.account-quote-count small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.account-field > input,
.account-field > select {
  width: 100%;
}
.account-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) 160px 72px minmax(150px, 1fr) 82px auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 6px;
  background: #f8fbff;
}
.account-active {
  display: inline-flex;
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 6px;
  color: var(--text);
  min-height: 40px;
}
.account-active input { min-height: auto; }
.account-quote-count {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 40px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.account-quote-count strong {
  color: var(--text);
  font-size: 14px;
}
.password-change-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
}
@media (max-width: 1280px) {
  .account-create-grid,
  .account-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-row .btn,
  .account-create-grid .btn { width: 100%; }
}
.settings-card h3 {
  margin: 8px 0 6px;
  font-size: 22px;
}
.settings-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #5fa7ff);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}
.settings-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.settings-steps span {
  border: 1px solid #dbe7f5;
  background: #f8fbff;
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--muted);
  font-weight: 800;
}
.edition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.edition-card {
  min-height: 110px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 16px;
  display: grid;
  gap: 8px;
}
.edition-card strong {
  font-size: 18px;
  color: var(--text);
}
.edition-card span {
  color: var(--muted);
  line-height: 1.6;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.guide-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  padding: 15px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: #f8fbff;
}
.guide-card strong {
  color: var(--blue);
  font-size: 16px;
}
.guide-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.btn.danger-soft {
  border-color: #fecaca;
  background: #fff5f5;
  color: #dc2626;
}
.form-action-btn {
  align-self: end;
  min-height: 40px;
}
.customer-library-field select {
  border-color: #9fc1ff;
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
}
.customer-library-page {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}
.customer-library-panel {
  min-height: 360px;
}
.customer-library-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.customer-library-hero h2 {
  margin: 3px 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}
.customer-library-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.customer-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #2f5fb9;
  font-weight: 850;
  white-space: nowrap;
}
.customer-library-list {
  display: grid;
  gap: 12px;
}
.customer-library-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d6e2ef;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.96) 52%),
    #fff;
  box-shadow: 0 10px 24px rgba(18, 51, 83, 0.06);
}
.customer-card-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}
.customer-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #315fc2, #123353);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.customer-library-card strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
}
.customer-card-top small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 650;
}
.customer-card-contact-list {
  display: grid;
  gap: 6px;
}
.customer-card-contact {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 8px;
}
.customer-card-contact.is-primary span {
  border-color: #c7d9f7;
  background: rgba(246, 250, 255, 0.96);
}
.customer-card-contact span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid #dde8f3;
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  color: #46576b;
  font-weight: 650;
  line-height: 1.35;
}
.customer-card-contact-name small {
  margin-left: auto;
  color: #2f65d8;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.customer-card-contact-summary {
  overflow-wrap: anywhere;
}
.customer-card-contact .ui-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #2f65d8;
}
.customer-card-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.customer-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 2px;
}
.customer-contact-section {
  display: grid;
  gap: 10px;
}
.customer-contact-section > div:first-child {
  display: grid;
  gap: 3px;
}
.customer-contact-section strong {
  color: var(--text);
  font-size: 14px;
}
.customer-contact-section small {
  color: var(--muted);
  line-height: 1.45;
}
.customer-contact-set {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}
.customer-contact-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.customer-contact-title span {
  color: #6b7b8e;
  font-size: 11px;
  font-weight: 650;
}
.customer-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.customer-add-contact {
  justify-content: center;
  width: 100%;
}
.customer-add-contact .ui-icon {
  width: 15px;
  height: 15px;
}
.customer-library-form textarea {
  min-height: 96px;
}
.quoteedit {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 14px;
  align-items: start;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.quoteedit > div:first-child {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}
.quote-side {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
}
.quote-side-summary {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.quote-editor-head {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-bottom: 12px;
}
.quote-ownership-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid #dbe7f5;
  border-radius: 6px;
  background: #f7fbff;
  color: var(--muted);
  font-size: 13px;
}
.quote-ownership-bar label {
  display: inline-flex;
  align-items: center;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 8px;
}
.quote-ownership-bar select {
  min-height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.quote-step-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 6px;
  border: 1px solid #d8e4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6f9fd, #eef4fb);
}
.quote-step-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #526b86;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.quote-step-nav button span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dfeafa;
  color: #3168d9;
  font-size: 11px;
}
.quote-step-nav button.active {
  background: #fff;
  color: #0f2a45;
  box-shadow: 0 8px 20px rgba(15, 47, 84, .08);
}
.quote-step-nav button.active span {
  background: var(--blue);
  color: #fff;
}
.quote-step-pane {
  margin-top: 14px;
}
.quote-step-pane[hidden] {
  display: none !important;
}
.quote-pricing-panel,
.quote-export-panel {
  margin-top: 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.pricing-card,
.export-action-card {
  border: 1px solid #d8e4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
  padding: 14px;
}
.pricing-card h4,
.export-action-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #102033;
}
.quote-export-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 12px;
  margin-top: 12px;
}
.quote-export-panel .pdf-export-grid {
  max-width: none;
}
.finance-page {
  display: grid;
  gap: 24px;
  font-family: var(--font-ui);
}
.finance-hero,
.finance-filter-bar,
.finance-panel,
.finance-kpi-card {
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.finance-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 24px;
}
.finance-hero h1 {
  margin: 6px 0 6px;
  color: #0f172a;
  font-size: 30px;
  letter-spacing: 0;
}
.finance-hero p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
}
.finance-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.finance-filter-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr)) repeat(5, max-content);
  gap: 12px;
  align-items: end;
  padding: 18px 24px;
}
.finance-filter-bar label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
}
.finance-filter-bar input {
  min-height: 42px;
  border: 1px solid #cfe0f2;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  color: #0f172a;
  background: #fff;
}
.finance-currency-panel {
  border: 1px solid #dbe7f3;
  border-radius: 8px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}
.finance-currency-panel.has-warning {
  border-color: #f3ce88;
  box-shadow: 0 14px 34px rgba(180, 83, 9, .07);
}
.finance-currency-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.finance-currency-head h2 {
  margin: 4px 0 5px;
  color: #0f172a;
  font-size: 18px;
}
.finance-currency-head p {
  margin: 0;
  max-width: 780px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}
.finance-rate-ok,
.finance-rate-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.finance-rate-ok {
  color: #15803d;
  white-space: nowrap;
}
.finance-rate-ok svg {
  width: 16px;
  height: 16px;
}
.finance-rate-warning {
  color: #b45309;
}
.finance-currency-table {
  min-width: 900px;
}
.finance-currency-table th:nth-child(n+3),
.finance-currency-table td:nth-child(n+3) {
  text-align: right;
}
.finance-currency-table td:nth-child(2) span,
.finance-currency-table td:nth-child(2) small {
  display: block;
}
.finance-currency-table td:nth-child(2) small {
  margin-top: 3px;
}
.finance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.finance-kpi-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 18px 16px;
  min-height: 118px;
  overflow: hidden;
  min-width: 0;
}
.finance-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eff6ff;
  font-weight: 900;
}
.finance-kpi-card.green .finance-kpi-icon { color: #16a34a; background: #dcfce7; }
.finance-kpi-card.amber .finance-kpi-icon { color: #f59e0b; background: #fef3c7; }
.finance-kpi-card.red .finance-kpi-icon { color: #dc2626; background: #fee2e2; }
.finance-kpi-card.violet .finance-kpi-icon { color: #7c3aed; background: #f3e8ff; }
.finance-kpi-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
  min-width: 0;
}
.finance-kpi-card strong {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: clamp(19px, 1.28vw, 24px);
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.finance-kpi-card.red strong,
.finance-danger {
  color: #dc2626 !important;
}
.finance-kpi-card.green.strong strong,
.finance-positive {
  color: #16a34a !important;
}
.finance-warning {
  color: #f59e0b !important;
}
.finance-kpi-card small,
.finance-kpi-card em {
  display: block;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  font-style: normal;
}
.finance-kpi-card em {
  color: #94a3b8;
}
.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 24px;
  align-items: start;
  min-width: 0;
}
.finance-main,
.finance-side {
  display: grid;
  gap: 24px;
  min-width: 0;
}
.finance-panel {
  padding: 22px;
  min-width: 0;
}
.finance-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.finance-panel-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}
.finance-panel-title p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.finance-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  max-width: 100%;
}
.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.finance-table th,
.finance-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.finance-table th {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  background: #f8fafc;
}
.finance-table tr:last-child td {
  border-bottom: 0;
}
.finance-table.clickable tbody tr {
  cursor: pointer;
}
.finance-table.clickable tbody tr:hover,
.finance-table.clickable tbody tr.selected {
  background: #eff6ff;
}

.finance-receivables-panel {
  margin-top: 18px;
}

.finance-receivables-total {
  color: #b45309;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.finance-receivables-table {
  min-width: 1040px;
}

.finance-receivables-table tbody tr {
  transition: background .18s ease;
}

.finance-receivables-table tbody tr:hover {
  background: #f8fbff;
}

.finance-receivable-row-overdue {
  background: #fff7f7;
}

.finance-invoice-no {
  color: #2563eb;
  font-variant-numeric: tabular-nums;
}

.finance-owner-chip,
.invoice-owner-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.finance-receivable-list,
.finance-product-list {
  display: grid;
  gap: 10px;
}
.finance-receivable,
.finance-product-row {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  color: #0f172a;
  cursor: pointer;
  min-width: 0;
}
.finance-receivable:hover,
.finance-product-row:hover {
  border-color: #2563eb;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
}
.finance-receivable small,
.finance-product-row small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.finance-receivable b,
.finance-product-row b {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: right;
}
.finance-status {
  display: inline-flex;
  margin-top: 7px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.finance-status.normal { color: #2563eb; background: #eff6ff; }
.finance-status.warning { color: #b45309; background: #fef3c7; }
.finance-status.overdue { color: #dc2626; background: #fee2e2; }
.cashflow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.cashflow-grid span {
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}
.cashflow-grid small {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.cashflow-grid strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.finance-progress {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 16px;
}
.finance-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #16a34a);
}
.cashflow-rate {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 13px;
}
.cashflow-rate strong {
  color: #2563eb;
  float: right;
}
.finance-month-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #eff6ff;
  padding: 12px 14px;
  color: #1e3a8a;
  font-size: 13px;
}
.finance-month-detail strong {
  color: #0f172a;
}
.finance-quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.finance-quick-grid article {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}
.finance-quick-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
}
.finance-quick-grid strong {
  display: block;
  margin-top: 8px;
  color: #0f172a;
  font-size: 18px;
}
.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.itinerary-outline-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d8e4f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 8px 18px rgba(15, 47, 84, .035);
}
.itinerary-outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.itinerary-outline-head > span {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.itinerary-outline-panel h3 {
  margin: 0;
  color: #0f2a45;
  font-size: 16px;
}
.itinerary-outline-panel p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.outline-days {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.outline-day-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.outline-day-card:hover,
.outline-day-card.active {
  border-color: var(--blue);
  box-shadow: 0 6px 14px rgba(23, 99, 233, .08);
}
.outline-day-index {
  display: grid;
  align-content: center;
  gap: 2px;
  border-right: 1px solid #dce8f6;
  padding-right: 8px;
}
.outline-day-index span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}
.outline-day-index small {
  color: #60748d;
  font-size: 11px;
  white-space: nowrap;
}
.outline-day-main {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}
.outline-title-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.outline-day-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.25;
}
.outline-day-main em {
  flex: 0 0 auto;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #526b86;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.outline-brief {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 11px;
  line-height: 1.25;
}
.cost-itinerary-context {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 14px;
  border: 1px solid #d8e4f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}
.cost-context-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.cost-context-head h3 {
  margin: 0;
  color: #0f2a45;
  font-size: 17px;
}
.cost-context-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.cost-context-body {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  gap: 12px;
}
.cost-day-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}
.cost-day-tabs button {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  border: 1px solid #dbe7f5;
  border-radius: 11px;
  background: #fff;
  padding: 9px 10px;
  cursor: pointer;
}
.cost-day-tabs button.active {
  border-color: var(--blue);
  background: #eef5ff;
  box-shadow: inset 3px 0 0 var(--blue);
}
.cost-day-tabs strong {
  color: #0f2a45;
  font-size: 13px;
}
.cost-day-tabs small,
.cost-day-tabs span {
  color: #60748d;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cost-day-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  min-width: 0;
  border: 1px solid #e4edf8;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  padding: 12px;
}
.cost-day-preview-title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e6eef8;
}
.cost-day-preview-title span {
  color: var(--blue);
  font-size: 16px;
  font-weight: 900;
}
.cost-day-preview-title small {
  color: #60748d;
  font-size: 12px;
}
.cost-day-field {
  min-width: 0;
}
.cost-day-field.wide {
  grid-column: 1 / -1;
}
.cost-day-field b {
  display: block;
  margin-bottom: 4px;
  color: #526981;
  font-size: 12px;
}
.cost-day-field p {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cost-day-field.itinerary-copy p {
  max-height: 120px;
  overflow: auto;
  padding-right: 4px;
}
.side-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 6px;
  background: #eaf1fa;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.side-tabs button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #47627d;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 700;
}
.side-tabs button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 6px 16px rgba(11, 58, 102, .08);
}
.days { display: grid; grid-template-columns: 1fr; gap: 10px; }
.days > .list {
  display: flex;
  align-items: center;
  overflow-x: auto;
  gap: 8px;
}
.days > .list button {
  width: auto;
  min-width: 120px;
  min-height: 0;
  padding: 9px 8px;
  border-radius: 12px;
  box-shadow: none;
  flex: 0 0 auto;
}
.days > .list button.soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
}
.days > .list .day-card-title {
  display: flex;
  gap: 4px;
}
.days > .list .day-card-title strong {
  font-size: 16px;
}
.days > .list .day-card-title span {
  display: flex;
  margin-top: 0;
}
.days > .list .day-date {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf5ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.days > .list button > span {
  line-height: 1.35;
  max-height: 38px;
  overflow: hidden;
}
.day-card-title { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.day-card-title em { color: var(--blue); font-style: normal; font-size: 11px; margin-right: 4px; white-space: nowrap; }

.itinerary-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf2f7;
}
.itinerary-panel-head h3,
.days > .panel > h3 {
  font-size: 24px;
  margin: 0;
}
.itinerary-panel-head .btn {
  flex: 0 0 auto;
}
.active-day-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #eef6ff);
}
.active-day-toolbar strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.25;
}
.active-day-toolbar span {
  display: block;
  margin-top: 3px;
  color: #5f728a;
  font-size: 12px;
  line-height: 1.35;
}
.active-day-toolbar .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}
.inline-select {
  width: 180px;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
}
.template-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
  width: 100%;
  min-width: 0;
}
.template-actions label {
  gap: 4px;
  font-size: 12px;
}
.template-actions select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 13px;
}
.template-actions .btn {
  width: 100%;
  min-width: 0;
}
.quote-terms-panel {
  padding: 24px 28px;
}
.quote-terms-hero {
  margin-bottom: 22px;
}
.quote-terms-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.quote-terms-icon {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: linear-gradient(145deg, #d8e8ff, #2f6df2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72), 0 8px 18px rgba(47,109,242,.18);
}
.quote-terms-icon::before,
.quote-terms-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
}
.quote-terms-icon::before { top: 12px; }
.quote-terms-icon::after { top: 18px; }
.quote-terms-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: 0;
}
.quote-terms-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.quote-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
}
.quote-term-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}
.quote-term-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 12px;
  min-width: 0;
}
.quote-term-card-head h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}
.quote-term-template {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  flex: 1 1 230px;
  min-width: 0;
  max-width: 100%;
}
.quote-term-template .btn {
  width: auto;
  min-width: 58px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 9px;
  white-space: nowrap;
}
.template-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 150px;
  max-width: 260px;
}
.template-picker-trigger span {
  min-width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.template-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 42, 69, .22);
}
.template-picker-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #d7e5f5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 47, 84, .22);
  padding: 18px;
}
.template-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.template-picker-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}
.template-picker-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
}
.template-picker-search {
  width: 100%;
  height: 44px;
  border: 1px solid #cbdff5;
  border-radius: 12px;
  background: #f8fbff;
  padding: 0 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.template-picker-search:focus {
  border-color: #8bb7f5;
  background: #fff;
  outline: 3px solid rgba(37, 99, 235, .12);
}
.template-picker-list {
  min-height: 120px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}
.template-picker-list button {
  width: 100%;
  border: 1px solid #dce8f5;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f9fcff);
  color: var(--ink);
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
}
.template-picker-list button:hover,
.template-picker-list button:focus-visible {
  border-color: #8bb7f5;
  background: #eef6ff;
  outline: none;
}
.template-picker-list button strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 5px;
}
.template-picker-list button span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.template-chip-list {
  width: 100%;
  min-width: 0;
  max-height: 96px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow: auto;
  padding: 2px;
}
.template-chip-list button {
  max-width: 100%;
  min-height: 34px;
  border: 1px solid #cfe0f3;
  border-radius: 999px;
  background: #f7fbff;
  color: #1553b7;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
  text-align: left;
}
.template-chip-list button:hover,
.template-chip-list button:focus-visible {
  border-color: #8bb7f5;
  background: #eaf3ff;
  outline: none;
}
.actions .template-chip-list {
  width: auto;
  max-width: 520px;
  max-height: 80px;
  align-items: center;
}
.template-button-menu {
  position: relative;
  min-width: 0;
  width: 100%;
}
.template-button-menu summary {
  list-style: none;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 34px 0 12px;
  border: 1px solid #cbd8e7;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.template-button-menu summary::-webkit-details-marker {
  display: none;
}
.template-button-menu summary::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
}
.template-button-menu[open] summary::after {
  top: 17px;
  transform: rotate(225deg);
}
.template-menu-list {
  position: absolute;
  z-index: 40;
  right: 0;
  top: calc(100% + 6px);
  width: min(320px, 76vw);
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d8e4f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 47, 84, .16);
}
.template-menu-list button {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f2a45;
  text-align: left;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.template-menu-list button:hover {
  background: #eef5ff;
  color: var(--blue);
}
.small-muted {
  color: var(--muted);
  font-size: 12px;
}
.actions .template-button-menu {
  width: auto;
  min-width: 180px;
}
.quote-term-textbox {
  position: relative;
}
.quote-term-textbox textarea {
  width: 100%;
  max-width: 100%;
  min-height: 154px;
  resize: vertical;
  border: 1px solid #d6e2f0;
  border-radius: 12px;
  padding: 15px 16px 30px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  line-height: 1.75;
}
.quote-term-textbox textarea:focus {
  outline: none;
  border-color: #7aa7ff;
  box-shadow: 0 0 0 3px rgba(47,109,242,.12);
}
.quote-term-textbox span {
  position: absolute;
  right: 14px;
  bottom: 10px;
  padding-left: 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 30%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.quote-terms-validity {
  margin-top: 16px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.quote-terms-validity label {
  display: grid;
  grid-template-columns: 90px minmax(180px, 280px);
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-weight: 900;
}
.quote-terms-validity input {
  width: 100%;
  min-height: 40px;
  border-radius: 9px;
  padding: 8px 12px;
  border: 1px solid #cbd8e7;
  background: #fff;
  font-size: 14px;
}
.departure-notice-panel {
  padding: 22px 26px;
}
.departure-notice-fields {
  align-items: stretch;
}
.departure-notice-fields textarea {
  min-height: 118px;
  font-size: 14px;
  line-height: 1.65;
}
.departure-notice-fields label.wide {
  align-self: stretch;
}
.days > .panel .form2 {
  gap: 14px 16px;
}
.days > .panel label {
  font-size: 14px;
}
.days > .panel input,
.days > .panel textarea {
  font-size: 16px;
  line-height: 1.55;
}
.itinerary-day-form {
  display: none;
}
.itinerary-day-form.active {
  display: grid;
  gap: 14px;
}
.itinerary-editor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}
.itinerary-editor-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1f3b5c;
  font-size: 13px;
}
.itinerary-editor-meta b {
  color: #64748b;
  font-size: 12px;
}
.manual-itinerary-resources {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 12px;
}
.manual-resource-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.manual-resource-head strong {
  color: #0f172a;
  font-size: 15px;
}
.manual-resource-head span {
  color: #64748b;
  font-size: 12px;
}
.manual-resource-grid {
  align-items: start;
  gap: 10px;
}
.itinerary-document-fields {
  align-items: start;
}
.days > .panel textarea {
  min-height: 104px;
}
.days > .panel textarea.itinerary-main-text {
  min-height: 128px;
}
.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}
.field-heading .btn.small {
  width: auto;
  min-height: 30px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}
.days > .panel textarea.itinerary-compact-text {
  min-height: 56px;
}

.cost-buttons { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cost-table-head {
  display: none;
  grid-template-columns: 76px minmax(120px, 1.4fr) minmax(92px, .9fr) minmax(92px, .8fr) minmax(92px, .8fr) 104px;
  gap: 8px;
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.costrow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  align-items: end;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.costrow.compact-row {
  display: block;
  padding: 0;
}
.costrow.editing {
  border-color: #bfd5f4;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .06);
}
.costrow-summary {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 104px;
  grid-template-areas:
    "type item actions"
    "date cost cost"
    "supplier cost cost";
  gap: 8px;
  align-items: center;
  padding: 11px 12px;
  min-width: 0;
}
.cost-type { grid-area: type; }
.cost-item-main {
  grid-area: item;
  min-width: 0;
  display: grid;
  gap: 3px;
}
.cost-item-main strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cost-item-main span {
  color: var(--muted);
  font-size: 12px;
}
.cost-date { grid-area: date; }
.cost-supplier-name {
  grid-area: supplier;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cost-amount {
  grid-area: cost;
  color: #c2410c;
  font-size: 16px;
  font-weight: 900;
}
.costrow-summary > .cost-actions { grid-area: actions; }
.costrow-summary span {
  color: var(--muted);
  font-size: 12px;
}
.costrow-summary strong {
  font-size: 14px;
}
.costrow-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #edf2f7;
  background: #fbfdff;
}
.cost-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
}
.cost-actions .btn {
  padding: 6px 8px;
  min-height: 30px;
}
.cost-table { overflow-x: visible; padding-bottom: 2px; }
.costhead { color: var(--muted); font-size: 12px; font-weight: 700; }
.costrow strong { font-size: 14px; white-space: nowrap; }
.costrow label { gap: 5px; font-size: 12px; }
.cost-name, .cost-supplier { grid-column: span 2; }
.ticket-cost-picker {
  display: grid;
  gap: 8px;
  align-content: end;
  color: var(--muted);
  font-size: 12px;
}
.library-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.library-picker-actions .btn.ghost {
  background: #fff;
  color: #64748b;
  border-color: #dbe7f5;
}
.library-picker-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
}
.manual-cost-note {
  display: block;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.ticket-cost-picker span {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  min-height: 38px;
}
.hotel-select-label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.hotel-picker-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.hotel-picker-heading small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-align: right;
}
.hotel-picker-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}
.hotel-picker-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-width: 0;
}
.hotel-picker-selection label {
  gap: 4px;
}
.hotel-picker-selection label > span {
  color: #52677f;
  font-size: 11px;
  font-weight: 800;
}
.hotel-picker-filters select,
.hotel-picker-filters input,
.hotel-picker-selection select,
.hotel-room-result {
  width: 100%;
  min-width: 0;
}
.hotel-city-filter,
.hotel-room-result {
  min-height: 38px;
}
.hotel-room-result.no-results {
  border-color: #efb7b7;
  background: #fffafa;
}
.hotel-select-search {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
  background: #f8fbff;
}
@media (max-width: 760px) {
  .hotel-picker-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .hotel-picker-heading small { text-align: left; }
  .hotel-picker-filters,
  .hotel-picker-selection { grid-template-columns: 1fr; }
}
.cost-total {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  min-height: 44px;
  align-content: center;
}
.cost-total strong { color: var(--green); font-size: 15px; }
.cost-total small { color: var(--muted); font-size: 11px; }
.cost-check {
  min-height: 42px;
  align-items: center;
  grid-template-columns: auto 1fr;
  border: 1px solid #d8e4f0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #f8fbff;
  color: var(--text)!important;
}
.cost-check input {
  width: auto;
  min-height: auto;
}
.costrow .btn { align-self: end; }

.summary .row { display: flex; justify-content: space-between; gap: 10px; margin: 10px 0; color: var(--muted); }
.summary strong { color: var(--text); }
.summary hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.summary .form2 { grid-template-columns: 1fr; }
.summary-control-stack {
  display: grid;
  gap: 10px;
}
.summary-control-card {
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}
.summary-control-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text);
}
.summary-control-card .form2 {
  gap: 8px;
}
.summary-control-card label {
  font-size: 12px;
}
.summary-control-card input,
.summary-control-card select {
  min-height: 38px;
}
.summary-fold {
  border: 1px solid #d8e4f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.summary-fold summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  color: #365573;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.summary-fold summary::after {
  content: "+";
  color: var(--blue);
  font-size: 16px;
}
.summary-fold[open] summary::after {
  content: "-";
}
.summary-fold .summary-control-stack,
.summary-fold .category-price {
  padding: 0 10px 10px;
}
.side-card {
  border: 1px solid #d8e4f0;
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(15, 47, 84, .04);
}
.side-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}
.side-card-title h3 {
  margin: 0;
  font-size: 17px;
}
.info-dot {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 15px;
  height: 15px;
  border: 1px solid #95a8bf;
  border-radius: 999px;
  color: #657991;
  font-size: 10px;
  font-weight: 900;
  cursor: help;
  outline: none;
}
.info-dot:hover,
.info-dot:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
  background: #eef5ff;
}
.info-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  right: -8px;
  top: calc(100% + 9px);
  z-index: 20;
  width: 280px;
  padding: 10px 12px;
  border: 1px solid #c7d8ee;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 47, 84, .16);
  color: #28445f;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
}
.info-dot:hover::after,
.info-dot:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
.price { border-radius: 8px; margin: 0; }
.price .row {
  padding: 3px 0;
}
.price hr {
  border: 0;
  border-top: 1px dashed #cfdceb;
  margin: 11px 0;
}
.price .emphasis-row {
  margin: 8px -4px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
}
.price .emphasis-row span {
  font-weight: 800;
}
.profit-emphasis {
  background: linear-gradient(135deg, #eafff4 0%, #f2fff9 100%);
  border-color: #b9f2d3!important;
}
.profit-emphasis span {
  color: #11623d;
}
.quote-total-row {
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
  border-color: #d5e7ff!important;
}
.green { color: var(--green)!important; }
.orange { color: var(--orange)!important; }
.red { color: var(--red)!important; }
.profit-soft {
  color: #14945a!important;
  font-weight: 800;
}
.commission-soft {
  color: #60758f!important;
  font-weight: 800;
}
.net-profit {
  color: var(--green)!important;
  font-weight: 900;
  font-size: 19px;
}
.quote-price {
  color: var(--text)!important;
  font-size: 15px;
  font-weight: 900;
}
.quote-price-with-suggestion {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.15;
}
.quote-price-suggestion {
  color: #73869a;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.quote-price.total {
  color: var(--blue)!important;
  font-size: 21px;
  font-weight: 900;
}
.ok { color: var(--green); font-size: 13px; font-weight: 700; }
.err { color: var(--red); font-size: 13px; }

.pdf { min-height: 320px; }
.pdf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pdf-head img { width: 78px; height: 78px; object-fit: contain; }
.pdf h3 { margin: 0; }
.pdf table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 10px 0; }
.pdf td, .pdf th { border-bottom: 1px solid #edf2f7; padding: 7px; text-align: left; }
.pdf-total { margin-top: 14px; font-size: 18px; text-align: right; }

.manage { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 16px; }
.data { width: 100%; border-collapse: collapse; }
.data th, .data td { text-align: left; border-bottom: 1px solid #edf2f7; padding: 10px; font-size: 13px; vertical-align: top; }
.data th { color: var(--muted); font-size: 12px; }
.compact { display: grid; gap: 11px; align-content: start; }

.tickets-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}
.tickets-main {
  padding: 18px;
}
.ticket-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 6px 2px 18px;
  border-bottom: 1px solid #e8eef6;
}
.ticket-hero h2 {
  margin: 8px 0 6px;
  font-size: 28px;
}
.ticket-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.ticket-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  margin: 16px 0 12px;
}
.ticket-city-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  margin-bottom: 4px;
}
.ticket-city-tabs button,
.ticket-city-list button {
  border: 1px solid #d8e4f0;
  background: #fff;
  color: #24415f;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  white-space: nowrap;
}
.ticket-city-tabs button span {
  color: var(--muted);
  margin-left: 4px;
}
.ticket-city-tabs button.active,
.ticket-city-list button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}
.filter-block {
  display: grid;
  gap: 7px;
  margin: 4px 0 8px;
}
.filter-block > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.filter-block .ticket-city-tabs {
  margin-bottom: 0;
  padding-bottom: 6px;
}
.ticket-group {
  margin-top: 16px;
}
.ticket-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ticket-group-head h3 {
  margin: 0;
  font-size: 20px;
}
.ticket-group-head span {
  color: var(--muted);
  font-size: 13px;
}
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}
.ticket-card {
  border: 1px solid #e4edf7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  padding: 14px;
  min-width: 0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}
.ticket-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.ticket-main strong {
  display: block;
  font-size: 15.5px;
  line-height: 1.35;
  color: #172033;
}
.ticket-main span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.ticket-city {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--blue)!important;
  padding: 3px 8px;
  margin-top: 0!important;
}
.ticket-prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  align-items: stretch;
}
.ticket-extra-prices {
  margin-bottom: 10px;
}
.ticket-prices div {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  padding: 9px 10px;
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ticket-prices span {
  display: block;
  color: #53657d;
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ticket-prices strong {
  display: block;
  color: #334155;
  font-size: 13.5px;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}
.ticket-prices div.ticket-sale-block strong {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}
.ticket-prices small {
  display: block;
  color: #52637a;
  font-size: 12.5px;
  line-height: 1.35;
  margin-top: 7px;
  white-space: nowrap;
}
.ticket-prices small b {
  color: #7b8ba0;
  font-weight: 600;
  margin-right: 3px;
}
.ticket-prices small b::after {
  content: ":";
}
.ticket-prices strong.cost-highlight,
.ticket-picker-prices strong.cost-highlight {
  color: #059669;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  font-weight: 800;
  font-size: 14px;
}
.ticket-keywords {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.ticket-keywords summary {
  cursor: pointer;
  color: #426280;
}
.ticket-keywords p {
  max-height: 70px;
  overflow: auto;
  margin: 8px 0 0;
  line-height: 1.45;
}
.ticket-side {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.hotel-layout .ticket-side {
  align-self: start;
}

@media (min-width: 1281px) {
  .tickets-layout,
  .manage,
  .template-layout,
  .terms-template-layout {
    height: calc(100vh - 36px);
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }

  .tickets-main,
  .ticket-side,
  .manage > .panel,
  .manage > form.panel,
  .template-layout > .panel,
  .template-layout > .template-side,
  .terms-template-layout > .panel {
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .ticket-side,
  .template-side {
    position: static;
  }

}

.hotel-card {
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  padding: 16px;
  margin-top: 14px;
}

.hotel-card-head,
.hotel-room-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.hotel-card-head strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
}

.hotel-card-head span,
.hotel-facts,
.hotel-room-row small {
  color: var(--muted);
  font-size: 13px;
}

.hotel-facts {
  display: grid;
  gap: 5px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7fbff;
}

.hotel-room-list {
  display: grid;
  gap: 8px;
}

.hotel-room-row {
  padding: 10px 12px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #fff;
}

.hotel-room-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.hotel-room-row > b {
  color: #0f766e;
  white-space: nowrap;
}

.hotel-form-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #f8fbff;
}

.hotel-form-block > strong,
.hotel-form-title strong {
  color: var(--ink);
  font-size: 14px;
}

.hotel-form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hotel-form-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e6eef8;
  border-radius: 10px;
  background: #fff;
}

.hotel-form-room label {
  min-width: 0;
  align-content: start;
}

.hotel-form-room label:nth-of-type(2) input {
  width: 100%;
}

.hotel-form-room .hotel-room-cost-field {
  width: 96px;
  max-width: 96px;
}

.hotel-form-room .hotel-room-cost-field input {
  width: 96px;
  max-width: 96px;
}

.hotel-room-field-label {
  display: flex;
  align-items: flex-start;
  min-height: 36px;
  color: var(--muted);
  line-height: 1.35;
}

.hotel-room-field-label small {
  display: block;
  margin-left: 4px;
  color: #7b8ba0;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hotel-room-cost-field .hotel-room-field-label {
  flex-direction: column;
  align-items: flex-start;
}

.hotel-room-cost-field .hotel-room-field-label small {
  margin-left: 0;
}

.hotel-form-room button {
  grid-column: 1 / -1;
}

.resource-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 4px;
}

.resource-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fbff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.resource-options input {
  width: 14px;
  height: 14px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(6, 29, 53, .42);
  display: grid;
  place-items: center;
  padding: 24px;
}
.ticket-picker {
  width: min(980px, calc(100vw - 48px));
  max-height: min(780px, calc(100vh - 48px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}
.pdf-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
}
.pdf-modal-body {
  border: 1px solid #e6eef8;
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}
.pdf-modal .pdf {
  border: 0;
  box-shadow: none;
  padding: 0;
}
.ticket-picker-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}
.compact-tabs {
  margin-bottom: 10px;
  padding-bottom: 8px;
}
.ticket-picker-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}
.ticket-picker-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.3fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e4edf7;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}
.ticket-picker-item strong { display: block; }
.ticket-picker-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.ticket-picker-prices {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
}
.ticket-picker-prices span {
  margin: 0;
  padding: 8px;
  border-radius: 9px;
  background: #f5f8fc;
}
.vehicle-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}
.vehicle-create-panel {
  padding: 14px;
  margin: 14px 0;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-heading h3 {
  margin: 0 0 4px;
  font-size: 17px;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}
.vehicle-form label {
  min-width: 0;
}
.vehicle-advanced {
  min-width: 0;
  align-self: end;
}
.vehicle-advanced summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  color: #24507d;
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
}
.vehicle-advanced label {
  display: block;
  margin-top: 8px;
}
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.vehicle-card .actions {
  justify-content: flex-end;
  margin-top: 8px;
}
.vehicle-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.vehicle-prices div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 0;
  background: transparent;
}
.vehicle-prices span {
  margin: 0;
  font-size: 12px;
}
.vehicle-prices strong {
  color: #047857;
  background: #dcfce7;
  box-shadow: inset 0 0 0 1px #86efac;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 14px;
}
.vehicle-picker-prices {
  grid-template-columns: minmax(90px, .8fr) minmax(130px, .8fr);
}
.quote-preview-card .btn {
  width: 100%;
  margin-top: 10px;
}
.pdf-export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.pdf-export-grid.pdf-export-groups {
  grid-template-columns: 1fr;
  gap: 16px;
}
.pdf-export-group {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce7f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
}
.pdf-export-group-agent {
  border-color: #d9d9f7;
  background: linear-gradient(180deg, #fdfdff 0%, #f7f7ff 100%);
}
.pdf-export-group-internal {
  border-color: #f3caca;
  background: linear-gradient(180deg, #fffdfd 0%, #fff6f6 100%);
}
.pdf-export-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.pdf-export-group-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.pdf-export-group-head strong {
  color: #1e3659;
  font-size: 14px;
  line-height: 1.2;
}
.pdf-export-group-head small {
  color: #6a7d98;
  font-size: 11px;
  line-height: 1.3;
}
.pdf-export-group-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #e7f0ff;
  color: #2a62ce;
}
.pdf-export-group-agent .pdf-export-group-icon {
  background: #eeedff;
  color: #6454c7;
}
.pdf-export-group-internal .pdf-export-group-icon {
  background: #ffe4e4;
  color: #c33b43;
}
.pdf-export-group-icon svg {
  width: 15px;
  height: 15px;
}
.pdf-export-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}
.pdf-export-grid .btn {
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: center;
  width: 100%;
  min-height: 58px;
  padding: 9px 8px;
  border-radius: 10px;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}
.pdf-export-grid .btn strong {
  font-size: 13px;
  line-height: 1.15;
}
.pdf-export-grid .btn span {
  display: block;
  font-size: 11px;
  line-height: 1.15;
  font-weight: 500;
  opacity: .76;
}
.pdf-export-grid .pdf-main {
  border-color: var(--blue);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37, 99, 235, .16);
}
.pdf-export-grid .pdf-main strong,
.pdf-export-grid .pdf-main span {
  color: #fff;
}

.pdf-export-grid .pdf-main:hover {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .2);
}

.pdf-export-grid .pdf-main:hover strong,
.pdf-export-grid .pdf-main:hover span {
  color: #fff;
}

.pdf-export-grid .pdf-outline {
  border-color: #bfd3ee;
  background: #fff;
  color: #1f5fb8;
}

.pdf-export-grid .pdf-outline:hover {
  border-color: #8fb4e8;
  background: #eef5ff;
  color: #174ea6;
}

.pdf-export-grid .pdf-outline strong {
  color: #1d4ed8;
}
.pdf-export-grid .pdf-outline span {
  color: #5d7faa;
  opacity: 1;
}

.pdf-export-grid .pdf-outline:hover strong {
  color: #174ea6;
}

.pdf-export-grid .pdf-outline:hover span {
  color: #426b9f;
}

.pdf-export-grid .pdf-internal {
  grid-column: 1 / -1;
  border-color: #ffb4b4;
  background: #fff5f5;
  color: #e11d48;
  min-height: 56px;
}
.pdf-export-grid .pdf-internal strong {
  color: #e11d48;
}
.pdf-export-grid .pdf-internal span {
  color: #ef4444;
  opacity: 1;
}

.pdf-export-grid .pdf-internal:hover {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #be123c;
}

.pdf-export-grid .pdf-internal:hover strong,
.pdf-export-grid .pdf-internal:hover span {
  color: #be123c;
}
.summary-export-actions {
  margin-top: 12px;
}
.summary-export-actions .pdf-export-group-grid {
  grid-template-columns: 1fr;
}
.quote-invoice-box {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #cfe1ff;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.quote-invoice-box .btn {
  width: 100%;
}
.quote-invoice-box small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
.export-menu {
  min-width: 340px;
}
.export-menu .pdf-export-grid {
  padding: 4px;
  width: 320px;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}
.internal-list {
  display: grid;
  gap: 8px;
}
.internal-list p {
  margin: 0;
  padding: 10px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #fbfdff;
}
.internal-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.more-menu {
  position: relative;
}
.more-menu summary {
  list-style: none;
}
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 132px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.ticket-side h3 {
  margin: 0;
}
.ticket-side hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}
.ticket-city-list {
  display: grid;
  gap: 7px;
  max-height: 340px;
  overflow: auto;
}
.vehicle-city-option {
  display: grid;
  gap: 6px;
}
.ticket-city-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  text-align: left;
}
.ticket-city-list strong {
  color: var(--blue);
}
.vehicle-type-sublist {
  display: grid;
  gap: 5px;
  margin: -1px 0 4px 12px;
  padding: 7px 0 0 10px;
  border-left: 2px solid #dbeafe;
}
.vehicle-type-sublist button {
  width: 100%;
  border-color: #e4edf8;
  background: #f8fbff;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 12px;
}
.vehicle-type-sublist button.active {
  border-color: var(--blue);
  background: #eef5ff;
}
.vehicle-type-sublist strong {
  color: var(--blue);
  font-size: 12px;
}
.rule-list {
  display: grid;
  gap: 7px;
}
.rule-list p {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: start;
  margin: 0;
  padding: 8px;
  border: 1px solid #e4edf7;
  border-radius: 9px;
  background: #f8fbff;
  color: #496681;
  font-size: 12px;
  line-height: 1.45;
}
.rule-list strong {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 11px;
}
.rule-list span {
  min-width: 0;
}
.empty-state {
  border: 1px dashed #cbd8e7;
  border-radius: 10px;
  padding: 30px;
  background: #fbfdff;
  text-align: center;
  color: var(--muted);
}
.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-bottom: 8px;
}
.template-library {
  display: grid;
  gap: 16px;
}
.template-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.template-hero h2 {
  margin: 10px 0 6px;
  font-size: 28px;
}
.template-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}
.template-create-panel {
  display: grid;
  gap: 14px;
}
.template-create-panel.is-collapsed {
  padding-bottom: 18px;
}
.template-form-section {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbe7f5;
}
.template-form-title,
.template-day-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.template-form-title h4,
.template-day-title h4 {
  margin: 0;
  color: var(--ink);
}
.template-form-title .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: start;
}
.template-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}
.template-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.template-card-head strong {
  display: block;
  font-size: 17px;
}
.template-card-head span:not(.badge) {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.template-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.template-card-metrics p {
  margin: 0;
  padding: 9px;
  border-radius: 9px;
  background: #f3f8ff;
}
.template-card-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.template-edit-form {
  border-top: 1px solid #dbe7f5;
  padding-top: 12px;
  display: grid;
  gap: 12px;
}
.template-edit-days {
  display: grid;
  gap: 10px;
}
.template-edit-day {
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}
.template-edit-day h4 {
  margin: 0 0 10px;
  color: var(--brand);
}
.template-edit-form textarea {
  min-height: 74px;
}
.template-costs {
  display: grid;
  gap: 10px;
}
.template-costs-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  border-top: 1px solid #dbe7f5;
  padding-top: 12px;
}
.template-costs-title h4 {
  margin: 0;
  color: var(--ink);
}
.template-costs-title span {
  color: var(--muted);
  font-size: 12px;
}
.template-cost-row {
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  padding: 12px;
  background: #fbfdff;
}
.template-cost-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.template-cost-row-head strong {
  display: block;
  color: var(--ink);
}
.template-cost-row-head span {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}
.template-cost-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.template-cost-wide {
  grid-column: span 2;
}
.template-side {
  position: sticky;
  top: 16px;
}

@media (min-width: 1281px) {
  .template-side {
    position: static;
  }
}
.terms-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}
.terms-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.terms-template-group {
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  padding: 14px;
  background: #fbfdff;
}
.text-template-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.text-template-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin: 0;
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #fff;
}
.text-template-item strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 6px;
}
.text-template-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}
.text-template-content.collapsed {
  max-height: 58px;
  overflow: hidden;
}
.link-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}
.text-template-item .btn.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.text-template-list > .muted {
  display: block;
  padding: 18px;
  border: 1px dashed #cbd8e7;
  border-radius: 10px;
  background: #fff;
}
.text-template-list p {
  margin: 0;
}
.text-template-list p span {
  color: var(--muted);
  font-size: 12px;
}
.text-template-list em {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--red);
  font-style: normal;
  font-size: 12px;
  cursor: pointer;
}
.mini-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.invoice-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  height: calc(100vh - 40px);
  min-height: 0;
  overflow: hidden;
}

.invoice-list-panel,
.invoice-main-panel {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.invoice-search {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 120px repeat(2, minmax(130px, .7fr)) auto auto;
  gap: 8px;
  margin: 14px 0;
  align-items: end;
}

.invoice-search label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.invoice-list-panel .invoice-search {
  grid-template-columns: minmax(0, 1fr) minmax(104px, 118px);
}

.invoice-list-panel .voucher-search {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 12px;
}

.invoice-list-panel .voucher-search > input {
  grid-column: 1 / -1;
}

.invoice-list-panel .invoice-search input,
.invoice-list-panel .invoice-search select,
.invoice-list-panel .invoice-search button {
  min-width: 0;
}

.invoice-list-panel .invoice-search label {
  grid-column: 1 / -1;
}

.invoice-list-panel .invoice-search > button {
  width: 100%;
}

.invoice-list {
  display: grid;
  gap: 10px;
}

.invoice-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.invoice-card.active {
  border-color: var(--blue);
  background: #eff6ff;
}

.invoice-card.overdue {
  border-color: #f6b973;
  background: #fff8ef;
}

.invoice-card.overdue b,
.invoice-card.overdue em {
  color: #b45309;
  font-weight: 800;
}

.invoice-card strong,
.invoice-card small {
  display: block;
}

.invoice-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.invoice-card-top strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-card-top b {
  white-space: nowrap;
  text-align: right;
}

.invoice-card-meta,
.invoice-card em {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.invoice-card small,
.invoice-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.invoice-editor {
  display: grid;
  gap: 16px;
}

.invoice-editor-head {
  align-items: start;
}

.invoice-save-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
}

.invoice-save-badge.dirty,
.invoice-save-badge.saving {
  background: #eff6ff;
  color: var(--blue);
}

.invoice-save-badge.error {
  background: #fef2f2;
  color: var(--red);
}

.invoice-block,
.invoice-bottom {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.invoice-block h3 {
  margin: 0 0 12px;
}

.invoice-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.invoice-section-action {
  width: auto;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.invoice-section-action .ui-icon {
  width: 14px;
  height: 14px;
}

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

.invoice-form-grid label {
  align-content: start;
  line-height: 20px;
}

.invoice-form-grid input:not([type="checkbox"]):not([type="radio"]),
.invoice-form-grid select {
  height: 40px;
  min-height: 40px;
}

.invoice-form-grid .wide {
  grid-column: span 4;
}

.invoice-form-grid .invoice-quote-link {
  grid-column: span 4;
}

.invoice-quote-link small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.invoice-quote-link {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.invoice-field-label {
  display: block;
}

.invoice-field-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

.invoice-field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  color: #6f8196;
  cursor: help;
}

.invoice-field-help:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.invoice-field-help .ui-icon {
  width: 14px;
  height: 14px;
}

.invoice-quote-picker {
  min-width: 0;
}

.invoice-quote-picker > summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 11px;
  border: 1px solid var(--gt-line, var(--line));
  border-radius: var(--gt-radius-control, 9px);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.invoice-quote-picker > summary::-webkit-details-marker {
  display: none;
}

.invoice-quote-picker > summary:hover {
  border-color: #9ab4dd;
  background: #fbfdff;
}

.invoice-quote-picker[open] > summary {
  border-color: #7da2f6;
  box-shadow: 0 0 0 3px rgba(49, 95, 214, .1);
}

.invoice-quote-picker-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--gt-blue-soft, #eff5ff);
  color: var(--gt-blue, var(--blue));
}

.invoice-quote-picker-icon .ui-icon,
.invoice-quote-picker-chevron {
  width: 17px;
  height: 17px;
}

.invoice-quote-picker-selection {
  min-width: 0;
}

.invoice-quote-picker-selection strong,
.invoice-quote-picker-selection small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-quote-picker-selection strong {
  color: var(--text);
  font-size: 14px;
}

.invoice-quote-picker-selection small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.invoice-quote-picker-chevron {
  color: var(--muted);
  transition: transform .15s ease;
}

.invoice-quote-picker[open] .invoice-quote-picker-chevron {
  transform: rotate(180deg);
}

.invoice-quote-picker-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--gt-line, var(--line));
  border-radius: var(--gt-radius-control, 9px);
  background: #fff;
  box-shadow: var(--gt-shadow-pop, 0 12px 28px rgba(20, 45, 74, .09));
}

.invoice-quote-picker-search {
  position: relative;
}

.invoice-quote-picker-search .ui-icon {
  position: absolute;
  top: 50%;
  left: 11px;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: #71839a;
  pointer-events: none;
  transform: translateY(-50%);
}

.invoice-quote-picker-search input {
  padding-left: 36px;
}

.invoice-quote-picker-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.invoice-quote-picker-tools > small {
  margin: 0;
  text-align: right;
}

.invoice-quote-unlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.invoice-quote-unlink:hover,
.invoice-quote-unlink.active {
  background: #f3f6fa;
  color: var(--text);
}

.invoice-quote-unlink .ui-icon {
  width: 16px;
  height: 16px;
}

.invoice-quote-unlink strong,
.invoice-quote-unlink small {
  display: block;
  margin: 0;
}

.invoice-quote-unlink strong {
  font-size: 12px;
}

.invoice-quote-unlink small {
  font-size: 11px;
}

.invoice-quote-options {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--gt-line, var(--line));
  scrollbar-color: #aab9ca transparent;
  scrollbar-width: thin;
}

.invoice-quote-option {
  display: grid;
  grid-template-columns: minmax(160px, .9fr) minmax(180px, 1.25fr) minmax(150px, .85fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #e8eef5;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.invoice-quote-option:hover {
  background: #f7faff;
}

.invoice-quote-option.active {
  background: #eef4ff;
  box-shadow: inset 3px 0 0 var(--gt-blue, var(--blue));
}

.invoice-quote-option-main,
.invoice-quote-option-meta {
  min-width: 0;
}

.invoice-quote-option-main strong,
.invoice-quote-option-main span,
.invoice-quote-option-trip,
.invoice-quote-option-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-quote-option-main strong {
  color: var(--gt-blue, var(--blue));
  font-size: 13px;
}

.invoice-quote-option-main span,
.invoice-quote-option-trip,
.invoice-quote-option-meta {
  font-size: 12px;
}

.invoice-quote-option-main span,
.invoice-quote-option-meta span {
  margin-top: 2px;
  color: var(--muted);
}

.invoice-quote-option-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.invoice-quote-option-meta em {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f7;
  color: #52657b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.invoice-quote-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

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

.invoice-quote-empty .ui-icon {
  width: 22px;
  height: 22px;
}

.invoice-quote-empty strong,
.invoice-quote-empty small {
  margin: 0;
}

.bill-to-grid {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.bill-to-grid .wide {
  grid-column: span 4;
}

.invoice-items {
  display: grid;
  gap: 12px;
}

.invoice-item-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  background: #f8fbff;
}

.invoice-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.invoice-item-head strong,
.invoice-item-head small {
  display: block;
}

.invoice-item-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-item-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) 160px 110px;
  gap: 10px;
  align-items: end;
}

.invoice-item-row.collapsed .invoice-item-fields {
  display: none;
}

.invoice-item-description,
.invoice-item-detail {
  grid-column: span 1;
}

.invoice-item-detail {
  grid-column: 1 / 4;
}

.invoice-item-subtotal {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef5ff;
  color: var(--muted);
}

.invoice-item-subtotal strong {
  color: var(--blue);
  font-size: 18px;
}

.invoice-payments {
  display: grid;
  gap: 10px;
}

.invoice-payment-row {
  display: grid;
  grid-template-columns: 135px 135px 135px 165px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dbe7f6;
  border-radius: 10px;
  background: #fff;
}

.invoice-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.invoice-total-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.invoice-total-box div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.invoice-total-box div:last-child {
  border-bottom: 0;
}

.invoice-total-box .total {
  background: var(--blue);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.invoice-total-box .balance {
  background: #eef6ff;
  color: var(--blue);
  font-size: 18px;
  font-weight: 800;
}

.invoice-total-box .credit {
  background: #fff7ed;
  color: #b45309;
  font-weight: 800;
}

.excel-mode-page {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 270px;
  gap: 12px;
  height: calc(100vh - 40px);
  min-height: 0;
  overflow: hidden;
}

.excel-mode-page.excel-list-collapsed {
  grid-template-columns: minmax(760px, 1fr) 270px;
}

.excel-mode-page.excel-profit-collapsed {
  grid-template-columns: minmax(760px, 1fr);
}

.excel-mode-page.excel-list-collapsed.excel-profit-collapsed {
  grid-template-columns: minmax(760px, 1fr);
}

.excel-quote-list,
.excel-workbench,
.excel-summary {
  min-height: 0;
  overflow-y: auto;
}

.excel-quote-list {
  padding: 16px;
}

.excel-quote-drawer {
  position: fixed;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 300px;
  z-index: 18;
  transform: translateX(-110%);
  transition: transform .18s ease;
  padding: 18px 0 18px 14px;
  pointer-events: none;
}

.app.sidebar-pinned .excel-quote-drawer {
  left: 252px;
}

.excel-quote-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.excel-quote-drawer .excel-quote-list {
  height: 100%;
  box-shadow: 18px 0 42px rgba(15,23,42,.16);
}

.excel-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 17;
  background: rgba(15,23,42,.18);
}

.excel-list-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.excel-filter {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  color: var(--muted);
}

.excel-list-cards {
  gap: 10px;
}

.excel-workbench {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.excel-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  backdrop-filter: blur(10px);
}

.excel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.excel-title-row .excel-list-open {
  flex: 0 0 auto;
  width: 34px;
  min-width: 34px;
  padding: 0;
  border-color: #b7cdf5;
  background: #f5f9ff;
  color: #245de0;
}

.excel-title-row .excel-list-open:hover {
  border-color: #7ea5ed;
  background: #eaf2ff;
}

.excel-actions .excel-finance-open {
  width: 34px;
  min-width: 34px;
  padding: 0;
  border-color: #b7cdf5;
  background: #f5f9ff;
  color: #245de0;
}

.excel-actions .excel-finance-open:hover {
  border-color: #7ea5ed;
  background: #eaf2ff;
}

.excel-title-row h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.excel-title-row small,
.excel-topbar p {
  color: var(--muted);
}

.excel-topbar p {
  margin: 4px 0 0;
  font-size: 13px;
}

.excel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.excel-actions .btn {
  min-height: 34px;
  padding: 0 12px;
}

.excel-icon-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cfe1ff;
  border-radius: 9px;
  background: #eff6ff;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.excel-save-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.excel-save-badge.saved {
  background: #dcfce7;
  color: #15803d;
}

.excel-save-badge.dirty {
  background: #fef3c7;
  color: #b45309;
}

.excel-save-badge.saving {
  background: #e0f2fe;
  color: #0369a1;
}

.excel-info-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.excel-info-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  margin-bottom: -2px;
}

.excel-info-head strong {
  font-size: 14px;
  color: var(--text);
}

.excel-info-head .btn {
  min-height: 28px;
  padding: 0 10px;
}

.excel-info-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.excel-info-summary .btn {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
}

.excel-info-summary strong,
.excel-info-summary span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-info-summary strong {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 14px;
}

.excel-info-summary span {
  flex: 0 1 auto;
  color: var(--muted);
  font-size: 13px;
}

.excel-info-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.excel-info-field input,
.excel-info-field select {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 14px;
}

.excel-info-field input[readonly] {
  background: #f8fafc;
  font-weight: 800;
  color: var(--text);
}

.excel-date-range {
  grid-column: span 2;
}

.excel-date-range > div,
.excel-pax-field > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.excel-date-range input {
  min-width: 0;
  flex: 1;
}

.excel-pax-field {
  grid-column: span 3;
}

.excel-pax-field input {
  width: 64px;
  text-align: center;
}

.excel-pax-field em {
  color: var(--text);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.excel-quote-tabs {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.excel-quote-tab-scroll,
.excel-quote-tab-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.excel-quote-tab-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.excel-quote-tab-scroll::-webkit-scrollbar {
  display: none;
}

.excel-quote-tab {
  flex: 0 0 auto;
  min-width: 112px;
  max-width: 220px;
  height: 32px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #cfe1ff;
  border-radius: 10px;
  background: #f8fbff;
  color: #31527a;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.excel-quote-tab.active {
  border-color: var(--blue);
  background: #eff6ff;
  color: var(--blue);
}

.excel-quote-tab-actions .btn {
  min-height: 32px;
  padding: 0 10px;
}

.excel-table-more-menu > div {
  min-width: 176px;
}

.excel-table-more-menu > div .btn {
  width: 100%;
  justify-content: flex-start;
}

.excel-sheet-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.excel-sheet-tools,
.excel-sheet-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.excel-add-day-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #f8fbff;
  color: #2f63d8;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.excel-add-day-button:hover,
.excel-add-day-button:focus-visible {
  border-color: #bcd0ff;
  background: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .10);
}

.excel-add-day-button .ui-icon {
  width: 16px;
  height: 16px;
}

.excel-sheet-search {
  flex: 0 1 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.excel-sheet-search .ui-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #6b7f95;
}

.excel-sheet-search input {
  border: 0;
  min-height: 34px;
  padding: 0;
}

.excel-sheet-search input:focus {
  box-shadow: none;
}

.excel-sheet-wrap {
  max-height: min(70vh, calc(100vh - 220px));
  min-height: 0;
  overflow: auto;
  border: 1px solid #d8e4f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.excel-mode-page.excel-info-collapsed .excel-sheet-wrap {
  max-height: min(82vh, calc(100vh - 112px));
}

.excel-sheet {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: calc(13px * var(--ui-density-scale));
}

.excel-sheet th,
.excel-sheet td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  vertical-align: middle;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.excel-sheet th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: calc(38px * var(--ui-density-scale));
  padding: 0 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.excel-sheet .excel-col-category,
.excel-sheet .excel-col-item-name,
.excel-sheet .excel-col-actions {
  position: sticky;
}

.excel-sheet .excel-col-category {
  position: sticky;
  left: 0;
  z-index: 3;
}

.excel-sheet .excel-col-item-name {
  position: sticky;
  left: 126px;
  z-index: 3;
  box-shadow: 8px 0 12px rgba(15, 47, 84, .06);
}

.excel-sheet .excel-col-actions {
  position: sticky;
  left: 386px;
  z-index: 3;
  box-shadow: 8px 0 12px rgba(15, 47, 84, .06);
}

.excel-sheet th.excel-col-category,
.excel-sheet th.excel-col-item-name,
.excel-sheet th.excel-col-actions {
  z-index: 5;
  background: #f8fafc;
}

.excel-sheet tr.active td {
  background: #eff6ff;
}

.excel-sheet tr:hover td {
  background: #f8fbff;
}

.excel-cell-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: calc(38px * var(--ui-density-scale));
  height: calc(38px * var(--ui-density-scale));
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: calc(7px * var(--ui-density-scale)) 8px;
  font-size: calc(13px * var(--ui-density-scale));
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-cell-input:focus {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--blue);
  outline-offset: -2px;
  box-shadow: none;
  background: #fff;
}

.excel-cell-input.money-input,
.excel-cell-input.qty-input {
  text-align: right;
}

.excel-cell-input.manual-sale-input {
  color: var(--blue);
  font-weight: 800;
}

.excel-checkbox-cell {
  min-height: calc(38px * var(--ui-density-scale));
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.excel-checkbox-cell input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--blue);
}

.excel-sheet td > span,
.excel-sheet td > strong {
  display: block;
  min-height: calc(38px * var(--ui-density-scale));
  padding: 10px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-money {
  text-align: right;
}

.excel-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.excel-row-drag-handle {
  width: 16px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #8aa0bd;
  cursor: grab;
  user-select: none;
  line-height: 1;
  font-weight: 900;
}

.excel-row-drag-handle:hover {
  background: #eef6ff;
  color: var(--blue);
}

.excel-row-drag-handle:active {
  cursor: grabbing;
}

.excel-day-group td {
  background: #f8fbff!important;
  border-top: 1px solid #93c5fd;
  border-bottom-color: #bfdbfe;
}

.excel-day-group.active td {
  background: #eff6ff!important;
}

.excel-day-group-main {
  display: grid;
  grid-template-columns: 22px 30px 76px 112px 132px minmax(380px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 8px;
}

.excel-day-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.excel-day-label {
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.excel-day-group-main .excel-cell-input {
  height: 30px;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-weight: 700;
}

.excel-day-group-main .excel-cell-input:focus {
  border-color: var(--blue);
}

.excel-day-group-totals {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  min-height: 42px;
  padding: 7px 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.excel-resource-row td {
  background: #fff;
}

.excel-resource-row.active td,
.excel-resource-row.selected td,
.excel-resource-row:hover td {
  background: #f8fbff;
}

.excel-resource-type-cell {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding-left: 6px;
}

.excel-resource-type-cell.no-handle {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 0;
}

.excel-muted-cell {
  display: block;
  min-height: 38px;
  padding: 10px 8px;
  color: #94a3b8;
  text-align: center;
}

.excel-resource-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 24px;
  border-radius: 6px;
  color: #94a3b8;
  cursor: grab;
  user-select: none;
  font-weight: 900;
}

.excel-resource-drag-handle:hover {
  background: #eef6ff;
  color: var(--blue);
}

.excel-resource-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-height: 38px;
  padding: 0 5px;
}

.mini-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  flex: 0 0 28px;
  border: 1px solid #cfe1ff;
  border-radius: 7px;
  background: #eff6ff;
  color: var(--blue);
  padding: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.mini-btn.danger {
  border-color: #fecaca;
  background: #fff5f5;
  color: var(--danger);
}

.excel-add-resource-row td {
  background: #fbfdff!important;
}

.excel-add-resource-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 10px;
}

.excel-total-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.excel-day-btn {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 900;
  cursor: pointer;
}

.excel-total-row td {
  background: #f8fafc!important;
  font-weight: 900;
}

.excel-total-row td:first-child {
  padding: 10px 12px;
  text-align: right;
  color: var(--text);
}

.excel-row-detail {
  position: relative;
  max-height: min(340px, 38vh);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: auto;
}

.excel-row-detail h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.excel-row-detail table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12px;
}

.excel-row-detail th,
.excel-row-detail td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
}

.excel-row-detail th {
  background: #f8fafc;
  color: #475569;
}

.excel-detail-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.excel-summary {
  display: grid;
  align-content: start;
  gap: 12px;
}

.excel-summary .side-card {
  box-shadow: var(--shadow);
}

.excel-settings-card {
  padding: 14px;
}

.excel-settings-grid {
  display: grid;
  gap: 10px;
}

.excel-settings-grid label {
  gap: 5px;
  font-size: 12px;
}

.excel-settings-grid input,
.excel-settings-grid select {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 13px;
}

.excel-panel-toggle {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #eff6ff;
  color: var(--blue);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  font-weight: 900;
  cursor: pointer;
}

.excel-panel-toggle .ui-icon {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 9;
}

@media (max-width: 1280px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; overflow: visible; }
  main { overflow: visible; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid, .quoteedit, .manage, .tickets-layout, .dashboard-workbench, .settings-grid, .template-layout, .terms-template-layout, .invoice-layout, .invoice-bottom, .finance-grid { grid-template-columns: 1fr; }
  .finance-filter-bar { grid-template-columns: repeat(2, minmax(180px, 1fr)) repeat(3, auto); }
  .finance-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finance-layout { grid-template-columns: 1fr; }
  .finance-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quotes { height: auto; overflow: visible; }
  .quotes.quotes-sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .quotes > .panel,
  .quoteedit,
  .quoteedit > div:first-child,
  .quote-side {
    max-height: none;
    height: auto;
    overflow: visible;
  }
  .excel-mode-page,
  .excel-mode-page.excel-list-collapsed,
  .excel-mode-page.excel-profit-collapsed,
  .excel-mode-page.excel-list-collapsed.excel-profit-collapsed {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
  }
  .excel-quote-list,
  .excel-workbench,
  .excel-summary {
    max-height: none;
    overflow: visible;
  }
  .excel-info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .excel-sheet-wrap {
    max-height: 70vh;
  }
  .ticket-side { position: static; }
  .template-side { position: static; }
  .terms-template-grid { grid-template-columns: 1fr; }
  .bottom, .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
  .form6 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  .costrow { grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); }
  .cost-name, .cost-supplier { grid-column: span 2; }
  .quote-side { position: static; }
  .ticket-picker-item { grid-template-columns: 1fr; }
  .cost-table-head { display: none; }
  .costrow-summary {
    grid-template-columns: 72px minmax(0, 1fr) 92px;
    grid-template-areas:
      "type item actions"
      "date cost cost"
      "supplier cost cost";
  }
  .invoice-form-grid,
  .bill-to-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
  .invoice-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quote-step-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pricing-grid,
  .quote-export-layout {
    grid-template-columns: 1fr;
  }
  .cost-context-body {
    grid-template-columns: 1fr;
  }
  .cost-day-tabs {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    max-height: none;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .invoice-form-grid .wide,
  .invoice-form-grid .invoice-quote-link,
  .bill-to-grid .wide {
    grid-column: span 2;
  }

  .invoice-quote-option {
    grid-template-columns: minmax(140px, .85fr) minmax(160px, 1.15fr);
  }

  .invoice-quote-option-meta {
    grid-column: span 2;
    justify-content: flex-start;
  }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; }
  .user { position: static; width: auto; margin-top: 18px; }
  main { padding: 18px; }
  .top, .stats, .bottom, .dashboard-cards, .quotes, .days, .form6, .form4, .form3, .form2 { display: grid; grid-template-columns: 1fr; }
  .finance-hero,
  .finance-currency-head,
  .finance-panel-title,
  .finance-receivable,
  .finance-product-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .finance-filter-bar,
  .finance-kpi-grid,
  .finance-quick-grid,
  .cashflow-grid {
    grid-template-columns: 1fr;
  }
  .quote-terms-panel { padding: 18px; }
  .quote-terms-grid { grid-template-columns: 1fr; }
  .quote-term-card-head { align-items: stretch; }
  .quote-term-template { flex-basis: 100%; grid-template-columns: minmax(0, 1fr); }
  .quote-terms-validity label { grid-template-columns: 1fr; }
  .invoice-search { grid-template-columns: 1fr; }
  .costrow { grid-template-columns: 1fr; }
  .cost-name, .cost-supplier { grid-column: auto; }
  .ticket-hero, .ticket-search, .ticket-picker-search, .vehicle-form { display: grid; grid-template-columns: 1fr; }
  .ticket-grid, .ticket-prices, .ticket-picker-prices, .vehicle-grid, .vehicle-prices, .vehicle-picker-prices { grid-template-columns: 1fr; }
  .ticket-picker { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .invoice-form-grid,
  .bill-to-grid,
  .invoice-payment-row,
  .invoice-item-fields {
    grid-template-columns: 1fr;
  }
  .cost-context-head {
    display: grid;
  }
  .cost-day-preview {
    grid-template-columns: 1fr;
  }
  .invoice-form-grid .wide,
  .invoice-form-grid .invoice-quote-link,
  .bill-to-grid .wide,
  .invoice-item-detail {
    grid-column: auto;
  }

  .invoice-quote-picker-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-quote-picker-tools > small {
    text-align: left;
  }

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

  .invoice-quote-option-meta {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .quote-term-template {
    grid-template-columns: 1fr;
  }
  .quote-term-template .btn,
  .template-actions .btn,
  .searchbar button {
    width: 100%;
  }
  .template-actions {
    grid-template-columns: 1fr;
  }
  .searchbar {
    flex-wrap: wrap;
  }
}

/* Operations console refresh */
.ui-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  vertical-align: -3px;
}

button .ui-icon,
.btn .ui-icon,
.link-btn .ui-icon {
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #29445d;
  box-shadow: none;
  font-weight: 650;
}

.btn:hover {
  transform: none;
  border-color: #93a9bc;
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
}

.btn:focus-visible,
.nav button:focus-visible,
.resource-overview-item:focus-visible,
.todo-list button:focus-visible,
.link-btn:focus-visible {
  outline: 3px solid rgba(31, 95, 189, 0.2);
  outline-offset: 2px;
}

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

.btn.primary:hover,
.primary:hover {
  border-color: #174e9d;
  background: #174e9d;
}

.btn.soft,
.soft {
  border-color: #c7d9ed;
  background: var(--blue-soft);
  color: var(--blue);
}

.btn.danger,
.danger {
  border-color: #edb6b6;
  background: #fffafa;
  color: var(--red);
}

.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}

.btn.quiet:hover {
  border-color: #d6e3ef;
  background: var(--blue-soft);
}

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

.badge,
.pill {
  border-radius: 999px;
}

.card,
.panel,
.summary,
.pdf,
.side-card,
.excel-row-detail {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.panel,
.summary,
.side-card {
  background: var(--panel);
}

.login {
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  place-items: stretch;
  background: #eaf0f4;
}

.login::before {
  content: "GOODTIME\A TRAVEL OPERATIONS";
  white-space: pre;
  display: grid;
  align-content: end;
  padding: 56px;
  background: #123353;
  color: #fff;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 760;
  line-height: 1.12;
  border-top: 8px solid #d47a20;
}

.login form {
  align-self: center;
  justify-self: start;
  width: min(460px, calc(100vw - 40px));
  margin-left: clamp(32px, 7vw, 110px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.login-logo {
  width: 136px;
}

.login-language,
.language-switch {
  border-radius: var(--radius-sm);
}

.app {
  grid-template-columns: 64px minmax(0, 1fr);
  background: var(--bg);
}

.app.sidebar-pinned {
  grid-template-columns: 252px minmax(0, 1fr);
}

.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  padding: 14px 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 28%),
    linear-gradient(180deg, #153a5e 0%, #0a2138 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
  border-right: 1px solid #071b2f;
}

.app:not(.sidebar-pinned).sidebar-expanded .side {
  width: 252px;
  padding: 14px 14px;
}

.app.sidebar-pinned .side {
  padding: 14px 14px;
}

.brand {
  position: relative;
  width: 100%;
  grid-template-columns: 38px minmax(0, 1fr);
  min-width: 0;
  gap: 9px;
  align-items: center;
  margin-bottom: 8px;
  padding: 0 34px 10px 0;
  border-bottom: 1px solid rgba(205, 222, 239, 0.14);
}

.brand > div {
  min-width: 0;
  overflow: hidden;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  padding: 3px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(2, 12, 24, 0.18);
}

.brand strong {
  display: block;
  overflow: visible;
  color: #f7fbff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: .01em;
  text-overflow: unset;
  white-space: nowrap;
}

.brand span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #a9bfd4;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-language-switch {
  width: 100%;
  margin: 0 0 12px;
  padding: 3px;
  border: 1px solid rgba(205, 222, 239, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  justify-self: center;
}

.sidebar-language-switch button {
  min-height: 27px;
  border-radius: 7px;
  font-size: 11px;
}

.dock-pin {
  position: absolute;
  top: 5px;
  right: 0;
  width: 28px;
  height: 28px;
  border-color: rgba(205, 222, 239, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #c9d9e8;
}

.dock-pin:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.12);
}

.dock-pin.active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.nav {
  width: 100%;
  gap: 5px;
}

.nav-group-label {
  margin: 13px 10px 3px;
  color: #86a0b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav button {
  position: relative;
  width: 100%;
  min-height: 38px;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #d8e6f3;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.nav button.active {
  background: #f6fbff;
  color: #102f4d;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(0, 18, 38, 0.18);
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d8832f;
}

.nav-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  background: rgba(232, 242, 252, 0.10);
  color: currentColor;
  box-shadow: inset 0 0 0 1px rgba(215, 230, 245, 0.10);
}

.nav-icon .ui-icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.nav button.active .nav-icon,
.nav button:hover .nav-icon {
  background: rgba(31, 95, 189, 0.10);
  box-shadow: inset 0 0 0 1px rgba(31, 95, 189, 0.14);
}

.user {
  width: 100%;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}

.user-identity {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.user-initial {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #eaf1f7;
  color: #123353;
  font-weight: 800;
}

.logout-button,
.language-switch button {
  border-radius: var(--radius-sm);
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav-group-label {
  display: none;
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .brand > div,
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .brand .dock-pin,
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .sidebar-language-switch,
.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .user {
  display: none;
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .brand {
  width: 38px;
  min-width: 38px;
  grid-template-columns: 38px;
  justify-content: center;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
  border-bottom: 0;
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav {
  align-items: center;
  gap: 10px;
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button {
  width: 42px;
  min-height: 42px;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #d8e6f3;
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button.active {
  background: rgba(84, 132, 206, 0.24);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(197, 218, 242, 0.14);
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button.active::before {
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d8832f;
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button .nav-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
  background: rgba(232, 242, 252, 0.09);
  box-shadow: inset 0 0 0 1px rgba(215, 230, 245, 0.12);
}

.app:not(.sidebar-pinned):not(.sidebar-expanded) .side .nav button.active .nav-icon {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

main {
  padding: 18px;
  background: var(--bg);
}

.top {
  position: relative;
  align-items: flex-end;
  min-height: 72px;
  margin-bottom: 14px;
  padding: 4px 0 14px 14px;
  border-bottom: 1px solid var(--line);
}

.top::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 4px;
  height: 36px;
  border-radius: 2px;
  background: #dc8124;
}

.top h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 760;
  line-height: 1.15;
}

.top p {
  margin-top: 5px;
  font-size: 13px;
}

.page-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.stats {
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-stats .stat-card {
  position: relative;
  min-height: 98px;
  align-content: stretch;
  gap: 5px;
  padding: 13px;
  border-top: 3px solid var(--line-strong);
  box-shadow: none;
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
}

.stat-card-head .ui-icon {
  width: 17px;
  height: 17px;
}

.dashboard-stats .stat-card strong {
  margin-top: 2px;
  font-size: 20px;
  line-height: 1.1;
}

.dashboard-stats .stat-card small {
  align-self: end;
  color: var(--muted);
  font-size: 11px;
}

.stat-blue {
  border-top-color: var(--blue) !important;
}

.stat-blue .stat-card-head .ui-icon {
  color: var(--blue);
}

.stat-amber {
  border-top-color: #d6842d !important;
}

.stat-amber .stat-card-head .ui-icon {
  color: var(--amber);
}

.stat-red {
  border-top-color: var(--red) !important;
}

.stat-red .stat-card-head .ui-icon {
  color: var(--red);
}

.stat-green {
  border-top-color: var(--green) !important;
}

.stat-green .stat-card-head .ui-icon {
  color: var(--green);
}

.dashboard-workbench {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.65fr);
  gap: 12px;
}

.quick-create,
.recent-panel,
.resource-overview,
.todo-card {
  box-shadow: none;
}

.panel-title {
  margin-bottom: 12px;
}

.section-title {
  align-items: center;
  gap: 10px;
}

.section-title h2 {
  font-size: 18px;
}

.section-title h3 {
  font-size: 16px;
}

.section-leading-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid #c6d9ec;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
}

.section-leading-icon.alert {
  border-color: #edd2b5;
  background: #fff7ed;
  color: var(--amber);
}

.quick-create .form6 {
  grid-template-columns: repeat(4, minmax(125px, 1fr));
  gap: 10px;
}

.quick-create .form6 .wide {
  grid-column: span 2;
}

.recent-list {
  gap: 7px;
}

.recent-item {
  padding: 10px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.recent-actions {
  padding-top: 6px;
  border-top: 1px solid #e3e9ee;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
}

.link-btn .ui-icon {
  width: 14px;
  height: 14px;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 12px;
  margin-top: 12px;
}

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

.resource-overview-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.resource-overview-item:hover {
  border-color: #a9bfd2;
  background: var(--panel-soft);
}

.resource-overview-item > span:nth-child(2) {
  min-width: 0;
}

.resource-overview-item strong,
.resource-overview-item small {
  display: block;
}

.resource-overview-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.resource-overview-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
}

.resource-overview-icon .ui-icon {
  width: 18px;
  height: 18px;
}

.todo-list {
  gap: 6px;
}

.todo-list button {
  display: flex;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--text);
  text-align: left;
}

.todo-list button:hover {
  border-color: #a9bfd2;
  background: #fff;
}

.todo-list button strong {
  color: var(--blue);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 17px;
}

.quote-no,
.invoice-no,
.voucher-no,
.quote-code-ref,
[class*="invoice-code"] {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.empty-state {
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.searchbar-icon {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding-left: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
}

.searchbar-icon input {
  min-width: 0;
  border: 0;
  padding-left: 0;
}

.searchbar-icon input:focus {
  box-shadow: none;
}

.searchbar-icon .btn {
  margin: 4px;
}

.section-title.compact {
  align-items: center;
}

.section-title.compact h2 {
  font-size: 18px;
}

.section-title.compact p {
  margin-top: 1px;
}

.quotes {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 36px);
}

.quote-list-panel {
  padding: 12px;
  box-shadow: none;
}

.quote-list-toolbar {
  align-items: center;
}

.quote-list-toolbar .actions {
  gap: 5px;
}

.quote-list-toolbar .btn {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.quote-list-toolbar .btn .ui-icon {
  width: 14px;
  height: 14px;
}

.quote-list-card {
  gap: 7px;
  padding: 11px !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none;
}

.quote-list-card:hover {
  border-color: #9fb5c8;
  background: var(--panel-soft);
}

.quote-list-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.quote-card-topline strong {
  font-size: 14px;
}

.quote-list-card .quote-code {
  font-size: 12px;
}

.quote-list-card .quote-code-ref {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.quote-card-compact-total,
.quote-card-metrics p {
  border-radius: var(--radius-sm);
  background: #f2f6f9;
}

.quote-card-actions em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
}

.quoteedit {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
}

.quote-editor-head {
  padding: 12px;
  border-top: 3px solid var(--blue);
  box-shadow: 0 3px 10px rgba(22, 42, 61, 0.06);
}

.quote-editor-head .toolbar {
  gap: 10px;
}

.quote-actions .btn {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.quote-ownership-bar {
  border-radius: var(--radius-sm);
}

.quote-step-nav,
.quote-step-nav button,
.quote-pane > .panel,
.quote-side .side-card {
  border-radius: var(--radius);
}

.quote-step-nav button {
  min-height: 38px;
}

.settings-hero {
  padding: 18px 20px;
  border-top: 3px solid var(--blue);
  background: #fff;
}

.settings-hero h2 {
  font-size: 23px;
}

.settings-icon {
  width: 32px;
  height: 32px;
  border: 1px solid #c6d9ec;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: none;
}

.settings-steps span,
.edition-card,
.guide-card {
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.edition-card {
  min-height: 94px;
}

.invoice-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 36px);
}

.invoice-list-panel,
.invoice-main-panel {
  padding: 12px;
  box-shadow: none;
}

.invoice-list-panel {
  background: #f8fafb;
}

.invoice-list {
  gap: 7px;
}

.invoice-card {
  padding: 10px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.invoice-card:hover {
  border-color: #9fb5c8;
}

.invoice-card.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

.invoice-editor {
  gap: 12px;
}

.invoice-editor-head {
  position: sticky;
  top: -12px;
  z-index: 5;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.invoice-editor-head h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
}

.invoice-block,
.invoice-bottom,
.invoice-item-row,
.invoice-payment-row,
.invoice-item-subtotal,
.invoice-total-box {
  border-radius: var(--radius);
}

.invoice-block {
  padding: 14px;
  box-shadow: none;
}

.invoice-block h3 {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.invoice-item-row {
  background: var(--panel-soft);
}

.invoice-form-grid {
  gap: 10px;
}

.invoice-total-box {
  box-shadow: none;
}

.price .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.price .row > :last-child {
  margin-left: auto;
  text-align: right;
}

.excel-mode-page {
  gap: 10px;
}

.excel-workbench {
  gap: 10px;
}

.excel-topbar {
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 3px 10px rgba(22, 42, 61, 0.07);
  backdrop-filter: none;
}

.excel-title-row h1 {
  font-family: var(--font-display);
  font-size: 20px;
}

.excel-topbar p {
  max-width: 680px;
  line-height: 1.45;
}

.excel-actions {
  align-items: stretch;
  gap: 6px;
}

.excel-action-group,
.excel-view-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

.excel-action-group:first-child {
  padding-left: 0;
  border-left: 0;
}

.excel-actions .btn {
  min-height: 32px;
  padding: 0 9px;
  font-size: 12px;
}

.excel-icon-btn {
  width: 32px;
  height: 32px;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--blue);
}

.excel-icon-btn:hover {
  background: var(--blue-soft);
}

/* Excel quote workbench compact header */
.excel-mode-page {
  height: calc(100vh - 28px);
}

.excel-workbench {
  gap: 8px;
}

.excel-topbar {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 12px;
  border-radius: 12px;
}

.excel-title-row {
  gap: 8px;
}

.excel-title-row h1 {
  font-size: 20px;
  line-height: 1.15;
}

.excel-title-row small {
  font-size: 12px;
}

.excel-topbar-hint {
  padding-left: 8px;
  border-left: 1px solid #dbe7f3;
  color: #64748b;
}

.excel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.excel-action-group,
.excel-view-actions {
  gap: 5px;
  padding-left: 7px;
}

.excel-action-group {
  border-left: 0;
  padding-left: 0;
}

.excel-actions .btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}

.excel-actions .btn.primary {
  min-width: 96px;
}

.excel-more-menu {
  position: relative;
}

.excel-more-menu > summary {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d6e2f0;
  border-radius: 9px;
  background: #fff;
  color: #203853;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.excel-more-menu > summary::-webkit-details-marker {
  display: none;
}

.excel-more-menu > div {
  right: 0;
  left: auto;
  min-width: 210px;
  z-index: 20;
}

.excel-more-menu > div .btn {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  box-shadow: none;
}

.excel-icon-btn {
  width: 32px;
  height: 32px;
}

.excel-info-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 12px;
}

.excel-info-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1d4ed8;
  white-space: nowrap;
}

.excel-info-summary-title .lucide {
  width: 18px;
  height: 18px;
}

.excel-info-summary-title strong {
  color: #1d4ed8;
  font-size: 13px;
}

.excel-info-summary-fields {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  overflow: hidden;
}

.excel-info-summary-fields span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
  border-left: 1px solid #e2e8f0;
}

.excel-info-summary-fields span,
.excel-info-summary-fields b {
  overflow: hidden;
  text-overflow: ellipsis;
}

.excel-info-summary-fields span:first-child {
  border-left: 0;
}

.excel-info-summary-fields b {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.excel-info-summary-fields span:nth-child(3) {
  flex: 1 1 220px;
}

.excel-info-summary .btn {
  min-height: 32px;
  padding: 0 10px;
}

.excel-sheet-header {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(520px, 1.4fr);
  align-items: center;
  gap: 8px 12px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.excel-quote-tabs {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.excel-quote-tab {
  height: 30px;
  min-width: 118px;
  padding: 0 14px;
}

.excel-quote-tab-actions .btn {
  min-height: 30px;
  padding: 0 10px;
}

.excel-quote-tab-actions .btn.icon-only {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.excel-table-more-menu > summary {
  min-height: 30px;
  padding: 0 10px;
  gap: 6px;
}

.excel-sheet-toolbar {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.excel-add-day-button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 8px;
}

.excel-sheet-search {
  flex: 0 1 340px;
  min-width: 260px;
}

.excel-sheet-search input {
  min-height: 30px;
}

.excel-sheet-wrap {
  max-height: min(70vh, calc(100vh - 220px));
}

.excel-mode-page.excel-info-collapsed .excel-sheet-wrap {
  max-height: min(82vh, calc(100vh - 112px));
}

@media (max-width: 1400px) {
  .excel-topbar {
    grid-template-columns: 1fr;
  }

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

  .excel-info-summary {
    grid-template-columns: 1fr auto;
  }

  .excel-info-summary-title {
    grid-column: 1 / -1;
  }

  .excel-sheet-header {
    grid-template-columns: 1fr;
  }

  .excel-sheet-toolbar {
    justify-content: space-between;
  }
}

.excel-info-strip,
.excel-info-summary,
.excel-quote-tabs,
.excel-sheet-toolbar,
.excel-sheet-header,
.excel-sheet-wrap {
  border-radius: var(--radius);
  box-shadow: none;
}

.excel-info-strip {
  gap: 8px;
  padding: 10px;
}

.excel-quote-tab {
  border-radius: var(--radius-sm);
}

.excel-sheet-search {
  border-radius: var(--radius-sm);
}

.excel-sheet-wrap {
  border-color: var(--line-strong);
}

.excel-sheet th {
  background: #edf2f5;
  color: #273b4c;
}

.excel-sheet td {
  border-color: #dfe6ec;
}

.excel-sheet tbody tr:hover td {
  background: #f7fafc;
}

.excel-sheet .mini-btn {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border-radius: 5px;
}

.excel-sheet .mini-btn .ui-icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 1500px) {
  .resource-overview-list {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .excel-topbar {
    display: grid;
  }

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

@media (max-width: 1120px) {
  .dashboard-workbench,
  .dashboard-lower {
    grid-template-columns: 1fr;
  }

  .quick-create .form6 {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .excel-action-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login::before {
    min-height: 150px;
    align-content: center;
    padding: 28px;
    font-size: 26px;
  }

  .login form {
    justify-self: center;
    margin: 24px;
  }

  .app,
  .app.sidebar-pinned {
    grid-template-columns: 1fr;
  }

  .side,
  .app.sidebar-pinned .side,
  .app:not(.sidebar-pinned).sidebar-expanded .side {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 62px;
    padding: 8px 10px;
    overflow: hidden;
  }

  .brand {
    width: 44px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }

  .brand > div,
  .brand .dock-pin,
  .sidebar-language-switch {
    display: none;
  }

  .nav {
    display: flex;
    min-width: 0;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group-label,
  .user {
    display: none;
  }

  .nav button {
    width: 42px;
    flex: 0 0 42px;
    justify-content: center;
    padding: 8px;
  }

  .nav-label {
    display: none;
  }

  .nav button.active::before {
    left: 8px;
  }

  .top {
    align-items: start;
  }

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

  .quotes,
  .invoice-layout,
  .excel-mode-page,
  .customer-library-page,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quotes,
  .invoice-layout,
  .excel-mode-page {
    height: auto;
    overflow: visible;
  }

  .quote-side {
    max-height: none;
    overflow: visible;
  }

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

  .quick-create .form6,
  .resource-overview-list {
    grid-template-columns: 1fr;
  }

  .quick-create .form6 .wide {
    grid-column: auto;
  }

  .customer-card-contact,
  .customer-contact-grid {
    grid-template-columns: 1fr;
  }

  .nav button,
  .resource-overview-item,
  .todo-list button {
    min-height: 44px;
  }
}

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

@media (max-width: 820px) {
  .quote-command-controls .quote-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .quote-command-controls .quote-actions > .btn,
  .quote-command-controls .quote-actions > .more-menu,
  .quote-command-controls .quote-actions > .more-menu > summary {
    width: 100%;
    min-width: 0;
  }

  .quote-editor-head .quote-step-nav {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .quote-editor-head .quote-step-nav button {
    flex: 1 0 108px;
    min-height: 42px;
  }

  .quote-command-controls .quote-actions .btn,
  .quote-command-controls .quote-view-switch button {
    min-height: 42px;
  }
}

@media (max-width: 560px) {
  .quote-command-controls .quote-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.quote-view-switch button:focus-visible,
.quote-list-open:focus-visible,
.quote-financial-command:focus-visible,
.quote-step-nav button:focus-visible {
  outline: 2px solid #2f6fcf;
  outline-offset: 2px;
}

/* Quote management workstation refresh */
.quotes.quote-workspace-standard,
.quotes.quote-workspace-focus,
.quotes.quote-workspace-finance {
  gap: 18px;
}

.quoteedit.quoteedit-wide,
.quoteedit.quoteedit-finance {
  gap: 18px;
}

.quoteedit > div:first-child {
  display: grid;
  gap: 18px;
}

.quote-editor-head {
  position: static;
  z-index: auto;
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 40, 70, .06);
}

.quote-commandbar {
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.quote-command-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.quote-command-title-wrap .quote-command-title {
  flex: 1 1 auto;
}

.quote-list-open {
  flex: 0 0 auto;
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.quote-list-open .ui-icon {
  width: 17px;
  height: 17px;
}

.quote-command-eyebrow {
  display: none;
}

.quote-command-heading {
  gap: 10px;
  flex-wrap: wrap;
}

.quote-command-heading h2 {
  color: #081a35;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0;
}

.quote-command-heading > span:not(.pill) {
  color: #0f172a;
  font-size: 16px;
}

.quote-command-heading .pill {
  border: 0;
  background: #edf2ff;
  color: #2457d6;
  font-size: 12px;
}

.quote-context-meta {
  margin-top: 4px;
  font-size: 12px;
}

.quote-command-controls {
  align-items: flex-start;
  gap: 10px;
}

.quote-view-switch {
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.quote-view-switch button,
.quote-actions .btn,
.quote-more-menu > summary {
  min-height: 38px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  background: #fff;
  color: #203853;
  box-shadow: 0 8px 18px rgba(15, 47, 84, .04);
}

.quote-view-switch button {
  padding: 0 12px;
  font-size: 12px;
}

.quote-view-switch button.active {
  color: #1456d9;
  border-color: #b7cdf5;
  background: #f5f9ff;
  box-shadow: inset 0 0 0 1px rgba(47, 109, 242, .08), 0 8px 18px rgba(15, 47, 84, .05);
}

.quote-actions {
  margin-left: auto;
  gap: 8px;
}

.quote-actions .btn.primary {
  border-color: #245de0;
  background: linear-gradient(180deg, #2f6df2, #1d55ce);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.quote-actions .quote-financial-command {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-color: #b7cdf5;
  background: #f5f9ff;
  color: #245de0;
}

.quote-actions .quote-financial-command:hover {
  border-color: #7ea5ed;
  background: #eaf2ff;
}

.quote-owner-line {
  min-height: 34px;
  margin-top: 0;
  padding: 0;
  border-top: 0;
  color: #62748a;
  font-size: 13px;
}

.quote-owner-line label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.quote-owner-line select {
  min-height: 34px;
  border-radius: 9px;
  background: #fff;
}

.quote-edit-state {
  padding: 6px 10px;
  border-radius: 999px;
  background: #edfdf3;
  color: #178447;
  font-weight: 800;
}

.quote-step-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
  padding: 4px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #f8fbff;
}

.quote-step-nav button {
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
}

.quote-step-nav button.active {
  color: #1356d8;
  box-shadow: 0 10px 26px rgba(15, 47, 84, .09);
}

.quote-step-nav button span {
  width: 20px;
  height: 20px;
}

.quote-financial-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
  border: 0;
}

.quote-financial-metric {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon action";
  align-content: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 47, 84, .06);
}

.quote-financial-metric + .quote-financial-metric {
  border-left: 1px solid #dbe7f3;
}

.quote-financial-metric > i {
  grid-area: icon;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 14px;
  background: #245de0;
  color: #fff;
  font-style: normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .24),
    inset 0 -1px 0 rgba(8, 40, 112, .2),
    0 7px 16px rgba(36, 93, 224, .18);
}

.quote-financial-metric > i::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  pointer-events: none;
}

.quote-financial-metric > i::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-right: 1px solid rgba(255, 255, 255, .58);
  border-bottom: 1px solid rgba(255, 255, 255, .58);
  pointer-events: none;
}

.quote-metric-cost > i::before {
  inset: 10px 11px;
  border-radius: 6px;
}

.quote-metric-sales > i::before {
  inset: 8px;
  border-radius: 50%;
}

.quote-metric-profit > i::before {
  inset: 10px 8px 11px 10px;
  border-radius: 6px;
  transform: rotate(-8deg);
}

.quote-metric-margin > i::before {
  inset: 8px;
  border: 2px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: transparent;
}

.quote-financial-metric > i .ui-icon {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  stroke-width: 2.05;
}

.quote-financial-metric span {
  grid-area: label;
  color: #6a7c91;
  font-size: 12px;
}

.quote-financial-metric strong {
  grid-area: value;
  margin-top: 4px;
  color: #0b1f3a;
  font-size: 18px;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.quote-financial-metric.negative strong {
  color: #e23b36;
}

.quote-step-pane {
  margin-top: 0;
}

.quote-step-layout {
  display: grid;
  gap: 16px;
}

.quote-form-card {
  min-width: 0;
  container-type: inline-size;
  padding: 18px 20px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 47, 84, .05);
}

.quote-form-card-wide {
  grid-column: 1 / -1;
}

.quote-form-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.quote-form-card-head h3 {
  margin: 0;
  color: #0d213b;
  font-size: 18px;
}

.quote-form-card-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.quote-customer-save {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border-color: #dbe7f3;
  color: #245de0;
}

.quote-customer-save:hover {
  border-color: #b7cdf5;
  background: #f5f9ff;
}

.quote-basic-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.quote-form-grid {
  display: grid;
  gap: 14px 18px;
  align-items: end;
  min-width: 0;
}

.quote-form-grid > * {
  min-width: 0;
}

.quote-form-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.quote-form-grid-two {
  grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
}

@container (max-width: 760px) {
  .quote-form-grid-five,
  .quote-form-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 460px) {
  .quote-form-grid-five,
  .quote-form-grid-four,
  .quote-form-grid-two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.quote-full-field textarea {
  min-height: 72px;
}

.quote-char-count {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.quote-card-note {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 13px;
}

.quote-itinerary-workbench {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: stretch;
}

.quote-itinerary-rail,
.quote-itinerary-editor {
  min-width: 0;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 47, 84, .05);
}

.quote-itinerary-rail {
  padding: 18px;
}

.quote-rail-head,
.quote-active-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.quote-rail-head h3,
.quote-active-day-head h3 {
  margin: 0;
  color: #0d213b;
  font-size: 19px;
}

.quote-rail-head p,
.quote-active-day-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

.quote-rail-head .actions,
.quote-active-day-head .actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quote-rail-head .btn,
.quote-active-day-head .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
}

.quote-itinerary-days {
  display: grid;
  gap: 12px;
  max-height: 570px;
  margin-top: 16px;
  overflow: auto;
  padding-right: 4px;
}

.quote-itinerary-day-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e0e8f2;
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.quote-itinerary-day-card.active {
  border-color: #2f6df2;
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #2f6df2, 0 12px 24px rgba(37, 99, 235, .08);
}

.quote-day-index {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 10px;
  background: #f3f7fc;
  color: #195bdc;
  font-size: 16px;
  font-weight: 900;
}

.quote-day-index small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.quote-day-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

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

.quote-day-copy strong {
  color: #0f172a;
  font-size: 15px;
}

.quote-day-copy small,
.quote-day-copy em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.quote-itinerary-editor {
  padding: 18px;
}

.manual-itinerary-resources {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.manual-resource-head {
  display: none;
}

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

.manual-resource-grid label {
  min-width: 0;
}

.itinerary-hotel-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  min-width: 0;
}

.itinerary-hotel-row > .itinerary-hotel-picker {
  min-width: 0;
}

.itinerary-hotel-field-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 20px;
  color: #52677f;
  font-size: 13px;
  font-weight: 800;
  line-height: 20px;
}

.itinerary-hotel-field-heading small {
  min-width: 0;
  overflow: hidden;
  color: #7b8da3;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-resource-grid .wide {
  grid-column: span 2;
}

.manual-resource-grid .itinerary-text-label {
  grid-column: 1 / -1;
}

.manual-resource-grid textarea {
  min-height: 74px;
}

.manual-resource-grid .itinerary-main-text {
  min-height: 130px;
}

.itinerary-english-fields {
  margin-top: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}

.itinerary-english-fields > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 800;
  list-style: none;
}

.itinerary-english-fields > summary::-webkit-details-marker {
  display: none;
}

.itinerary-english-fields > summary svg {
  width: 16px;
  height: 16px;
}

.itinerary-english-fields > summary small {
  margin-left: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.itinerary-english-fields[open] > summary {
  border-bottom: 1px solid #dbeafe;
  background: #eff6ff;
}

.english-field-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 0;
  color: #64748b;
}

.english-field-actions .btn {
  flex: 0 0 auto;
}

.english-field-actions small {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.english-field-actions svg {
  width: 15px;
  height: 15px;
}

.itinerary-english-fields .manual-resource-grid {
  padding: 12px;
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.quote-cost-workbench-card,
.quote-cost-list-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 47, 84, .05);
}

.quote-cost-toolbar,
.quote-cost-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.quote-cost-toolbar h3,
.quote-cost-list-head h3 {
  margin: 0;
  color: #0d213b;
  font-size: 18px;
}

.quote-cost-toolbar p,
.quote-cost-list-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.quote-cost-generation-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quote-cost-view-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d6e2f0;
  border-radius: 10px;
  color: #456176;
  font-size: 12px;
  background: #f8fbff;
}

.cost-itinerary-context {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cost-context-body {
  display: grid;
  grid-template-columns: minmax(280px, 370px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.cost-day-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding: 10px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fbfdff;
}

.cost-day-tabs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 8px;
}

.cost-day-tabs-head h3 {
  margin: 0;
  font-size: 15px;
  color: #0d213b;
}

.cost-day-tabs-head small {
  color: #64748b;
  font-weight: 700;
}

.cost-day-tabs button {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #e0e8f2;
  border-radius: 10px;
  background: #fff;
  color: #213852;
  text-align: left;
}

.cost-day-tabs button.active {
  border-color: #2f6df2;
  background: #f4f8ff;
  box-shadow: inset 3px 0 0 #2f6df2;
}

.cost-day-tabs button strong {
  color: #1e55d6;
  font-size: 14px;
}

.cost-day-tabs button small {
  color: #64748b;
  font-size: 12px;
}

.cost-day-tabs button span {
  min-width: 0;
  color: #4b5f75;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-day-tabs button .cost-day-tab-meta {
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.cost-day-tabs button .cost-day-tab-meta strong,
.cost-day-tabs button .cost-day-tab-meta small {
  display: block;
  line-height: 1.25;
  white-space: nowrap;
}

.cost-day-tabs button .cost-day-tab-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cost-day-preview {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
}

.cost-day-preview-head {
  display: block;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.cost-day-preview-head h3 {
  margin: 0;
  color: #0d213b;
  font-size: 18px;
}

.cost-day-preview-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

.cost-day-edit-row {
  display: flex;
  margin-top: 10px;
}

.cost-day-edit-row .btn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 13px;
}

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

.cost-day-field {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "content content";
  gap: 4px 8px;
  min-height: 66px;
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #fbfdff;
}

.cost-day-field.wide {
  grid-column: 1 / -1;
}

.cost-day-field i {
  grid-area: icon;
  color: #2f6df2;
  font-style: normal;
}

.cost-day-field b {
  grid-area: label;
  color: #425a73;
  font-size: 12px;
}

.cost-day-field p {
  grid-area: content;
  margin: 0;
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cost-day-field.wide p {
  font-size: 13.5px;
  line-height: 1.55;
}

.quote-cost-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.quote-cost-filter-row .btn {
  min-height: 34px;
  padding: 6px 12px;
}

.quote-cost-table-head {
  grid-template-columns: 110px minmax(260px, 1fr) 140px 160px 130px 220px;
  border-radius: 10px 10px 0 0;
  background: #f8fafc;
}

.quote-cost-table .compact-row {
  margin: 0;
  border-top: 0;
  border-radius: 0;
  box-shadow: none;
}

.quote-cost-table .costrow-summary {
  grid-template-columns: 110px minmax(260px, 1fr) 140px 130px 220px;
  border-radius: 0;
}

.quote-export-page {
  gap: 0;
}

.quote-export-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .9fr);
  gap: 18px;
}

.export-action-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 47, 84, .05);
}

.quote-export-documents .quote-form-card-head,
.quote-tax-card .quote-form-card-head {
  margin-bottom: 16px;
}

.document-language-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #f8fbff;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.document-language-selector span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  white-space: nowrap;
}

.document-language-selector svg {
  width: 15px;
  height: 15px;
}

.document-language-selector button {
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #52627a;
  font: inherit;
  cursor: pointer;
}

.document-language-selector button.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(15, 47, 84, .12);
}

.quote-export-documents .pdf-export-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.quote-export-documents .pdf-export-grid.pdf-export-groups {
  grid-template-columns: 1fr;
  gap: 16px;
}
.quote-export-documents .pdf-export-group-grid {
  gap: 10px 12px;
}

.quote-export-documents .pdf-card-shell {
  position: relative;
  min-width: 0;
}

.quote-export-documents .pdf-card {
  position: relative;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  justify-items: stretch;
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  text-align: left;
}

.quote-export-documents .has-word-export .pdf-card {
  padding-right: 76px;
}

.quote-export-documents .pdf-word-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border: 1px solid #c8dcf5;
  border-radius: 8px;
  background: #f7fbff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 9px;
  cursor: pointer;
}

.quote-export-documents .pdf-word-button:hover,
.quote-export-documents .pdf-word-button:focus-visible {
  border-color: #7aa7f7;
  background: #eaf2ff;
}

.quote-export-documents .pdf-main,
.quote-export-documents .pdf-main:hover,
.quote-export-documents .pdf-outline,
.quote-export-documents .pdf-outline:hover {
  border-color: #c8dcf5;
  background: #fff;
  color: #1d4ed8;
  box-shadow: none;
}

.quote-export-documents .pdf-card > i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2f6df2, #1d55ce);
  color: #fff;
  font-style: normal;
}

.quote-export-documents .pdf-card-copy {
  display: grid;
  gap: 4px;
  align-content: center;
}

.quote-export-documents .pdf-card .pdf-card-copy {
  display: grid;
}

.quote-export-documents .pdf-card strong {
  color: #1d4ed8;
  font-size: 15px;
  line-height: 1.2;
}

.quote-export-documents .pdf-card small {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.quote-export-documents .pdf-card:hover strong {
  color: #174ea6;
}

.quote-export-documents .pdf-card:hover small {
  color: #516a83;
}

.quote-export-documents .pdf-card em {
  align-self: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1d4ed8;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.quote-export-documents .pdf-card b {
  align-self: center;
  color: #315fd6;
  font-weight: 800;
}

.quote-export-documents .pdf-internal {
  grid-column: auto;
  border-color: #fca5a5;
  background: #fff5f5;
}

.quote-export-documents .pdf-internal > i {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

.quote-export-documents .pdf-internal em {
  background: #fee2e2;
  color: #b91c1c;
}

.export-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
}

.quote-tax-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.quote-invoice-hero {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-height: 250px;
  padding: 34px 28px 24px;
  border: 1px solid #cfe0f6;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.quote-invoice-illustration {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  color: #2f6df2;
  background: #eaf2ff;
}

.quote-invoice-illustration .lucide {
  width: 42px;
  height: 42px;
}

.quote-invoice-main {
  width: min(100%, 420px);
  min-height: 50px;
  justify-content: center;
  font-size: 15px;
}

.quote-invoice-hero small {
  color: #64748b;
  text-align: center;
}

.quote-invoice-about {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe7f3;
  border-radius: 10px;
  color: #476176;
  background: #f8fbff;
}

.quote-invoice-about strong {
  display: block;
  margin-bottom: 4px;
  color: #18324c;
}

.quote-invoice-about p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

/* Unified app primitives: keep controls and cards visually consistent across modules. */
:is(.btn,
  .excel-icon-btn,
  .excel-quote-tab,
  .excel-day-toggle,
  .mini-btn,
  .quote-workspace-switcher button,
  .login-language button,
  .template-button-menu > summary,
  .more-menu > summary) {
  min-height: 34px;
  border: 1px solid #d4e1ee;
  border-radius: 9px;
  background: #fff;
  color: #203853;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: none;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

:is(.btn,
  .excel-icon-btn,
  .excel-quote-tab,
  .excel-day-toggle,
  .mini-btn,
  .quote-workspace-switcher button,
  .login-language button,
  .template-button-menu > summary,
  .more-menu > summary):hover {
  border-color: #a9bfda;
  background: #f8fbff;
  color: #174ea6;
  box-shadow: 0 8px 18px rgba(15, 47, 84, .07);
  transform: translateY(-1px);
}

:is(.btn,
  .excel-icon-btn,
  .excel-quote-tab,
  .excel-day-toggle,
  .mini-btn,
  .quote-workspace-switcher button,
  .login-language button,
  .template-button-menu > summary,
  .more-menu > summary):focus-visible {
  outline: 3px solid rgba(47, 109, 242, .18);
  outline-offset: 2px;
  border-color: #5f8df4;
}

:is(.btn.primary,
  .quote-workspace-switcher button.active,
  .login-language button.active) {
  border-color: #2f6df2;
  background: linear-gradient(180deg, #3f74f3, #275ed6);
  color: #fff;
  box-shadow: 0 10px 22px rgba(47, 109, 242, .16);
}

:is(.btn.primary,
  .quote-workspace-switcher button.active,
  .login-language button.active):hover {
  background: linear-gradient(180deg, #346bf0, #1f55c8);
  color: #fff;
}

:is(.btn.soft) {
  border-color: #cfe0f6;
  background: #f3f8ff;
  color: #245de0;
}

:is(.btn.danger, .btn.danger-soft, .mini-btn.danger) {
  border-color: #f2b8b8;
  background: #fff7f7;
  color: #c93636;
}

:is(.btn:disabled,
  .btn.disabled,
  button:disabled) {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
  transform: none;
}

:is(.card,
  .panel,
  .side-card,
  .quote-form-card,
  .quote-list-card,
  .invoice-card,
  .customer-library-card,
  .finance-kpi-card,
  .finance-panel,
  .export-action-card,
  .pdf-card,
  .excel-info-strip,
  .excel-info-summary,
  .excel-sheet-header,
  .excel-sheet-wrap,
  .quote-financial-metric,
  .quote-rail,
  .quote-active-day-card,
  .quote-invoice-hero,
  .quote-invoice-about) {
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 47, 84, .05);
}

:is(.toolbar,
  .quote-command-controls,
  .quote-list-toolbar,
  .excel-actions,
  .excel-sheet-header,
  .excel-sheet-toolbar,
  .excel-quote-tabs) {
  gap: 8px;
}

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

  .quote-command-controls {
    justify-content: space-between;
  }

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

  .quote-financial-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .quote-basic-layout,
  .quote-itinerary-workbench,
  .quote-export-layout {
    grid-template-columns: 1fr;
  }

  .quote-form-grid-five,
  .quote-form-grid-four,
  .quote-form-grid-two,
  .manual-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .quote-editor-head {
    position: static;
    padding: 16px;
    border-radius: 12px;
  }

  .quote-command-controls,
  .quote-rail-head,
  .quote-active-day-head,
  .quote-form-card-head {
    display: grid;
  }

  .quote-step-nav {
    display: flex;
    overflow-x: auto;
  }

  .quote-step-nav button {
    flex: 0 0 132px;
  }

  .quote-financial-strip,
  .quote-form-grid-five,
  .quote-form-grid-four,
  .quote-form-grid-two,
  .manual-resource-grid {
    grid-template-columns: 1fr;
  }

  .manual-resource-grid .wide,
  .manual-resource-grid .itinerary-text-label {
    grid-column: auto;
  }

  .itinerary-hotel-row {
    grid-template-columns: 1fr;
  }

  .quote-itinerary-day-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .pdf-export-group-grid {
    grid-template-columns: 1fr;
  }
}

/* Final contrast guard for export cards and mixed button states. */
.quote-export-documents .pdf-card,
.quote-export-documents .pdf-card:hover,
.quote-export-documents .pdf-card:focus-visible {
  background: #fff;
  color: #1d4ed8;
}

.quote-export-documents .pdf-card strong,
.quote-export-documents .pdf-card:hover strong,
.quote-export-documents .pdf-card:focus-visible strong {
  color: #1d4ed8;
}

.quote-export-documents .pdf-card small,
.quote-export-documents .pdf-card:hover small,
.quote-export-documents .pdf-card:focus-visible small {
  color: #64748b;
}

.quote-export-documents .pdf-card.pdf-internal,
.quote-export-documents .pdf-card.pdf-internal:hover,
.quote-export-documents .pdf-card.pdf-internal:focus-visible {
  background: #fff5f5;
  color: #be123c;
}

.btn:not(.primary):not(.danger):not(.danger-soft):hover,
.btn.soft:hover {
  color: #174ea6;
}

/* System-wide consistency pass: shared primitives for the operational UI. */
:root {
  --gt-surface: #ffffff;
  --gt-surface-soft: #f7faff;
  --gt-line: #d8e4f1;
  --gt-line-strong: #c3d4e7;
  --gt-text: #0f1f36;
  --gt-muted: #667992;
  --gt-blue: #315fd6;
  --gt-blue-hover: #2450bf;
  --gt-blue-soft: #eff5ff;
  --gt-danger: #c93636;
  --gt-danger-soft: #fff5f5;
  --gt-green: #2f8a4e;
  --gt-radius-control: 9px;
  --gt-radius-panel: 12px;
  --gt-shadow-panel: 0 10px 24px rgba(15, 47, 84, .045);
  --gt-shadow-pop: 0 12px 28px rgba(20, 45, 74, .09);
}

main {
  color: var(--gt-text);
}

:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):not(.excel-cell-input):not(.login-language button) {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius-control);
  background: #fff;
  color: var(--gt-text);
  box-shadow: inset 0 1px 0 rgba(15, 47, 84, .025);
}

:is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):not(.excel-cell-input):focus {
  border-color: #7da2f6;
  box-shadow: 0 0 0 3px rgba(49, 95, 214, .13);
  outline: 0;
}

textarea:not(.excel-cell-input) {
  line-height: 1.55;
}

::placeholder {
  color: #8493a6;
  opacity: 1;
}

label {
  color: var(--gt-muted);
  font-weight: 650;
}

:where(.btn,
  .mini-btn,
  .link-btn,
  .excel-icon-btn,
  .excel-quote-tab,
  .excel-day-toggle,
  .quote-workspace-switcher button,
  .template-button-menu > summary,
  .more-menu > summary,
  .excel-more-menu > summary,
  .ticket-city-list button,
  .quote-filter-tabs button,
  .voucher-list button,
  .cost-day-tabs button) {
  min-height: 36px;
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius-control);
  background: #fff;
  color: #203853;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow: none;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

:where(.btn,
  .mini-btn,
  .link-btn,
  .excel-icon-btn,
  .excel-quote-tab,
  .excel-day-toggle,
  .quote-workspace-switcher button,
  .template-button-menu > summary,
  .more-menu > summary,
  .excel-more-menu > summary,
  .ticket-city-list button,
  .quote-filter-tabs button,
  .voucher-list button,
  .cost-day-tabs button):hover {
  border-color: var(--gt-line-strong);
  background: var(--gt-blue-soft);
  color: var(--gt-blue-hover);
  box-shadow: 0 8px 18px rgba(15, 47, 84, .065);
}

:where(.btn,
  .mini-btn,
  .link-btn,
  .excel-icon-btn,
  .excel-quote-tab,
  .excel-day-toggle,
  .quote-workspace-switcher button,
  .template-button-menu > summary,
  .more-menu > summary,
  .excel-more-menu > summary,
  .ticket-city-list button,
  .quote-filter-tabs button,
  .voucher-list button,
  .cost-day-tabs button):focus-visible {
  border-color: #7da2f6;
  outline: 3px solid rgba(49, 95, 214, .16);
  outline-offset: 2px;
}

:where(.btn.primary,
  .primary,
  .quote-workspace-switcher button.active,
  .excel-quote-tab.active,
  .login-language button.active,
  .sidebar-language-switch button.active) {
  border-color: var(--gt-blue);
  background: linear-gradient(180deg, #3d73ef 0%, var(--gt-blue) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(49, 95, 214, .16);
}

:where(.btn.primary,
  .primary,
  .quote-workspace-switcher button.active,
  .excel-quote-tab.active,
  .login-language button.active,
  .sidebar-language-switch button.active):hover {
  border-color: var(--gt-blue-hover);
  background: linear-gradient(180deg, #3469e5 0%, var(--gt-blue-hover) 100%);
  color: #fff;
}

:where(.btn.soft, .soft) {
  border-color: #cbdcf1;
  background: var(--gt-blue-soft);
  color: var(--gt-blue);
}

.btn.search-submit {
  border-color: #7894bd;
  background: #fff;
  color: #203f69;
  box-shadow: inset 0 0 0 1px rgba(73, 104, 151, .08);
}

.btn.search-submit:hover {
  border-color: #3f68aa;
  background: #f7faff;
  color: #244f96;
  box-shadow: 0 8px 18px rgba(37, 78, 140, .09), inset 0 0 0 1px rgba(63, 104, 170, .08);
}

:where(.btn.danger, .btn.danger-soft, .mini-btn.danger, .danger) {
  border-color: #f0bbbb;
  background: var(--gt-danger-soft);
  color: var(--gt-danger);
}

:where(.btn:disabled,
  .btn.disabled,
  button:disabled,
  input:disabled,
  select:disabled,
  textarea:disabled) {
  cursor: not-allowed;
  opacity: .56;
  box-shadow: none;
  transform: none;
}

:where(.panel,
  .card,
  .summary,
  .side-card,
  .quote-form-card,
  .quote-list-card,
  .quote-editor-head,
  .quote-cost-workbench-card,
  .quote-cost-list-panel,
  .quote-itinerary-rail,
  .quote-itinerary-editor,
  .quote-active-day-card,
  .quote-rail,
  .quote-financial-metric,
  .quote-invoice-hero,
  .quote-invoice-about,
  .customer-library-card,
  .customer-contact-card,
  .finance-panel,
  .finance-kpi-card,
  .export-action-card,
  .pdf-card,
  .resource-overview-item,
  .excel-info-strip,
  .excel-info-summary,
  .excel-sheet-header,
  .excel-sheet-wrap,
  .ticket-card,
  .vehicle-card,
  .hotel-card,
  .template-card) {
  border: 1px solid var(--gt-line);
  border-radius: var(--gt-radius-panel);
  background: var(--gt-surface);
  box-shadow: var(--gt-shadow-panel);
}

:where(.toolbar,
  .actions,
  .quote-command-controls,
  .quote-list-toolbar,
  .quote-cost-toolbar,
  .quote-form-card-head,
  .excel-actions,
  .excel-sheet-toolbar,
  .excel-quote-tabs,
  .ticket-toolbar,
  .template-actions) {
  gap: 8px;
}

:where(table:not(.voucher-service-table):not(.voucher-extra-table):not(.invoice-pdf table):not(.pdf-table)) {
  border-collapse: separate;
  border-spacing: 0;
}

:where(table:not(.voucher-service-table):not(.voucher-extra-table):not(.invoice-pdf table):not(.pdf-table) th) {
  background: #f5f8fc;
  color: #243a55;
  font-weight: 800;
}

:where(table:not(.voucher-service-table):not(.voucher-extra-table):not(.invoice-pdf table):not(.pdf-table) td,
  table:not(.voucher-service-table):not(.voucher-extra-table):not(.invoice-pdf table):not(.pdf-table) th) {
  border-color: #e1e9f2;
}

.muted,
.small-muted,
.quote-card-note {
  color: var(--gt-muted);
}

.green,
.finance-positive {
  color: var(--gt-green);
}

.red,
.finance-danger,
.finance-warning {
  color: var(--gt-danger);
}

@font-face {
  font-family: "MiSans";
  src: url("/fonts/MiSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("/fonts/MiSans-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("/fonts/MiSans-Semibold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("/fonts/MiSans-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Stable day/month/year presentation for system date controls. */
.ui-date-control {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.ui-date-control > .ui-date-native {
  width: 100%;
  color: transparent;
  caret-color: transparent;
}

.ui-date-control > .ui-date-native::-webkit-datetime-edit,
.ui-date-control > .ui-date-native::-webkit-datetime-edit-fields-wrapper,
.ui-date-control > .ui-date-native::-webkit-datetime-edit-text,
.ui-date-control > .ui-date-native::-webkit-datetime-edit-month-field,
.ui-date-control > .ui-date-native::-webkit-datetime-edit-day-field,
.ui-date-control > .ui-date-native::-webkit-datetime-edit-year-field {
  color: transparent;
}

.ui-date-display {
  position: absolute;
  inset: 0 42px 0 0;
  display: flex;
  align-items: center;
  min-width: 0;
  padding-left: calc(12px * var(--ui-density-scale));
  color: var(--text, #14213d);
  font: inherit;
  pointer-events: none;
  white-space: nowrap;
}

.ui-date-display.is-placeholder {
  color: var(--muted, #73809a);
}
