:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f5fbfe;
  background: #03090e;
  font-synthesis: none;
  --bg: #03090e;
  --surface: #0d1a22;
  --surface-raised: #10232d;
  --panel: rgba(13, 26, 34, 0.9);
  --panel-strong: rgba(13, 28, 37, 0.98);
  --line: rgba(168, 211, 225, 0.18);
  --line-cyan: rgba(56, 231, 216, 0.38);
  --cyan: #38e7d8;
  --cyan-strong: #1ccdc4;
  --gold: #e9c15b;
  --green: #58e6a5;
  --red: #ff7f91;
  --blue: #72b0ff;
  --muted: #9fb0ba;
  --soft: #d0dde4;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.31);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { width: 19px; height: 19px; stroke-width: 1.9; }
.spin { animation: spin 0.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 8%, rgba(39, 225, 210, 0.10), transparent 28%),
    radial-gradient(circle at 91% 14%, rgba(226, 184, 79, 0.075), transparent 26%),
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.glass {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 52%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(18px);
}

.logo { display: flex; flex-direction: column; gap: 4px; width: max-content; }
.logo span {
  color: #f7ffff;
  font-size: 37px;
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0.24em;
  text-shadow: 0 0 22px rgba(39, 225, 210, 0.3);
}
.logo small { color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: 0.31em; }
.logo.compact span { font-size: 24px; letter-spacing: 0.12em; }

.primary, .ghost, .round, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}
.primary {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(39, 225, 210, 0.48);
  border-radius: 13px;
  color: #02201e;
  background: linear-gradient(135deg, #55f6e6, #23c9bf);
  box-shadow: 0 11px 30px rgba(39, 225, 210, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-weight: 900;
}
.primary:hover { filter: brightness(1.05); box-shadow: 0 12px 32px rgba(39, 225, 210, 0.2); }
.primary:disabled { opacity: 0.48; cursor: not-allowed; transform: none; }
.primary.wide { width: 100%; min-height: 54px; margin-top: 4px; }
.ghost {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  font-weight: 750;
}
.ghost:hover { border-color: var(--line-cyan); color: white; background: rgba(39, 225, 210, 0.07); }
.round, .icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}
.round:hover, .icon-button:hover { border-color: var(--line-cyan); background: rgba(39, 225, 210, 0.08); }
.round.danger:hover { color: var(--red); border-color: rgba(255, 113, 132, 0.34); }
.danger-text { color: #ff9cab; }
.danger-text:hover { color: #ffc4cd; border-color: rgba(255, 113, 132, 0.38); background: rgba(255, 113, 132, 0.07); }
.danger-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid rgba(255, 113, 132, 0.42);
  border-radius: 12px;
  color: #ffe4e8;
  background: rgba(255, 82, 106, 0.15);
  cursor: pointer;
  font-weight: 850;
}
.danger-button:hover { background: rgba(255, 82, 106, 0.22); }
.danger-button:disabled { opacity: 0.5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgba(39, 225, 210, 0.72);
  outline-offset: 2px;
}

.login-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, 560px) minmax(460px, 580px);
  align-items: center;
  justify-content: center;
  gap: clamp(48px, 8vw, 124px);
  padding: 56px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(115deg, rgba(3, 7, 10, 0.82), rgba(4, 13, 18, 0.96)),
    radial-gradient(circle at 22% 20%, rgba(39, 225, 210, 0.14), transparent 32%);
}
.login-stage::after {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 0;
  opacity: 0.32;
  background-image: radial-gradient(rgba(152, 255, 247, 0.55) 0.7px, transparent 0.8px);
  background-size: 48px 48px;
}
.login-orbit {
  position: absolute;
  z-index: -2;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(39, 225, 210, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 120px rgba(39, 225, 210, 0.04);
}
.orbit-a { left: -320px; bottom: -300px; }
.orbit-b { right: -350px; top: -330px; border-color: rgba(226, 184, 79, 0.09); }
.login-copy { max-width: 540px; }
.login-copy .eyebrow { margin-top: 68px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.login-copy h1 {
  margin: 17px 0 20px;
  font-size: clamp(48px, 5.1vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.07em;
  font-weight: 930;
}
.login-copy h1 em { color: var(--cyan); font-style: normal; text-shadow: 0 0 28px rgba(39, 225, 210, 0.2); }
.login-copy > p { max-width: 510px; color: var(--soft); font-size: 16px; line-height: 1.72; }
.login-benefits { display: grid; gap: 11px; margin-top: 34px; }
.login-benefits span { display: flex; align-items: center; gap: 11px; color: #d6e2e8; font-size: 13px; font-weight: 700; }
.login-benefits svg { color: var(--gold); }
.login-card { position: relative; padding: 38px; border-radius: 28px; overflow: hidden; }
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, var(--cyan), transparent) top/100% 1px no-repeat,
    radial-gradient(circle at 100% 0%, rgba(39, 225, 210, 0.15), transparent 34%);
}
.secure-chip, .safety {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line-cyan);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(39, 225, 210, 0.06);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.login-card h2 { margin: 27px 0 8px; font-size: 33px; letter-spacing: -0.045em; }
.login-card > p { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.login-card form { display: grid; gap: 17px; }
.login-card label { display: grid; gap: 8px; color: var(--soft); font-size: 12px; font-weight: 750; }
.field {
  min-height: 54px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
  transition: 0.18s;
}
.field:focus-within { border-color: rgba(39, 225, 210, 0.52); box-shadow: 0 0 0 3px rgba(39, 225, 210, 0.06); }
.field > svg { justify-self: center; color: var(--muted); width: 17px; }
.field input { height: 52px; border: 0; outline: 0; background: transparent; color: white; font-size: 14px; }
.eye { width: 44px; height: 52px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.eye svg { width: 18px; }
.inline-error {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 113, 132, 0.28);
  border-radius: 12px;
  color: #ffb8c2;
  background: rgba(255, 113, 132, 0.07);
  font-size: 13px;
  font-weight: 700;
}
.login-foot { display: flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 11px; }
.login-foot svg { color: var(--cyan); width: 15px; }
.activation-stage { align-items: center; overflow-y: auto; }
.activation-card { max-height: calc(100vh - 48px); overflow-y: auto; }
.activation-card h2 { font-size: 29px; }
.activation-card form { gap: 13px; }
.activation-loading { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.activation-loading svg { color: var(--cyan); }
.password-rules { margin-top: -3px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  color: var(--muted);
}
.boot-screen > svg { color: var(--cyan); }

.app-shell {
  --sidebar: 78px;
  min-height: 100vh;
  padding-left: var(--sidebar);
  transition: padding 0.16s ease;
}
.app-shell.nav-open { --sidebar: 248px; }
.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(4, 10, 14, 0.94);
  backdrop-filter: blur(22px);
  transition: width 0.16s ease;
  overflow: visible;
}
.sidebar-head { overflow: hidden; }
.sidebar::after { content: ""; position: absolute; inset: 0 0 auto; height: 140px; pointer-events: none; background: radial-gradient(circle at top, rgba(39, 225, 210, 0.12), transparent 68%); }
.sidebar-head { position: relative; z-index: 2; height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.055); }
.sidebar:not(.expanded) .sidebar-head {
  height: 104px;
  justify-content: flex-start;
  flex-direction: column;
  gap: 14px;
  padding: 18px 10px 10px;
}
.sidebar:not(.expanded) .sidebar-head .icon-button {
  position: static;
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #0a141b;
  box-shadow: none;
}
.sidebar:not(.expanded) .sidebar-head .icon-button svg { width: 15px; height: 15px; }
.sidebar nav { display: grid; gap: 7px; padding: 20px 12px; }
.sidebar nav button, .sidebar-bottom button {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 50px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  overflow: visible;
}
.sidebar .nav-icon {
  width: 52px;
  height: 100%;
  display: grid;
  place-items: center;
}
.sidebar .nav-icon svg { display: block; }
.sidebar .nav-label { width: 160px; overflow: hidden; font-size: 13px; font-weight: 750; }
.sidebar:not(.expanded) nav button,
.sidebar:not(.expanded) .sidebar-bottom button {
  width: 54px;
  grid-template-columns: 1fr;
  margin-inline: auto;
}
.sidebar:not(.expanded) .nav-icon { width: 100%; }
.sidebar:not(.expanded) .nav-label { display: none; }
.sidebar:not(.expanded) nav button::after,
.sidebar:not(.expanded) .sidebar-bottom button::after {
  content: attr(data-label);
  position: absolute;
  z-index: 80;
  left: 62px;
  top: 50%;
  width: max-content;
  max-width: 210px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #eaf5f8;
  background: #0b151c;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
  opacity: 0;
  transform: translate(5px, -50%);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.sidebar:not(.expanded) nav button:hover::after,
.sidebar:not(.expanded) .sidebar-bottom button:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}
.sidebar nav button:hover, .sidebar-bottom button:hover { color: white; background: rgba(255, 255, 255, 0.035); }
.sidebar nav button.active {
  color: var(--cyan);
  border-color: rgba(39, 225, 210, 0.35);
  background: rgba(39, 225, 210, 0.09);
  box-shadow: inset 0 0 18px rgba(39, 225, 210, 0.035), 0 8px 28px rgba(0, 0, 0, 0.12);
}
.sidebar-bottom { margin-top: auto; display: grid; gap: 13px; padding: 18px 12px 22px; border-top: 1px solid rgba(255, 255, 255, 0.055); }
.sidebar-bottom small { padding: 0 14px; color: rgba(255, 255, 255, 0.23); font-size: 9px; font-weight: 800; letter-spacing: 0.12em; }

.topbar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: var(--sidebar);
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 3vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 9, 13, 0.78);
  backdrop-filter: blur(18px);
  transition: left 0.16s ease;
}
.company-pill { display: flex; align-items: center; gap: 12px; }
.company-pill span { font-size: 13px; font-weight: 850; }
.company-pill small { padding-left: 12px; border-left: 1px solid var(--line); color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: 0.12em; }
.top-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.top-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.top-status b { margin-left: 14px; color: var(--soft); }
.content { width: min(1540px, 100%); margin: 0 auto; padding: 104px clamp(20px, 3.2vw, 52px) 64px; }
.mobile-top, .mobile-nav, .nav-scrim { display: none; }

.page-header { min-height: 112px; display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 26px; }
.page-header h1 { margin: 9px 0 8px; font-size: clamp(32px, 3vw, 46px); line-height: 1; letter-spacing: -0.06em; }
.page-header p { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { min-height: 128px; display: grid; grid-template-columns: 45px 1fr; align-items: start; gap: 14px; padding: 20px; border-radius: 18px; transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease; }
.metric:hover { transform: translateY(-1px); border-color: rgba(202, 226, 238, 0.18); box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.045); }
.metric:hover { border-color: rgba(39, 225, 210, 0.22); }
.metric-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-cyan); border-radius: 12px; color: var(--cyan); background: rgba(39, 225, 210, 0.06); }
.metric span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.metric strong { display: block; margin: 8px 0 5px; font-size: clamp(24px, 2vw, 33px); line-height: 1; letter-spacing: -0.04em; }
.metric small { color: var(--muted); font-size: 11px; }
.metric.green .metric-icon { color: var(--green); border-color: rgba(75, 227, 155, 0.28); background: rgba(75, 227, 155, 0.06); }
.metric.gold .metric-icon { color: var(--gold); border-color: rgba(226, 184, 79, 0.28); background: rgba(226, 184, 79, 0.06); }
.metric.blue .metric-icon { color: var(--blue); border-color: rgba(102, 168, 255, 0.28); background: rgba(102, 168, 255, 0.06); }
.metric.red .metric-icon { color: var(--red); border-color: rgba(255, 113, 132, 0.28); background: rgba(255, 113, 132, 0.06); }
.panel { padding: 23px; border-radius: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-head span, .upload-head span, .process span, .support-hero span { color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: 0.16em; }
.panel-head h2, .upload-head h2 { margin: 6px 0 0; font-size: 20px; letter-spacing: -0.035em; }
.panel-head > svg { color: var(--cyan); }
.muted { color: var(--muted); font-size: 12px; line-height: 1.55; }
.loading-line { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
.loading-line svg { color: var(--cyan); }
.empty { min-height: 250px; display: grid; justify-items: center; align-content: center; text-align: center; padding: 34px; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--line-cyan); border-radius: 18px; color: var(--cyan); background: rgba(39, 225, 210, 0.06); }
.empty h3 { margin: 0 0 7px; font-size: 17px; }
.empty p { max-width: 450px; margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: 0.1em; }
td { padding: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.055); color: #c9d5dc; font-size: 12px; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--soft); background: rgba(255, 255, 255, 0.035); font-size: 10px; font-weight: 850; white-space: nowrap; }
.status.completed, .status.matched, .status.reviewed, .status.found { color: var(--green); border-color: rgba(75, 227, 155, 0.25); background: rgba(75, 227, 155, 0.06); }
.status.mapping_required, .status.review, .status.unreviewed, .status.pending { color: var(--gold); border-color: rgba(226, 184, 79, 0.28); background: rgba(226, 184, 79, 0.06); }
.status.failed, .status.unmatched, .status.not_found { color: var(--red); border-color: rgba(255, 113, 132, 0.26); background: rgba(255, 113, 132, 0.06); }
.run-label { display: block; margin-top: 5px; color: #49eee0; font-size: 11px; font-weight: 800; line-height: 1.4; }
.reviewed-by { display: block; margin-top: 5px; color: var(--soft); font-size: 11px; line-height: 1.4; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.surplus { color: var(--gold) !important; }
.neutral { color: var(--soft) !important; }
.history-panel-head > small {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(39, 225, 210, 0.16);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(39, 225, 210, 0.035);
  font-size: 11px;
  font-weight: 800;
}
.history-filters {
  display: grid;
  gap: 11px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.14);
  transform: none;
}
.history-filter-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.history-filter-toolbar > div { min-width: 0; display: grid; gap: 4px; }
.history-filter-toolbar span,
.history-filter-field > span,
.history-period-block > span,
.history-status-block > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.history-filter-toolbar small { color: var(--muted); font-size: 11px; }
.history-clear {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid rgba(255, 113, 132, 0.2);
  border-radius: 9px;
  color: var(--red);
  background: rgba(255, 113, 132, 0.045);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transform: none;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.history-clear:hover { border-color: rgba(255, 113, 132, 0.3); background: rgba(255, 113, 132, 0.065); }
.history-clear:focus-visible { outline: 0; border-color: rgba(255, 113, 132, 0.38); background: rgba(255, 113, 132, 0.075); box-shadow: none; }
.history-clear svg { width: 14px; }
.history-active-filters {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.history-active-filters span {
  max-width: min(100%, 390px);
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(39, 225, 210, 0.18);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(39, 225, 210, 0.045);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.history-filter-primary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 10px;
}
.history-filter-field { min-width: 0; display: grid; gap: 7px; }
.history-search {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 34px !important;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  transform: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.history-search:focus-within { border-color: rgba(39, 225, 210, 0.34); background: rgba(39, 225, 210, 0.025); box-shadow: none; }
.history-search > svg { width: 15px; justify-self: center; color: var(--muted); }
.history-search input { width: 100%; min-width: 0; border: 0; padding-inline: 0; background: transparent; }
.history-search input:focus,
.history-search input:focus-visible { border: 0; outline: 0; box-shadow: none; }
.history-search button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.history-search button:focus-visible { outline: 1px solid rgba(39, 225, 210, 0.36); outline-offset: -3px; border-radius: 8px; box-shadow: none; }
.history-search button svg { width: 14px; }
.history-filter-secondary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 14px;
  padding-top: 1px;
}
.history-period-block,
.history-status-block {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.history-period-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 9px;
}
.history-date-range { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.history-date-range label { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; }
.history-date-range label > span { color: var(--muted); font-size: 11px; font-weight: 800; }
.history-date-range input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  box-sizing: border-box;
  transform: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.history-date-range input:focus,
.history-date-range input:focus-visible { outline: 0; border-color: rgba(39, 225, 210, 0.36); background: #0b141b; box-shadow: none; }
.history-shortcuts { display: flex; flex-wrap: nowrap; gap: 5px; }
.history-shortcuts button {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transform: none;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.history-shortcuts button:hover { color: var(--cyan); border-color: rgba(39, 225, 210, 0.25); background: rgba(39, 225, 210, 0.035); }
.history-shortcuts button:focus-visible { outline: 0; box-shadow: none; }
.history-shortcuts button:focus-visible:not(.active) { color: var(--soft); border-color: rgba(39, 225, 210, 0.36); background: rgba(39, 225, 210, 0.045); }
.history-shortcuts button.active {
  color: var(--cyan);
  border-color: rgba(39, 225, 210, 0.36);
  background: rgba(39, 225, 210, 0.08);
  box-shadow: none;
}
.history-status-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.history-status-options button {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  transform: none;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.history-status-options button:hover { color: var(--soft); border-color: rgba(202, 226, 238, 0.2); background: rgba(255, 255, 255, 0.035); }
.history-status-options button:focus-visible { outline: 0; box-shadow: none; }
.history-status-options button:focus-visible:not(.active) { color: var(--soft); border-color: rgba(39, 225, 210, 0.36); background: rgba(39, 225, 210, 0.045); }
.history-status-options button.active {
  color: var(--cyan);
  border-color: rgba(39, 225, 210, 0.34);
  background: rgba(39, 225, 210, 0.075);
}
.history-status-options button.active.success {
  color: var(--green);
  border-color: rgba(75, 227, 155, 0.3);
  background: rgba(75, 227, 155, 0.065);
}
.history-status-options button.active.warning {
  color: var(--gold);
  border-color: rgba(226, 184, 79, 0.3);
  background: rgba(226, 184, 79, 0.065);
}
.history-panel > .empty { min-height: 170px; padding-block: 22px; }
.history-panel > .empty .empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 11px;
  border-radius: 15px;
}
.history-cards { display: none; }
.dashboard-recent-cards { display: none; }
.history-card {
  min-width: 0;
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.022);
  transform: none;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.history-card:hover { transform: none; border-color: rgba(202, 226, 238, 0.17); background: rgba(255, 255, 255, 0.028); box-shadow: none; }
.history-card header, .history-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-card header > div { min-width: 0; }
.history-card header span:not(.status) { color: var(--cyan); font-size: 10px; font-weight: 850; }
.history-card h3 { overflow-wrap: anywhere; margin: 5px 0 0; font-size: 16px; }
.history-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.history-card-stats span { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.14); }
.history-card-stats b { font-size: 18px; }
.history-card-stats small { color: var(--muted); font-size: 10px; }
.history-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.history-card p b { color: var(--soft); }
.history-card footer { justify-content: flex-end; padding-top: 2px; }

.process { min-height: 126px; display: grid; grid-template-columns: 58px 1fr 180px; align-items: center; gap: 18px; margin-bottom: 18px; padding: 22px; border-radius: 20px; }
.process-core { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--line-cyan); border-radius: 16px; color: var(--cyan); background: rgba(39, 225, 210, 0.07); }
.process h3 { margin: 7px 0 0; font-size: 18px; }
.process p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.process-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.process-steps i { height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.process-steps i.active { background: var(--cyan); box-shadow: 0 0 12px rgba(39, 225, 210, 0.35); animation: process-pulse 1.1s ease-in-out infinite alternate; }
@keyframes process-pulse { to { opacity: 0.42; } }

.upload-panel { padding: 28px; }
.upload-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.upload-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.dropzone {
  min-height: 235px;
  display: grid;
  justify-items: center;
  align-content: center;
  border: 1px dashed rgba(39, 225, 210, 0.32);
  border-radius: 18px;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(39, 225, 210, 0.07), transparent 48%),
    rgba(0, 0, 0, 0.16);
  transition: 0.18s;
}
.dropzone:hover { border-color: rgba(39, 225, 210, 0.63); background-color: rgba(39, 225, 210, 0.025); }
.dropzone.drag-active {
  border-color: var(--cyan);
  background:
    radial-gradient(circle at center, rgba(39, 225, 210, 0.13), transparent 52%),
    rgba(39, 225, 210, 0.035);
  box-shadow: inset 0 0 0 1px rgba(39, 225, 210, 0.18);
}
.dropzone > svg { width: 42px; height: 42px; color: var(--cyan); }
.dropzone h3 { margin: 14px 0 5px; font-size: 17px; }
.dropzone p { margin: 0 0 15px; color: var(--muted); font-size: 11px; }
.upload-list { display: grid; gap: 8px; margin-top: 16px; }
.upload-file {
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(160px, 1fr) minmax(210px, 0.65fr) 38px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}
.file-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--cyan); border-radius: 10px; background: rgba(39, 225, 210, 0.06); }
.file-main { min-width: 0; }
.file-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-main span { color: var(--muted); font-size: 9px; }
.auto-identification {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: var(--cyan);
}
.auto-identification > svg { width: 17px; height: 17px; }
.auto-identification span { display: grid; gap: 2px; }
.auto-identification b { color: var(--soft); font-size: 10px; }
.auto-identification small { color: var(--muted); font-size: 8px; }
select, input {
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 11px;
  background: #091117;
  color: #e9f2f6;
}
select { min-height: 40px; padding: 0 11px; font-size: 11px; }
input { min-height: 42px; padding: 0 12px; }
select:focus, input:focus { border-color: rgba(39, 225, 210, 0.43); box-shadow: 0 0 0 3px rgba(39, 225, 210, 0.055); }
.reference-row { display: grid; grid-template-columns: minmax(260px, 0.45fr) 1fr; gap: 24px; align-items: end; margin-top: 22px; }
.reference-row label, .custom-tolerance { display: grid; gap: 7px; }
.reference-row label span, .custom-tolerance > span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.reference-row label input { width: 100%; }
.reference-row label small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.reference-row > div { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.preflight { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.preflight span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: 750;
}
.preflight svg { width: 14px; height: 14px; color: var(--cyan); }

.rename-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 16px;
}
.rename-bar label { display: grid; gap: 7px; }
.rename-bar label span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
.rename-bar > div { display: flex; gap: 8px; }
.rename-bar .inline-error { grid-column: 1 / -1; }

.review-decision {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
}
.review-decision > div:first-child { display: flex; align-items: center; gap: 12px; }
.review-decision > div:first-child > svg { color: var(--cyan); }
.review-decision span { display: grid; gap: 3px; }
.review-decision span small { color: var(--cyan); font-size: 8px; font-weight: 900; letter-spacing: 0.13em; }
.review-decision span strong { font-size: 14px; }
.review-decision span i { color: var(--muted); font-size: 9px; font-style: normal; }
.review-actions { display: flex; gap: 7px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.18); }
.review-actions button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.review-actions button svg { width: 15px; }
.review-actions button.active.reviewed { color: var(--green); background: rgba(75, 227, 155, 0.1); }
.review-actions button.active.unreviewed { color: var(--gold); background: rgba(226, 184, 79, 0.1); }
.review-actions button:disabled { cursor: not-allowed; opacity: 0.58; }
.review-decision .inline-error { grid-column: 1 / -1; }
.live-sync { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.live-sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(75, 227, 155, 0.5); }

.identification-strip {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border-radius: 16px;
}
.identification-strip > div:first-child { display: flex; align-items: center; gap: 11px; }
.identification-strip > div:first-child > svg { color: var(--cyan); }
.identification-strip b, .identification-strip small { display: block; }
.identification-strip b { font-size: 11px; }
.identification-strip small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.identification-files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.identification-files > span {
  min-width: 132px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  column-gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.identification-files svg { grid-row: 1 / 3; width: 16px; color: var(--cyan); }
.identification-files b { font-size: 9px; }
.identification-files small { margin: 0; font-size: 8px; }

.format-review {
  min-height: 270px;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 24px;
}
.format-review-icon, .delete-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 184, 79, 0.3);
  border-radius: 20px;
  color: var(--gold);
  background: rgba(226, 184, 79, 0.07);
}
.format-review > div:nth-child(2) > span, .delete-modal > div:nth-child(2) > span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}
.format-review h2 { margin: 8px 0; font-size: 22px; }
.format-review p { max-width: 720px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.format-files { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.format-files small { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--soft); background: rgba(255, 255, 255, 0.025); }
.format-files svg { width: 14px; color: var(--cyan); }
.format-actions { display: grid; gap: 8px; }

.modal-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 4, 7, 0.76);
  backdrop-filter: blur(8px);
}
.delete-modal {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 18px;
  padding: 24px;
  border-radius: 22px;
}
.delete-icon { width: 62px; height: 62px; color: var(--red); border-color: rgba(255, 113, 132, 0.32); background: rgba(255, 113, 132, 0.07); }
.delete-modal h2 { margin: 7px 0 8px; font-size: 22px; }
.delete-modal p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.delete-modal label, .delete-modal .inline-error, .modal-actions { grid-column: 1 / -1; }
.delete-modal label { display: grid; gap: 7px; }
.delete-modal label span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reprocess-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(39, 225, 210, 0.32);
  border-radius: 20px;
  color: var(--cyan);
  background: rgba(39, 225, 210, 0.07);
}
.reprocess-modal > div:nth-child(2) > span { color: var(--cyan); }
.resolution-modal {
  width: min(820px, 100%);
  max-height: min(850px, calc(100vh - 36px));
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 22px;
  overflow: auto;
}
.resolution-head { display: grid; grid-template-columns: 58px 1fr 38px; align-items: center; gap: 14px; }
.resolution-icon { width: 56px; height: 56px; display: grid; place-items: center; border: 1px solid var(--line-cyan); border-radius: 17px; color: var(--cyan); background: rgba(39, 225, 210, 0.06); }
.resolution-head span { color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: 0.12em; }
.resolution-head h2 { margin: 5px 0 4px; font-size: 21px; }
.resolution-head p { margin: 0; color: var(--soft); font-size: 12px; line-height: 1.45; }
.resolution-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0, 0, 0, 0.18); }
.resolution-tabs button { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 850; }
.resolution-tabs button.active { color: var(--green); background: rgba(75, 227, 155, 0.09); }
.resolution-tabs button.active.danger { color: var(--red); background: rgba(255, 113, 132, 0.08); }
.candidate-section { display: grid; gap: 10px; }
.candidate-title span, .resolution-note > span { display: block; color: var(--soft); font-size: 12px; font-weight: 850; }
.candidate-title small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.candidate-availability { display: flex; align-items: center; gap: 7px; color: var(--soft); font-size: 11px; font-weight: 750; line-height: 1.4; }
.candidate-availability i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(75, 227, 155, 0.5); }
.resolution-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.resolution-methods button {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  text-align: left;
}
.resolution-methods button > svg { width: 18px; }
.resolution-methods button span { min-width: 0; display: grid; gap: 3px; }
.resolution-methods button b { color: var(--soft); font-size: 12px; }
.resolution-methods button small { overflow: hidden; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.resolution-methods button.active {
  color: var(--cyan);
  border-color: rgba(39, 225, 210, 0.38);
  background: rgba(39, 225, 210, 0.065);
  box-shadow: inset 0 0 20px rgba(39, 225, 210, 0.035);
}
.candidate-list { display: grid; gap: 7px; max-height: 370px; overflow: auto; padding-right: 3px; }
.candidate-list button {
  min-width: 0;
  min-height: 86px;
  display: grid;
  grid-template-columns: 24px minmax(150px, 0.55fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.024);
  cursor: pointer;
  text-align: left;
}
.candidate-list button.selected { border-color: rgba(39, 225, 210, 0.42); background: rgba(39, 225, 210, 0.065); box-shadow: inset 0 0 20px rgba(39, 225, 210, 0.035); }
.candidate-list button > span { min-width: 0; display: grid; gap: 3px; }
.candidate-value, .candidate-source { min-width: 0; }
.candidate-list button b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.candidate-list button small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.candidate-list button > strong { font-size: 12px; line-height: 1.35; white-space: nowrap; }
.candidate-difference { justify-self: end; }
.candidate-source small { overflow-wrap: anywhere; }
.candidate-clock { display: inline-flex; align-items: center; gap: 5px; color: var(--soft) !important; font-size: 12px !important; font-weight: 780; }
.candidate-clock svg { width: 14px; height: 14px; color: var(--cyan); flex: 0 0 auto; }
.candidate-time-gap { color: var(--green); font-size: 10px; font-style: normal; font-weight: 800; line-height: 1.35; }
.candidate-check { width: 21px; height: 21px; display: grid !important; place-items: center; border: 1px solid var(--line); border-radius: 7px; }
.candidate-list button.selected .candidate-check { color: #03201e; border-color: var(--cyan); background: var(--cyan); }
.candidate-check svg { width: 13px; }
.candidate-empty, .not-found-confirmation, .manual-evidence, .duplicate-warning {
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(226, 184, 79, 0.24);
  border-radius: 13px;
  color: var(--gold);
  background: rgba(226, 184, 79, 0.05);
}
.duplicate-warning { min-height: 62px; color: var(--gold); }
.manual-evidence { color: var(--cyan); border-color: rgba(39, 225, 210, 0.24); background: rgba(39, 225, 210, 0.05); }
.manual-evidence.cash { color: var(--green); border-color: rgba(75, 227, 155, 0.24); background: rgba(75, 227, 155, 0.05); }
.not-found-confirmation { border-color: rgba(255, 113, 132, 0.24); color: var(--red); background: rgba(255, 113, 132, 0.05); }
.candidate-empty span, .not-found-confirmation span, .manual-evidence span, .duplicate-warning span { display: grid; gap: 4px; }
.candidate-empty b, .not-found-confirmation b, .manual-evidence b, .duplicate-warning b { color: var(--soft); font-size: 12px; }
.candidate-empty small, .not-found-confirmation small, .manual-evidence small, .duplicate-warning small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.not-found-flow { display: grid; gap: 9px; }
.pin-toggle {
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  text-align: left;
}
.pin-toggle > svg { width: 18px; }
.pin-toggle span { display: grid; gap: 3px; }
.pin-toggle b { color: var(--soft); font-size: 9px; }
.pin-toggle small { font-size: 8px; }
.pin-toggle i { padding: 4px 6px; border-radius: 7px; font-size: 7px; font-style: normal; background: rgba(255, 255, 255, 0.04); }
.pin-toggle.active { color: var(--gold); border-color: rgba(226, 184, 79, 0.34); background: rgba(226, 184, 79, 0.06); }
.resolution-note { display: grid; gap: 7px; }
.resolution-note input { width: 100%; }
.loading-line.compact { min-height: 96px; }
.resolution-actions { align-items: center; }
.review-pending-hint { grid-column: 1 / -1; color: var(--gold); font-size: 8px; }
.review-confirmation-modal {
  width: min(560px, 100%);
  display: grid;
  justify-items: stretch;
  gap: 13px;
  padding: 26px;
  border-radius: 22px;
}
.review-confirmation-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(75, 227, 155, 0.3);
  border-radius: 18px;
  color: var(--green);
  background: rgba(75, 227, 155, 0.07);
}
.review-confirmation-modal > span { color: var(--cyan); font-size: 8px; font-weight: 900; letter-spacing: 0.14em; }
.review-confirmation-modal h2 { margin: -4px 0 0; font-size: 24px; letter-spacing: -0.035em; }
.review-confirmation-modal > p { margin: -5px 0 2px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.review-confirmation-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.review-confirmation-summary span { display: grid; gap: 3px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.025); }
.review-confirmation-summary b { font-size: 17px; }
.review-confirmation-summary small { color: var(--muted); font-size: 7px; }
.responsible-name input { border-color: rgba(39, 225, 210, 0.24); background: rgba(39, 225, 210, 0.035); }
.responsible-name input:focus { border-color: rgba(39, 225, 210, 0.58); }
.responsible-name > small { color: var(--muted); font-size: 10px; line-height: 1.5; }

.source-ledger { margin-bottom: 18px; }
.source-ledger .panel-head > small { color: var(--muted); font-size: 9px; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.source-grid article {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}
.source-grid article.payments { border-color: rgba(39, 225, 210, 0.18); }
.source-grid article > div { display: flex; align-items: center; gap: 9px; }
.source-grid article > div > svg { width: 19px; color: var(--cyan); }
.source-grid article > div span { display: grid; gap: 2px; }
.source-grid article > div b { font-size: 12px; }
.source-grid article > div small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.source-grid article > strong { font-size: 21px; letter-spacing: -0.035em; }
.source-grid article p { margin: 0; color: var(--soft); font-size: 11px; line-height: 1.45; }
.source-grid article > small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.machine-chips { display: flex !important; flex-wrap: wrap; gap: 5px !important; }
.machine-chips small {
  padding: 4px 6px;
  border: 1px solid rgba(39, 225, 210, 0.16);
  border-radius: 7px;
  color: #a9dcd7 !important;
  background: rgba(39, 225, 210, 0.035);
  font-size: 7px !important;
  text-transform: none !important;
}

.reprocess-chain { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 13px 16px; border-radius: 14px; }
.reprocess-chain > span { color: var(--cyan); font-size: 8px; font-weight: 900; letter-spacing: 0.13em; }
.reprocess-chain > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.reprocess-chain button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(255, 255, 255, 0.025); cursor: pointer; font-size: 9px; }
.reprocess-chain button.active { color: var(--cyan); border-color: rgba(39, 225, 210, 0.32); background: rgba(39, 225, 210, 0.06); }
.reprocess-chain .status { pointer-events: none; }

.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, 0.18); }
.segmented button { min-height: 32px; padding: 0 11px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }
.segmented button.active { color: var(--cyan); background: rgba(39, 225, 210, 0.09); }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.segmented button svg { width: 12px; height: 12px; }
.segmented button.active.pinned-filter { color: var(--gold); background: rgba(226, 184, 79, 0.09); }
.result-tools { width: min(820px, 62vw); min-width: 0; display: grid; grid-template-columns: minmax(270px, 1fr) auto; align-items: center; gap: 9px; }
.result-search {
  min-height: 40px;
  display: grid;
  grid-template-columns: 34px minmax(110px, 1fr) auto 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.result-search:focus-within { border-color: rgba(39, 225, 210, 0.48); background: rgba(39, 225, 210, 0.025); box-shadow: 0 0 0 3px rgba(39, 225, 210, 0.045); }
.result-search > svg { justify-self: center; width: 14px; color: var(--muted); }
.result-search input { min-width: 0; min-height: 38px; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; font-size: 10px; }
.result-search input:focus, .result-search input:focus-visible { border: 0; outline: 0; box-shadow: none; }
.search-count { padding: 5px 8px; border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, 0.035); font-size: 8px; font-weight: 750; white-space: nowrap; }
.result-search button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.result-search button svg { width: 13px; }
.results-list { display: grid; }
.result-row {
  display: grid;
  grid-template-columns: minmax(250px, 0.82fr) minmax(430px, 1.7fr);
  gap: 18px;
  align-items: center;
  padding: 17px 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 11px;
  transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.result-row:hover { transform: translateY(-1px); border-color: rgba(39, 225, 210, 0.13); background-color: rgba(255, 255, 255, 0.016); box-shadow: inset 0 0 0 1px rgba(39, 225, 210, 0.035); }
.result-row.found { background: linear-gradient(90deg, rgba(75, 227, 155, 0.025), transparent 42%); }
.result-row.not_found { background: linear-gradient(90deg, rgba(255, 113, 132, 0.025), transparent 42%); }
.result-row.pinned {
  margin-inline: -8px;
  padding-inline: 13px;
  border-left: 2px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(226, 184, 79, 0.075), rgba(255, 113, 132, 0.018) 46%, transparent);
}
.result-primary { display: grid; justify-items: start; gap: 7px; }
.result-primary > strong { font-size: 14px; line-height: 1.45; }
.result-primary > span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.result-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.automatic-status { color: var(--muted); font-size: 11px; }
.pin-badge { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid rgba(226, 184, 79, 0.24); border-radius: 999px; color: var(--gold) !important; background: rgba(226, 184, 79, 0.06); font-size: 7px !important; font-weight: 850; letter-spacing: 0 !important; }
.pin-badge svg { width: 10px; height: 10px; }
.order-id { color: var(--cyan); font-size: 10px; font-weight: 800; }
.owner-note { max-width: 440px; color: var(--soft); font-size: 10px; line-height: 1.45; }
.result-collapsible { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 190px); gap: 13px; align-items: center; }
.result-items { display: flex; flex-wrap: wrap; gap: 7px; }
.result-items > span { min-width: min(280px, 100%); max-width: 430px; display: grid; gap: 4px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.025); transition: border-color 0.16s ease, background-color 0.16s ease; }
.result-items > span:hover { border-color: rgba(39, 225, 210, 0.16); background: rgba(255, 255, 255, 0.035); }
.result-items i { color: var(--muted); font-size: 11px; font-style: normal; text-transform: uppercase; }
.result-items b { font-size: 15px; }
.result-items small { overflow-wrap: anywhere; color: var(--muted); font-size: 11px; line-height: 1.5; }
.result-items small b { color: var(--cyan); font-size: 11px; }
.manual-result-evidence { border-color: rgba(75, 227, 155, 0.2) !important; background: rgba(75, 227, 155, 0.035) !important; }
.manual-result-evidence.automatic-cash { border-color: rgba(246, 190, 72, 0.24) !important; background: rgba(246, 190, 72, 0.045) !important; }
.manual-result-evidence.automatic-cash i { color: var(--gold); }
.result-side { display: grid; justify-items: end; gap: 9px; }
.result-side > strong { font-size: 14px; font-weight: 900; }
.difference-audit { min-width: 0; display: grid; gap: 9px; justify-items: end; }
.difference-audit > span { display: grid; justify-items: end; gap: 2px; }
.difference-audit small { color: var(--muted); font-size: 11px; text-align: right; }
.difference-audit strong { font-size: 15px; font-weight: 900; white-space: nowrap; }
.difference-audit strong.tolerance { color: var(--gold); }
.difference-audit i { color: var(--green); font-size: 11px; font-style: normal; }
.difference-audit .tolerance-proof { color: var(--gold); }
.difference-audit .owner-payment-proof { max-width: 230px; color: var(--cyan); line-height: 1.4; text-align: right; }
.difference-audit .non-comparable-proof { max-width: 230px; color: var(--soft); line-height: 1.4; text-align: right; }
.difference-audit .split-machine-proof { max-width: 190px; color: var(--cyan); line-height: 1.35; text-align: right; overflow-wrap: anywhere; }
.difference-audit.result-truth-mobile { display: none; }
.result-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.quick-pin {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}
.quick-pin:hover, .quick-pin.active { color: var(--gold); border-color: rgba(226, 184, 79, 0.32); background: rgba(226, 184, 79, 0.07); }
.quick-pin:disabled { opacity: 0.58; cursor: wait; }
.quick-pin svg { width: 13px; height: 13px; }
.resolve-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgba(226, 184, 79, 0.28);
  border-radius: 9px;
  color: var(--gold);
  background: rgba(226, 184, 79, 0.055);
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}
.resolve-button.saved { color: var(--cyan); border-color: rgba(39, 225, 210, 0.26); background: rgba(39, 225, 210, 0.05); }
.resolve-button svg { width: 14px; height: 14px; }
.result-toggle { display: none; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tolerance-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 22px 0; }
.tolerance-options button {
  position: relative;
  min-height: 64px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}
.tolerance-options button.active { color: var(--cyan); border-color: rgba(39, 225, 210, 0.42); background: rgba(39, 225, 210, 0.07); box-shadow: inset 0 0 20px rgba(39, 225, 210, 0.04); }
.tolerance-options small { position: absolute; top: -7px; right: 6px; padding: 3px 5px; border-radius: 5px; color: #181305; background: var(--gold); font-size: 6px; white-space: nowrap; }
.current-setting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(39, 225, 210, 0.2);
  border-radius: 11px;
  color: var(--cyan);
  background: rgba(39, 225, 210, 0.045);
}
.current-setting.pending { color: var(--gold); border-color: rgba(226, 184, 79, 0.24); background: rgba(226, 184, 79, 0.045); }
.current-setting > svg { width: 17px; height: 17px; }
.current-setting b, .current-setting small { display: block; }
.current-setting b { color: var(--soft); font-size: 10px; }
.current-setting small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.custom-tolerance {
  width: max-content;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.custom-tolerance.active { border-color: rgba(39, 225, 210, 0.34); background: rgba(39, 225, 210, 0.045); }
.custom-tolerance > span { display: flex; align-items: center; gap: 7px; }
.custom-tolerance > span small { padding: 3px 5px; border-radius: 5px; color: #03201e; background: var(--cyan); font-size: 6px; }
.custom-tolerance > div { display: flex; align-items: center; gap: 10px; }
.custom-tolerance input { width: 110px; }
.custom-tolerance.active input { border-color: rgba(39, 225, 210, 0.45); box-shadow: 0 0 0 3px rgba(39, 225, 210, 0.05); }
.custom-tolerance b { color: var(--muted); font-size: 11px; }
.matching-policy-panel {
  position: relative;
  overflow: hidden;
}
.matching-policy-panel:before {
  position: absolute;
  top: -110px;
  right: -90px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 225, 210, 0.07), transparent 68%);
  content: "";
  pointer-events: none;
}
.matching-policy-head {
  position: relative;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.matching-policy-head .panel-head { margin-bottom: 8px; }
.matching-policy-head > .muted { max-width: 490px; margin: 0; font-size: 10px; }
.policy-head-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(39, 225, 210, 0.2);
  border-radius: 11px;
  color: var(--cyan);
  background: rgba(39, 225, 210, 0.055);
}
.policy-head-icon svg { width: 18px; height: 18px; }
.policy-scope {
  width: max-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 7px 9px;
  border: 1px solid rgba(75, 227, 155, 0.16);
  border-radius: 9px;
  color: var(--green);
  background: rgba(75, 227, 155, 0.035);
}
.policy-scope > svg { width: 14px; height: 14px; flex: 0 0 auto; }
.policy-scope span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.policy-scope b { color: #c9eee0; font-size: 8px; letter-spacing: 0.02em; }
.policy-scope small { color: var(--muted); font-size: 8px; }
.policy-list {
  position: relative;
  display: grid;
  gap: 8px;
  padding-top: 13px;
}
.policy-row {
  position: relative;
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid rgba(202, 226, 238, 0.1);
  border-radius: 13px;
  color: inherit;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.policy-row:before {
  position: absolute;
  inset: 9px auto 9px 0;
  width: 2px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  content: "";
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.policy-row:hover {
  transform: translateY(-1px);
  border-color: rgba(202, 226, 238, 0.18);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}
.policy-row:focus-visible {
  outline: 2px solid rgba(39, 225, 210, 0.6);
  outline-offset: 2px;
}
.policy-row.on {
  border-color: rgba(39, 225, 210, 0.2);
  background: linear-gradient(90deg, rgba(39, 225, 210, 0.045), rgba(39, 225, 210, 0.012) 72%);
}
.policy-row.on:before {
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(39, 225, 210, 0.42);
}
.policy-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(202, 226, 238, 0.12);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.policy-icon svg { width: 15px; height: 15px; }
.policy-row.on .policy-icon {
  color: var(--cyan);
  border-color: rgba(39, 225, 210, 0.22);
  background: rgba(39, 225, 210, 0.055);
}
.policy-copy { min-width: 0; display: block; }
.policy-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.policy-title strong {
  min-width: 0;
  color: var(--soft);
  font-size: 11px;
  line-height: 1.25;
}
.policy-title em {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(202, 226, 238, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.policy-row.on .policy-title em {
  color: var(--green);
  border-color: rgba(75, 227, 155, 0.2);
  background: rgba(75, 227, 155, 0.045);
}
.policy-copy > small {
  display: block;
  max-width: 500px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.42;
}
.policy-switch {
  position: relative;
  width: 42px;
  height: 23px;
  justify-self: end;
  border: 1px solid rgba(202, 226, 238, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.policy-switch b {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--muted);
  transition: left 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.policy-row.on .policy-switch {
  border-color: rgba(39, 225, 210, 0.38);
  background: rgba(39, 225, 210, 0.09);
}
.policy-row.on .policy-switch b {
  left: 21px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(39, 225, 210, 0.4);
}
.save-bar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 15px 20px; border-radius: 16px; }
.save-bar > div { display: flex; align-items: center; gap: 12px; }
.save-bar > div > svg { color: var(--cyan); }
.save-bar strong, .save-bar small { display: block; }
.save-bar strong { font-size: 11px; }
.save-bar small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.save-message { max-width: 360px; font-size: 10px; }
.save-message.success { color: var(--green); }
.save-message.error { color: var(--red); }

.support-hero { min-height: 230px; display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 24px; padding: 32px; border-radius: 22px; }
.support-icon { width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid var(--line-cyan); border-radius: 22px; color: var(--cyan); background: rgba(39, 225, 210, 0.07); }
.support-icon svg { width: 33px; height: 33px; }
.support-hero h2 { margin: 8px 0; font-size: 26px; }
.support-hero p { margin: 0 0 14px; color: var(--muted); font-size: 11px; }
.support-hero strong { display: block; font-size: 19px; }
.support-hero small { display: block; margin-top: 5px; color: var(--gold); font-size: 10px; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.support-grid .panel > svg { color: var(--cyan); }
.support-grid h3 { margin: 14px 0 8px; font-size: 14px; }
.support-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.idle-warning {
  position: fixed;
  z-index: 120;
  top: 76px;
  right: 18px;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 184, 79, 0.34);
  border-radius: 14px;
  color: var(--gold);
  background: rgba(15, 13, 7, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
}
.idle-warning > svg { width: 22px; justify-self: center; }
.idle-warning span { display: grid; gap: 2px; }
.idle-warning b { color: var(--soft); font-size: 11px; }
.idle-warning small { color: var(--muted); font-size: 9px; }
.idle-warning .primary { min-height: 38px; padding-inline: 12px; font-size: 9px; }

@media (max-width: 1180px) {
  .login-stage { grid-template-columns: minmax(370px, 0.9fr) minmax(430px, 1fr); gap: 45px; padding: 42px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .upload-file { grid-template-columns: 42px 1fr minmax(190px, 0.7fr) 38px; }
  .settings-grid { grid-template-columns: 1fr; }
  .result-row { grid-template-columns: 0.82fr 1.35fr; }
  .history-filter-secondary { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 860px) {
  .login-stage { grid-template-columns: 1fr; padding: 26px 18px 50px; }
  .login-copy { display: none; }
  .login-card { width: min(100%, 540px); margin: auto; padding: 28px 22px; }
  .app-shell, .app-shell.nav-open { padding-left: 0; }
  .sidebar { width: min(310px, 84vw); transform: translateX(-105%); box-shadow: 20px 0 80px rgba(0, 0, 0, 0.5); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .app-shell.nav-open .nav-scrim {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(1, 4, 7, 0.62);
    backdrop-filter: blur(3px);
  }
  .sidebar:not(.expanded) .sidebar-head { height: 84px; justify-content: space-between; flex-direction: row; gap: 0; padding: 0 20px; }
  .sidebar:not(.expanded) .sidebar-head .icon-button { display: inline-flex; }
  .sidebar:not(.expanded) .logo.compact span { font-size: 28px; }
  .sidebar nav button, .sidebar-bottom button { grid-template-columns: 52px 1fr; }
  .sidebar:not(.expanded) .nav-label { display: block; }
  .sidebar:not(.expanded) nav button::after, .sidebar:not(.expanded) .sidebar-bottom button::after { display: none; }
  .topbar { display: none; }
  .mobile-top {
    position: fixed;
    z-index: 35;
    inset: 0 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 17px;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 9, 13, 0.9);
    backdrop-filter: blur(18px);
  }
  .mobile-top .logo span { font-size: 25px; }
  .mobile-top .logo small { font-size: 7px; }
  .content { padding: 88px 15px calc(126px + env(safe-area-inset-bottom)); }
  .page-header { min-height: auto; align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-header h1 { font-size: 34px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric { min-height: 116px; grid-template-columns: 36px 1fr; gap: 10px; padding: 15px 12px; }
  .metric-icon { width: 35px; height: 35px; }
  .metric strong { font-size: 23px; }
  .panel { padding: 17px; }
  .history-filter-primary, .history-filter-secondary { grid-template-columns: 1fr; }
  .history-period-controls { grid-template-columns: 1fr; }
  .history-panel { margin-bottom: 18px; overflow: visible; }
  .history-table { display: none; }
  .history-cards { display: grid; gap: 10px; }
  .dashboard-recent-table { display: none; }
  .dashboard-recent-cards { display: grid; gap: 10px; }
  .upload-panel { padding: 17px; }
  .upload-head { flex-direction: column; }
  .dropzone { min-height: 200px; }
  .upload-file { grid-template-columns: 38px 1fr 38px; padding: 10px; }
  .auto-identification { grid-column: 2 / 4; justify-content: flex-start; }
  .reference-row { grid-template-columns: 1fr; }
  .reference-row > div { align-items: stretch; flex-direction: column; }
  .preflight { justify-content: flex-start; }
  .rename-bar { grid-template-columns: 1fr; align-items: stretch; }
  .rename-bar > div { justify-content: flex-end; }
  .review-decision { grid-template-columns: 1fr; align-items: stretch; }
  .review-actions { width: 100%; }
  .review-actions button { flex: 1; }
  .identification-strip { align-items: stretch; flex-direction: column; }
  .identification-files { justify-content: flex-start; }
  .format-review { grid-template-columns: 60px 1fr; }
  .format-review-icon { width: 58px; height: 58px; }
  .format-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 50px 1fr; }
  .process-steps { grid-column: 1 / -1; }
  .result-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px 3px;
  }
  .result-row:hover { transform: none; }
  .result-row.pinned { margin-inline: -6px; padding-inline: 10px; }
  .difference-audit.result-truth-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid rgba(39, 225, 210, 0.1);
    border-radius: 10px;
    background: rgba(39, 225, 210, 0.025);
  }
  .result-truth-mobile > span { justify-items: start; }
  .result-truth-mobile small, .result-truth-mobile .split-machine-proof { max-width: none; text-align: left; }
  .result-tools { width: 100%; min-width: 0; grid-template-columns: 1fr; }
  .result-search { width: 100%; }
  .result-tools .segmented { width: 100%; overflow-x: auto; }
  .result-tools .segmented button { flex: 1 0 auto; }
  .result-toggle {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
    font-size: 9px;
  }
  .result-toggle svg { width: 14px; transition: transform 0.15s ease; }
  .result-row.expanded .result-toggle svg { transform: rotate(90deg); }
  .result-collapsible { display: none; grid-template-columns: 1fr; gap: 10px; }
  .result-row.expanded .result-collapsible { display: grid; }
  .result-items { display: grid; grid-template-columns: 1fr; }
  .result-items > span { width: 100%; max-width: none; }
  .result-side { width: 100%; grid-template-columns: 1fr; align-items: center; justify-items: stretch; gap: 11px; }
  .result-side > strong { justify-self: start; }
  .result-side > .difference-audit { display: none; }
  .result-card-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
  .quick-pin, .resolve-button { min-height: 42px; padding-inline: 12px; }
  .resolve-button { min-height: 40px; }
  .modal-backdrop:has(.resolution-modal) { padding: 0; place-items: stretch; }
  .resolution-modal { width: 100%; height: 100dvh; max-height: 100dvh; align-self: stretch; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 0; }
  .review-confirmation-modal { align-self: end; width: 100%; max-height: calc(100vh - 16px); padding: 20px; border-radius: 22px 22px 0 0; overflow: auto; }
  .candidate-list button { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .candidate-list { max-height: none; overflow: visible; padding-right: 0; }
  .candidate-source { grid-column: 2 / 4; }
  .candidate-difference { grid-column: 3; grid-row: 1; }
  .resolution-actions { position: sticky; z-index: 3; bottom: calc(-22px - env(safe-area-inset-bottom)); padding: 13px 0 calc(22px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, rgba(5, 9, 13, 0.98) 20%); }
  .reprocess-chain { align-items: flex-start; flex-direction: column; }
  .reprocess-chain > div { justify-content: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
  .tolerance-options { grid-template-columns: repeat(3, 1fr); }
  .matching-policy-head > .muted { max-width: 560px; }
  .policy-row { min-height: 72px; }
  .save-bar, .save-bar > div { align-items: stretch; flex-direction: column; }
  .support-hero { grid-template-columns: 64px 1fr; padding: 23px; }
  .support-icon { width: 62px; height: 62px; }
  .support-hero .primary { grid-column: 1 / -1; }
  .support-grid { grid-template-columns: 1fr; }
  .mobile-nav {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    min-height: 70px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(5, 9, 13, 0.94);
    backdrop-filter: blur(18px);
  }
  .mobile-nav button { display: grid; justify-items: center; gap: 4px; border: 0; color: var(--muted); background: transparent; font-size: 8px; }
  .mobile-nav button svg { width: 18px; }
  .mobile-nav button.active { color: var(--cyan); }
  .idle-warning { top: 72px; right: 12px; }
}

@media (max-width: 520px) {
  .content { padding-inline: 11px; padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  .page-header h1 { font-size: 30px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { display: block; }
  .metric-icon { margin-bottom: 12px; }
  .metric strong { font-size: 21px; }
  .action-row { width: 100%; flex-direction: column-reverse; }
  .action-row > * { width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .panel-head:has(.segmented) { align-items: stretch; flex-direction: column; }
  .segmented { overflow-x: auto; }
  .segmented button { min-width: max-content; }
  .dropzone { min-height: 168px; padding: 20px 12px; text-align: center; }
  .dropzone > svg { width: 34px; height: 34px; }
  .upload-file { align-items: start; }
  .file-main strong { overflow-wrap: anywhere; }
  .tolerance-options { grid-template-columns: repeat(2, 1fr); }
  .policy-scope { width: 100%; }
  .policy-scope span { align-items: flex-start; flex-direction: column; gap: 2px; }
  .policy-row { grid-template-columns: 32px minmax(0, 1fr) 40px; gap: 9px; padding: 11px 10px; }
  .policy-icon { width: 31px; height: 31px; }
  .policy-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .policy-title strong { font-size: 10px; }
  .policy-copy > small { font-size: 8px; }
  .policy-switch { width: 40px; }
  .policy-row.on .policy-switch b { left: 19px; }
  .format-review { grid-template-columns: 1fr; text-align: left; }
  .format-review-icon { width: 52px; height: 52px; }
  .format-actions { grid-template-columns: 1fr; }
  .delete-modal { grid-template-columns: 52px 1fr; padding: 19px; }
  .delete-icon { width: 50px; height: 50px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions > * { width: 100%; }
  .resolution-head { grid-template-columns: 44px 1fr 36px; }
  .resolution-icon { width: 42px; height: 42px; border-radius: 13px; }
  .resolution-head span { font-size: 11px; }
  .resolution-head h2 { font-size: 22px; }
  .resolution-head p { font-size: 13px; line-height: 1.45; }
  .resolution-tabs button { min-height: 52px; font-size: 13px; }
  .candidate-title span, .resolution-note > span { font-size: 13px; }
  .candidate-title small { font-size: 12px; line-height: 1.5; }
  .resolution-methods { grid-template-columns: 1fr; }
  .resolution-methods button { min-height: 62px; padding: 11px 12px; }
  .resolution-methods button b { font-size: 13px; }
  .resolution-methods button small { font-size: 12px; white-space: normal; }
  .candidate-availability { align-items: flex-start; font-size: 12px; }
  .candidate-list { max-height: none; padding-right: 0; }
  .candidate-list button {
    min-height: 154px;
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 7px 10px;
    padding: 12px;
  }
  .candidate-check { grid-column: 1; grid-row: 1 / 4; margin-top: 1px; }
  .candidate-value { grid-column: 2; grid-row: 1; }
  .candidate-source { grid-column: 2; grid-row: 2; }
  .candidate-difference { grid-column: 2; grid-row: 3; justify-self: start; }
  .candidate-list button b { font-size: 14px; white-space: normal; }
  .candidate-list button small { font-size: 12px; line-height: 1.5; white-space: normal; text-overflow: clip; }
  .candidate-list button > strong { font-size: 13px; }
  .candidate-value b { font-size: 17px; }
  .candidate-clock { font-size: 14px !important; }
  .candidate-clock svg { width: 16px; height: 16px; }
  .candidate-time-gap { font-size: 12px; }
  .candidate-source b { font-size: 13px; }
  .candidate-source small {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .candidate-empty b, .not-found-confirmation b, .manual-evidence b, .duplicate-warning b { font-size: 13px; }
  .candidate-empty small, .not-found-confirmation small, .manual-evidence small, .duplicate-warning small { font-size: 12px; }
  .result-row {
    margin-bottom: 10px;
    padding: 16px 13px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background-color: rgba(255, 255, 255, 0.018);
  }
  .result-row.pinned { margin-inline: 0; padding-inline: 13px; }
  .result-primary > strong { font-size: 14px; }
  .result-primary > span, .order-id, .owner-note { font-size: 12px; }
  .automatic-status { font-size: 12px; }
  .result-toggle { min-height: 43px; font-size: 12px; }
  .result-items > span { padding: 14px; }
  .result-items i { font-size: 12px; }
  .result-items b { font-size: 16px; }
  .result-items small, .result-items small b { font-size: 12px; }
  .result-side > strong { font-size: 17px; }
  .difference-audit { grid-template-columns: 1fr; }
  .difference-audit small, .difference-audit i { font-size: 11px; }
  .difference-audit strong { font-size: 16px; }
  .review-confirmation-summary { grid-template-columns: 1fr; }
  .review-confirmation-summary span { grid-template-columns: 42px 1fr; align-items: center; }
  .review-confirmation-summary small { font-size: 11px; }
  .pin-toggle { grid-template-columns: 28px 1fr; }
  .pin-toggle i { grid-column: 2; justify-self: start; }
  .search-count { display: none; }
  .result-search { grid-template-columns: 34px minmax(0, 1fr) 34px; }
  .result-card-actions { width: 100%; }
  .result-card-actions > * { flex: 1; }
  .quick-pin span { display: inline; }
  .activation-card { max-height: none; }
  .activation-card h2 { font-size: 25px; }
  .activation-card form { gap: 15px; }
  .history-filters { gap: 10px; padding: 11px; }
  .history-filter-toolbar { align-items: flex-start; }
  .history-filter-toolbar span,
  .history-filter-field > span,
  .history-period-block > span,
  .history-status-block > span { font-size: 11px; }
  .history-filter-toolbar small { font-size: 11px; line-height: 1.35; }
  .history-clear { flex: 0 0 auto; padding-inline: 9px; font-size: 0; }
  .history-clear svg { width: 16px; }
  .history-active-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .history-active-filters span { flex: 0 0 auto; max-width: 82%; font-size: 10px; }
  .history-search { min-height: 48px; }
  .history-search input { font-size: 13px; }
  .history-period-block, .history-status-block { padding: 10px 0 0; }
  .history-date-range { grid-template-columns: 1fr; }
  .history-date-range label { grid-template-columns: 26px minmax(0, 1fr); }
  .history-date-range label > span { font-size: 11px; }
  .history-date-range input { min-height: 46px; font-size: 13px; }
  .history-shortcuts { flex-wrap: wrap; }
  .history-shortcuts button { flex: 1 1 calc(50% - 5px); min-height: 40px; font-size: 11px; }
  .history-status-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-status-options button { min-height: 44px; padding-inline: 5px; font-size: 10px; }
  .history-panel > .empty { min-height: 150px; }
  .history-card header { align-items: flex-start; }
  .history-card-stats { gap: 5px; }
  .history-card-stats span { padding: 9px 7px; }
  .history-card footer .primary { flex: 1; }
  .idle-warning { grid-template-columns: 28px 1fr; }
  .idle-warning .primary { grid-column: 1 / -1; width: 100%; }
}

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

/* YZY-CONF-P2.0 — preferências visuais seguras e leitura compacta. */
.experience-panel { min-width: 0; }
.experience-groups { display: grid; gap: 14px; margin-top: 18px; }
.experience-group { display: grid; gap: 9px; }
.experience-group > span { display: grid; gap: 3px; }
.experience-group > span b { color: var(--soft); font-size: 11px; }
.experience-group > span small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.preference-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.preference-options button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.preference-options button > svg { width: 17px; justify-self: center; }
.preference-options button > span { min-width: 0; display: grid; gap: 2px; }
.preference-options button b { color: var(--soft); font-size: 10px; }
.preference-options button small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.preference-options button:hover { border-color: rgba(39, 225, 210, 0.22); background: rgba(39, 225, 210, 0.028); }
.preference-options button.active {
  color: var(--cyan);
  border-color: rgba(39, 225, 210, 0.36);
  background: rgba(39, 225, 210, 0.065);
  box-shadow: inset 0 0 18px rgba(39, 225, 210, 0.03);
}
.experience-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  padding: 10px;
  border: 1px solid rgba(75, 227, 155, 0.15);
  border-radius: 10px;
  color: var(--green);
  background: rgba(75, 227, 155, 0.03);
}
.experience-note > svg { width: 16px; flex: 0 0 auto; }
.experience-note span { display: grid; gap: 2px; }
.experience-note b { color: var(--soft); font-size: 9px; }
.experience-note small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.loading-line.is-delayed, .boot-screen.is-delayed { color: transparent; }
.activation-loading .loading-line { min-height: 96px; width: 100%; }

@media (min-width: 1181px) {
  .settings-grid {
    grid-template-columns:
      minmax(0, 0.95fr)
      minmax(0, 1.2fr)
      minmax(300px, 0.78fr);
  }
}

@media (min-width: 861px) {
  .view-simple .content { padding-top: 88px; }
  .view-simple .page-header { min-height: 86px; margin-bottom: 18px; }
  .view-simple .metrics { gap: 10px; margin-bottom: 12px; }
  .view-simple .metric { min-height: 104px; gap: 11px; padding: 15px; }
  .view-simple .metric-icon { width: 38px; height: 38px; }
  .view-simple .metric strong { margin-block: 6px 4px; }
  .view-simple .panel { padding: 19px; }
  .view-simple .result-row {
    grid-template-columns: minmax(230px, 0.9fr) minmax(330px, 1.1fr) minmax(170px, 0.5fr);
    gap: 12px;
    padding-block: 12px;
  }
  .view-simple .difference-audit.result-truth-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid rgba(39, 225, 210, 0.1);
    border-radius: 10px;
    background: rgba(39, 225, 210, 0.02);
  }
  .view-simple .result-truth-mobile > span { justify-items: start; }
  .view-simple .result-truth-mobile small,
  .view-simple .result-truth-mobile i { max-width: none; text-align: left; }
  .view-simple .result-toggle {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
    font-size: 9px;
    text-align: left;
  }
  .view-simple .result-toggle svg { width: 14px; flex: 0 0 auto; transition: transform 0.15s ease; }
  .view-simple .result-row.expanded .result-toggle svg { transform: rotate(90deg); }
  .view-simple .result-collapsible {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 190px);
  }
  .view-simple .result-row.expanded .result-collapsible { display: grid; }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .view-simple .result-row { grid-template-columns: minmax(220px, 0.8fr) minmax(340px, 1.2fr); }
  .view-simple .result-toggle { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .view-simple .content { padding-top: 78px; }
  .view-simple .page-header { margin-bottom: 14px; }
  .view-simple .page-header p { display: none; }
  .view-simple .metrics { margin-bottom: 12px; }
  .view-simple .metric { min-height: 96px; padding: 12px 10px; }
  .experience-panel { margin-bottom: 0; }
}

@media (max-width: 520px) {
  .preference-options { grid-template-columns: 1fr; }
  .preference-options button { min-height: 56px; }
}

:root[data-yzy-theme="light"] {
  color-scheme: light;
  color: #102a34;
  background: #dfeaed;
  --bg: #dfeaed;
  --surface: #f4f8f9;
  --surface-raised: #e7f0f2;
  --panel: rgba(244, 248, 249, 0.94);
  --panel-strong: rgba(248, 251, 252, 0.99);
  --line: rgba(24, 63, 74, 0.22);
  --line-cyan: rgba(10, 113, 111, 0.42);
  --cyan: #0a716f;
  --cyan-strong: #075f5d;
  --gold: #7b5500;
  --green: #08734d;
  --red: #b72f4b;
  --blue: #245fa4;
  --muted: #4b626b;
  --soft: #203c47;
  --shadow: 0 14px 34px rgba(36, 67, 77, 0.14);
}
:root[data-yzy-theme="light"] body::before {
  background:
    radial-gradient(circle at 16% 8%, rgba(8, 127, 122, 0.09), transparent 30%),
    radial-gradient(circle at 91% 14%, rgba(145, 103, 0, 0.065), transparent 27%),
    linear-gradient(rgba(31, 74, 87, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 74, 87, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 42px 42px, 42px 42px;
}
:root[data-yzy-theme="light"] .glass {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), transparent 58%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:root[data-yzy-theme="light"] .sidebar {
  background: rgba(245, 251, 252, 0.96);
  box-shadow: 12px 0 34px rgba(52, 83, 93, 0.08);
}
:root[data-yzy-theme="light"] .sidebar-head,
:root[data-yzy-theme="light"] .sidebar-bottom { border-color: rgba(33, 75, 87, 0.1); }
:root[data-yzy-theme="light"] .sidebar:not(.expanded) .sidebar-head .icon-button {
  background: #e8f1f3;
}
:root[data-yzy-theme="light"] .sidebar nav button:hover,
:root[data-yzy-theme="light"] .sidebar-bottom button:hover,
:root[data-yzy-theme="light"] .ghost:hover { color: #102a34; }
:root[data-yzy-theme="light"] .sidebar-bottom small { color: rgba(35, 70, 82, 0.5); }
:root[data-yzy-theme="light"] .topbar,
:root[data-yzy-theme="light"] .mobile-top,
:root[data-yzy-theme="light"] .mobile-nav {
  border-color: rgba(33, 75, 87, 0.12);
  background: rgba(244, 250, 251, 0.92);
}
:root[data-yzy-theme="light"] .logo span {
  color: #15343e;
  text-shadow: 0 0 22px rgba(8, 127, 122, 0.12);
}
:root[data-yzy-theme="light"] select,
:root[data-yzy-theme="light"] input {
  border-color: rgba(33, 75, 87, 0.18);
  background: #f7fbfc;
  color: #17313b;
}
:root[data-yzy-theme="light"] .field input,
:root[data-yzy-theme="light"] .history-search input,
:root[data-yzy-theme="light"] .result-search input { background: transparent; color: #17313b; }
:root[data-yzy-theme="light"] .history-date-range input:focus,
:root[data-yzy-theme="light"] .history-date-range input:focus-visible { background: #f7fbfc; }
:root[data-yzy-theme="light"] .segmented,
:root[data-yzy-theme="light"] .result-search,
:root[data-yzy-theme="light"] .review-actions,
:root[data-yzy-theme="light"] .resolution-tabs,
:root[data-yzy-theme="light"] .history-card-stats span {
  background: rgba(31, 74, 87, 0.045);
}
:root[data-yzy-theme="light"] td { color: var(--soft); border-color: rgba(33, 75, 87, 0.1); }
:root[data-yzy-theme="light"] tbody tr:hover td { background: rgba(8, 127, 122, 0.025); }
:root[data-yzy-theme="light"] .result-row {
  border-color: rgba(33, 75, 87, 0.12);
  background-color: rgba(255, 255, 255, 0.46);
}
:root[data-yzy-theme="light"] .result-row:hover { background-color: rgba(255, 255, 255, 0.72); }
:root[data-yzy-theme="light"] .result-items > span,
:root[data-yzy-theme="light"] .source-grid article,
:root[data-yzy-theme="light"] .preference-options button,
:root[data-yzy-theme="light"] .tolerance-options button,
:root[data-yzy-theme="light"] .policy-row,
:root[data-yzy-theme="light"] .review-confirmation-summary span,
:root[data-yzy-theme="light"] .reprocess-chain button {
  background: rgba(255, 255, 255, 0.55);
}
:root[data-yzy-theme="light"] .policy-scope b { color: #256b54; }
:root[data-yzy-theme="light"] .resolution-actions {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.98) 20%);
}

/* YZY-CONF-P2.4 — refinamento SOTA, contraste estrutural e ações operacionais consistentes. */
:root {
  font-family: Inter, Roboto, "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color-scheme: dark;
  color: #f7f7f8;
  background: #0b0c0e;
  --bg: #0b0c0e;
  --surface: #15171a;
  --surface-raised: #1d2024;
  --panel: #15171a;
  --panel-strong: #1a1d21;
  --line: #30343a;
  --line-strong: #414751;
  --navy: #173a57;
  --navy-soft: rgba(23, 58, 87, .34);
  --cyan: #31d4c7;
  --cyan-strong: #17b8ad;
  --gold: #e7b64b;
  --green: #39d59a;
  --red: #ff667d;
  --blue: #5ca9ff;
  --muted: #a7adb5;
  --soft: #d9dde2;
  --text-strong: #fbfbfc;
  --text-body: #dde1e6;
  --text-subtle: #a7adb5;
  --shadow: 0 18px 44px rgba(0, 0, 0, .34);
  --shadow-soft: 0 7px 20px rgba(0, 0, 0, .24);
  --focus-ring: rgba(49, 212, 199, .78);
}

html,
body { background: var(--bg); }
body { color: var(--text-body); font-size: 14px; }

body::before {
  background:
    radial-gradient(circle at 8% 4%, rgba(23, 58, 87, .22), transparent 30%),
    radial-gradient(circle at 96% 12%, rgba(231, 182, 75, .035), transparent 24%),
    linear-gradient(rgba(255, 255, 255, .011) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .011) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 90%);
}

.glass {
  border-color: var(--line);
  background:
    linear-gradient(145deg, rgba(23, 58, 87, .055), transparent 30%),
    var(--panel);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, .025);
  backdrop-filter: none;
}

h1,
h2,
h3,
.metric strong,
.result-hero strong,
.summary-value {
  font-family: Inter, "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  color: var(--text-strong);
  font-synthesis: none;
}

.page-header h1 {
  color: var(--text-strong);
  font-weight: 860;
  letter-spacing: -.052em;
  text-wrap: balance;
}

.page-header p {
  color: var(--text-body);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.6;
}

.eyebrow,
.panel-head span,
.upload-head span,
.process span,
.support-hero span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: .13em;
}

.panel-head h2,
.upload-head h2 {
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 820;
}

.sidebar {
  background: #0d0f11;
  border-color: #292d32;
  box-shadow: 8px 0 22px rgba(0, 0, 0, .26);
}
.sidebar::after {
  height: 150px;
  opacity: .72;
  background: radial-gradient(circle at top, rgba(23, 58, 87, .38), transparent 72%);
}
.sidebar-head,
.sidebar-bottom { border-color: #292d32; }
.sidebar nav button,
.sidebar-bottom button { color: #9fa6ae; border-color: transparent; background: transparent; }
.sidebar nav button:hover,
.sidebar-bottom button:hover { color: #f7f8f9; background: #1b1e22; }
.sidebar nav button.active {
  color: #dffcf8;
  border-color: #2c5a7d;
  background: linear-gradient(90deg, rgba(23,58,87,.7), rgba(22,27,31,.92));
  box-shadow: inset 3px 0 0 var(--cyan);
}

.topbar,
.mobile-top,
.mobile-nav {
  border-color: #292d32;
  background: rgba(13, 15, 17, .98);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .22);
}
.company-pill span { color: #f8f8f9; font-weight: 830; }
.company-pill small { color: var(--gold); font-size: 10px; font-weight: 860; letter-spacing: .1em; }
.top-status { color: #b3b8bf; font-size: 12px; }
.top-status b { color: #eceef1; }

.primary,
.ghost,
.round,
.icon-button,
.danger-button {
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease, filter .15s ease;
}
.primary {
  color: #06231f;
  border-color: rgba(49, 212, 199, .72);
  background: #3ad7c9;
  box-shadow: 0 8px 18px rgba(23, 184, 173, .17);
}
.primary:hover { transform: translateY(-1px); filter: brightness(1.035); box-shadow: 0 10px 24px rgba(23,184,173,.23); }
.primary:active { transform: translateY(0); }
.primary:disabled { color: #788184; border-color: #3a4346; background: #2c373a; box-shadow: none; opacity: 1; }
.ghost,
.round,
.icon-button { border-color: #3a3f46; color: #e0e3e7; background: #202328; }
.ghost:hover,
.round:hover,
.icon-button:hover { transform: translateY(-1px); border-color: #545b64; color: #ffffff; background: #292d32; box-shadow: none; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.metric,
.panel,
.review-decision,
.identification-strip,
.reprocess-chain,
.save-bar,
.support-hero,
.support-grid .panel { border-color: var(--line); }

.metric {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(23,58,87,.09), transparent 33%), var(--surface);
  box-shadow: var(--shadow-soft);
}
.metric::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--cyan); }
.metric.green::after { background: var(--green); }
.metric.gold::after { background: var(--gold); }
.metric.blue::after { background: var(--blue); }
.metric.red::after { background: var(--red); }
.metric:hover { transform: translateY(-2px); border-color: var(--line-strong); background: linear-gradient(135deg, rgba(23,58,87,.16), transparent 38%), #191c20; box-shadow: var(--shadow); }
.metric span { color: #b8bec6; font-size: 11px; font-weight: 860; letter-spacing: .065em; }
.metric strong { color: #f8f8f9; font-weight: 860; letter-spacing: -.04em; }
.metric small { color: #aeb4bc; font-size: 12px; line-height: 1.45; }
.metric-icon { border-color: #3a4047; background: #20242a; box-shadow: none; }

.panel { background: linear-gradient(145deg, rgba(23,58,87,.05), transparent 28%), var(--panel); }
.panel-head > small { color: var(--text-subtle); font-size: 12px; }
th { color: #b8bec6; font-size: 11px; font-weight: 860; letter-spacing: .075em; }
td { color: #e0e3e7; font-size: 13px; line-height: 1.5; }
tbody tr:hover td { background: #1a1d21; }

.reviewed-by,
.history-card p,
.support-grid p,
.support-hero p,
.upload-head p,
.dropzone p,
.policy-copy > small,
.matching-policy-head > .muted,
.experience-note small,
.save-bar small,
.file-main span,
.auto-identification small,
.current-setting small,
.idle-warning small { color: #aeb4bc; font-size: 12px; line-height: 1.58; }

.history-filters,
.dropzone,
.segmented,
.result-search,
.review-actions,
.resolution-tabs { border-color: #353b42; background: #111315; }
.history-search,
.history-shortcuts button,
.history-status-options button,
.segmented,
.result-search,
.review-actions,
.resolution-tabs,
.preflight span { border-color: #3a4047; background: #202328; }
.history-shortcuts button.active,
.history-status-options button.active,
.segmented button.active { color: #f5fffd; border-color: #2f617f; background: linear-gradient(90deg, rgba(23,58,87,.68), rgba(28,35,40,.92)); box-shadow: inset 2px 0 0 var(--cyan); }

input,
select { border-color: #3a4047; color: #f0f2f4; background: #202328; font-size: 14px; }
input::placeholder,
textarea::placeholder { color: #969da6; }

.policy-row,
.preference-options button,
.tolerance-options button,
.source-grid article,
.result-items > span,
.history-card,
.history-card-stats span,
.review-confirmation-summary span,
.reprocess-chain button,
.support-grid .panel {
  border-color: #363b42;
  background: #1a1c1f;
}

.policy-row,
.preference-options button,
.tolerance-options button {
  position: relative;
  overflow: visible;
}
.policy-row::after,
.preference-options button::after,
.tolerance-options button::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(52, 111, 157, .44);
  border-right: 1px solid rgba(52, 111, 157, .44);
  border-radius: 0 7px 0 0;
  opacity: .58;
  pointer-events: none;
  transition: opacity .16s ease, border-color .16s ease;
}
.policy-row:hover,
.preference-options button:hover,
.tolerance-options button:hover,
.source-grid article:hover,
.history-card:hover,
.support-grid .panel:hover { border-color: #48505a; background: #202328; }
.policy-row:hover::after,
.preference-options button:hover::after,
.tolerance-options button:hover::after { opacity: 1; border-color: rgba(75, 144, 194, .72); }

.policy-row.on,
.preference-options button.active,
.tolerance-options button.active {
  border-color: #36566e;
  background: linear-gradient(90deg, rgba(23,58,87,.42), rgba(27,30,34,.98) 38%);
  box-shadow: inset 3px 0 0 #2b6a94;
}
.policy-row.on::after,
.preference-options button.active::after,
.tolerance-options button.active::after { opacity: 1; border-color: rgba(49,212,199,.64); }
.policy-row.on .policy-title strong,
.preference-options button.active b { color: #f7f8f9; }
.policy-title strong { color: #eff1f4; font-size: 13px; }
.policy-title em { font-size: 10px; }
.policy-copy > small { font-size: 12px; }

.tolerance-options button { min-height: 64px; }
.tolerance-options small {
  top: -9px;
  right: 8px;
  padding: 4px 8px;
  border: 1px solid #506577;
  border-radius: 999px;
  color: #eaf3f9;
  background: #22384a;
  box-shadow: 0 3px 10px rgba(0,0,0,.24);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .045em;
}

.status { border-color: #3a4047; background: #202328; font-size: 11px; }
.status.completed,
.status.matched,
.status.reviewed,
.status.found { color: #6fe7b2; border-color: rgba(57,213,154,.38); background: rgba(57,213,154,.1); }
.status.mapping_required,
.status.review,
.status.unreviewed,
.status.pending { color: #f4ca67; border-color: rgba(231,182,75,.42); background: rgba(231,182,75,.1); }
.status.failed,
.status.unmatched,
.status.not_found { color: #ff8396; border-color: rgba(255,102,125,.42); background: rgba(255,102,125,.1); }

.result-row { border-color: #353a40; background: #17191c; }
.result-row:hover { border-color: #4a515a; background: #1c1f23; box-shadow: var(--shadow-soft); }
.view-simple .result-row { margin-bottom: 12px; padding: 14px; border: 1px solid #353a40; border-left-width: 4px; background: #17191c; box-shadow: var(--shadow-soft); }
.view-simple .result-row.not_found { border-left-color: var(--red); }
.view-simple .result-row.matched,
.view-simple .result-row.found { border-left-color: var(--green); }
.view-simple .result-row.review,
.view-simple .result-row.pinned { border-left-color: var(--gold); }
.view-simple .result-primary .order-id { display: none; }

.compact-order-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(158px, 1.25fr) minmax(90px, .65fr) minmax(120px, .92fr) minmax(126px, 1fr) minmax(150px, 1.18fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #394048;
  border-radius: 12px;
  background: #202328;
}
.compact-order-summary > span { min-width: 0; display: grid; align-content: center; gap: 6px; padding: 12px 13px; border-left: 1px solid #394048; }
.compact-order-summary > span:first-child { border-left: 0; }
.compact-order-summary small { color: #aeb4bc; font-size: 11px; font-weight: 860; letter-spacing: .05em; text-transform: uppercase; }
.compact-order-summary strong { overflow: hidden; color: #eef0f3; font-size: 14px; font-weight: 860; line-height: 1.28; text-overflow: ellipsis; white-space: nowrap; }
.compact-order strong { color: var(--cyan); }
.compact-time strong { color: var(--gold); }
.compact-payment.located strong { color: var(--green); }
.compact-difference strong.positive { color: var(--green); }
.compact-difference strong.negative { color: var(--red); font-size: 16px; }
.compact-difference strong.neutral { color: #eef0f3; }

.compact-order-value { display: flex; align-items: center; gap: 8px; min-width: 0; }
.compact-order-value > strong { flex: 1; min-width: 0; }
.copy-order-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #48505a;
  border-radius: 8px;
  color: #e9ecf0;
  background: #292d32;
  cursor: pointer;
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease;
}
.copy-order-button:hover { transform: translateY(-1px); border-color: #3f779b; color: #ffffff; background: #203342; }
.copy-order-button.copied { color: #7be9b9; border-color: rgba(57,213,154,.5); background: rgba(57,213,154,.12); }
.copy-order-button.error { color: #ff9cac; border-color: rgba(255,102,125,.48); background: rgba(255,102,125,.1); }
.copy-order-button.extended-copy { min-height: 28px; padding: 0 8px; font-size: 10px; }
.extended-order-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.extended-order-line > b { min-width: 0; overflow-wrap: anywhere; }

.difference-audit strong.negative,
.result-truth-mobile strong.negative,
.result-row .negative,
.result-row .status.not_found { font-variant-numeric: tabular-nums; }
.difference-audit strong.negative,
.result-truth-mobile strong.negative { color: var(--red); font-size: 18px; font-weight: 900; letter-spacing: -.02em; }

.view-simple .result-toggle { border-color: #424951; color: #e0e4e8; background: #202328; font-size: 11px; font-weight: 820; }
.view-simple .result-toggle:hover { border-color: #59616b; color: #ffffff; background: #292d32; }
.support-hero { background: linear-gradient(145deg, rgba(23,58,87,.08), transparent 30%), #15171a; }

/* Tema claro próprio: mesmo sistema visual, superfícies claras e contraste navy. */
:root[data-yzy-theme="light"] {
  color-scheme: light;
  color: #1f2d3a;
  background: #f3f5f7;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-raised: #edf1f4;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #cfd6dd;
  --line-strong: #aeb8c2;
  --navy: #123b5b;
  --navy-soft: rgba(18,59,91,.12);
  --cyan: #007c75;
  --cyan-strong: #006b65;
  --gold: #805500;
  --green: #087249;
  --red: #b42343;
  --blue: #155fa8;
  --muted: #526271;
  --soft: #263849;
  --text-strong: #0d1b2a;
  --text-body: #243746;
  --text-subtle: #526271;
  --shadow: 0 18px 38px rgba(24, 39, 54, .14);
  --shadow-soft: 0 6px 18px rgba(24, 39, 54, .09);
  --focus-ring: rgba(0,124,117,.72);
}
:root[data-yzy-theme="light"] body::before {
  background:
    radial-gradient(circle at 8% 4%, rgba(18,59,91,.08), transparent 30%),
    radial-gradient(circle at 96% 12%, rgba(128,85,0,.025), transparent 24%),
    linear-gradient(rgba(13,27,42,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,42,.028) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
}
:root[data-yzy-theme="light"] .glass {
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(18,59,91,.025), transparent 28%), #ffffff;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.96);
}
:root[data-yzy-theme="light"] .sidebar { background: #ffffff; border-color: #d7dde3; box-shadow: 7px 0 20px rgba(24,39,54,.07); }
:root[data-yzy-theme="light"] .sidebar::after { opacity: .42; background: radial-gradient(circle at top, rgba(18,59,91,.14), transparent 72%); }
:root[data-yzy-theme="light"] .sidebar-head,
:root[data-yzy-theme="light"] .sidebar-bottom { border-color: #e1e5e9; }
:root[data-yzy-theme="light"] .sidebar nav button,
:root[data-yzy-theme="light"] .sidebar-bottom button { color: #566675; }
:root[data-yzy-theme="light"] .sidebar nav button:hover,
:root[data-yzy-theme="light"] .sidebar-bottom button:hover { color: #0d1b2a; background: #edf1f4; }
:root[data-yzy-theme="light"] .sidebar nav button.active { color: #0b5563; border-color: #85a8bd; background: linear-gradient(90deg, rgba(18,59,91,.12), rgba(238,244,247,.96)); box-shadow: inset 3px 0 0 #137b91; }
:root[data-yzy-theme="light"] .topbar,
:root[data-yzy-theme="light"] .mobile-top,
:root[data-yzy-theme="light"] .mobile-nav { border-color: #d7dde3; background: rgba(255,255,255,.98); box-shadow: 0 4px 14px rgba(24,39,54,.07); }

:root[data-yzy-theme="light"] .logo span,
:root[data-yzy-theme="light"] h1,
:root[data-yzy-theme="light"] h2,
:root[data-yzy-theme="light"] h3,
:root[data-yzy-theme="light"] .metric strong,
:root[data-yzy-theme="light"] .summary-value { color: #0d1b2a; text-shadow: none; }
:root[data-yzy-theme="light"] .page-header p,
:root[data-yzy-theme="light"] p,
:root[data-yzy-theme="light"] td,
:root[data-yzy-theme="light"] .policy-title strong,
:root[data-yzy-theme="light"] .preference-options button b,
:root[data-yzy-theme="light"] .dropzone strong,
:root[data-yzy-theme="light"] .support-hero strong { color: #243746; }
:root[data-yzy-theme="light"] small,
:root[data-yzy-theme="light"] th,
:root[data-yzy-theme="light"] .top-status,
:root[data-yzy-theme="light"] .metric p,
:root[data-yzy-theme="light"] .metric small,
:root[data-yzy-theme="light"] .support-grid p,
:root[data-yzy-theme="light"] .support-hero p,
:root[data-yzy-theme="light"] .upload-head p,
:root[data-yzy-theme="light"] .dropzone p,
:root[data-yzy-theme="light"] .policy-copy > small,
:root[data-yzy-theme="light"] .matching-policy-head > .muted,
:root[data-yzy-theme="light"] .experience-note small,
:root[data-yzy-theme="light"] .save-bar small,
:root[data-yzy-theme="light"] .history-card p,
:root[data-yzy-theme="light"] .reviewed-by { color: #526271; }

:root[data-yzy-theme="light"] .primary { color: #062925; border-color: #008b82; background: #36d4c6; box-shadow: 0 7px 18px rgba(0,124,117,.16); }
:root[data-yzy-theme="light"] .primary:hover { box-shadow: 0 9px 22px rgba(0,124,117,.22); }
:root[data-yzy-theme="light"] .primary:disabled { color: #687680; border-color: #c6d0d7; background: #dbe4e8; box-shadow: none; }
:root[data-yzy-theme="light"] .ghost,
:root[data-yzy-theme="light"] .round,
:root[data-yzy-theme="light"] .icon-button { border-color: #c8d0d7; color: #243746; background: #ffffff; }
:root[data-yzy-theme="light"] .ghost:hover,
:root[data-yzy-theme="light"] .round:hover,
:root[data-yzy-theme="light"] .icon-button:hover { border-color: #95a3af; color: #0d1b2a; background: #edf1f4; box-shadow: none; }

:root[data-yzy-theme="light"] .metric { border-color: #cfd6dd; background: linear-gradient(135deg, rgba(18,59,91,.035), transparent 34%), #ffffff; box-shadow: var(--shadow-soft); }
:root[data-yzy-theme="light"] .metric:hover { border-color: #aeb8c2; background: linear-gradient(135deg, rgba(18,59,91,.065), transparent 36%), #ffffff; box-shadow: var(--shadow); }
:root[data-yzy-theme="light"] .metric span { color: #526271; }
:root[data-yzy-theme="light"] .metric small { color: #596a78; }
:root[data-yzy-theme="light"] .metric-icon { border-color: #d2d9df; background: #edf1f4; }
:root[data-yzy-theme="light"] .panel { background: linear-gradient(145deg, rgba(18,59,91,.02), transparent 28%), #ffffff; }
:root[data-yzy-theme="light"] th { color: #4b5d6d; }
:root[data-yzy-theme="light"] td { color: #243746; }
:root[data-yzy-theme="light"] tbody tr:hover td { background: #f1f4f6; }

:root[data-yzy-theme="light"] .history-filters,
:root[data-yzy-theme="light"] .dropzone,
:root[data-yzy-theme="light"] .segmented,
:root[data-yzy-theme="light"] .result-search,
:root[data-yzy-theme="light"] .review-actions,
:root[data-yzy-theme="light"] .resolution-tabs { border-color: #cbd3da; background: #edf1f4; }
:root[data-yzy-theme="light"] .history-search,
:root[data-yzy-theme="light"] .history-shortcuts button,
:root[data-yzy-theme="light"] .history-status-options button,
:root[data-yzy-theme="light"] .segmented,
:root[data-yzy-theme="light"] .result-search,
:root[data-yzy-theme="light"] .review-actions,
:root[data-yzy-theme="light"] .resolution-tabs,
:root[data-yzy-theme="light"] .preflight span { border-color: #cbd3da; background: #ffffff; }
:root[data-yzy-theme="light"] .history-shortcuts button.active,
:root[data-yzy-theme="light"] .history-status-options button.active,
:root[data-yzy-theme="light"] .segmented button.active { color: #0b5563; border-color: #7ea3ba; background: linear-gradient(90deg, rgba(18,59,91,.11), rgba(239,246,248,.98)); box-shadow: inset 2px 0 0 #137b91; }

:root[data-yzy-theme="light"] input,
:root[data-yzy-theme="light"] select { border-color: #bcc7d0; color: #172838; background: #ffffff; }
:root[data-yzy-theme="light"] input::placeholder,
:root[data-yzy-theme="light"] textarea::placeholder { color: #6b7b88; }
:root[data-yzy-theme="light"] .dropzone { border-color: #74a7aa; background: linear-gradient(135deg, rgba(18,59,91,.035), transparent 40%), #eef6f6; }
:root[data-yzy-theme="light"] .dropzone:hover,
:root[data-yzy-theme="light"] .dropzone.drag-active { border-color: #0b7b75; background: #e6f2f1; box-shadow: inset 0 0 0 1px rgba(0,124,117,.08); }

:root[data-yzy-theme="light"] .policy-row,
:root[data-yzy-theme="light"] .preference-options button,
:root[data-yzy-theme="light"] .tolerance-options button,
:root[data-yzy-theme="light"] .source-grid article,
:root[data-yzy-theme="light"] .result-items > span,
:root[data-yzy-theme="light"] .history-card,
:root[data-yzy-theme="light"] .history-card-stats span,
:root[data-yzy-theme="light"] .review-confirmation-summary span,
:root[data-yzy-theme="light"] .reprocess-chain button,
:root[data-yzy-theme="light"] .support-grid .panel { border-color: #cfd6dd; background: #ffffff; }
:root[data-yzy-theme="light"] .policy-row:hover,
:root[data-yzy-theme="light"] .preference-options button:hover,
:root[data-yzy-theme="light"] .tolerance-options button:hover,
:root[data-yzy-theme="light"] .source-grid article:hover,
:root[data-yzy-theme="light"] .history-card:hover,
:root[data-yzy-theme="light"] .support-grid .panel:hover { border-color: #aeb8c2; background: #f7f9fa; }
:root[data-yzy-theme="light"] .policy-row.on,
:root[data-yzy-theme="light"] .preference-options button.active,
:root[data-yzy-theme="light"] .tolerance-options button.active { border-color: #8aa7ba; background: linear-gradient(90deg, rgba(18,59,91,.105), #f7fbfc 42%); box-shadow: inset 3px 0 0 #1d668f; }
:root[data-yzy-theme="light"] .policy-row::after,
:root[data-yzy-theme="light"] .preference-options button::after,
:root[data-yzy-theme="light"] .tolerance-options button::after { border-color: rgba(18,59,91,.32); }
:root[data-yzy-theme="light"] .tolerance-options small { color: #ffffff; border-color: #315e7b; background: #244a65; box-shadow: 0 3px 9px rgba(24,39,54,.17); }

:root[data-yzy-theme="light"] .status { border-color: #cbd3da; background: #edf1f4; }
:root[data-yzy-theme="light"] .status.completed,
:root[data-yzy-theme="light"] .status.matched,
:root[data-yzy-theme="light"] .status.reviewed,
:root[data-yzy-theme="light"] .status.found { color: #076742; border-color: rgba(8,114,73,.34); background: #e7f4ed; }
:root[data-yzy-theme="light"] .status.mapping_required,
:root[data-yzy-theme="light"] .status.review,
:root[data-yzy-theme="light"] .status.unreviewed,
:root[data-yzy-theme="light"] .status.pending { color: #734d00; border-color: rgba(128,85,0,.34); background: #fff6de; }
:root[data-yzy-theme="light"] .status.failed,
:root[data-yzy-theme="light"] .status.unmatched,
:root[data-yzy-theme="light"] .status.not_found { color: #a61f3b; border-color: rgba(180,35,67,.34); background: #fff0f3; }

:root[data-yzy-theme="light"] .result-row { border-color: #cfd6dd; background: #ffffff; }
:root[data-yzy-theme="light"] .result-row:hover { border-color: #aeb8c2; background: #ffffff; box-shadow: var(--shadow-soft); }
:root[data-yzy-theme="light"] .view-simple .result-row { background: #ffffff; box-shadow: var(--shadow-soft); }
:root[data-yzy-theme="light"] .compact-order-summary { border-color: #cbd3da; background: #edf1f4; }
:root[data-yzy-theme="light"] .compact-order-summary > span { border-color: #d2d9df; background: #ffffff; }
:root[data-yzy-theme="light"] .compact-order-summary small { color: #526271; }
:root[data-yzy-theme="light"] .compact-order-summary strong { color: #243746; }
:root[data-yzy-theme="light"] .compact-order strong { color: #006b65; }
:root[data-yzy-theme="light"] .compact-time strong { color: #734d00; }
:root[data-yzy-theme="light"] .compact-difference strong.negative { color: #b42343; font-size: 16px; }
:root[data-yzy-theme="light"] .difference-audit strong.negative,
:root[data-yzy-theme="light"] .result-truth-mobile strong.negative { color: #b42343; font-size: 18px; }
:root[data-yzy-theme="light"] .copy-order-button { color: #243746; border-color: #bcc7d0; background: #edf1f4; }
:root[data-yzy-theme="light"] .copy-order-button:hover { color: #0b5563; border-color: #6d98b3; background: #e9f2f6; }
:root[data-yzy-theme="light"] .copy-order-button.copied { color: #076742; border-color: rgba(8,114,73,.42); background: #e7f4ed; }
:root[data-yzy-theme="light"] .view-simple .result-toggle { border-color: #bcc7d0; color: #243746; background: #ffffff; }
:root[data-yzy-theme="light"] .view-simple .result-toggle:hover { border-color: #95a3af; color: #0d1b2a; background: #edf1f4; }
:root[data-yzy-theme="light"] .support-hero { background: linear-gradient(145deg, rgba(18,59,91,.025), transparent 30%), #ffffff; }
:root[data-yzy-theme="light"] .resolution-actions { background: linear-gradient(180deg, transparent, rgba(255,255,255,.99) 20%); }

@media (min-width: 1440px) {
  .view-simple .result-row { grid-template-columns: minmax(225px, .68fr) minmax(720px, 2.05fr) minmax(180px, .52fr); gap: 14px; }
}
@media (min-width: 861px) and (max-width: 1439px) {
  .view-simple .result-row { grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); }
  .view-simple .result-toggle { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .page-header p { font-size: 13px; }
  .compact-order-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-order-summary > span { min-height: 72px; border-top: 1px solid #394048; }
  .compact-order-summary > span:nth-child(-n + 2) { border-top: 0; }
  .compact-order-summary > span:nth-child(odd) { border-left: 0; }
  .compact-difference { grid-column: 1 / -1; }
  .compact-order-summary > .compact-difference { border-left: 0; }
  .extended-order-line { align-items: flex-start; flex-direction: column; }
  :root[data-yzy-theme="light"] .compact-order-summary > span { border-top-color: #d2d9df; }
}
@media (max-width: 520px) {
  .view-simple .result-row { padding: 14px 12px; }
  .compact-order-summary strong { font-size: 14px; }
  .compact-order-summary small { font-size: 10px; }
  .compact-order-value { align-items: flex-start; flex-direction: column; gap: 7px; }
  .copy-order-button { min-height: 34px; width: 100%; }
  .copy-order-button.extended-copy { width: auto; min-height: 30px; }
  .view-simple .result-toggle { min-height: 44px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .primary,
  .ghost,
  .round,
  .icon-button,
  .metric,
  .policy-row,
  .preference-options button,
  .tolerance-options button,
  .result-row,
  .copy-order-button { transition: none; }
}
