:root {
  --primary: #006194;
  --primary-container: #007bb9;
  --on-primary: #ffffff;
  --surface: #f8f9ff;
  --surface-canvas: #f1f5fb;
  --surface-card: #ffffff;
  --border: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text: #0b1c30;
  --text-variant: #3f4850;
  --outline: #707881;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0284c7;
  --purple: #7c3aed;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(11, 28, 48, 0.07);
  --shadow-md: 0 10px 30px rgba(11, 28, 48, 0.12);
  --font: "Assistant", "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-canvas);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--primary);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(120deg, var(--primary), var(--primary-container));
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text small {
  font-size: 0.72rem;
  opacity: 0.85;
}

.topnav {
  display: flex;
  gap: 4px;
}

.tab-btn {
  border: 0;
  background: transparent;
  color: var(--on-primary);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.85;
}

.tab-btn.is-active {
  background: rgba(255, 255, 255, 0.22);
  opacity: 1;
}

.view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.view--narrow {
  max-width: 720px;
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 16px;
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.section-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: "Rubik", var(--font);
}

.section-sub {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-variant);
}

.prep-card {
  border-color: rgba(0, 97, 148, 0.28);
  background: linear-gradient(135deg, rgba(0, 97, 148, 0.09), rgba(0, 123, 185, 0.03));
}

.prep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.prep-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.prep-num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(0, 97, 148, 0.12);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

.prep-intro {
  white-space: pre-line;
}

.prep-label {
  flex: 1;
  min-width: 0;
}

.prep-req {
  flex: none;
  align-self: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
  border-radius: 999px;
  padding: 2px 8px;
}

.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-variant);
}

.step-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--border);
  color: var(--text-variant);
  flex: none;
}

.step.is-active {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}

.step.is-active .step-dot {
  background: var(--primary);
  color: var(--on-primary);
}

.step.is-done .step-dot {
  background: var(--success);
  color: #fff;
}

.field {
  margin-bottom: 14px;
}

.field label,
.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field .hint {
  font-size: 0.78rem;
  color: var(--text-variant);
  margin-top: 4px;
}

.input,
select.input,
textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: #fff;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 97, 148, 0.15);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 5px;
  min-height: 1em;
}

.field-warning {
  color: #8a5a00;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  margin-top: 6px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}

.radio-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  background: #fff;
}

.radio-card input {
  accent-color: var(--primary);
}

.radio-card.is-checked {
  border-color: var(--primary);
  background: rgba(0, 97, 148, 0.06);
  font-weight: 600;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stepper button {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.stepper input {
  width: 70px;
  text-align: center;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: #fff;
  color: var(--primary);
  border-color: var(--border-subtle);
}

.btn-subtle {
  background: transparent;
  color: var(--text-variant);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--surface-canvas) 70%, rgba(241, 245, 251, 0));
  margin-top: 8px;
}

.sticky-actions .btn {
  flex: 1;
}

.child-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface);
}

.child-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.child-card-head strong {
  font-size: 0.95rem;
}

.uploads-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.upload-tile {
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-tile.is-attached {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.05);
}

.upload-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.upload-tile-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.attached-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

.req-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.12);
  border-radius: 999px;
  padding: 2px 10px;
}

.upload-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.upload-buttons .btn {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.85rem;
}

.file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.file-preview {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-pdf {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-variant);
}

.file-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-meta {
  font-size: 0.74rem;
  color: var(--text-variant);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-desc {
  font-size: 0.82rem;
  padding: 8px 10px;
}

.file-remove {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--text-variant);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.file-remove:hover {
  color: var(--danger);
}

.thumbs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thumb {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-file {
  font-size: 0.68rem;
  padding: 6px;
  text-align: center;
  color: var(--text-variant);
  word-break: break-all;
}

.thumb-remove {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(11, 28, 48, 0.75);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.review-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.review-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.review-list span:first-child {
  color: var(--text-variant);
}

.doc-checklist-title {
  margin-top: 18px;
}

.doc-checklist {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.doc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.88rem;
}

.doc-check.is-attached {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}

.doc-check-icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}

.doc-check.is-attached .doc-check-icon {
  background: var(--success);
  color: #fff;
}

.doc-check.is-missing .doc-check-icon {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
}

.doc-check-label {
  flex: 1;
  min-width: 0;
  font-weight: 600;
}

.doc-check-meta {
  font-size: 0.78rem;
  color: var(--text-variant);
  white-space: nowrap;
}

.doc-check.is-attached .doc-check-meta {
  color: #047857;
  font-weight: 600;
}

.doc-check.is-missing .doc-check-meta {
  color: var(--danger);
  font-weight: 600;
}

.doc-desc {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--text-variant);
}

.settings-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--border);
}

.section-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 12px;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.section-label {
  flex: 1 1 220px;
  min-width: 160px;
}

.section-max {
  flex: 0 0 84px;
  width: 84px;
}

.section-req {
  gap: 6px;
  white-space: nowrap;
  font-size: 0.85rem;
}

.section-row-actions {
  display: inline-flex;
  gap: 4px;
  margin-inline-start: auto;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.2s;
}

.success {
  text-align: center;
  padding: 30px 16px;
}

.success-mark {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px dashed var(--primary);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 12px 0;
  color: var(--primary);
}

.banner {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #075985;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.notice {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #8a5a00;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.empty {
  text-align: center;
  color: var(--text-variant);
  padding: 40px 16px;
}

.muted {
  color: var(--text-variant);
}

.share-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.share-row .input {
  flex: 1;
  min-width: 0;
}

.share-preview {
  margin-top: 14px;
}

.share-text {
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 0.82rem;
  font-family: var(--font);
  color: var(--text-variant);
  margin: 8px 0 0;
}

.small {
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  max-width: 460px;
  margin: 0 auto;
  background: #0b1c30;
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  z-index: 60;
  font-size: 0.9rem;
}

.toast.is-error {
  background: var(--danger);
}

.toast.is-success {
  background: var(--success);
}

/* ── Admin ─────────────────────────────────────────────────────────────── */

.admin-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge--submitted { background: rgba(2, 132, 199, 0.14); color: #075985; }
.badge--in_review { background: rgba(245, 158, 11, 0.16); color: #92400e; }
.badge--approved { background: rgba(16, 185, 129, 0.16); color: #065f46; }
.badge--rejected { background: rgba(239, 68, 68, 0.16); color: #991b1b; }
.badge--paid { background: rgba(124, 58, 237, 0.16); color: #5b21b6; }
.badge--notified { background: rgba(16, 185, 129, 0.14); color: #047857; border: 1px solid rgba(16, 185, 129, 0.35); white-space: normal; }
.badge--not-notified { background: rgba(100, 116, 139, 0.12); color: #475569; border: 1px solid rgba(100, 116, 139, 0.25); }

.cards-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.sub-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sub-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.sub-card-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.sub-card-meta {
  font-size: 0.82rem;
  color: var(--text-variant);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.sub-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  justify-content: space-between;
}

.table-wrap {
  display: none;
  overflow-x: auto;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  min-width: 900px;
}

table.data-table th,
table.data-table td {
  padding: 10px 12px;
  text-align: start;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  font-weight: 700;
  color: var(--text-variant);
  z-index: 1;
}

table.data-table tbody tr {
  cursor: pointer;
}

table.data-table tbody tr:hover {
  background: var(--surface);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.kpi {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.kpi-value {
  font-size: 1.7rem;
  font-weight: 800;
  font-family: "Rubik", var(--font);
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-variant);
}

.breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.breakdown li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.88rem;
}

.breakdown-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.breakdown-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 48, 0.45);
  z-index: 50;
  display: flex;
  justify-content: flex-start;
}

.drawer {
  background: var(--surface-card);
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  animation: slide-in 0.2s ease;
}

@keyframes slide-in {
  from { transform: translateX(-24px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-head {
  position: sticky;
  top: 0;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 1;
}

.drawer-body {
  padding: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin-bottom: 18px;
}

.detail-item {
  font-size: 0.88rem;
}

.detail-item dt {
  color: var(--text-variant);
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.detail-item dd {
  margin: 0;
  font-weight: 600;
}

.doc-group {
  margin-bottom: 16px;
}

.doc-group h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.doc-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-thumb {
  width: 92px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.doc-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.doc-thumb span {
  display: block;
  font-size: 0.68rem;
  padding: 4px;
  color: var(--text-variant);
  word-break: break-all;
}

.doc-thumb--file {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}

.status-form {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.detail-notify-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-notify-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.award-input {
  width: 110px;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

/* ── Lightbox ──────────────────────────────────────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 48, 0.92);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* ── Decisions ─────────────────────────────────────────────────────────── */

.decisions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.decision-family {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.decision-family-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.decision-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.decision-row:last-of-type {
  border-bottom: 0;
}

.dr-cell {
  min-width: 0;
}

.dr-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-variant);
  margin-bottom: 4px;
}

.dr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.amount-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--border-subtle);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dr-balance strong {
  font-size: 1rem;
}

.dr-balance strong.is-negative {
  color: var(--danger);
}

.save-state {
  font-size: 0.75rem;
  color: var(--text-variant);
}

.btn-small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.decision-family-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.decision-family-total {
  font-size: 0.84rem;
  color: var(--text-variant);
}

.decision-family-notify {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.decision-grand-total {
  margin-top: 14px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .decision-row {
    grid-template-columns: 2.2fr 1.7fr 1fr 1.1fr auto;
    align-items: center;
  }

  .dr-label {
    display: none;
  }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .uploads-grid {
    grid-template-columns: 1fr 1fr;
  }
  .radio-cards {
    grid-template-columns: repeat(4, 1fr);
  }
  .filters {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .drawer {
    max-width: 620px;
  }
  .drawer-backdrop {
    background: rgba(11, 28, 48, 0.35);
  }
}

@media (min-width: 768px) {
  .view {
    padding: 24px 24px 48px;
  }
  .cards-list {
    display: none;
  }
  .table-wrap {
    display: block;
  }
  .admin-toolbar {
    grid-template-columns: 2fr 1fr;
  }
  .kpi-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .topbar,
  .sticky-actions,
  .btn,
  .toast {
    display: none !important;
  }
}

