:root {
  color-scheme: light;
  --ink: #152039;
  --muted: #51647e;
  --line: #dbe3ef;
  --purple: #4a39e8;
  --surface: #f4f7fa;
  background: var(--surface);
  color: var(--ink);
  font: 100%/1.5 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
.shell { width: min(100% - 40px, 1100px); margin-inline: auto; }
header { background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.brand strong, .brand small { display: block; line-height: 1.3; }
.brand small { color: #4734cc; font-size: .82rem; font-weight: 600; }
.logo, .upload-icon {
  display: grid; place-items: center; background: var(--purple); color: #fff;
  width: 40px; height: 40px; border-radius: 11px; font-size: 1.55rem;
}
main { padding-block: 25px 56px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.metric {
  --tint: #eeeaff; --tone: #4433cc;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 15px 19px;
}
.metric.phone { --tint: #e6faf4; --tone: #007859; }
.metric.email { --tint: #eaf2ff; --tone: #224fa5; }
.metric.complete { --tint: #f6ebff; --tone: #7330a6; }
.metric h2 { color: var(--muted); font-size: .83rem; text-transform: uppercase; letter-spacing: .045em; }
.metric > div { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.metric strong { font-size: 1.65rem; line-height: 1.35; }
.metric span { background: var(--tint); color: var(--tone); border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 700; }
.intake { margin-top: 23px; }
.intake-bar { display: flex; align-items: center; gap: 13px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.intake-bar h2 { padding: 6px 14px; background: var(--purple); color: white; border-radius: 9px; font-size: .9rem; }
.intake-bar span, .small { color: var(--muted); font-size: .86rem; }
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 191px; padding: 20px; margin-top: 13px; background: #fff; border: 1px dashed #9eaed1;
  border-radius: 16px; text-align: center; cursor: pointer;
}
.drop:hover, .drop.active, .drop:focus-within { background: #f4f2ff; border-color: var(--purple); }
.drop.busy { opacity: .72; cursor: progress; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }
.upload-icon { width: 56px; height: 56px; background: #eeebff; color: var(--purple); font-size: 2.05rem; margin-bottom: 4px; }
.drop > span:not(.upload-icon) { color: var(--muted); }
kbd { background: #eff2f6; padding: 2px 4px; border-radius: 4px; font-size: .8rem; }
.notice { margin-top: 10px; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.errors { color: #a62b27; padding-left: 22px; }
.records { margin-top: 29px; }
.records-head, .search-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.records h2, dialog h2 { font-size: 1.2rem; letter-spacing: -.015em; }
.records p, dialog p { color: var(--muted); font-size: .9rem; }
.search-bar { margin-block: 14px; }
#search { max-width: 415px; }
#copy-message { color: #00684f; font-size: .9rem; }
input, button { font: inherit; }
input:not([type=file]) { width: 100%; min-height: 42px; border: 1px solid #cdd8e8; border-radius: 9px; padding: 8px 11px; color: var(--ink); background: #fff; }
input::placeholder { color: var(--muted); }
button { cursor: pointer; border-radius: 9px; border: 1px solid transparent; min-height: 39px; padding: 7px 12px; white-space: nowrap; font-size: .9rem; font-weight: 650; }
button:disabled { opacity: .47; cursor: default; }
.primary { color: #fff; background: var(--purple); }
.primary:not(:disabled):hover { background: #3627c1; }
.secondary { color: #3b2ec1; background: #fff; border-color: #d9dff1; }
.secondary:hover { background: #f1eeff; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 15px; overflow: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 15px; }
th { color: #005b50; background: #edfaf5; border-bottom: 1px solid #d5efe5; font-size: .82rem; text-transform: uppercase; letter-spacing: .025em; }
td { font-size: .92rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
#empty td { color: var(--muted); padding: 42px 15px; text-align: center; }
.row-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.row-actions button { min-height: 33px; padding: 3px 8px; }
.missing { color: var(--muted); }
dialog { width: min(460px, calc(100% - 30px)); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); padding: 23px; }
dialog::backdrop { background: #15203970; }
dialog p { overflow-wrap: anywhere; }
dialog label { display: block; margin-top: 12px; font-size: .92rem; font-weight: 650; }
dialog input { display: block; margin-top: 4px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 560px) {
  .shell { width: calc(100% - 26px); }
  .metric { padding: 12px; }
  .metric h2 { font-size: .73rem; }
  .records-head, .search-bar { align-items: flex-start; flex-direction: column; }
  #search { max-width: none; }
}
