:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #17212b;
  --muted: #5d6b7a;
  --line: #d9e0e7;
  --blue: #1959a8;
  --blue-dark: #123f78;
  --gold: #f2bd1d;
  --green: #16814a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto;
}

.panel,
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05);
}

.search-panel {
  padding: 22px;
  border-top: 5px solid var(--gold);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
}

.search-grid {
  display: grid;
  grid-template-columns: 110px minmax(170px, 1fr) minmax(220px, 1.2fr) minmax(170px, 0.8fr) minmax(170px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: #fff;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

button:hover:not(:disabled) {
  background: var(--blue-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}

.table-wrap {
  overflow: auto;
  max-height: 62vh;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: #edf2f7;
  color: #233242;
  z-index: 1;
}

tr[data-ocid] {
  cursor: pointer;
}

tr[data-ocid]:hover {
  background: #f7fbff;
}

.amount {
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.detail-panel {
  padding: 18px;
}

#detail {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .search-grid,
  .content-grid,
  .summary-row {
    grid-template-columns: 1fr;
  }

  .content-grid {
    display: block;
  }

  .detail-panel {
    margin-top: 14px;
  }
}
