:root {
  --offer-surface: linear-gradient(135deg, rgba(var(--primary), 0.14), rgba(255, 255, 255, 0.95));
  --offer-accent: #e9f5f3;
}

body.offer-printing {
  background: #ffffff;
}

.offer-shell .app-content {
  min-height: 100vh;
  padding-top: 1.5rem;
  overflow: visible;
}

.offer-shell .header-main {
  position: static;
  top: auto;
  right: auto;
  width: auto;
  height: auto;
  z-index: 1;
  padding-left: 0;
}

.offer-shell .header-main .container-fluid {
  padding: 0;
}

.offer-shell .header-main .card {
  border-radius: 18px;
  overflow: hidden;
}

.sidebar-logo-mark {
  width: 58px !important;
  height: 58px;
  object-fit: contain;
  float: none !important;
}

.offer-hero {
  background: var(--offer-surface);
  border-radius: 18px;
}

.offer-hero h3 {
  font-size: 2rem;
  color: rgba(var(--dark), 0.92);
}

.section-heading h5 {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.section-kicker,
.mini-label,
.preview-kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--primary), 0.95);
  font-weight: 700;
}

.info-box,
.preview-panel {
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--border_color);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.offer-items-card .table th,
.offer-items-card .table td {
  vertical-align: middle;
}

.product-sheet-hint {
  background: rgba(var(--primary), 0.04);
  color: rgba(var(--dark), 0.72);
  font-size: 0.94rem;
}

.offer-items-table input {
  min-width: 120px;
}

.offer-items-table thead th,
.preview-table thead th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  white-space: nowrap;
}

.offer-items-table tbody td,
.preview-table tbody td {
  vertical-align: top;
}

.summary-tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem;
  border-radius: 18px;
}

.summary-tile strong {
  font-size: 1.9rem;
  line-height: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-box {
  padding: 1rem;
  border-radius: 14px;
  background: var(--offer-accent);
  border: 1px solid rgba(var(--primary), 0.08);
}

.summary-box span {
  display: block;
  color: var(--font-light-color);
  margin-bottom: 0.35rem;
}

.summary-box strong {
  font-size: 1rem;
  color: rgba(var(--dark), 0.86);
}

.sticky-summary {
  position: sticky;
  top: 1.5rem;
  z-index: 2;
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--font-light-color);
}

.empty-state i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: rgba(var(--primary), 0.1);
  color: rgba(var(--primary), 0.9);
  font-size: 1.6rem;
}

.recent-offer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.recent-offer-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border_color);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recent-offer-item:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--primary), 0.45);
  box-shadow: 0 12px 30px rgba(15, 25, 40, 0.08);
}

.recent-offer-item.is-active {
  border-color: rgba(var(--primary), 0.9);
  box-shadow: 0 0 0 2px rgba(var(--primary), 0.1);
}

.recent-offer-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.recent-offer-delete {
  display: flex;
  justify-content: flex-end;
}

.quote-preview-card .card-body {
  padding: 2rem;
}

.quote-preview {
  border-radius: 22px;
  border: 1px solid var(--border_color);
  padding: 2rem;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.quote-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.preview-logo {
  height: 42px;
  margin-bottom: 1rem;
}

.quote-meta {
  min-width: 260px;
  display: grid;
  gap: 12px;
}

.meta-chip {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--offer-accent);
  border: 1px solid rgba(var(--primary), 0.08);
}

.meta-chip span,
.preview-totals span {
  color: var(--font-light-color);
}

.meta-chip strong,
.preview-totals strong {
  color: rgba(var(--dark), 0.92);
}

.preview-table thead th {
  background: rgba(var(--primary), 0.06);
}

.preview-table {
  table-layout: fixed;
  width: 100%;
}

.preview-table .col-product {
  width: 43%;
}

.preview-table .col-location {
  width: 19%;
}

.preview-table .col-qty {
  width: 10%;
}

.preview-table .col-unit-price,
.preview-table .col-total-price {
  width: 14%;
}

.preview-table .cell-product {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.preview-table .cell-location {
  white-space: normal;
  overflow-wrap: break-word;
}

.preview-table .cell-qty,
.preview-table .cell-unit-price,
.preview-table .cell-total-price {
  white-space: nowrap;
}

.preview-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1.2rem;
  border-radius: 18px;
  background: rgba(var(--primary), 0.04);
}

.preview-totals div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.preview-totals .grand-total {
  margin-top: 0.4rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(var(--primary), 0.22);
}

.preview-totals .grand-total strong {
  font-size: 1.35rem;
}

.print-avoid-break {
  break-inside: avoid;
  page-break-inside: avoid;
}

@media (max-width: 1399px) {
  .sticky-summary {
    position: static;
  }
}

@media (max-width: 991px) {
  .quote-preview-head {
    flex-direction: column;
  }

  .quote-meta {
    min-width: auto;
  }
}

@media (max-width: 767px) {
  .offer-shell .app-content {
    padding-top: 1rem;
    padding-right: 1rem;
    padding-left: 1rem;
  }

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

  .quote-preview-card .card-body,
  .quote-preview {
    padding: 1.2rem;
  }

  .recent-offer-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff !important;
  }

  .dark-sidebar,
  .header-main,
  .no-print,
  .offer-form,
  .sticky-summary,
  .recent-offer-list,
  .menu-navs,
  .go-top {
    display: none !important;
  }

  .app-wrapper .app-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .quote-preview-card > .card-header {
    display: none !important;
  }

  .quote-preview-card,
  .quote-preview-card .card-body,
  .quote-preview {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .quote-preview {
    margin: 0 !important;
  }

  .quote-preview-head,
  .preview-panel,
  .preview-totals,
  .preview-table,
  .preview-table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .preview-totals {
    margin-top: 12px;
  }

  .preview-table thead th {
    display: table-cell !important;
    font-size: 10.5px;
    padding: 0.45rem 0.35rem !important;
  }

  .preview-table tbody td {
    font-size: 11px;
    padding: 0.45rem 0.35rem !important;
  }

  .preview-table .col-product {
    width: 44%;
  }

  .preview-table .col-location {
    width: 18%;
  }

  .preview-table .col-qty {
    width: 8%;
  }

  .preview-table .col-unit-price,
  .preview-table .col-total-price {
    width: 15%;
  }
}
