.receipt-page .page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.receipt-page h2 {
  margin: 0 0 6px 0;
}

.receipt-page h3 {
  margin: 0 0 6px 0;
}

.receipt-page p {
  margin: 0;
  color: #666;
}

.notice-box {
  padding: 12px 14px;
  background: #f4f8ff;
  border: 1px solid #d6e7ff;
  border-radius: 10px;
  margin-bottom: 16px;
  color: #1d3f66;
}

.receipt-mode-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.receipt-mode-tabs button {
  background: #64748b !important;
}

.receipt-mode-tabs button.active {
  background: #0b83d8 !important;
}

.selected-panel {
  border: 1px solid #dce3eb;
  border-radius: 14px;
  padding: 16px;
  background: #fbfcfe;
  margin-top: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.quote-picker-box {
  border: 1px solid #e1e6ee;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 14px;
}

.quote-picker-box label,
.form-panel label,
.form-grid label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.quote-picker-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.helper-text {
  margin-top: 6px;
  color: #666;
  font-size: 12px;
}

.form-panel {
  margin-bottom: 16px;
}

.form-panel.no-padding {
  margin-top: 14px;
}

.receipt-page input,
.receipt-page select,
.receipt-page textarea {
  width: 100%;
  border: 1px solid #ccd3dd;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

.custom-creator-input {
  margin-top: 8px;
}

.receipt-page textarea {
  resize: vertical;
}

.receipt-page button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #0b83d8;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.receipt-page button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.receipt-page .secondary-btn {
  background: #666;
}

.receipt-page .icon-btn {
  background: #666;
  padding: 8px 12px;
}

.receipt-page .danger {
  background: #c62828;
}

.receipt-page .small-btn {
  padding: 7px 10px;
  font-size: 12px;
}

.hidden {
  display: none !important;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.summary-grid > div {
  border: 1px solid #e1e6ee;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.summary-grid span {
  display: block;
  color: #666;
  font-size: 12px;
  margin-bottom: 4px;
}

.summary-grid b {
  display: block;
  font-size: 14px;
  word-break: break-word;
}

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

.summary-form-grid {
  margin-top: 16px;
}

.vat-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  white-space: nowrap;
}

.inline-check input {
  width: auto;
}

.items-wrap {
  margin-top: 16px;
}

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

.table-scroll {
  overflow-x: auto;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  background: #fff;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e6e9ee;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #f4f6f9;
  font-weight: 800;
  white-space: nowrap;
}

.data-table .center {
  text-align: center;
}

.data-table .right {
  text-align: right;
  white-space: nowrap;
}

.editable-items-table td {
  position: relative;
}

.editable-items-table input {
  min-width: 100px;
}

.editable-items-table .direct-item-name {
  min-width: 180px;
}

.direct-product-cell {
  position: relative;
}

.direct-product-suggest {
  position: absolute;
  z-index: 80;
  top: calc(100% - 6px);
  left: 8px;
  right: 8px;
  max-height: 260px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 6px;
}

.direct-product-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  cursor: pointer;
}

.direct-product-suggest-item:hover {
  background: #e7f1ff;
  color: #084298;
}

.direct-product-suggest-name {
  font-weight: 900;
  line-height: 1.25;
}

.direct-product-suggest-meta {
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.25;
}

.small-text {
  margin-top: 4px;
  color: #666;
  font-size: 12px;
  white-space: pre-line;
}

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.status-text {
  margin: 10px 0;
  font-weight: 700;
}

.status-text.success {
  color: #167a3a;
}

.status-text.warning {
  color: #a56600;
}

.status-text.error {
  color: #c62828;
}

.status-text.muted {
  color: #666;
}

.empty-box {
  border: 1px dashed #ccd3dd;
  padding: 14px;
  border-radius: 10px;
  color: #666;
  background: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: min(900px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.result-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0 0;
}

.quote-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border: 1px solid #e0e4ea;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.quote-title {
  font-size: 16px;
  font-weight: 800;
}

.quote-subtitle {
  margin-top: 4px;
  font-weight: 700;
}

.quote-meta {
  margin-top: 4px;
  color: #666;
  font-size: 13px;
}

.quote-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quote-total {
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .receipt-page .page-header,
  .panel-header,
  .quote-picker-row,
  .modal-search-row,
  .quote-card,
  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .quote-right {
    justify-content: space-between;
  }
}
