/* Quotation page — tipografi selaras cart / profile */
.quo-wrap {
  max-width: 1100px;
  margin: 24px auto 48px;
  padding: 0 16px;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.45;
}
.quo-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin: 8px 0 6px;
  line-height: 1.25;
  color: #111827;
}
.quo-title-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}
.quo-sub {
  color: #6b7280;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
  max-width: none;
}
.quo-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}
#quoPage[data-empty="1"] .quo-layout {
  grid-template-columns: 1fr;
}
@media (max-width: 900px) {
  .quo-layout { grid-template-columns: 1fr; gap: 12px; }
  .quo-wrap { margin: 12px auto 36px; }
  .quo-title { font-size: 20px; gap: 8px; }
  .quo-title-icon { width: 32px; height: 32px; }
}
.quo-card {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  padding: 16px;
}
.quo-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #111827;
}
.quo-side {
  position: sticky;
  top: 16px;
  overflow: hidden;
  padding-top: 20px;
  box-shadow: none;
}
@media (max-width: 900px) {
  /* relative (bukan static) agar strip absolute tetap nempel di kartu */
  .quo-side { position: relative; top: auto; }
}
/* Strip amplop udara: diagonal merah–biru (tanpa shadow / flap) */
.quo-envelope-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    #dc2626 0 7px,
    #fff 7px 11px,
    #1d4ed8 11px 18px,
    #fff 18px 22px
  );
  pointer-events: none;
  z-index: 1;
  box-shadow: none;
  filter: none;
}
.quo-side-lead,
.quo-side-foot {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}
.quo-side-foot { margin: 10px 0 0; }

/* Empty draft — compact on desktop so history stays above the fold */
.quo-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  text-align: center;
  gap: 10px;
}
.quo-empty-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.quo-empty-illustration {
  width: min(140px, 52vw);
  height: auto;
  display: block;
  margin: 0;
  object-fit: contain;
}
.quo-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.quo-empty-sub {
  font-size: 14px;
  color: #6b7280;
  max-width: 280px;
  line-height: 1.45;
}
.quo-empty-btn {
  margin-top: 4px;
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}
.quo-empty-btn:hover { background: #d97706; color: #fff; }

/* Desktop: strip horizontal — tidak memakan tinggi viewport */
@media (min-width: 901px) {
  #quoPage[data-empty="1"] .quo-draft {
    padding: 14px 18px;
  }
  #quoPage[data-empty="1"] .quo-empty-state {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 8px 4px;
    gap: 18px 22px;
  }
  #quoPage[data-empty="1"] .quo-empty-illustration {
    width: 88px;
    flex-shrink: 0;
  }
  #quoPage[data-empty="1"] .quo-empty-copy {
    align-items: flex-start;
    flex: 1;
    min-width: 0;
  }
  #quoPage[data-empty="1"] .quo-empty-sub {
    max-width: 36rem;
  }
  #quoPage[data-empty="1"] .quo-history {
    margin-top: 14px;
  }
}

.quo-draft[data-has-items="0"] .quo-card-title { display: none; }

/* Items */
.quo-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.quo-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: start;
}
.quo-item:last-child { border-bottom: 0; }
.quo-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}
.quo-item-name {
  font-weight: 650;
  font-size: 14px;
  margin: 0 0 4px;
  line-height: 1.35;
  color: #0f172a;
}
.quo-item-meta {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 8px;
}
.quo-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quo-item-actions input[type="number"] {
  width: 68px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}
.quo-item-price {
  text-align: right;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  color: #111827;
}
.quo-item-remove {
  border: 0;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 4px;
}

@media (max-width: 640px) {
  .quo-item {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "img info"
      "img price";
    gap: 10px 12px;
  }
  .quo-item img { width: 56px; height: 56px; grid-area: img; }
  .quo-item > div:not(.quo-item-price) { grid-area: info; min-width: 0; }
  .quo-item-price {
    grid-area: price;
    text-align: left;
    padding-top: 0;
  }
}

/* Form */
.quo-more {
  margin: 0 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}
.quo-more > summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  user-select: none;
}
.quo-more > summary::-webkit-details-marker { display: none; }
.quo-more > summary::after {
  content: '+';
  float: right;
  color: #6b7280;
  font-weight: 500;
}
.quo-more[open] > summary::after { content: '−'; }
.quo-more > summary span {
  font-weight: 500;
  color: #6b7280;
}
.quo-more-body {
  padding: 0 12px 12px;
  border-top: 1px solid #e5e7eb;
}
.quo-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.quo-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 4px;
  color: #334155;
}
.quo-form .field { margin-bottom: 10px; }
.quo-form input,
.quo-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #111827;
  background: #fff;
}
.quo-form input:focus,
.quo-form textarea:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}
.quo-form textarea.quo-addr { min-height: 72px; resize: vertical; }
.quo-form textarea.quo-notes { min-height: 56px; resize: vertical; }

.quo-summary-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 12px;
  font-size: 14px;
  font-weight: 700;
}
.quo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.quo-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.quo-btn-primary { background: #0f172a; color: #fff; }
.quo-btn-secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid #d1d5db;
}

.quo-alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}
.quo-alert-ok { background: #ecfdf5; color: #065f46; }
.quo-alert-err { background: #fef2f2; color: #991b1b; }
.quo-alert-info { background: #eff6ff; color: #1e40af; }

/* History */
.quo-history { margin-top: 20px; }
.quo-history-empty {
  margin: 0;
  padding: 16px 4px;
  color: #6b7280;
  font-size: 14px;
}
.quo-history-table-wrap { overflow-x: auto; }
.quo-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.quo-history-table th,
.quo-history-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid #e8eaee;
  vertical-align: middle;
}
.quo-history-table th {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.quo-hist-code {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.quo-hist-code__no {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.quo-hist-code__co {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.quo-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.quo-badge-ready { background: #ecfdf5; color: #047857; }
.quo-badge-pending { background: #fffbeb; color: #b45309; }
.quo-badge-rejected { background: #fef2f2; color: #dc2626; }
.quo-badge-other { background: #f1f5f9; color: #334155; }
.quo-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  line-height: 1.2;
}
.quo-link-btn .quo-dl-icon {
  flex-shrink: 0;
  display: block;
}
.quo-link-btn:hover {
  color: #1d4ed8;
  text-decoration: none;
}
.quo-link-btn:hover .quo-dl-icon { stroke: currentColor; }

/* History cards — mobile (order-card pattern) */
.quo-history-cards {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.quo-hcard {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #e8eaee;
  border-radius: 12px;
  padding: 14px 16px;
}
.quo-hcard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.quo-hcard__ids {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.quo-hcard__code {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.quo-hcard__company {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.quo-hcard__meta {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}
.quo-hcard__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.quo-hcard__total {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.quo-hcard__actions {
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .quo-history-table-wrap { display: none; }
  .quo-history-cards:not([hidden]) { display: flex; }
}

@media (min-width: 721px) {
  .quo-history-cards { display: none !important; }
}

/* PDP secondary button */
.btn-add-quo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}
.btn-add-quo:hover { background: #f8fafc; }
.btn-add-quo:disabled { opacity: 0.5; cursor: not-allowed; }

.pd-quo-promo {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: #0f172a;
}
.pd-quo-promo-sm { padding: 8px 10px; font-size: 12px; }
.pd-quo-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #334155;
}
.pd-quo-icon svg { display: block; }
.pd-quo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.pd-quo-text strong { color: #0f172a; font-weight: 700; font-size: 12px; }
.pd-quo-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #64748b;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
@media (max-width: 640px) {
  .pd-quo-promo { display: inline-flex; }
}
@media (min-width: 641px) {
  .pd-price-promos .pd-quo-promo { display: none !important; }
}
