.tablePanel {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
}

.tableWrap {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

.tableHeader {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.meta {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

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

/* 12-col feel: name ≈ 4, customer ≈ 2, rest share remaining */
.colName {
  width: 33.333%;
}

.colCustomer {
  width: 16%;
}

.colIssued {
  width: 11%;
}

.colStatus {
  width: 10%;
}

.colTotal {
  width: 11%;
}

.colLink {
  width: 12%;
}

.colActions {
  width: 112px;
}

.th,
.td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  vertical-align: middle;
  min-width: 0;
}

.th {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.35);
}

.td {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

.subText {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.itemTitle {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tdCustomer {
  vertical-align: top;
}

.customerStack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.customerCell {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.customerPhone {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.recipientHeading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 4px;
}

.recipientPrefix {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.recipientName {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.recipientPhoneChip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-variant-numeric: tabular-nums;
}

.thActions,
.tdActions {
  text-align: end;
  white-space: nowrap;
}

.rowActions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.actionBtn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.actionBtn:hover:not(:disabled) {
  background: rgba(var(--primary-rgb) / 0.1);
  color: var(--primary);
}

.actionBtnDanger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.actionBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination {
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 38px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 12px;
  box-sizing: border-box;
}

.pagination > div:first-child {
  grid-column: 1;
  justify-self: start;
}

.pagination > nav {
  grid-column: 2;
  justify-self: center;
}

.statusChip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid transparent;
  transition: filter 0.2s;
  font-family: var(--font-ui);
}

.statusChipBtn {
  cursor: pointer;
  background: none;
}

.statusChipBtn:hover {
  filter: brightness(0.95);
}

.statusChipBtn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.statusChipBtn:disabled {
  cursor: wait;
  opacity: 0.7;
}

.statusOptionList {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.statusOption {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
}

.statusOptionSelected {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb) / 0.12);
}

.status_draft,
.status_issued {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
}

.status_approved {
  color: #0e7490;
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.32);
}

.status_paid {
  color: #15803d;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.32);
}

.status_cancelled {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.28);
}

.publicLink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publicLink:hover {
  text-decoration: underline;
}

.linkRow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.copyLinkBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: rgba(var(--primary-rgb) / 0.06);
  border: 1px solid rgba(var(--primary-rgb) / 0.14);
  flex-shrink: 0;
}

.copyLinkBtn:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb) / 0.12);
}

.filterBanner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(var(--primary-rgb) / 0.08);
  border: 1px solid rgba(var(--primary-rgb) / 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
}

.filterBannerActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.filterBannerCancel {
  flex-shrink: 0;
  margin-inline-start: auto;
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--primary);
  cursor: pointer;
}

.filterBannerCancel:hover {
  text-decoration: underline;
}

.filterBannerClear {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.filterBannerClear:hover {
  text-decoration: underline;
}

.detailMeta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.detailLabel {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.detailMeta .statusChipBtn {
  margin-top: 4px;
}

.detailNotes {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.detailItems {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detailItem {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
}

.detailItemTop {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.detailItemMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.detailItemDesc {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-line;
}

.strike {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 500;
}

.blockSection {
  margin: 16px 0;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.blockTitle {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.keyPointList {
  margin: 0;
  padding-inline-start: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

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

.fab {
  position: fixed;
  inset-inline-end: 32px;
  inset-inline-start: auto;
  bottom: 32px;
  z-index: 110;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 8px 24px rgba(var(--primary-rgb) / 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(var(--primary-rgb) / 0.45);
}

@media (max-width: 768px) {
  .fab {
    inset-inline-end: 20px;
    inset-inline-start: auto;
    bottom: 20px;
    width: 52px;
    height: 52px;
  }
}
