@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ink: #1b1f23;
  --paper: #f7f7f5;
  --panel: #ffffff;
  --line: #dcdbd6;
  --muted: #6b6f76;
  --teal: #0f6b5c;
  --teal-dark: #0a4c41;
  --amber: #b9740f;
  --red: #a3312a;
  --focus: #1b62c4;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  line-height: 1.45;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 32px 20px 80px; }

header.top {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 3px solid var(--ink); padding-bottom: 14px; margin-bottom: 28px;
}
header.top .brand { display: flex; align-items: baseline; gap: 10px; }
header.top .brand .mark {
  font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 13px;
  background: var(--ink); color: var(--paper); padding: 3px 7px; border-radius: 4px; letter-spacing: 0.04em;
}
header.top h1 { font-size: 19px; margin: 0; font-weight: 600; }
header.top .sub { font-size: 13px; color: var(--muted); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px;
}

.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-weight: 600; margin: 0 0 16px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 620px) { .grid, .grid.cols-4 { grid-template-columns: 1fr; } }

label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}
label .opt { font-weight: 400; color: var(--muted); }

input, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  font-family: inherit; font-size: 14px; background: var(--panel); color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[type="checkbox"] { width: auto; }

.field { margin-bottom: 14px; }

.bucket-box {
  border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fbfbfa;
}
.bucket-box .label-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--teal-dark);
  margin-bottom: 6px; display: block;
}

button.primary {
  background: var(--ink); color: #fff; border: none; padding: 12px 22px;
  border-radius: 7px; font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
button.primary:hover { background: #000; }
button.primary:disabled { background: #9a9a95; cursor: not-allowed; }

button.ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink);
  padding: 11px 22px; border-radius: 7px; font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}

button.reject {
  background: transparent; color: var(--red); border: 1.5px solid var(--red);
  padding: 11px 22px; border-radius: 7px; font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 20px; letter-spacing: 0.02em;
}
.status-pill.approved { background: #e5f2ee; color: var(--teal-dark); }
.status-pill.not-approved { background: #f7e9e2; color: var(--red); }
.status-pill.pending { background: #f7edd9; color: var(--amber); }

.result-panel { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

table.calc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
table.calc-table th, table.calc-table td {
  text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
}
table.calc-table th:first-child, table.calc-table td:first-child { text-align: left; font-family: 'IBM Plex Sans', sans-serif; }
table.calc-table thead th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }

.note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.error-box { background: #f7e9e2; border: 1px solid #e0b4a8; color: var(--red); padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-top: 14px; }
.success-box { background: #e5f2ee; border: 1px solid #b6d9cf; color: var(--teal-dark); padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-top: 14px; }

.otp-row { display: flex; gap: 10px; margin-top: 14px; }
.otp-row input { max-width: 160px; letter-spacing: 0.3em; font-family: 'IBM Plex Mono', monospace; text-align: center; font-size: 18px; }

.po-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; font-size: 13.5px; margin-bottom: 4px; }
.po-meta-grid .k { color: var(--muted); }
.po-meta-grid .v { font-weight: 600; }
