:root {
  color-scheme: light;
  --font-main: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-family: var(--font-main);
  --blue: #0d63ff;
  --blue-dark: #074ad4;
  --ink: #111b34;
  --muted: #66728a;
  --line: #e5eaf3;
  --soft: #f6f9fe;
  --card: #ffffff;
  --green: #35bd65;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--ink);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 52%, #f9fbff 100%);
  overflow-x: hidden;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-shell {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand img {
  width: 92px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.footer-brand img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  display: block;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #00a4ff, #0c54e8);
  border-radius: 8px;
  transform: rotate(-35deg);
}

.brand-mark svg {
  transform: rotate(35deg);
}

.desktop-nav {
  display: flex;
  gap: 46px;
  align-items: center;
}

.desktop-nav a,
.desktop-nav button {
  color: #2d3950;
  border: 0;
  background: transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

.mobile-menu-panel,
.menu-backdrop {
  display: none;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  max-width: 100%;
}

.app-icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}

.menu-button .app-icon,
.modal-close .app-icon,
.mobile-menu-head button .app-icon,
.icon-button .app-icon,
.mini-qr .app-icon,
.table-tools .app-icon,
.eyebrow .app-icon {
  margin-right: 0;
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: white;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--ink);
}

main {
  flex: 1;
  min-height: 62vh;
}

.hero,
.page-title {
  text-align: center;
  padding: 38px 0 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1,
.page-title h1,
.success-page h1 {
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero p,
.page-title p,
.success-page > p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.input-card,
.summary-card,
.order-card,
.qr-card,
.manual-card,
.process,
.notice-box,
.success-summary,
.invoice-sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(25, 64, 128, 0.08);
}

.input-card {
  padding: 28px 34px 24px;
}

.bulk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.bulk-toolbar h2,
.result-table h2,
.process h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.bulk-toolbar p {
  margin-bottom: 0;
  color: var(--muted);
}

.bulk-import {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

textarea {
  width: 100%;
  min-height: 122px;
  max-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdff;
  padding: 14px;
  outline: none;
  resize: vertical;
  font-weight: 650;
  line-height: 1.55;
}

textarea:focus,
input:focus {
  border-color: #8db9ff;
  box-shadow: 0 0 0 3px rgba(13, 99, 255, 0.1);
}

.keyword-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 220px) 52px;
  gap: 12px;
  align-items: center;
  max-height: 330px;
  overflow-y: auto;
  padding-right: 8px;
}

.keyword-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 220px) 52px;
  gap: 12px;
  align-items: center;
}

.grid-head {
  color: #27344c;
  font-size: 14px;
  font-weight: 800;
}

.grid-head span {
  color: #ef4444;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfdff;
  padding: 0 14px;
  outline: none;
  font-weight: 600;
}

.customer-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.outline-button,
.ghost-button,
.icon-button {
  min-height: 44px;
  border-radius: 8px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
}

.primary-button {
  color: white;
  background: linear-gradient(180deg, #1473ff, #0757e4);
  box-shadow: 0 8px 16px rgba(13, 99, 255, 0.22);
  padding: 0 28px;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.outline-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  background: #f4f7fb;
}

.outline-button,
.ghost-button {
  color: var(--ink);
  background: white;
  border: 1px solid #bfc9d8;
  padding: 0 26px;
}

.icon-button {
  width: 44px;
  color: #526177;
  background: #f3f6fb;
}

.center-button {
  min-width: 190px;
  margin: 22px auto 0;
  display: flex;
}

.result-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  margin-top: 24px;
  align-items: start;
}

.result-table {
  min-width: 0;
}

.table-wrap {
  overflow-x: auto;
  max-height: 430px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1260px;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7fb;
  color: #38465e;
}

td {
  color: #334057;
}

tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.form-error {
  margin: 14px 0 0;
  color: #c02626;
  text-align: center;
  font-weight: 750;
}

.cooldown-note,
.rank-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #0f5db8;
  text-align: center;
  background: #eef6ff;
  border: 1px solid #cfe2ff;
  border-radius: 8px;
  font-weight: 800;
}

.volume-loading-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 19, 45, 0.42);
  backdrop-filter: blur(8px);
}

.volume-loading-card {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 26px;
  background: white;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(9, 19, 45, 0.22);
}

.volume-loading-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #eef6ff;
  border: 1px solid #cfe2ff;
  border-radius: 50%;
}

.volume-loading-spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: 0 0 auto;
  color: var(--blue);
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: volumeLoadingSpin 0.8s linear infinite;
}

.primary-button .volume-loading-spinner {
  width: 17px;
  height: 17px;
  color: white;
  border-width: 2px;
}

.volume-loading-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.volume-loading-copy strong {
  display: block;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.35;
}

.volume-loading-copy p {
  margin: 7px 0 16px;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 650;
}

.volume-loading-progress {
  height: 6px;
  overflow: hidden;
  background: #e6effd;
  border-radius: 999px;
}

.volume-loading-progress span {
  width: 42%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #0d63ff, #66a3ff);
  border-radius: inherit;
  animation: volumeLoadingProgress 1.3s ease-in-out infinite;
}

.volume-loading-meta {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: #60708a;
  font-size: 13px;
  font-weight: 700;
}

.volume-loading-meta span:first-child {
  color: #0f5db8;
  font-weight: 850;
}

@keyframes volumeLoadingSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes volumeLoadingProgress {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(340%);
  }
}

@media (max-width: 600px) {
  .volume-loading-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }

  .volume-loading-icon {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .volume-loading-spinner,
  .volume-loading-progress span {
    animation: none;
  }

  .volume-loading-progress span {
    width: 100%;
    opacity: 0.72;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 19, 45, 0.42);
  backdrop-filter: blur(8px);
}

.customer-modal {
  width: min(520px, 100%);
  padding: 28px;
  background: white;
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(9, 19, 45, 0.22);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0 0 6px;
  color: #111b34;
  font-size: 26px;
}

.modal-head p {
  margin: 0;
  color: #66728a;
  font-weight: 700;
}

.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #526176;
  background: #fbfdff;
}

.customer-modal label {
  display: block;
  margin-bottom: 14px;
}

.customer-modal label span {
  display: block;
  margin-bottom: 7px;
  color: #25324a;
  font-weight: 850;
}

.customer-modal small {
  display: block;
  margin-top: 6px;
  color: #c02626;
  font-weight: 750;
}

.modal-submit {
  width: 100%;
  margin-top: 6px;
}

.modal-error {
  margin: 4px 0 12px;
  text-align: left;
}

.expired-quote-sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 48px;
}

.expired-quote-sheet .public-quote-top {
  min-height: 0;
  margin-bottom: 18px;
  padding-top: 0;
}

.expired-quote-sheet .public-quote-top h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
}

.expired-quote-sheet .public-quote-top p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.expired-quote-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin: 20px auto 0;
}

.expired-quote-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.expired-quote-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 750;
}

.expired-quote-form .primary-button {
  margin-top: 8px;
  padding: 12px 16px;
  font-size: 16px;
}

.summary-card {
  padding: 28px 24px;
}

.summary-card h3 {
  font-size: 18px;
}

.summary-card strong {
  display: block;
  color: var(--blue);
  font-size: 27px;
  margin: 12px 0 18px;
}

.summary-card p {
  color: var(--muted);
  font-weight: 650;
  line-height: 1.6;
}

.summary-card .primary-button {
  width: 100%;
}

.process {
  margin-top: 34px;
  margin-bottom: 10px;
  padding: 26px 30px 30px;
}

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

.process article {
  position: relative;
  text-align: center;
  padding: 10px 16px 0;
}

.process-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: var(--blue);
  background: #edf4ff;
  border-radius: 50%;
}

.process h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.process p {
  color: #536176;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.step-arrow {
  position: absolute;
  right: -16px;
  top: 30px;
  color: #acc1e5;
  font-size: 28px;
}

.payment-page {
  padding-bottom: 36px;
}

.payment-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
}

.order-card,
.qr-card,
.manual-card {
  padding: 24px;
}

.order-card .table-wrap {
  margin: 18px 0;
}

.order-card table {
  min-width: 560px;
}

.order-card th:nth-child(3),
.order-card th:nth-child(4),
.order-card th:nth-child(5),
.order-card th:nth-child(6),
.order-card th:nth-child(7),
.order-card th:nth-child(8),
.order-card td:nth-child(3),
.order-card td:nth-child(4),
.order-card td:nth-child(5),
.order-card td:nth-child(6),
.order-card td:nth-child(7),
.order-card td:nth-child(8) {
  display: none;
}

.pay-column {
  display: grid;
  gap: 14px;
}

.qr-card {
  text-align: center;
}

.qr-card h2,
.manual-card h2,
.order-card h2 {
  text-align: left;
  font-size: 21px;
  margin-bottom: 12px;
}

.qr-card p {
  text-align: left;
  color: var(--muted);
  font-weight: 650;
}

.qr-box {
  width: 208px;
  height: 208px;
  display: grid;
  place-items: center;
  margin: 10px auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #526176;
  font-weight: 800;
}

.payment-status span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(53, 189, 101, 0.12);
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  color: #526176;
  font-weight: 700;
}

.info-row b {
  color: #1f2a40;
  text-align: right;
}

.info-row.strong b {
  color: var(--blue);
  font-size: 22px;
}

.total-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
}

.notice-box {
  display: flex;
  gap: 12px;
  margin: 28px 0 18px;
  padding: 18px 22px;
  color: #1f57af;
  background: #f6faff;
}

.notice-box p {
  margin: 6px 0 0;
  color: #4d5c72;
  font-weight: 650;
}

.success-page {
  position: relative;
  min-height: 500px;
  padding: 48px 0 72px;
  text-align: center;
  overflow: hidden;
}

.success-icon {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: white;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(53, 189, 101, 0.28);
}

.success-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(680px, 100%);
  margin: 28px auto 24px;
  padding: 24px 0;
}

.info-block {
  padding: 0 18px;
  border-right: 1px solid var(--line);
}

.info-block:last-child {
  border-right: 0;
}

.info-block span {
  display: block;
  color: #6b7688;
  margin-bottom: 10px;
  font-weight: 750;
}

.info-block strong {
  color: #18243a;
  font-size: 18px;
}

.info-block .highlight {
  color: var(--blue);
}

.success-actions,
.invoice-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.confetti span {
  position: absolute;
  top: 20px;
  left: calc(18% + var(--x, 0) * 2%);
  width: 6px;
  height: 6px;
  background: hsl(calc(var(--x, 1) * 34), 80%, 58%);
  border-radius: 2px;
  transform: translateY(calc(var(--y, 1) * 14px)) rotate(calc(var(--x, 1) * 24deg));
}

.confetti span:nth-child(1n) { --x: 1; --y: 5; }
.confetti span:nth-child(2n) { --x: 8; --y: 1; }
.confetti span:nth-child(3n) { --x: 15; --y: 4; }
.confetti span:nth-child(4n) { --x: 22; --y: 7; }
.confetti span:nth-child(5n) { --x: 30; --y: 2; }

.invoice-page {
  padding: 28px 0 34px;
}

.invoice-sheet {
  padding: 34px 48px 44px;
}

.invoice-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.invoice-head h1 {
  text-align: right;
  font-size: 30px;
  margin-bottom: 8px;
}

.invoice-head h2 {
  font-size: 18px;
}

.invoice-head p,
.invoice-bottom p {
  margin-bottom: 7px;
  color: #44536b;
  font-weight: 650;
}

.invoice-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin: 24px 0 18px;
}

.invoice-bottom {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  margin-top: 22px;
}

.invoice-totals .strong b {
  font-size: 24px;
}

.stamp {
  width: 98px;
  height: 98px;
  margin: 28px auto 0;
  display: grid;
  place-items: center;
  color: #ef4b5a;
  border: 4px double #ef4b5a;
  border-radius: 50%;
  font-weight: 900;
  text-align: center;
  transform: rotate(-12deg);
}

.invoice-actions {
  margin-top: 28px;
}

.public-quote-page {
  padding: 34px 0 44px;
}

.public-quote-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.public-quote-mode {
  background: #f8fbff;
}

.public-quote-mode main {
  padding: 0;
}

.public-quote-sheet {
  color: #111;
}

.public-quote-top {
  position: relative;
  text-align: center;
  margin-bottom: 22px;
  min-height: 86px;
  padding-top: 4px;
}

.public-quote-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.public-quote-top h1 {
  font-size: 34px;
  text-transform: uppercase;
}

.public-quote-top p {
  color: #111;
  font-size: 17px;
  font-weight: 650;
}

.public-quote-top span {
  display: inline-block;
  min-width: 38px;
  border-bottom: 2px dashed #111;
  text-align: center;
}

.public-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 18px;
}

.public-info-box {
  min-width: 0;
  padding: 12px 14px;
  color: #111;
  border: 1px solid #111;
  background: #fff;
}

.public-info-box h2 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #111;
  font-size: 15px;
  text-transform: uppercase;
}

.public-info-box p {
  margin: 5px 0;
  font-weight: 650;
  line-height: 1.35;
}

.public-quote-table-block .table-wrap {
  border: 1px solid #111;
  border-bottom: 0;
  border-radius: 0;
  max-height: none;
  overflow: visible;
}

.public-quote-table-block table {
  min-width: 0;
  table-layout: fixed;
}

.public-quote-table-block th,
.public-quote-table-block td {
  border-color: #111;
}

.public-quote-table-block th {
  background: #f4f6f9;
}

.public-quote-table-block th:nth-child(1),
.public-quote-table-block td:nth-child(1) {
  width: 3%;
  text-align: center;
}

.public-quote-table-block th:nth-child(2),
.public-quote-table-block td:nth-child(2) {
  width: 26%;
}

.public-quote-table-block th:nth-child(3),
.public-quote-table-block td:nth-child(3) {
  width: 6%;
}

.public-quote-table-block th:nth-child(4),
.public-quote-table-block td:nth-child(4) {
  width: 5%;
}

.public-quote-table-block th:nth-child(5),
.public-quote-table-block td:nth-child(5) {
  width: 6%;
}

.public-quote-table-block th:nth-child(6),
.public-quote-table-block td:nth-child(6),
.public-quote-table-block th:nth-child(7),
.public-quote-table-block td:nth-child(7),
.public-quote-table-block th:nth-child(8),
.public-quote-table-block td:nth-child(8) {
  width: 10.5%;
}

.public-quote-table-block th:nth-child(9),
.public-quote-table-block td:nth-child(9) {
  width: 12%;
}

.public-quote-table-block th:nth-child(10),
.public-quote-table-block td:nth-child(10) {
  width: 10.5%;
}

.public-quote-table-block .money-cell {
  display: inline-block;
  white-space: nowrap;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(2),
.public-quote-table-block table.has-maintenance-column td:nth-child(2) {
  width: 23%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(3),
.public-quote-table-block table.has-maintenance-column td:nth-child(3) {
  width: 5%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(4),
.public-quote-table-block table.has-maintenance-column td:nth-child(4) {
  width: 4%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(5),
.public-quote-table-block table.has-maintenance-column td:nth-child(5) {
  width: 5%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(6),
.public-quote-table-block table.has-maintenance-column td:nth-child(6),
.public-quote-table-block table.has-maintenance-column th:nth-child(7),
.public-quote-table-block table.has-maintenance-column td:nth-child(7),
.public-quote-table-block table.has-maintenance-column th:nth-child(8),
.public-quote-table-block table.has-maintenance-column td:nth-child(8) {
  width: 9%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(9),
.public-quote-table-block table.has-maintenance-column td:nth-child(9) {
  width: 11%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(10),
.public-quote-table-block table.has-maintenance-column td:nth-child(10) {
  width: 8%;
}

.public-quote-table-block table.has-maintenance-column th:nth-child(11),
.public-quote-table-block table.has-maintenance-column td:nth-child(11) {
  width: 10%;
}

.public-total-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  color: #111;
  font-size: 18px;
  border: 1px solid #111;
}

.public-total-table td {
  border: 1px solid #111;
  padding: 10px 12px;
}

.public-total-label-col {
  width: 56%;
}

.public-total-money-col {
  width: 22%;
}

.public-total-table td:nth-child(2),
.public-total-table td:last-child {
  text-align: right;
}

.public-total-table td:nth-child(2),
.public-total-table td:last-child {
  font-weight: 800;
  white-space: nowrap;
}

.public-grand-total td,
.public-grand-total td:last-child {
  color: #d00000;
  font-weight: 900;
}

.public-total-table strong {
  font-weight: 900;
}

.public-total-table .amount-words-row td {
  border: 1px solid #111;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  text-align: left;
}

.quote-valid-note {
  margin-top: 12px;
  font-size: 14px;
  font-style: italic;
  font-weight: 800;
  color: #ff0000;
}

.public-quote-terms {
  margin-top: 14px;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  line-height: 1.35;
}

.public-quote-terms h2,
.public-quote-terms h3,
.public-quote-terms p {
  margin: 4px 0;
}

.public-quote-terms h2 {
  margin-top: 28px;
  font-size: 21px;
  font-weight: 800;
}

.public-quote-terms h3 {
  font-size: 20px;
  font-weight: 800;
}

.public-quote-terms .quote-valid-note {
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.35;
}

.quote-red-line {
  color: #ff0000;
  font-weight: 800;
}

.quote-indent {
  padding-left: 88px;
}

.quote-italic-strong {
  font-style: italic;
  font-weight: 800;
}

.quote-section-spaced {
  margin-top: 26px !important;
}

.quote-feedback-card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #dbe7f7;
  border-radius: 10px;
  background: #f8fbff;
  font-family: var(--font-main);
}

.quote-feedback-card.is-accepted {
  border-color: #9ee0bd;
  background: linear-gradient(180deg, #f1fff7, #ffffff);
}

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

.quote-feedback-head strong {
  color: #16a05c;
  font-size: 14px;
}

.quote-accept-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111b34;
  font-weight: 900;
  cursor: pointer;
}

.quote-accept-check input {
  width: 19px;
  height: 19px;
  accent-color: #1768ff;
}

.quote-note-field {
  display: grid;
  gap: 7px;
  color: #5f6f89;
  font-weight: 800;
}

.quote-note-field textarea {
  min-height: 92px;
  resize: vertical;
  border: 1px solid #dbe7f7;
  border-radius: 8px;
  padding: 11px 12px;
  color: #111b34;
  background: white;
  font: 14px/1.45 var(--font-main);
}

.quote-feedback-card .primary-button {
  margin-top: 12px;
}

.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 180px minmax(150px, 1fr) minmax(170px, 1fr) minmax(260px, 1.35fr);
  gap: 34px;
  padding: 34px 0 22px;
  align-items: start;
}

.footer-logo-panel {
  display: flex;
  align-items: flex-start;
}

.footer-brand {
  color: var(--ink);
  font-size: 17px;
}

.footer-section {
  min-width: 0;
}

.site-footer p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: #536176;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.site-footer h3 {
  margin-bottom: 14px;
  font-size: 16px;
  color: #101a32;
}

.socials {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  color: #40506a;
}

.copyright {
  justify-content: center;
  margin: 0;
  padding: 14px 20px 20px;
  font-size: 13px;
  text-align: center;
}

/* New quote dashboard layout */
.container {
  width: min(1680px, calc(100% - 150px));
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
}

.nav-shell {
  height: 68px;
}

.brand {
  font-size: 40px;
}

.brand-mark {
  width: 36px;
  height: 30px;
  border-radius: 9px;
}

.desktop-nav {
  gap: 42px;
  height: 100%;
}

.desktop-nav a,
.desktop-nav button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  color: #17213b;
  font-size: 16px;
}

.desktop-nav button:first-child {
  color: var(--blue);
}

.desktop-nav button:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
}

.quote-page {
  padding-bottom: 22px;
  background:
    radial-gradient(circle at 78% 12%, rgba(84, 139, 255, 0.13), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 48%, #f8fbff 100%);
}

.quote-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 40px;
  align-items: center;
  padding: 38px 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: #4d7dff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
}

.eyebrow i {
  width: 12px;
  height: 12px;
  background: #9bb8ff;
  border-radius: 50%;
}

.quote-hero h1 {
  margin: 0 0 12px;
  color: #09132d;
  font-size: clamp(40px, 3.1vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
}

.quote-hero p {
  margin-bottom: 4px;
  color: #4c5874;
  font-size: 18px;
  font-weight: 700;
}

.hero-art {
  position: relative;
  min-height: 220px;
  isolation: isolate;
  transform: translateZ(0);
  animation: hero-art-float 14s cubic-bezier(.42, 0, .18, 1) infinite;
  will-change: transform;
}

.hero-glow {
  position: absolute;
  right: 20px;
  top: -4px;
  width: 330px;
  height: 200px;
  background:
    radial-gradient(circle at 74% 24%, rgba(13, 99, 255, 0.2), transparent 32%),
    radial-gradient(circle at 40% 62%, rgba(143, 178, 255, 0.24), transparent 42%);
  filter: blur(16px);
  opacity: 0.72;
  animation: hero-glow-soft 10s ease-in-out infinite;
  will-change: opacity, transform;
  z-index: -1;
}

.chart-card {
  position: absolute;
  right: 78px;
  top: 50px;
  width: 205px;
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 13px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #dce7ff;
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(35, 83, 163, 0.14);
  transform: translate3d(0, 0, 0);
  animation: chart-card-drift 8.5s cubic-bezier(.42, 0, .18, 1) infinite;
  will-change: transform;
}

.chart-card span {
  width: 27px;
  background: linear-gradient(180deg, #a9c5ff 0%, #2f6df0 100%);
  border-radius: 10px;
  transform-origin: bottom;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 16px rgba(47, 109, 240, 0.14);
}

.chart-card span:nth-child(1) { height: 48px; animation-delay: 0s; }
.chart-card span:nth-child(2) { height: 64px; animation-delay: 0.16s; }
.chart-card span:nth-child(3) { height: 82px; animation-delay: 0.32s; }
.chart-card span:nth-child(4) { height: 100px; animation-delay: 0.48s; }

.bubble {
  position: absolute;
  display: grid;
  place-items: center;
  color: #2d67ed;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #dce7ff;
  border-radius: 50%;
  box-shadow: 0 14px 32px rgba(35, 83, 163, 0.15);
  transform: translate3d(0, 0, 0);
}

.search-bubble {
  right: 28px;
  top: 18px;
  width: 96px;
  height: 96px;
  box-shadow: 0 18px 38px rgba(35, 83, 163, 0.16);
  animation: bubble-search-drift 9.2s cubic-bezier(.42, 0, .18, 1) infinite;
}

.money-bubble {
  right: 24px;
  bottom: 24px;
  width: 72px;
  height: 72px;
  font-size: 32px;
  font-weight: 900;
  animation: bubble-money-drift 10.4s cubic-bezier(.42, 0, .18, 1) infinite;
}

.hero-art > i {
  position: absolute;
  width: 13px;
  height: 13px;
  background: #9bb8ff;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(155, 184, 255, 0.1);
  animation: dot-breathe 7.5s ease-in-out infinite;
  will-change: opacity, transform;
}

.hero-art > i:nth-of-type(1) { right: 354px; bottom: 60px; }
.hero-art > i:nth-of-type(2) { right: 6px; top: 62px; animation-delay: 1.1s; }
.hero-art > i:nth-of-type(3) { right: 70px; top: 42px; animation-delay: 2.2s; }
.hero-art > i:nth-of-type(4) { right: 292px; top: 96px; width: 9px; height: 9px; animation-delay: 3.1s; }
.hero-art > i:nth-of-type(5) { right: 410px; top: 138px; width: 8px; height: 8px; animation-delay: 4s; }

.spark {
  position: absolute;
  width: 34px;
  height: 34px;
  color: #4f80ff;
  opacity: 0.72;
  animation: spark-slow-spin 13s linear infinite;
  will-change: transform;
}

.spark::before,
.spark::after {
  content: "";
  position: absolute;
  inset: 15px 0 auto;
  height: 4px;
  background: currentColor;
  border-radius: 999px;
}

.spark::after {
  transform: rotate(90deg);
}

.spark-one {
  right: 318px;
  top: 26px;
}

.spark-two {
  right: 135px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  color: #8dacff;
  animation-duration: 16s;
  animation-direction: reverse;
}

@keyframes hero-art-float {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-2px, -5px, 0);
  }
}

@keyframes chart-card-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(-0.3deg);
  }
  50% {
    transform: translate3d(-5px, -10px, 0) rotate(0.5deg);
  }
}

@keyframes bubble-search-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate3d(7px, -8px, 0) rotate(3deg) scale(1.02);
  }
}

@keyframes bubble-money-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-6px, 7px, 0) scale(1.035);
  }
}

@keyframes hero-glow-soft {
  0%, 100% {
    opacity: 0.66;
    transform: translate3d(0, 0, 0) scale(0.98);
  }
  50% {
    opacity: 0.86;
    transform: translate3d(0, -4px, 0) scale(1.03);
  }
}

@keyframes dot-breathe {
  0%, 100% {
    opacity: 0.55;
    transform: translate3d(0, 0, 0) scale(0.96);
  }
  50% {
    opacity: 0.9;
    transform: translate3d(3px, -4px, 0) scale(1.06);
  }
}

@keyframes spark-slow-spin {
  from {
    transform: rotate(0deg) scale(0.92);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
  }
  to {
    transform: rotate(360deg) scale(0.92);
  }
}

.cursor-sparkle {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--spark-size, 9px);
  height: var(--spark-size, 9px);
  color: var(--spark-color, #4f80ff);
  pointer-events: none;
  z-index: 9999;
  filter: drop-shadow(0 4px 8px rgba(47, 109, 240, 0.16));
  transform: translate(-50%, -50%);
  animation: cursor-sparkle 560ms ease-out forwards;
  will-change: transform, opacity;
}

.cursor-sparkle::before,
.cursor-sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 22%;
  background: currentColor;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.cursor-sparkle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

@keyframes cursor-sparkle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(0deg);
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--spark-x, 0px)), calc(-50% + var(--spark-y, -24px))) scale(1.18) rotate(95deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-card,
  .chart-card span,
  .bubble,
  .hero-art > i,
  .hero-glow,
  .spark,
  .cursor-sparkle {
    animation: none;
  }
}

@media (pointer: coarse) {
  .cursor-sparkle {
    display: none;
  }
}

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

.quote-input-card,
.quote-summary-card,
.new-table-card,
.trust-strip {
  border: 1px solid #dfe8f6;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(34, 62, 108, 0.08);
}

.quote-input-card {
  padding: 24px 28px 30px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: #0d63ff;
}

.section-title h2 {
  margin: 0;
  color: #111b34;
  font-size: 24px;
  letter-spacing: 0;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 8px;
  margin-bottom: 14px;
  max-width: 100%;
}

.mode-tabs button {
  height: 38px;
  border: 1px solid #dce5f2;
  background: #fbfdff;
  color: #526176;
  font-weight: 800;
}

.mode-tabs button:first-child {
  border-radius: 8px;
}

.mode-tabs button:last-child {
  border-radius: 8px;
}

.mode-tabs .active {
  color: var(--blue);
  background: white;
  box-shadow: inset 0 0 0 1px #bed3ff;
}

.input-help {
  margin-bottom: 8px;
  color: #68748b;
  font-weight: 700;
}

.website-field {
  position: relative;
  margin-bottom: 14px;
}

.website-field input {
  padding-right: 50px;
}

.website-help-button {
  position: absolute;
  right: 10px;
  top: 7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #64748b;
  background: #eef4ff;
}

.website-hint {
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 3;
  width: min(290px, 92vw);
  padding: 8px 10px;
  color: #24324a;
  background: white;
  border: 1px solid #dce7f7;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17, 27, 52, 0.12);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  pointer-events: none;
}

.website-help-button:hover + .website-hint,
.website-help-button:focus-visible + .website-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.extension-guide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 0;
  margin: 0;
  padding: 0 14px;
  overflow: hidden;
  opacity: 0;
  color: #526176;
  background: #f7faff;
  border: 1px solid #dce7f7;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 750;
  transform-origin: top;
  transition: max-height 260ms ease, opacity 180ms ease, margin 260ms ease, padding 260ms ease;
}

.extension-guide.is-open {
  max-height: 180px;
  margin: -4px 0 14px;
  padding: 12px 14px;
  opacity: 1;
}

.extension-guide strong {
  color: #17223a;
  font-size: 15px;
}

.extension-download {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 900;
}

.bulk-textarea {
  min-height: 158px;
  max-height: 210px;
  font-size: 17px;
  line-height: 1.55;
}

.inline-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 10px 14px;
  color: #68748b;
  background: #f7faff;
  border: 1px solid #e3ebf7;
  border-radius: 8px;
  font-weight: 700;
}

.quote-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.quote-actions > div {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-actions .primary-button {
  min-width: 210px;
}

.quote-actions .outline-button {
  padding: 0 18px;
}

.customer-strip.slim {
  margin-top: 16px;
}

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

.quote-summary-card {
  padding: 24px 28px;
}

.quote-summary-card h2,
.quote-summary-card h3,
.quote-summary-card p,
.quote-summary-card strong {
  margin: 0;
}

.quote-summary-card > strong {
  display: inline;
  color: inherit;
  font-size: inherit;
}

.quote-summary-card .info-row {
  padding: 7px 0;
  font-size: 16px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  font-weight: 900;
}

.summary-total strong {
  color: var(--blue);
  font-size: 25px;
}

.full-button {
  width: 100%;
  margin-bottom: 10px;
}

.mini-qr-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
}

.mini-qr-card > div:last-child {
  min-width: 0;
}

.mini-qr {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e8f2;
  border-radius: 6px;
  overflow: hidden;
  justify-self: center;
}

.mini-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-qr-card strong,
.mini-qr-card b {
  display: block;
  color: #101b33;
  font-weight: 900;
}

.mini-qr-card p {
  margin: 5px 0 2px;
  color: #68748b;
  font-weight: 700;
}

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

.mini-qr-card span {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 5px 12px;
  color: #1aa060;
  background: #e7f8ef;
  border-radius: 999px;
  font-weight: 800;
}

.copy-order-button {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding: 5px 12px;
  color: #1aa060;
  background: #e7f8ef;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}

.copy-order-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.copy-status {
  display: block;
  margin-top: 6px;
  color: #1aa060;
  font-style: normal;
  font-weight: 800;
}

.new-table-card {
  margin-top: 18px;
  padding: 20px 28px 8px;
  background: white;
}

.table-headline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 8px;
}

.table-tools {
  display: flex;
  gap: 12px;
  align-items: center;
}

.table-tools label {
  position: relative;
  display: block;
  width: min(360px, 48vw);
}

.table-tools label svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8491a7;
}

.table-tools input {
  padding-right: 48px;
}

.quote-link-button {
  height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

.new-table-card .table-wrap {
  max-height: 360px;
  box-shadow: none;
}

.new-table-card table {
  min-width: 1320px;
}

.new-table-card th,
.new-table-card td {
  padding: 10px 16px;
  font-size: 15px;
}

.result-link {
  color: #1464ff;
  font-weight: 900;
  text-decoration: none;
}

.result-link:hover {
  text-decoration: underline;
}

.time-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

tfoot td {
  background: #f6f9ff;
  color: #0f1a33;
  font-weight: 900;
}

.trust-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-top: 18px;
  padding: 20px;
  background: #f7fbff;
}

.trust-strip article {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 36px;
  border-right: 1px solid #bfd0f3;
}

.trust-strip article:last-child {
  border-right: 0;
}

.trust-strip svg {
  flex: 0 0 auto;
  color: var(--blue);
}

.trust-strip strong {
  display: block;
  margin-bottom: 4px;
  color: #17213b;
  font-size: 17px;
}

.trust-strip p {
  margin: 0;
  color: #59667e;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .container {
    width: min(100% - 40px, 1120px);
  }

  .quote-hero,
  .workspace-layout {
    grid-template-columns: 1fr;
  }

  .quote-summary-card {
    max-width: 760px;
  }

  .quote-hero h1 {
    white-space: normal;
  }

  .hero-art {
    width: min(560px, 100%);
    min-height: 270px;
    justify-self: center;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }

  .trust-strip article {
    border-right: 0;
    border-bottom: 1px solid #bfd0f3;
    padding: 16px;
  }

  .trust-strip article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .container {
    width: min(100% - 26px, 720px);
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .desktop-nav {
    display: none;
  }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    border: 0;
    background: rgba(9, 19, 45, 0.42);
    backdrop-filter: blur(4px);
  }

  .mobile-menu-panel {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    width: min(315px, 86vw);
    min-height: 100vh;
    min-height: 100dvh;
    padding: 20px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-right: 1px solid var(--line);
    box-shadow: 20px 0 48px rgba(9, 19, 45, 0.18);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .mobile-menu-panel.open {
    transform: translateX(0);
  }

  .mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-menu-head img {
    width: 70px;
    height: 48px;
    object-fit: contain;
  }

  .mobile-menu-head button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #526176;
    background: #fbfdff;
  }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    padding-top: 20px;
  }

  .mobile-nav a,
  .mobile-nav button {
    position: relative;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 0 18px;
    border: 0;
    border-radius: 8px;
    text-align: left;
    height: auto;
    color: #1f2a40;
    background: transparent;
    text-decoration: none;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: 0;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  }

  .mobile-nav a:hover,
  .mobile-nav button:hover {
    color: var(--blue);
    background: rgba(13, 99, 255, 0.06);
  }

  .mobile-nav button:first-child {
    color: var(--blue);
    background: rgba(13, 99, 255, 0.08);
  }

  .mobile-nav button:first-child::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 13px;
    bottom: 13px;
    width: 3px;
    background: var(--blue);
    border-radius: 999px;
  }

  .mobile-nav a svg {
    flex: 0 0 auto;
  }

  .desktop-nav button:first-child::after {
    display: none;
  }

  .quote-hero {
    gap: 12px;
    padding-top: 22px;
  }

  .quote-hero h1 {
    font-size: clamp(32px, 8vw, 44px);
  }

  .hero-art {
    display: none;
  }

  .mode-tabs {
    grid-template-columns: 1fr 1fr;
  }

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

  .quote-actions > div,
  .quote-actions .primary-button,
  .quote-actions .outline-button {
    width: 100%;
  }

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

  .quote-actions > div .outline-button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .new-table-card {
    padding: 18px 16px 16px;
  }

  .table-headline,
  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .table-tools label,
  .table-tools .outline-button {
    width: 100%;
  }

  .keyword-grid {
    grid-template-columns: 1fr 120px 44px;
  }

  .keyword-row {
    grid-template-columns: 1fr 120px 44px;
  }

  .grid-head:nth-child(3) {
    display: none;
  }

  .bulk-import {
    grid-template-columns: 1fr;
  }

  .customer-strip,
  .result-layout,
  .payment-layout,
  .process-grid,
  .footer-grid,
  .invoice-head,
  .invoice-meta,
  .invoice-bottom {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 26px 0 12px;
  }

  .footer-logo-panel {
    grid-column: 1 / -1;
    justify-content: center;
    padding-bottom: 4px;
  }

  .footer-brand img {
    width: 86px;
    height: 86px;
  }

  .step-arrow {
    display: none;
  }

  .payment-layout {
    gap: 18px;
  }

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

  .info-block {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .info-block:last-child {
    border-bottom: 0;
  }

  .invoice-head h1 {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 20px, 520px);
  }

  .nav-shell {
    height: 60px;
  }

  .brand {
    font-size: 24px;
  }

  .brand img {
    width: 76px;
    height: 44px;
  }

  .hero h1,
  .page-title h1,
  .success-page h1 {
    font-size: 30px;
  }

  .quote-hero h1 {
    font-size: clamp(27px, 8.2vw, 32px);
  }

  .eyebrow {
    gap: 8px;
    font-size: 13px;
    letter-spacing: 1px;
  }

  .input-card,
  .invoice-sheet,
  .order-card,
  .qr-card,
  .manual-card,
  .quote-input-card,
  .quote-summary-card {
    padding: 18px;
  }

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

  .section-title h2,
  .modal-head h2 {
    font-size: 21px;
  }

  .mode-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mode-tabs button:first-child,
  .mode-tabs button:last-child {
    border-radius: 8px;
    border: 1px solid #dce5f2;
  }

  .mode-tabs button:last-child {
    border-top: 1px solid #dce5f2;
  }

  .inline-note {
    align-items: flex-start;
  }

  .bulk-toolbar {
    flex-direction: column;
  }

  .bulk-import .primary-button {
    width: 100%;
  }

  .keyword-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-right: 0;
    max-height: 360px;
  }

  .keyword-grid > .grid-head {
    display: none;
  }

  .keyword-row {
    grid-template-columns: minmax(0, 1fr) 96px 46px;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dfe8f6;
    border-radius: 8px;
    background: #fbfdff;
  }

  .keyword-row .keyword-input {
    grid-column: 1 / -1;
  }

  .keyword-row .volume-input {
    grid-column: 1 / 3;
  }

  .keyword-row .icon-button {
    grid-column: 3 / 4;
    width: 46px;
  }

  th,
  td {
    padding: 13px 12px;
  }

  .new-table-card {
    padding: 16px;
  }

  .new-table-card .section-title {
    margin-bottom: 14px;
  }

  .new-table-card .section-title h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  .new-table-card .table-wrap {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .new-table-card table,
  .order-card table,
  .invoice-sheet table {
    min-width: 0;
  }

  .new-table-card table,
  .new-table-card thead,
  .new-table-card tbody,
  .new-table-card tfoot,
  .new-table-card tr,
  .new-table-card th,
  .new-table-card td {
    display: block;
    width: 100%;
  }

  .new-table-card thead {
    display: none;
  }

  .new-table-card tbody {
    display: grid;
    gap: 12px;
  }

  .new-table-card tbody tr {
    padding: 12px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(34, 62, 108, 0.06);
  }

  .new-table-card tbody td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f8;
    font-size: 14px;
  }

  .new-table-card tbody td::before {
    content: attr(data-label);
    color: #68748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .new-table-card tbody td:first-child {
    display: none;
  }

  .new-table-card tbody td:nth-child(2) {
    display: block;
    padding-top: 0;
    color: #101a32;
    font-size: 16px;
    font-weight: 900;
  }

  .new-table-card tbody td:nth-child(2)::before {
    display: block;
    margin-bottom: 4px;
  }

  .new-table-card tbody td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .new-table-card tfoot {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #f6f9ff;
  }

  .new-table-card tfoot tr,
  .new-table-card tfoot td {
    background: transparent;
  }

  .new-table-card tfoot td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #dfe8f6;
  }

  .new-table-card tfoot td::before {
    content: attr(data-label);
    color: #68748b;
    font-weight: 850;
  }

  .new-table-card tfoot td:empty {
    display: none;
  }

  .new-table-card tfoot td:last-child {
    border-bottom: 0;
  }

  .time-cell {
    justify-content: flex-end;
    text-align: right;
  }

  .summary-card strong {
    font-size: 23px;
  }

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

  .mini-qr-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mini-qr {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }

  .mini-qr-card p,
  .mini-qr-card strong,
  .mini-qr-card b {
    text-align: center;
  }

  .copy-order-button {
    margin-left: auto;
    margin-right: auto;
  }

  .copy-order-button {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .center-button,
  .summary-card .primary-button {
    width: 100%;
  }

  .customer-modal {
    padding: 20px;
  }

  .modal-head {
    gap: 12px;
  }

  .success-actions,
  .invoice-actions {
    gap: 12px;
  }

  .success-actions .primary-button,
  .success-actions .outline-button,
  .invoice-actions .primary-button,
  .invoice-actions .outline-button {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 0 8px;
  }

  .footer-logo-panel {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .footer-brand img {
    width: 72px;
    height: 72px;
  }

  .footer-section {
    padding: 14px 0;
    border-top: 1px solid #e6edf7;
  }

  .site-footer h3 {
    margin-bottom: 10px;
  }

  .site-footer p {
    align-items: flex-start;
    margin-bottom: 8px;
    font-size: 14px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 10mm;
  }

  .site-header,
  .site-footer,
  #chat-root,
  .live-chat,
  .public-quote-actions,
  .invoice-actions,
  .success-actions {
    display: none !important;
  }

  body {
    background: white;
  }

  .container {
    width: 100%;
  }

  .invoice-sheet {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .public-quote-page {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .public-quote-sheet {
    width: 100%;
  }

  .public-quote-logo {
    width: 62px;
    height: 62px;
  }

  .public-quote-sheet .table-wrap {
    max-height: none;
    overflow: visible;
    border-radius: 0;
  }

  .public-quote-table-block table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .public-quote-table-block th,
  .public-quote-table-block td {
    padding: 7px 6px;
    font-size: 10px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .public-quote-table-block th:nth-child(1),
  .public-quote-table-block td:nth-child(1) {
    width: 3%;
    text-align: center;
  }

  .public-quote-table-block th:nth-child(2),
  .public-quote-table-block td:nth-child(2) {
    width: 26%;
  }

  .public-quote-table-block th:nth-child(3),
  .public-quote-table-block td:nth-child(3),
  .public-quote-table-block th:nth-child(4),
  .public-quote-table-block td:nth-child(4),
  .public-quote-table-block th:nth-child(5),
  .public-quote-table-block td:nth-child(5) {
    width: 6%;
  }

  .public-quote-table-block th:nth-child(6),
  .public-quote-table-block td:nth-child(6),
  .public-quote-table-block th:nth-child(7),
  .public-quote-table-block td:nth-child(7),
  .public-quote-table-block th:nth-child(8),
  .public-quote-table-block td:nth-child(8) {
    width: 10.5%;
  }

  .public-quote-table-block th:nth-child(9),
  .public-quote-table-block td:nth-child(9) {
    width: 12%;
  }

  .public-quote-table-block th:nth-child(10),
  .public-quote-table-block td:nth-child(10) {
    width: 10.5%;
  }

  .public-quote-table-block .money-cell {
    white-space: nowrap;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(2),
  .public-quote-table-block table.has-maintenance-column td:nth-child(2) {
    width: 23%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(3),
  .public-quote-table-block table.has-maintenance-column td:nth-child(3) {
    width: 5%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(4),
  .public-quote-table-block table.has-maintenance-column td:nth-child(4) {
    width: 4%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(5),
  .public-quote-table-block table.has-maintenance-column td:nth-child(5) {
    width: 5%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(6),
  .public-quote-table-block table.has-maintenance-column td:nth-child(6),
  .public-quote-table-block table.has-maintenance-column th:nth-child(7),
  .public-quote-table-block table.has-maintenance-column td:nth-child(7),
  .public-quote-table-block table.has-maintenance-column th:nth-child(8),
  .public-quote-table-block table.has-maintenance-column td:nth-child(8) {
    width: 9%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(9),
  .public-quote-table-block table.has-maintenance-column td:nth-child(9) {
    width: 11%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(10),
  .public-quote-table-block table.has-maintenance-column td:nth-child(10) {
    width: 8%;
  }

  .public-quote-table-block table.has-maintenance-column th:nth-child(11),
  .public-quote-table-block table.has-maintenance-column td:nth-child(11) {
    width: 10%;
  }

  .public-total-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .public-total-table td {
    padding: 7px 8px;
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
  }

  .public-total-label-col {
    width: 52%;
  }

  .public-total-money-col {
    width: 24%;
  }

  .public-total-table tr > td:nth-child(2),
  .public-total-table td:last-child {
    text-align: right;
    white-space: nowrap;
  }

  .public-total-table .amount-words-row td {
    text-align: center;
    white-space: normal;
  }

  .public-quote-terms {
    font-size: 13px;
    line-height: 1.25;
  }

  .public-quote-terms h2 {
    font-size: 15px;
  }

  .public-quote-terms h3 {
    font-size: 14px;
  }
}

#root {
  min-height: 100%;
}

.site-footer {
  margin-bottom: 0;
  padding-bottom: 0;
}
/* =====================================================
   HERO ART - SMOOTH ANIMATION FIX
   Dán cuối file CSS để override animation cũ
===================================================== */

.hero-art {
  position: relative;
  min-height: 220px;
  isolation: isolate;
  overflow: visible;
  transform: translate3d(0, 0, 0);
  animation: none !important;
  contain: layout paint style;
}

.hero-art *,
.hero-art *::before,
.hero-art *::after {
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

/* Glow: bỏ filter blur animation vì rất dễ giật */
.hero-glow {
  position: absolute;
  right: 20px;
  top: -4px;
  width: 330px;
  height: 200px;
  background:
    radial-gradient(circle at 74% 24%, rgba(13, 99, 255, 0.18), transparent 32%),
    radial-gradient(circle at 40% 62%, rgba(143, 178, 255, 0.22), transparent 42%);
  filter: none !important;
  opacity: 0.72;
  z-index: -1;
  transform: translate3d(0, 0, 0) scale(1);
  animation: heroGlowSmooth 9s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Chart card */
.chart-card {
  position: absolute;
  right: 78px;
  top: 50px;
  width: 205px;
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 13px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dce7ff;
  border-radius: 24px;
  box-shadow: 0 18px 38px rgba(35, 83, 163, 0.12);
  transform: translate3d(0, 0, 0);
  animation: chartCardSmooth 12s ease-in-out infinite;
  will-change: transform;
}

.chart-card span {
  width: 27px;
  background: linear-gradient(180deg, #a9c5ff 0%, #2f6df0 100%);
  border-radius: 10px;
  transform-origin: bottom center;
  transform: translate3d(0, 0, 0) scaleY(1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  animation: barSmooth 5.8s ease-in-out infinite;
  will-change: transform;
}

.chart-card span:nth-child(1) {
  height: 48px;
  animation-delay: 0s;
}

.chart-card span:nth-child(2) {
  height: 64px;
  animation-delay: 0.2s;
}

.chart-card span:nth-child(3) {
  height: 82px;
  animation-delay: 0.4s;
}

.chart-card span:nth-child(4) {
  height: 100px;
  animation-delay: 0.6s;
}

/* Bubble chung */
.bubble {
  position: absolute;
  display: grid;
  place-items: center;
  color: #2d67ed;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce7ff;
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(35, 83, 163, 0.13);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.search-bubble {
  right: 28px;
  top: 18px;
  width: 96px;
  height: 96px;
  animation: searchBubbleSmooth 13s ease-in-out infinite;
}

.money-bubble {
  right: 24px;
  bottom: 24px;
  width: 72px;
  height: 72px;
  font-size: 32px;
  font-weight: 900;
  animation: moneyBubbleSmooth 14s ease-in-out infinite;
}

/* Dots */
.hero-art > i {
  position: absolute;
  width: 13px;
  height: 13px;
  background: #9bb8ff;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(155, 184, 255, 0.1);
  opacity: 0.72;
  transform: translate3d(0, 0, 0);
  animation: dotSmooth 9s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero-art > i:nth-of-type(1) {
  right: 354px;
  bottom: 60px;
}

.hero-art > i:nth-of-type(2) {
  right: 6px;
  top: 62px;
  animation-delay: 1.1s;
}

.hero-art > i:nth-of-type(3) {
  right: 70px;
  top: 42px;
  animation-delay: 2.2s;
}

.hero-art > i:nth-of-type(4) {
  right: 292px;
  top: 96px;
  width: 9px;
  height: 9px;
  animation-delay: 3.1s;
}

.hero-art > i:nth-of-type(5) {
  right: 410px;
  top: 138px;
  width: 8px;
  height: 8px;
  animation-delay: 4s;
}

/* Spark */
.spark {
  position: absolute;
  width: 34px;
  height: 34px;
  color: #4f80ff;
  opacity: 0.68;
  transform: translate3d(0, 0, 0) rotate(0deg);
  transform-origin: center;
  animation: sparkSmoothSpin 20s linear infinite;
  will-change: transform;
}

.spark::before,
.spark::after {
  content: "";
  position: absolute;
  inset: 15px 0 auto;
  height: 4px;
  background: currentColor;
  border-radius: 999px;
}

.spark::after {
  transform: rotate(90deg);
}

.spark-one {
  right: 318px;
  top: 26px;
}

.spark-two {
  right: 135px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  color: #8dacff;
  animation-duration: 24s;
  animation-direction: reverse;
}

/* Tắt tia chuột để tránh giật khi rê mouse */
.cursor-sparkle {
  display: none !important;
}

/* ================= Keyframes mượt ================= */

@keyframes chartCardSmooth {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }

  50% {
    transform: translate3d(-4px, -8px, 0) rotate(0.35deg);
  }
}

@keyframes searchBubbleSmooth {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(5px, -7px, 0) scale(1.018);
  }
}

@keyframes moneyBubbleSmooth {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-5px, 6px, 0) scale(1.025);
  }
}

@keyframes heroGlowSmooth {
  0%,
  100% {
    opacity: 0.66;
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    opacity: 0.82;
    transform: translate3d(0, -3px, 0) scale(1.025);
  }
}

@keyframes dotSmooth {
  0%,
  100% {
    opacity: 0.56;
    transform: translate3d(0, 0, 0) scale(0.96);
  }

  50% {
    opacity: 0.88;
    transform: translate3d(2px, -3px, 0) scale(1.06);
  }
}

@keyframes sparkSmoothSpin {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.94);
  }

  50% {
    transform: translate3d(0, 0, 0) rotate(180deg) scale(1.04);
  }

  to {
    transform: translate3d(0, 0, 0) rotate(360deg) scale(0.94);
  }
}

@keyframes barSmooth {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scaleY(1);
  }

  50% {
    transform: translate3d(0, 0, 0) scaleY(0.94);
  }
}

/* Người dùng bật giảm chuyển động thì tắt animation */
@media (prefers-reduced-motion: reduce) {
  .hero-art,
  .hero-art *,
  .hero-art *::before,
  .hero-art *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Hero art đứng yên để không bị reset chuyển động khi form báo giá render lại */
.hero-art,
.hero-art *,
.hero-art *::before,
.hero-art *::after {
  animation: none !important;
  transition: none !important;
  will-change: auto !important;
}

.hero-glow,
.chart-card,
.chart-card span,
.bubble,
.hero-art > i,
.spark {
  transform: none !important;
}

.spark::after {
  transform: rotate(90deg) !important;
}

/* =====================================================
   CURSOR SPARKLE - SMOOTH VERSION
   Dán cuối file CSS
===================================================== */

.cursor-sparkle {
  display: block !important;
  position: fixed;
  left: 0;
  top: 0;
  width: var(--spark-size, 8px);
  height: var(--spark-size, 8px);
  color: var(--spark-color, #4f80ff);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.25) rotate(0deg);
  will-change: transform, opacity;
  contain: layout paint style;
  backface-visibility: hidden;
  filter: none !important;
}

.cursor-sparkle::before,
.cursor-sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 22%;
  background: currentColor;
  border-radius: 999px;
  transform: translate3d(-50%, -50%, 0);
}

.cursor-sparkle::after {
  transform: translate3d(-50%, -50%, 0) rotate(90deg);
}

.cursor-sparkle.is-active {
  animation: cursorSparkleSmooth 620ms ease-out forwards;
}

@keyframes cursorSparkleSmooth {
  0% {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.25) rotate(0deg);
  }

  22% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate3d(
        calc(-50% + var(--spark-x, 0px)),
        calc(-50% + var(--spark-y, -24px)),
        0
      )
      scale(1.12)
      rotate(88deg);
  }
}

@media (pointer: coarse) {
  .cursor-sparkle {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-sparkle,
  .cursor-sparkle.is-active {
    animation: none !important;
    display: none !important;
  }
}
/* Fix dấu tick trang thanh toán thành công */
.success-icon {
  width: 120px;
  height: 120px;
  font-size: 68px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 18px 38px rgba(53, 189, 101, 0.3);
  margin: 0 auto 22px;
  transform: translateZ(0);
}

/* Căn dấu tick nhìn cân hơn */
.success-icon::first-letter {
  line-height: 1;
}

/* Mobile nhỏ lại chút */
@media (max-width: 575px) {
  .success-icon {
    width: 96px;
    height: 96px;
    font-size: 54px;
  }
}
/* =====================================================
   SUMMARY CARD + QR CTA - SMOOTH STATIC VERSION
   Không giật tổng tiền, chỉ làm nổi bật nhẹ nút QR
===================================================== */

.quote-summary-card {
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

/* Chưa có giá */
.quote-summary-card.is-empty {
  border-color: #dce5f2;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

/* Có giá */
.quote-summary-card.is-ready {
  border-color: rgba(13, 99, 255, 0.36);
  background:
    radial-gradient(circle at 92% 0%, rgba(13, 99, 255, 0.1), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 18px 46px rgba(13, 99, 255, 0.14),
    0 0 0 1px rgba(13, 99, 255, 0.06);
}

/* Tổng thanh toán: đứng im, không animation */
.quote-summary-card .summary-total,
.quote-summary-card .summary-total strong {
  animation: none !important;
  transform: none !important;
}

.quote-summary-card.is-ready .summary-total {
  margin-top: 14px;
  padding: 16px 14px;
  border: 1px solid rgba(13, 99, 255, 0.16);
  border-radius: 10px;
  background: rgba(13, 99, 255, 0.055);
}

.quote-summary-card.is-ready .summary-total strong {
  font-size: 28px;
  color: #0757e4;
  text-shadow: none;
}

/* Nút QR */
.pay-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 52px;
  margin-top: 14px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

/* Chưa có giá: nhìn disabled rõ ràng */
.pay-cta.is-empty:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  background: linear-gradient(180deg, #8fb5f7, #668ddd);
  box-shadow: none;
}

/* Có giá: nổi bật nhưng không làm giật layout */
.pay-cta.is-ready:not(:disabled) {
  background: linear-gradient(135deg, #0966ff 0%, #004bdc 48%, #0d7cff 100%);
  box-shadow:
    0 14px 28px rgba(13, 99, 255, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

/* Ánh sáng chạy ngang nút */
.pay-cta.is-ready:not(:disabled)::before {
  content: "";
  position: absolute;
  top: 0;
  left: -65%;
  width: 46%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  );
  transform: skewX(-18deg);
  animation: qrButtonShine 2.6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Vòng sáng nhẹ, không dịch chuyển */
.pay-cta.is-ready:not(:disabled)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(13, 99, 255, 0.34);
  animation: qrButtonGlow 1.9s ease-in-out infinite;
  pointer-events: none;
}

/* Hover mới nâng nhẹ nút, không auto giật */
.pay-cta.is-ready:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 18px 34px rgba(13, 99, 255, 0.34),
    0 0 0 4px rgba(13, 99, 255, 0.08);
}

.pay-cta.is-ready:not(:disabled):active {
  transform: translateY(0) scale(0.99);
}

/* Icon QR rung rất nhẹ, không ảnh hưởng layout */
.pay-cta.is-ready:not(:disabled) .app-icon {
  animation: qrIconSoft 1.8s ease-in-out infinite;
}

/* Mini QR card */
.mini-qr-card.is-ready {
  border-color: rgba(13, 99, 255, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.mini-qr-card.is-ready .mini-qr {
  border-color: rgba(13, 99, 255, 0.28);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(13, 99, 255, 0.1);
}

.mini-qr-card.is-ready b {
  color: #0757e4;
}

/* Keyframes: không dùng translateY cho summary-total */
@keyframes qrButtonShine {
  0% {
    left: -65%;
  }

  46%,
  100% {
    left: 120%;
  }
}

@keyframes qrButtonGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(13, 99, 255, 0.24);
  }

  50% {
    box-shadow: 0 0 0 7px rgba(13, 99, 255, 0.07);
  }
}

@keyframes qrIconSoft {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

/* Mobile giảm hiệu ứng */
@media (max-width: 575px) {
  .quote-summary-card.is-ready .summary-total strong {
    font-size: 24px;
  }

  .pay-cta {
    min-height: 48px;
  }
}

/* Người dùng bật giảm chuyển động thì tắt animation */
@media (prefers-reduced-motion: reduce) {
  .pay-cta,
  .pay-cta::before,
  .pay-cta::after,
  .pay-cta .app-icon,
  .summary-total,
  .summary-total strong {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
/* =====================================================
   RESET SUMMARY TOTAL - BỎ KHUNG TỔNG THANH TOÁN
===================================================== */

.quote-summary-card .summary-total,
.quote-summary-card.is-ready .summary-total,
.quote-summary-card.is-empty .summary-total {
  margin: 14px 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
}

.quote-summary-card .summary-total span,
.quote-summary-card.is-ready .summary-total span {
  color: #526176;
  font-weight: 800;
}

.quote-summary-card .summary-total strong,
.quote-summary-card.is-ready .summary-total strong {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
  text-shadow: none !important;
  animation: none !important;
  transform: none !important;
}

/* =====================================================
   LIVE CHAT TELEGRAM - AI BOT
===================================================== */

.live-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  isolation: isolate;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chat-panel {
  width: min(360px, calc(100vw - 24px));
  height: min(540px, calc(100dvh - 96px));
  max-height: 540px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  border: 1px solid rgba(232, 238, 247, 0.96);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(22px) saturate(1.18);
  box-shadow:
    0 34px 90px rgba(0, 42, 112, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  opacity: 1;
  transform: translateZ(0);
  transform-origin: right bottom;
  animation: none;
  will-change: auto;
}

.chat-head {
  position: relative;
  height: 92px;
  flex: 0 0 92px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 24px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 26px 26px 0 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.32), transparent 26%),
    linear-gradient(135deg, #005dff 0%, #0079ff 52%, #34b6ff 100%);
}

.chat-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 20px;
  border-radius: 26px 26px 0 0;
  background: rgba(255, 255, 255, 0.96);
}

.chat-head strong {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 215px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.chat-head strong i,
.chat-fab-status i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: #36e07c;
  box-shadow: 0 0 0 5px rgba(54, 224, 124, 0.14);
}

.chat-head span {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 220px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.chat-head > button {
  position: relative;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  transition: background 0.16s ease, transform 0.16s ease;
}

.chat-head > button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.04);
}

.chat-bot-avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: visible;
}

.chat-bot-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.chat-bot-avatar.hero img {
  width: 100%;
  height: 100%;
  transform: translateY(3%);
}

.chat-bot-avatar.small img,
.chat-bot-avatar.fab img {
  width: 120%;
  height: 120%;
  transform: translateY(3%);
}

.chat-bot-avatar.hero {
  position: absolute;
  right: 48px;
  bottom: -23px;
  z-index: 3;
  width: 104px;
  height: 122px;
  transform-origin: 55% 80%;
  filter:
    drop-shadow(0 18px 22px rgba(0, 43, 144, 0.22))
    drop-shadow(0 0 18px rgba(51, 182, 255, 0.28));
}

.chat-bot-avatar.small {
  width: 34px;
  height: 34px;
  margin-top: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #eff7ff, #dbeaff);
  box-shadow: 0 10px 22px rgba(13, 99, 255, 0.12);
  overflow: hidden;
}

.chat-bot-avatar.fab {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.chat-body {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px 14px;
  background:
    radial-gradient(circle at 14% 2%, rgba(0, 102, 255, 0.06), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.chat-message > div {
  max-width: 76%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.chat-message p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-message time {
  display: block;
  margin-top: 5px;
  color: #7a869b;
  font-size: 11px;
  font-weight: 800;
}

.chat-message.customer {
  justify-content: flex-end;
}

.chat-message.customer > div {
  color: #ffffff;
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, #0066ff 0%, #005dff 58%, #168dff 100%);
  box-shadow: 0 10px 22px rgba(0, 102, 255, 0.18);
}

.chat-message.customer time {
  color: rgba(255, 255, 255, 0.76);
  text-align: right;
}

.chat-message.admin > div {
  color: #222222;
  border: 1px solid rgba(232, 238, 247, 0.95);
  border-bottom-left-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(24, 49, 91, 0.08);
}

.chat-message.welcome > div {
  font-size: 13px;
}

.chat-suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-top: 0;
}

.chat-suggestions button {
  min-height: 36px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff, #005dff);
  box-shadow: 0 14px 28px rgba(0, 102, 255, 0.22);
  font-size: 13px;
  font-weight: 900;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.chat-suggestions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(13, 99, 255, 0.26);
}

.chat-typing {
  width: fit-content;
  display: inline-flex;
  gap: 4px;
  margin-left: 56px;
  padding: 11px 13px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid #e8eef7;
}

.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0d63ff;
  animation: chatTyping 0.9s ease-in-out infinite;
}

.chat-typing i:nth-child(2) {
  animation-delay: 0.12s;
}

.chat-typing i:nth-child(3) {
  animation-delay: 0.24s;
}

.chat-error {
  margin: 0;
  padding: 8px 24px 0;
  color: #d62949;
  font-size: 12px;
  font-weight: 800;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 46px;
  align-items: center;
  gap: 10px;
  height: 58px;
  margin: 0 14px;
  padding: 7px;
  border: 1px solid #e8eef7;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(24, 49, 91, 0.08);
}

.chat-form textarea {
  width: 100%;
  min-height: 42px;
  max-height: 82px;
  resize: none;
  border: 1px solid #e8eef7;
  border-radius: 15px;
  padding: 11px 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
  font-size: 13px;
  font-weight: 700;
}

.chat-form textarea:focus {
  border-color: rgba(13, 99, 255, 0.44);
  box-shadow: 0 0 0 4px rgba(13, 99, 255, 0.08);
}

.chat-form button {
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
}

.chat-form button[type="submit"] {
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff, #33b6ff);
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.chat-form button[type="submit"]:not(:disabled):hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: none;
}

.chat-form button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
}

.chat-fab {
  position: relative;
  width: 174px;
  min-width: 174px;
  min-height: 126px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 30px;
  padding: 0;
  color: #13203a;
  background: transparent;
  box-shadow: none;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.live-chat.is-open .chat-fab {
  display: none;
}

.chat-fab::before {
  content: none;
}

.chat-fab::after {
  content: none;
}

.chat-fab:hover {
  transform: translateY(-2px);
}

.chat-fab-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #e8eef7;
  border-radius: 999px;
  color: #222222;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 42px rgba(24, 49, 91, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.76) inset;
  font-size: 13px;
  white-space: nowrap;
}

.chat-fab b {
  position: absolute;
  top: 6px;
  right: 36px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #ff3361;
  font-size: 12px;
  line-height: 1;
}

@keyframes chatPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes chatTyping {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@keyframes botBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.018);
  }
}

@keyframes botWaveTiny {
  0%,
  78%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  82% {
    transform: translateY(-2px) rotate(-3deg);
  }
  86% {
    transform: translateY(-2px) rotate(3deg);
  }
  90% {
    transform: translateY(-1px) rotate(-2deg);
  }
}

@keyframes notificationPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.92;
  }
}

@keyframes notificationCirclePulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.06);
    opacity: 0.92;
  }
}

@media (max-width: 575px) {
  .live-chat {
    right: 10px;
    bottom: 10px;
  }

  .chat-panel {
    width: calc(100vw - 20px);
    height: min(540px, calc(100dvh - 92px));
    border-radius: 24px;
  }

  .chat-head {
    height: 90px;
    flex-basis: 90px;
    padding: 17px 16px 22px;
    border-radius: 24px 24px 0 0;
  }

  .chat-head strong {
    max-width: 200px;
    font-size: 19px;
  }

  .chat-bot-avatar.hero {
    right: 38px;
    width: 96px;
    height: 112px;
  }

  .chat-body {
    padding: 18px 12px 12px;
  }

  .chat-message > div {
    max-width: 80%;
    font-size: 13px;
  }

  .chat-fab {
    width: 112px;
    min-width: 112px;
    min-height: 122px;
    justify-content: center;
  }

  .chat-bot-avatar.fab {
    width: 82px;
    height: 82px;
  }

  .chat-fab-status {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0;
  }

  .chat-fab-status::after {
    content: "Online";
    font-size: 13px;
  }

  .chat-fab::after,
  .chat-fab b {
    right: 12px;
  }
}
