.btn {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn.secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--foreground);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted-foreground);
}

.btn.accent {
  background: var(--accent);
}

.btn.danger {
  background: var(--danger);
}

.btn.small {
  min-height: 26px;
  padding: 0 9px;
  font-size: 9px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.45;
}

.icon-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-foreground);
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  border-radius: var(--radius-control);
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill {
  padding: 4px 7px;
}

.tag {
  padding: 3px 6px;
}

.status-pill.neutral,
.tag.neutral { background: var(--surface-deep); color: var(--muted-foreground); }
.status-pill.success,
.tag.success { background: var(--success-soft); color: var(--success-ink); }
.status-pill.warning,
.tag.warning { background: var(--warning-soft); color: var(--warning-ink); }
.status-pill.danger,
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.accent,
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.status-pill.blue,
.tag.blue { background: var(--blue-soft); color: #1f56b7; }

.panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.panel-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.panel-header h4 {
  font-size: 11px;
}

.panel-header p {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 8px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-chip {
  min-height: 25px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 8px;
  font-weight: 750;
}

.filter-chip.active {
  background: var(--primary);
  color: white;
}

.service-table {
  min-width: 680px;
}

.service-table-wrap {
  overflow-x: auto;
}

.service-grid {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr) 82px 98px 92px 76px 76px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}

.service-grid.header {
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.service-row {
  border-bottom: 1px solid #eeeaf4;
}

.service-row:last-child {
  border-bottom: 0;
}

.service-row.highlight {
  background: #fbfaff;
  box-shadow: inset 3px 0 var(--accent);
}

.service-date,
.service-supplier,
.money-sub,
.muted {
  color: var(--muted-foreground);
}

.service-date {
  font-size: 8px;
}

.service-name strong,
.service-name span {
  display: block;
}

.service-name strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-supplier,
.money-sub {
  margin-top: 2px;
  font-size: 7px;
}

.service-money {
  text-align: right;
  font-size: 9px;
}

.service-variance.favorable { color: var(--success-ink); }
.service-variance.over { color: var(--danger); }

.invoice-rail {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.upload-zone {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--muted-foreground);
  font-size: 9px;
}

.invoice-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.invoice-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 800;
}

.invoice-card {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid #eeeaf4;
  background: var(--surface);
  text-align: left;
}

.invoice-card.active {
  background: var(--accent-soft);
}

.invoice-card:last-child {
  border-bottom: 0;
}

.invoice-file-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-deep);
  color: var(--muted-foreground);
}

.invoice-card strong,
.invoice-card small {
  display: block;
}

.invoice-card strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-card small {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 7px;
}

.invoice-card-amount {
  text-align: right;
}

.invoice-detail {
  padding: 10px;
  border-top: 1px solid var(--border);
  background: #fdfcff;
}

.pdf-preview {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  padding: 13px;
  border-radius: var(--radius-item);
  background: #d9d5e1;
}

.pdf-sheet {
  width: 72%;
  min-height: 140px;
  margin: 0 auto -45px;
  padding: 12px;
  border-radius: 4px 4px 0 0;
  background: white;
  box-shadow: 0 8px 20px rgba(18, 16, 33, 0.14);
}

.pdf-sheet strong {
  font-size: 7px;
}

.pdf-line {
  height: 4px;
  margin-top: 7px;
  border-radius: 4px;
  background: #e7e3ec;
}

.pdf-line.short { width: 58%; }
.pdf-line.tiny { width: 36%; }

.line-list {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-item);
  background: var(--surface);
}

.line-list-title {
  padding: 7px 9px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 8px;
  font-weight: 800;
}

.invoice-line {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 8px 9px;
  border-bottom: 1px solid #eeeaf4;
}

.invoice-line:last-child {
  border-bottom: 0;
}

.invoice-line.highlight {
  background: #fbfaff;
}

.line-number {
  color: var(--muted-foreground);
  font-size: 8px;
  text-align: center;
}

.line-description strong,
.line-description small {
  display: block;
}

.line-description strong {
  font-size: 9px;
}

.line-description small {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 7px;
}

.line-actions {
  display: flex;
  align-items: end;
  flex-direction: column;
  gap: 5px;
}

.line-amount {
  font-size: 9px;
  font-weight: 750;
}

.line-amount.credit {
  color: var(--success-ink);
}

.ai-banner,
.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 15px;
  font-size: 9px;
}

.ai-banner {
  border: 1px solid #cbbff4;
  background: var(--accent-soft);
  color: var(--accent);
}

.notice.warning { background: var(--warning-soft); color: var(--warning-ink); }
.notice.success { background: var(--success-soft); color: var(--success-ink); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }

.review-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.review-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.review-card-header h4 {
  font-size: 12px;
}

.review-card-header p {
  margin-top: 3px;
  color: var(--muted-foreground);
  font-size: 8px;
}

.review-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.review-data-point {
  padding: 8px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.review-data-point label,
.review-data-point strong {
  display: block;
}

.review-data-point label {
  color: var(--muted-foreground);
  font-size: 7px;
  text-transform: uppercase;
}

.review-data-point strong {
  margin-top: 3px;
  font-size: 9px;
}
