@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600;1,700&display=swap');

:root {
  --ink: #201b16;
  --ink-soft: #6f6559;
  --ink-faint: #958a7b;
  --paper: #f7f2e9;
  --paper-warm: #efe6d8;
  --paper-deep: #e5dac9;
  --line: #ded4c5;
  --line-dark: #c8b9a3;
  --night: #17130f;
  --night-soft: #282119;
  --night-muted: #857568;
  --amber: #e5a13b;
  --amber-light: #f6c773;
  --rust: #c85e42;
  --rust-dark: #9f4430;
  --lime: #b6d77b;
  --lime-dark: #6c8b3b;
  --cream: #fffaf1;
  --display: "Playfair Display", Georgia, serif;
  --body: "Plus Jakarta Sans", "Trebuchet MS", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --shadow: 0 20px 48px rgba(41, 28, 15, 0.08);
  --shadow-small: 0 8px 20px rgba(41, 28, 15, 0.07);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(229, 161, 59, 0.65);
  outline-offset: 3px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.icon-large {
  width: 28px;
  height: 28px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 77% 4%, rgba(229, 161, 59, 0.07), transparent 24rem),
    var(--paper);
}

.sidebar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 34px 22px 25px;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 38%),
    var(--night);
  overflow: hidden;
}

.sidebar::after {
  position: absolute;
  right: -70px;
  bottom: 126px;
  width: 185px;
  height: 185px;
  border: 1px solid rgba(229, 161, 59, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 17px rgba(229, 161, 59, 0.03), 0 0 0 34px rgba(229, 161, 59, 0.02);
  content: "";
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--night);
  border-radius: 12px 12px 17px 17px;
  background: var(--amber);
  box-shadow: 4px 4px 0 rgba(255, 250, 241, 0.12);
  transform: rotate(-4deg);
}

.brand-mark .icon {
  width: 25px;
  height: 25px;
}

.brand-kicker,
.nav-label,
.eyebrow,
.dropzone-kicker,
.topbar-kicker,
.target-topline,
.status-label,
.table-eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.brand-kicker {
  margin-bottom: 3px;
  color: var(--night-muted);
  font-size: 9px;
}

.brand-name {
  margin: 0;
  color: var(--cream);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.brand-name em {
  color: var(--amber-light);
  font-family: var(--display);
  font-weight: 600;
}

.sidebar-divider {
  height: 1px;
  margin: 34px 0 24px;
  background: rgba(255, 250, 241, 0.1);
}

.nav-label {
  margin: 0 12px 10px;
  color: var(--night-muted);
  font-size: 9px;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  color: #ad9e8e;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: var(--cream);
  background: rgba(255, 250, 241, 0.06);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--night);
  background: var(--amber);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.nav-item .icon {
  width: 17px;
  height: 17px;
}

.nav-item span:not(.nav-item-count) {
  font-size: 12px;
  font-weight: 600;
}

.nav-item-count {
  margin-left: auto;
  color: inherit;
  font-family: var(--mono);
  font-size: 10px;
  opacity: 0.7;
}

.sidebar-target {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 17px 16px 15px;
  border: 1px solid rgba(255, 250, 241, 0.12);
  border-radius: 12px;
  background: rgba(255, 250, 241, 0.045);
}

.target-topline,
.target-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--night-muted);
  font-size: 9px;
}

.target-topline .icon {
  width: 13px;
  height: 13px;
  color: var(--amber-light);
}

.target-number {
  margin: 14px 0 11px;
  color: var(--cream);
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.target-number small {
  color: var(--night-muted);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

.target-track {
  height: 5px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 250, 241, 0.12);
}

.target-track span {
  display: block;
  width: 0.42%;
  min-width: 5px;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
  transition: width 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.target-meta {
  margin-top: 8px;
  font-size: 9px;
}

.target-meta span:first-child {
  color: var(--amber-light);
  font-family: var(--mono);
}

.sidebar-bottom {
  position: relative;
  z-index: 1;
  padding-top: 26px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a7998b;
  font-family: var(--mono);
  font-size: 9px;
}

.status-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(182, 215, 123, 0.1);
}

.sidebar-note {
  margin: 10px 0 0 14px;
  color: #66594e;
  font-size: 10px;
  line-height: 1.5;
}

.main-content {
  min-width: 0;
  background: var(--paper);
}

.topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 5.2vw;
  border-bottom: 1px solid var(--line);
}

.topbar-left,
.topbar-actions,
.topbar-context,
.button,
.window-note,
.import-policy {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 16px;
}

.topbar-context {
  gap: 12px;
}

.topbar-kicker {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.topbar-status {
  padding-left: 12px;
  color: var(--ink-faint);
  border-left: 1px solid var(--line);
  font-size: 11px;
}

.topbar-actions {
  gap: 9px;
}

.mobile-menu-button {
  display: none;
  width: 35px;
  height: 35px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.button {
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button .icon {
  width: 15px;
  height: 15px;
}

.button-primary {
  color: var(--night);
  background: var(--amber);
  box-shadow: 0 5px 0 #b87925;
}

.button-primary:hover {
  background: var(--amber-light);
  box-shadow: 0 7px 0 #b87925;
}

.button-quiet {
  color: var(--ink-soft);
  border: 1px solid var(--line);
  background: transparent;
}

.button-quiet:hover,
.button-light:hover {
  color: var(--ink);
  background: var(--paper-warm);
}

.button-outline {
  color: var(--ink);
  border: 1px solid var(--line-dark);
  background: transparent;
}

.button-outline:hover {
  border-color: var(--ink);
  background: var(--cream);
}

.button-dark {
  color: var(--cream);
  background: var(--night);
}

.button-dark:hover {
  background: var(--night-soft);
}

.button-light {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--cream);
}

.button-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  color: var(--rust-dark);
  border-radius: 5px;
  background: rgba(200, 94, 66, 0.12);
  font-family: var(--mono);
  font-size: 9px;
}

.content-wrap {
  width: min(1270px, 100%);
  margin: 0 auto;
  padding: 54px 5.2vw 80px;
}

.admin-review-shell {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 48px 5.2vw 80px;
}

.admin-review-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
}

.admin-review-header h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.admin-review-header h1 em {
  color: var(--rust);
  font-style: italic;
}

.admin-review-header .page-description {
  max-width: 680px;
  margin: 16px 0 0;
}

.view {
  display: none;
  animation: view-in 300ms ease both;
}

.view.is-active {
  display: block;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.page-intro-compact {
  margin-bottom: 34px;
}

.eyebrow {
  margin-bottom: 13px;
  color: var(--rust);
  font-size: 10px;
}

.page-intro h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(43px, 5vw, 70px);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

.page-intro h1 em {
  color: var(--rust);
  font-weight: 600;
}

.page-description {
  max-width: 510px;
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.page-intro-compact h1 {
  font-size: clamp(39px, 4.3vw, 59px);
}

.window-note,
.import-policy {
  gap: 8px;
  align-self: center;
  padding: 9px 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 250, 241, 0.54);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}

.window-note-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rust);
}

.import-policy .status-pulse {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.overview-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.dataset-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.01em;
}

.dataset-badge .status-pulse {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.dataset-badge strong {
  color: var(--ink);
  font-weight: 500;
}

.fresh-import-label {
  color: var(--rust);
  font-family: var(--mono);
  font-size: 10px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.95fr);
  gap: 16px;
}

.hero-card {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  padding: 31px 34px 28px;
  color: var(--cream);
  border-radius: var(--radius);
  background:
    linear-gradient(127deg, rgba(229, 161, 59, 0.12), transparent 36%),
    var(--night);
  box-shadow: var(--shadow);
}

.hero-card::before,
.hero-card::after {
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(229, 161, 59, 0.14);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-card::before {
  right: -75px;
  bottom: -115px;
  box-shadow: 0 0 0 16px rgba(229, 161, 59, 0.04), 0 0 0 32px rgba(229, 161, 59, 0.035), 0 0 0 48px rgba(229, 161, 59, 0.025);
}

.hero-card::after {
  right: 34px;
  bottom: -151px;
  width: 130px;
  height: 130px;
  border-color: rgba(255, 250, 241, 0.07);
}

.hero-card-topline,
.hero-card-footer,
.summary-card-topline,
.card-heading,
.section-card-header,
.detail-heading,
.detail-stats,
.audit-row,
.activity-row,
.table-footer,
.mapping-row,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-card-topline {
  position: relative;
  z-index: 1;
  color: #a99b8d;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.hero-card-topline .icon {
  color: var(--amber-light);
}

.hero-number {
  position: relative;
  z-index: 1;
  margin: 22px 0 24px;
  font-family: var(--display);
  font-size: clamp(72px, 8vw, 112px);
  font-weight: 600;
  letter-spacing: -0.09em;
  line-height: 0.84;
}

.hero-number small {
  margin-left: 9px;
  color: #72665b;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-progress {
  position: relative;
  z-index: 1;
  height: 9px;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 250, 241, 0.13);
}

.hero-progress span {
  display: block;
  width: 0.42%;
  min-width: 7px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--amber-light));
  box-shadow: 0 0 16px rgba(229, 161, 59, 0.32);
}

.hero-card-footer {
  position: relative;
  z-index: 1;
  margin-top: 17px;
  color: #a99b8d;
  font-family: var(--mono);
  font-size: 10px;
}

.hero-card-footer strong {
  color: var(--amber-light);
  font-weight: 500;
}

.hero-stamp {
  position: absolute;
  right: 32px;
  top: 30px;
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  color: var(--amber-light);
  border: 1px solid rgba(229, 161, 59, 0.35);
  border-radius: 50%;
  transform: rotate(10deg);
}

.hero-stamp .icon {
  width: 23px;
  height: 23px;
}

.stat-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.summary-card {
  min-height: 137px;
  padding: 21px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.64);
}

.summary-card:nth-child(2) {
  background: #f0e8da;
}

.summary-card:nth-child(3) {
  color: var(--cream);
  border-color: var(--rust-dark);
  background: var(--rust);
}

.summary-card:nth-child(4) {
  background: #e7efd2;
}

.summary-card-topline {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
}

.summary-card:nth-child(3) .summary-card-topline {
  color: rgba(255, 250, 241, 0.72);
}

.summary-card .icon {
  width: 15px;
  height: 15px;
  color: var(--rust);
}

.summary-card:nth-child(3) .icon {
  color: var(--amber-light);
}

.summary-card-value {
  margin-top: 18px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1;
}

.summary-card:nth-child(3) .summary-card-value {
  color: var(--cream);
}

.summary-card-foot {
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 10px;
}

.summary-card:nth-child(3) .summary-card-foot {
  color: rgba(255, 250, 241, 0.72);
}

.import-summary {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 25px;
  margin-top: 17px;
  padding: 21px 24px 19px;
  border: 1px solid rgba(200, 94, 66, 0.3);
  border-radius: var(--radius);
  background: #fbebe2;
}

.import-summary-header {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.import-summary-mark {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--rust-dark);
  border-radius: 50%;
  background: rgba(200, 94, 66, 0.13);
}

.import-summary-mark .icon {
  width: 15px;
  height: 15px;
}

.import-summary h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.import-summary p {
  margin: 4px 0 0;
  color: #8a6258;
  font-size: 10px;
}

.import-summary-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 18px;
  padding-left: 25px;
  border-left: 1px solid rgba(200, 94, 66, 0.22);
}

.import-summary-metric {
  display: grid;
  gap: 4px;
}

.import-summary-metric span {
  color: #986b60;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.3;
  text-transform: uppercase;
}

.import-summary-metric strong {
  color: var(--rust-dark);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.import-summary-metric:first-child strong {
  color: var(--ink);
}

.dedupe-audit-line {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -2px;
  padding-top: 13px;
  color: #986b60;
  border-top: 1px solid rgba(200, 94, 66, 0.18);
  font-family: var(--mono);
  font-size: 9px;
}

.dedupe-audit-line strong {
  color: var(--ink);
  font-weight: 500;
}

.dedupe-audit-line em {
  color: var(--rust-dark);
  font-style: normal;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.panel-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.64);
}

.section-card-header {
  padding: 22px 23px 17px;
  border-bottom: 1px solid var(--line);
}

.card-heading {
  align-items: flex-start;
  gap: 15px;
}

.card-heading h2,
.section-card-header h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.card-heading .eyebrow,
.section-card-header .eyebrow {
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 9px;
}

.card-heading > .icon {
  color: var(--rust);
}

.view-all,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--rust-dark);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.view-all:hover,
.text-link:hover {
  color: var(--ink);
}

.view-all .icon,
.text-link .icon {
  width: 13px;
  height: 13px;
}

.ranking-list {
  padding: 5px 14px 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1.25fr) minmax(70px, 1fr) 72px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 57px;
  padding: 10px 10px;
  color: var(--ink);
  border-bottom: 1px solid rgba(222, 212, 197, 0.7);
  background: transparent;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

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

.rank-row:hover {
  border-radius: 8px;
  background: var(--paper-warm);
  transform: translateX(2px);
}

.rank-number {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
  text-align: center;
}

.person-cell,
.person-inline {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--night);
  border-radius: 50%;
  background: var(--amber-light);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}

.avatar.avatar-rust {
  color: var(--cream);
  background: var(--rust);
}

.avatar.avatar-green {
  background: var(--lime);
}

.avatar.avatar-dark {
  color: var(--cream);
  background: var(--night-soft);
}

.person-copy {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.person-name {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-subline {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--paper-deep);
}

.rank-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
}

.rank-count {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.ranking-empty {
  padding: 28px 15px;
  color: var(--ink-faint);
  font-size: 10px;
  text-align: center;
}

.rank-count small {
  color: var(--ink-faint);
  font-family: var(--body);
  font-size: 9px;
  font-weight: 500;
}

.audit-panel {
  background: var(--night);
}

.audit-panel .section-card-header {
  border-color: rgba(255, 250, 241, 0.12);
}

.audit-panel .section-card-header h2 {
  color: var(--cream);
}

.audit-panel .section-card-header .eyebrow {
  color: var(--amber-light);
}

.audit-panel .view-all {
  color: var(--amber-light);
}

.audit-list {
  padding: 6px 22px 14px;
}

.audit-row {
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 250, 241, 0.1);
}

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

.audit-beer-mark {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--amber-light);
  border: 1px solid rgba(229, 161, 59, 0.32);
  border-radius: 8px;
}

.audit-beer-mark .icon {
  width: 14px;
  height: 14px;
}

.audit-copy {
  min-width: 0;
  flex: 1;
}

.audit-copy strong {
  display: block;
  overflow: hidden;
  color: var(--cream);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-copy span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #86786b;
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-time {
  color: #9a8a7a;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.audit-footer {
  margin: 0 22px;
  padding: 15px 0 17px;
  color: #86786b;
  border-top: 1px solid rgba(255, 250, 241, 0.1);
  font-size: 10px;
}

.audit-footer strong {
  color: var(--amber-light);
  font-family: var(--mono);
  font-weight: 500;
}

.empty-state {
  display: grid;
  min-height: 230px;
  padding: 28px;
  place-items: center;
  color: var(--ink-soft);
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--rust);
  border: 1px solid var(--line-dark);
  border-radius: 50%;
}

.empty-state h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
}

.empty-state p {
  max-width: 340px;
  margin: 8px auto 0;
  font-size: 11px;
}

/* Daily view */
.daily-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.daily-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.daily-toolbar p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.select-wrap {
  position: relative;
  min-width: 245px;
}

.select-wrap label,
.select-wrap-label,
.search-wrap label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.select-wrap select {
  width: 100%;
  min-height: 39px;
  padding: 0 36px 0 12px;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  outline: none;
  appearance: none;
  background: var(--cream);
  font-size: 11px;
  font-weight: 700;
}

.select-wrap > .icon {
  position: absolute;
  right: 12px;
  bottom: 11px;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.day-window-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e7efd2;
}

.day-window-card .window-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.day-window-card .icon {
  color: var(--lime-dark);
}

.day-window-card strong {
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.day-window-card span {
  display: block;
  margin-top: 2px;
  color: #708054;
  font-size: 10px;
}

.day-total {
  text-align: right;
}

.day-total strong {
  color: var(--lime-dark);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.07em;
}

.day-total span {
  margin: 0;
  color: #708054;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.day-chart-card {
  margin-top: 17px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.64);
}

.chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 23px;
}

.chart-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.chart-heading span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.bar-chart {
  display: grid;
  gap: 15px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(125px, 0.75fr) minmax(140px, 2fr) 60px;
  align-items: center;
  gap: 14px;
}

.bar-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper-deep);
}

.bar-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--rust);
  transition: width 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-row:first-child .bar-track span {
  background: var(--amber);
}

.bar-value {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.table-card {
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.64);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 13px 18px;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(222, 212, 197, 0.7);
  font-size: 11px;
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr.clickable-row {
  cursor: pointer;
  transition: background 140ms ease;
}

tbody tr.clickable-row:hover {
  background: var(--paper-warm);
}

.table-rank {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
}

.table-person-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.table-person-button .person-name {
  max-width: 230px;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  color: var(--ink-soft);
  border-radius: 5px;
  background: var(--paper-warm);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.1;
  white-space: nowrap;
}

.status-tag::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
  content: "";
}

.status-tag.status-matched {
  color: var(--lime-dark);
  background: #e7efd2;
}

.status-tag.status-matched::before {
  background: var(--lime-dark);
}

.status-tag.status-name {
  color: var(--rust-dark);
  background: #fbebe2;
}

.status-tag.status-name::before {
  background: var(--rust);
}

.status-tag.status-phone {
  color: #81745e;
  background: #f0e8da;
}

.status-tag.status-phone::before {
  background: var(--amber);
}

.count-cell {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.table-footer {
  padding: 15px 18px;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
}

/* Participants */
.participants-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.participants-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.participants-toolbar p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.toolbar-tools {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.search-wrap {
  position: relative;
  width: min(250px, 32vw);
}

.search-wrap .icon {
  position: absolute;
  left: 11px;
  bottom: 11px;
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}

.search-wrap input {
  width: 100%;
  min-height: 39px;
  padding: 0 11px 0 34px;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  outline: none;
  background: var(--cream);
  font-size: 11px;
}

.search-wrap input:focus {
  border-color: var(--rust);
}

.sort-select {
  min-height: 39px;
  padding: 0 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  outline: none;
  background: var(--cream);
  font-size: 10px;
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 17px;
  padding: 12px 15px;
  color: #7d6d59;
  border: 1px solid #e7d6a9;
  border-radius: 9px;
  background: #fff4d8;
  font-size: 10px;
}

.contact-note .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #b17d20;
}

.contact-note strong {
  color: var(--ink);
}

/* Import centre */
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.78fr);
  align-items: start;
  gap: 17px;
}

.import-main-column {
  min-width: 0;
}

.dropzone-grid {
  display: grid;
  gap: 15px;
}

.dropzone {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  min-height: 140px;
  padding: 22px 23px;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.65);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--rust);
  background: #fffaf1;
  transform: translateY(-2px);
}

.dropzone-secondary {
  background: #eee8df;
}

.dropzone-icon {
  display: grid;
  width: 51px;
  height: 51px;
  place-items: center;
  color: var(--rust);
  border: 1px solid rgba(200, 94, 66, 0.25);
  border-radius: 13px;
  background: #fbebe2;
}

.dropzone-secondary .dropzone-icon {
  color: var(--lime-dark);
  border-color: rgba(108, 139, 59, 0.25);
  background: #e7efd2;
}

.dropzone-copy {
  min-width: 0;
}

.dropzone-kicker {
  margin-bottom: 7px;
  color: var(--rust);
  font-size: 9px;
}

.dropzone-secondary .dropzone-kicker {
  color: var(--lime-dark);
}

.dropzone h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.dropzone p:not(.dropzone-kicker) {
  max-width: 410px;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.dropzone p strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.import-status-card {
  margin-top: 17px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.64);
}

.import-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.import-status-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.import-status-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  color: var(--rust-dark);
  border-radius: 6px;
  background: #fbebe2;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.file-badge .icon {
  width: 13px;
  height: 13px;
}

.import-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.import-status-metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.import-status-metric span {
  display: block;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.35;
  text-transform: uppercase;
}

.import-status-metric strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.import-status-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 10px;
}

.import-status-foot .status-pulse {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.rules-card {
  padding: 23px 22px 21px;
  color: var(--cream);
  border-radius: var(--radius);
  background: var(--night);
  box-shadow: var(--shadow);
}

.rules-card .card-heading h2 {
  color: var(--cream);
}

.rules-card .card-heading .eyebrow {
  color: var(--amber-light);
}

.rules-card .card-heading > .icon {
  color: var(--amber-light);
}

.rules-list {
  display: grid;
  gap: 15px;
  margin: 23px 0 20px;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  color: #afa194;
  font-size: 10px;
  line-height: 1.55;
}

.rules-list strong {
  color: var(--cream);
  font-weight: 700;
}

.rule-check {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--night);
  border-radius: 50%;
  background: var(--lime);
}

.rule-check .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.2;
}

.rules-card .text-link {
  color: var(--amber-light);
  border-top: 1px solid rgba(255, 250, 241, 0.12);
  padding-top: 17px;
}

/* Visual review */
.review-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 17px;
}

.review-summary > div {
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 250, 241, 0.64);
}

.review-summary > div:first-child {
  color: var(--cream);
  border-color: var(--night);
  background: var(--night);
}

.review-summary span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.review-summary > div:first-child span {
  color: #a99b8d;
}

.review-summary strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.review-summary > div:first-child strong {
  color: var(--amber-light);
}

.review-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.review-toolbar h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.review-toolbar p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.review-tools {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.review-tools .search-wrap {
  width: min(250px, 24vw);
}

.review-tools .sort-select {
  min-width: 170px;
}

.review-tools .button {
  white-space: nowrap;
}

.review-bulk-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  pointer-events: none;
  transform: none;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.review-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 250, 241, 0.7);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.review-card:hover {
  border-color: var(--line-dark);
  box-shadow: var(--shadow-small);
  transform: translateY(-2px);
}

.review-card.review-state-beer {
  border-color: rgba(108, 139, 59, 0.42);
}

.review-card.review-state-non-beer {
  border-color: rgba(200, 94, 66, 0.42);
  background: #fbebe2;
}

.review-card.review-state-duplicate {
  border-color: rgba(229, 161, 59, 0.46);
}

.review-image-wrap {
  position: relative;
  height: 215px;
  overflow: hidden;
  background: #dfd6ca;
}

.review-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-state {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  color: var(--ink);
  border-radius: 5px;
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 3px 10px rgba(23, 19, 15, 0.13);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.review-state-beer .review-state {
  color: var(--lime-dark);
  background: #e7efd2;
}

.review-state-non-beer .review-state {
  color: var(--rust-dark);
  background: #fbebe2;
}

.review-state-duplicate .review-state {
  color: #8b6527;
  background: #fff4d8;
}

.review-card-body {
  padding: 12px 12px 13px;
}

.review-card-meta {
  min-width: 0;
}

.review-card-meta strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-card-meta span {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
}

.review-card-body p {
  min-height: 30px;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.review-action,
.review-clear {
  min-height: 27px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.review-action-beer:hover,
.review-state-beer .review-action-beer {
  color: var(--lime-dark);
  border-color: rgba(108, 139, 59, 0.4);
  background: #e7efd2;
}

.review-action-non-beer:hover,
.review-state-non-beer .review-action-non-beer {
  color: var(--rust-dark);
  border-color: rgba(200, 94, 66, 0.4);
  background: #fbebe2;
}

.review-action-duplicate:hover,
.review-state-duplicate .review-action-duplicate {
  color: #8b6527;
  border-color: rgba(229, 161, 59, 0.45);
  background: #fff4d8;
}

.review-clear {
  color: var(--ink-faint);
  margin-left: auto;
}

.review-clear:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.review-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  padding: 13px 0;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
}

.review-pagination p {
  margin: 0;
}

.review-pagination .pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Detail */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 27px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.detail-back:hover {
  color: var(--rust-dark);
}

.detail-back .icon {
  width: 14px;
  height: 14px;
}

.detail-heading {
  align-items: flex-start;
  gap: 25px;
  margin-bottom: 29px;
}

.detail-person {
  display: flex;
  align-items: center;
  gap: 15px;
}

.detail-person .avatar {
  width: 58px;
  height: 58px;
  font-size: 15px;
}

.detail-heading h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(39px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.detail-heading p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.detail-heading .status-tag {
  margin-top: 9px;
}

.detail-total {
  min-width: 145px;
  padding: 16px 18px;
  text-align: right;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}

.detail-total span {
  display: block;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.detail-total strong {
  display: block;
  margin-top: 5px;
  color: var(--rust);
  font-family: var(--display);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.08em;
  line-height: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 17px;
  align-items: start;
}

.detail-log-card,
.detail-days-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.64);
}

.detail-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding: 21px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.detail-card-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.detail-card-header p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.detail-card-header .mono-note {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.detail-log-table th,
.detail-log-table td {
  padding-right: 14px;
  padding-left: 14px;
}

.filename-cell {
  max-width: 235px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumbnail-cell {
  width: 58px;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.thumbnail-cell a {
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #efe9df;
}

.detail-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.thumbnail-cell a:hover .detail-thumbnail {
  transform: scale(1.08);
}

.bucket-cell {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}

.pagination p {
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
}

.pagination-actions {
  display: flex;
  gap: 5px;
}

.icon-button {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
}

.icon-button:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.icon-button .icon {
  width: 14px;
  height: 14px;
}

.detail-days-list {
  padding: 4px 17px 11px;
}

.day-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 5px;
  border-bottom: 1px solid rgba(222, 212, 197, 0.7);
}

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

.day-total-row p {
  margin: 0;
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}

.day-total-row span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
}

.day-total-row strong {
  color: var(--rust);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.detail-contact-card {
  margin-top: 17px;
  padding: 17px 18px;
  border: 1px solid #e7d6a9;
  border-radius: 10px;
  background: #fff4d8;
}

.detail-contact-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
}

.detail-contact-card p {
  margin: 5px 0 0;
  color: #7d6d59;
  font-size: 10px;
  line-height: 1.55;
}

.detail-contact-card .button {
  margin-top: 12px;
}

/* Dialog and toast */
.mapper-dialog {
  width: min(700px, calc(100vw - 30px));
  max-height: min(760px, calc(100vh - 30px));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(23, 19, 15, 0.33);
}

.mapper-dialog::backdrop {
  background: rgba(23, 19, 15, 0.65);
  backdrop-filter: blur(3px);
}

.dialog-shell {
  display: flex;
  max-height: min(760px, calc(100vh - 30px));
  flex-direction: column;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 27px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.dialog-header p:not(.eyebrow) {
  max-width: 500px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

#mapperMount {
  overflow-y: auto;
  padding: 5px 27px;
}

.mapper-empty {
  padding: 30px 0;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.mapping-row {
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

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

.mapping-person {
  min-width: 0;
  flex: 1;
}

.mapping-person strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-person span {
  display: block;
  margin-top: 4px;
  color: var(--rust-dark);
  font-family: var(--mono);
  font-size: 9px;
}

.mapping-control {
  width: min(270px, 47%);
}

.mapping-control label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.mapping-control select,
.mapping-control input {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: 7px;
  outline: none;
  background: var(--cream);
  font-size: 10px;
}

.mapping-control select:focus,
.mapping-control input:focus {
  border-color: var(--rust);
}

.mapping-control input {
  margin-top: 7px;
}

.dialog-footer {
  justify-content: flex-end;
  gap: 8px;
  padding: 17px 27px;
  border-top: 1px solid var(--line);
  background: var(--paper-warm);
}

.toast {
  position: fixed;
  z-index: 30;
  right: 26px;
  bottom: 24px;
  max-width: min(390px, calc(100vw - 40px));
  padding: 13px 16px;
  color: var(--cream);
  border: 1px solid rgba(255, 250, 241, 0.16);
  border-radius: 9px;
  background: var(--night);
  box-shadow: 0 14px 32px rgba(23, 19, 15, 0.24);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast strong {
  color: var(--amber-light);
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 234px minmax(0, 1fr);
  }

  .sidebar {
    padding-right: 17px;
    padding-left: 17px;
  }

  .topbar,
  .content-wrap {
    padding-right: 4vw;
    padding-left: 4vw;
  }

  .hero-grid,
  .dashboard-lower,
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    min-height: 265px;
  }

  .review-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .import-layout {
    grid-template-columns: 1fr;
  }

  .rules-card {
    display: grid;
    grid-template-columns: 0.65fr 1.35fr;
    column-gap: 25px;
  }

  .rules-card .card-heading {
    align-self: start;
  }

  .rules-list {
    margin-top: 0;
  }

  .rules-card .text-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 270px;
    min-height: 100vh;
    box-shadow: 20px 0 50px rgba(23, 19, 15, 0.18);
    transform: translateX(-102%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-menu-button {
    display: grid;
    place-items: center;
  }

  .topbar {
    min-height: 70px;
  }

  .topbar-actions .button-quiet span,
  .topbar-status {
    display: none;
  }

  .topbar-context {
    gap: 0;
  }

  .content-wrap {
    padding-top: 39px;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 31px;
  }

  .page-intro .button,
  .page-intro .window-note,
  .page-intro .import-policy {
    align-self: flex-start;
  }

  .import-summary {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .import-summary-values {
    padding-top: 17px;
    padding-left: 0;
    border-top: 1px solid rgba(200, 94, 66, 0.22);
    border-left: 0;
  }

  .dedupe-audit-line {
    margin-top: 0;
  }

  .rules-card {
    display: block;
  }

  .review-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .review-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .review-tools {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .review-tools .search-wrap {
    width: min(280px, 100%);
  }

  .rules-list {
    margin-top: 23px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .content-wrap,
  .admin-review-shell {
    padding-right: 18px;
    padding-left: 18px;
  }

  .admin-review-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .button {
    min-height: 34px;
    padding: 8px 10px;
  }

  .topbar-actions .button-primary span {
    display: none;
  }

  .topbar-actions .button-primary::after {
    content: "Import";
  }

  .page-intro h1 {
    font-size: 46px;
  }

  .hero-card {
    padding: 25px 22px 23px;
  }

  .hero-number {
    font-size: 72px;
  }

  .hero-stamp {
    right: 22px;
    top: 24px;
  }

  .stat-stack {
    gap: 9px;
  }

  .summary-card {
    min-height: 116px;
    padding: 15px 13px;
  }

  .summary-card-value {
    margin-top: 14px;
    font-size: 26px;
  }

  .summary-card-foot {
    font-size: 9px;
  }

  .import-summary {
    padding: 18px 16px;
  }

  .import-summary-values {
    gap: 8px;
  }

  .import-summary-metric strong {
    font-size: 22px;
  }

  .import-summary-metric span {
    font-size: 8px;
  }

  .dedupe-audit-line {
    align-items: flex-start;
    flex-wrap: wrap;
    line-height: 1.45;
  }

  .rank-row {
    grid-template-columns: 25px minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .rank-row .rank-bar {
    display: none;
  }

  .ranking-list {
    padding-right: 8px;
    padding-left: 8px;
  }

  .section-card-header {
    padding-right: 17px;
    padding-left: 17px;
  }

  .audit-list {
    padding-right: 17px;
    padding-left: 17px;
  }

  .audit-footer {
    margin-right: 17px;
    margin-left: 17px;
  }

  .daily-toolbar,
  .participants-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .select-wrap,
  .search-wrap {
    width: 100%;
    min-width: 0;
  }

  .toolbar-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-select {
    width: 100%;
  }

  .day-window-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .day-total {
    display: flex;
    width: 100%;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
  }

  .bar-row {
    grid-template-columns: minmax(92px, 0.9fr) minmax(80px, 1.4fr) 42px;
    gap: 8px;
  }

  .day-chart-card {
    padding: 18px 14px;
  }

  .review-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dropzone {
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 12px;
    padding: 17px;
  }

  .dropzone-icon {
    width: 43px;
    height: 43px;
  }

  .dropzone h2 {
    font-size: 19px;
  }

  .dropzone > .button {
    grid-column: 2;
    justify-self: start;
  }

  .import-status-grid {
    gap: 6px;
  }

  .import-status-metric {
    padding: 9px;
  }

  .import-status-metric strong {
    font-size: 20px;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .review-summary {
    gap: 7px;
  }

  .review-summary > div {
    padding: 12px 10px;
  }

  .review-summary strong {
    font-size: 23px;
  }

  .review-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .review-tools .search-wrap,
  .review-tools .sort-select,
  .review-tools .button {
    width: 100%;
  }

  .detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-total {
    width: 100%;
    text-align: left;
  }

  .mapping-row {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .mapping-control {
    width: 100%;
  }

  .dialog-header,
  #mapperMount,
  .dialog-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .dialog-header h2 {
    font-size: 25px;
  }

  .table-card {
    border-radius: 10px;
  }

  .table-scroll {
    margin-right: -1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
