:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e4e8ef;
  --surface: #ffffff;
  --background: #f7f9fc;
  --navy: #19345f;
  --navy-dark: #122747;
  --green: #20a66a;
  --green-soft: #e8f8f0;
  --red: #e34850;
  --red-soft: #fff0f1;
  --orange: #ed7d31;
  --orange-soft: #fff4e8;
  --amber: #d79614;
  --amber-soft: #fff8df;
  --blue: #3478d4;
  --blue-soft: #edf4ff;
  --shadow: 0 12px 35px rgba(26, 45, 76, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: color .2s, background-color .2s;
}

button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 9px 13px;
  color: white;
  background: var(--navy);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  height: 66px;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand, .local-pill, .source-title, .primary-actions,
.results-heading, .toolbar, .table-meta, .legend, .footer-inner {
  display: flex;
  align-items: center;
}

.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { gap: 11px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.01em; }
.brand strong { color: var(--green); }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--navy);
  border-radius: 11px;
}
.local-pill {
  justify-self: end;
  gap: 8px;
  padding: 6px 11px;
  color: #3e566e;
  background: #f1f5f8;
  border: 1px solid #e4eaef;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 650;
}
.local-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(32,166,106,.13); }
.header-tools { justify-self: end; display: flex; align-items: center; gap: 8px; }
.main-nav { display: flex; align-items: center; gap: 3px; padding: 4px; background: #f2f5f8; border: 1px solid #e3e8ee; border-radius: 10px; }
.main-nav a { padding: 7px 12px; color: #69768a; border-radius: 7px; text-decoration: none; font-size: .73rem; font-weight: 700; transition: color .15s, background .15s, box-shadow .15s; }
.main-nav a:hover { color: var(--navy); background: rgba(255,255,255,.75); }
.main-nav a.active { color: white; background: var(--navy); box-shadow: 0 3px 9px rgba(25,52,95,.15); }
.theme-toggle { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: #52657d; background: #f5f7fa; border: 1px solid #dfe5ec; border-radius: 9px; cursor: pointer; transition: color .15s, background .15s, border-color .15s, transform .15s; }
.theme-toggle:hover { color: var(--navy); background: white; border-color: #bdc8d5; transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 3px solid rgba(52,120,212,.22); outline-offset: 2px; }
.sun-icon { display: none; }

.hero { padding-block: 64px 38px; text-align: center; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--green);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero h1 { max-width: 780px; margin: 0 auto; font-size: clamp(2rem, 4.2vw, 3.45rem); line-height: 1.08; letter-spacing: -.048em; }
.hero h1 span { color: var(--navy); }
.hero-copy { max-width: 720px; margin: 19px auto 0; color: var(--muted); font-size: 1.04rem; }
.privacy-note {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
  padding: 8px 12px;
  color: #367659;
  background: var(--green-soft);
  border: 1px solid #cef0de;
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 600;
}

.workspace { padding-bottom: 60px; }
.input-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}
.paste-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-accent { position: absolute; inset: 0 0 auto; height: 4px; }
.doc-card .card-accent { background: var(--green); }
.panel-card .card-accent { background: #e2b425; }
.paste-card-header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.source-title { gap: 10px; }
.source-title h2 { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
.paste-card-header p { margin: 5px 0 0 39px; color: var(--muted); font-size: .78rem; }
.source-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; }
.doc-icon { color: #167f50; background: var(--green-soft); }
.panel-icon { color: #95700b; background: var(--amber-soft); }
.row-count { flex: none; padding: 5px 9px; color: var(--muted); background: #f5f7fa; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.column-hint {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  color: #526176;
  background: #f5f7fa;
  border: 1px solid #e0e5eb;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.column-hint span { padding: 8px 11px; }
.column-hint span + span { border-left: 1px solid #e0e5eb; }
textarea {
  width: 100%;
  min-width: 0;
  min-height: 235px;
  display: block;
  resize: vertical;
  padding: 14px;
  color: #26354b;
  background: #fbfcfe;
  border: 1px solid #dfe4eb;
  border-radius: 0 0 10px 10px;
  outline: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .82rem;
  line-height: 1.7;
  tab-size: 18;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea::placeholder { color: #a0a9b7; }
textarea:focus { background: white; border-color: #7da4d2; box-shadow: 0 0 0 3px rgba(52,120,212,.11); }
.doc-card textarea:focus { border-color: #59b68a; box-shadow: 0 0 0 3px rgba(32,166,106,.11); }
.input-feedback { margin: 10px 1px 0; color: #8490a1; font-size: .72rem; }
.input-feedback.has-warning { color: #b46b13; }
.compare-symbol {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(26,45,76,.12);
  transform: translate(-50%, -50%);
}
.primary-actions { justify-content: center; gap: 10px; margin-top: 24px; }
.button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: .82rem;
  font-weight: 750;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid rgba(52,120,212,.22); outline-offset: 2px; }
.button-primary { min-width: 205px; color: white; background: var(--navy); box-shadow: 0 8px 20px rgba(25,52,95,.18); }
.button-primary:hover { background: var(--navy-dark); }
.button-ghost { color: #566579; background: white; border-color: var(--line); }
.button-ghost:hover { border-color: #bdc5d0; }
.shortcut-hint { margin-left: 5px; color: #929dac; font-size: .7rem; }
kbd { padding: 2px 5px; color: #6d7786; background: white; border: 1px solid #dce1e7; border-bottom-width: 2px; border-radius: 4px; font-family: inherit; font-size: .65rem; }
.validation-message { max-width: 720px; margin: 17px auto 0; padding: 11px 14px; color: #9a5310; background: var(--orange-soft); border: 1px solid #f2d3b4; border-radius: 9px; text-align: center; font-size: .8rem; }

.results-section { padding: 57px 0 70px; background: white; border-top: 1px solid var(--line); }
.results-heading { justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.results-heading h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.035em; }
.processed-time { color: #8a95a4; font-size: .75rem; }
.summary-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.summary-card {
  position: relative;
  min-height: 119px;
  overflow: hidden;
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #e7eaf0;
  border-radius: 12px;
}
.summary-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #9aa5b5; }
.summary-card span { display: block; color: #606d7e; font-size: .7rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.summary-card strong { display: block; margin: 7px 0 1px; color: #24324a; font-size: 1.8rem; line-height: 1.1; letter-spacing: -.04em; }
.summary-card small { color: #929baa; font-size: .66rem; }
.summary-card.success { background: #f5fcf8; }.summary-card.success::before { background: var(--green); }.summary-card.success strong { color: #198457; }
.summary-card.danger { background: #fff8f8; }.summary-card.danger::before { background: var(--red); }.summary-card.danger strong { color: #c63840; }
.summary-card.orange { background: #fffaf5; }.summary-card.orange::before { background: var(--orange); }.summary-card.orange strong { color: #c96825; }
.summary-card.amber { background: #fffcf2; }.summary-card.amber::before { background: var(--amber); }.summary-card.amber strong { color: #a9760e; }
.summary-card.blue { background: #f7faff; }.summary-card.blue::before { background: var(--blue); }.summary-card.blue strong { color: #2d6bbc; }
.summary-card.prominent { box-shadow: 0 5px 15px rgba(227,72,80,.08); }

.result-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 25px rgba(26,45,76,.05); }
.toolbar { gap: 12px; padding: 15px 17px; background: #fbfcfe; border-bottom: 1px solid var(--line); }
.filter-field { display: flex; align-items: center; gap: 8px; }
.filter-field label { color: #778293; font-size: .72rem; font-weight: 700; }
select, .search-field {
  height: 39px;
  color: #39485d;
  background: white;
  border: 1px solid #dce2e9;
  border-radius: 8px;
}
select { min-width: 185px; padding: 0 34px 0 10px; font-size: .76rem; font-weight: 650; }
.search-field { min-width: 220px; display: flex; align-items: center; gap: 7px; margin-left: auto; padding: 0 10px; color: #8e98a7; }
.search-field:focus-within { border-color: #7da4d2; box-shadow: 0 0 0 3px rgba(52,120,212,.09); }
.search-field input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .78rem; }
.button-copy { color: white; background: var(--green); }
.button-copy:hover { background: #198e5a; }
.table-meta { justify-content: space-between; gap: 20px; padding: 11px 17px; color: #7a8595; background: white; border-bottom: 1px solid var(--line); font-size: .7rem; }
.table-meta p { margin: 0; }.table-meta strong { color: #425066; }
.legend { gap: 15px; }.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }.success-dot { background: var(--green); }.problem-dot { background: var(--red); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .76rem; }
thead { background: #f7f8fa; }
th { padding: 11px 16px; color: #6f7b8c; border-bottom: 1px solid var(--line); text-align: left; font-size: .66rem; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 16px; color: #49566a; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
td:first-child { color: #25344b; font-family: "SFMono-Regular", Consolas, monospace; font-weight: 700; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800; letter-spacing: .015em; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-SESUAI { color: #188454; background: var(--green-soft); }
.badge-SALAH_NOMINAL { color: #c83d44; background: var(--red-soft); }
.badge-TIDAK_ADA_DI_PANEL { color: #c76a24; background: var(--orange-soft); }
.badge-DUPLIKAT { color: #a6760e; background: var(--amber-soft); }
.badge-BELUM_INPUT_NOMINAL { color: #2d6fca; background: var(--blue-soft); }
.description { min-width: 230px; color: #717d8e; }
.empty-result { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: #98a2b1; text-align: center; }
.empty-result[hidden] { display: none; }
.empty-result strong { margin-top: 5px; color: #526075; font-size: .9rem; }.empty-result span { font-size: .75rem; }

footer { padding: 25px 0; color: #8a95a4; background: var(--background); border-top: 1px solid var(--line); font-size: .72rem; }
.footer-inner { justify-content: space-between; gap: 20px; }
.footer-inner span:first-child { color: #5b687a; font-weight: 700; }
.toast {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 11px 15px;
  color: white;
  background: #20324b;
  border-radius: 9px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  font-size: .78rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

:root[data-theme="dark"] {
  --ink: #e7edf7;
  --muted: #9ba9bd;
  --line: #29384e;
  --surface: #111d2e;
  --background: #0a1422;
  --navy: #4b83cf;
  --navy-dark: #386baa;
  --green: #36ca83;
  --green-soft: #123728;
  --red: #ff6d76;
  --red-soft: #3b1d25;
  --orange: #f69a54;
  --orange-soft: #3a291d;
  --amber: #e7b64c;
  --amber-soft: #372f1b;
  --blue: #66a2ef;
  --blue-soft: #172d49;
  --shadow: 0 14px 34px rgba(0, 0, 0, .2);
}
:root[data-theme="dark"] .site-header { background: rgba(10,20,34,.94); }
:root[data-theme="dark"] .brand-mark { background: #254d82; }
:root[data-theme="dark"] .local-pill,
:root[data-theme="dark"] .main-nav,
:root[data-theme="dark"] .theme-toggle { color: #a9b7c9; background: #111f32; border-color: #29394f; }
:root[data-theme="dark"] .main-nav a { color: #91a0b5; }
:root[data-theme="dark"] .main-nav a:hover { color: #dbe7f7; background: #18283c; }
:root[data-theme="dark"] .main-nav a.active { color: white; background: #315f9d; }
:root[data-theme="dark"] .theme-toggle:hover { color: #f6cb69; background: #18283c; border-color: #3b4c63; }
:root[data-theme="dark"] .moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: block; }
:root[data-theme="dark"] .privacy-note { color: #73dba8; border-color: #24553d; }
:root[data-theme="dark"] .source-icon.doc-icon { color: #62d59b; }
:root[data-theme="dark"] .source-icon.panel-icon { color: #e8c45f; }
:root[data-theme="dark"] .row-count,
:root[data-theme="dark"] .column-hint,
:root[data-theme="dark"] thead { color: #a5b2c4; background: #172438; border-color: #2b3b51; }
:root[data-theme="dark"] .column-hint span + span { border-color: #2b3b51; }
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .search-field,
:root[data-theme="dark"] .button-ghost,
:root[data-theme="dark"] kbd { color: #d8e2ef; background: #0d1828; border-color: #2c3c52; }
:root[data-theme="dark"] textarea:focus { background: #101d2f; }
:root[data-theme="dark"] textarea::placeholder,
:root[data-theme="dark"] .search-field input::placeholder { color: #708096; }
:root[data-theme="dark"] .compare-symbol { color: #8ab4ed; background: #152338; border-color: #304157; }
:root[data-theme="dark"] .validation-message { color: #efb976; background: #352517; border-color: #63421f; }
:root[data-theme="dark"] .results-section { background: #0d1827; }
:root[data-theme="dark"] .summary-card { background: #121f31; border-color: #2a394e; }
:root[data-theme="dark"] .summary-card span { color: #a2afc0; }
:root[data-theme="dark"] .summary-card strong { color: #e4ebf5; }
:root[data-theme="dark"] .summary-card small { color: #8391a5; }
:root[data-theme="dark"] .summary-card.success { background: #10291f; }
:root[data-theme="dark"] .summary-card.success strong { color: #61d39a; }
:root[data-theme="dark"] .summary-card.danger { background: #301c25; }
:root[data-theme="dark"] .summary-card.danger strong { color: #ff7b83; }
:root[data-theme="dark"] .summary-card.orange { background: #30231b; }
:root[data-theme="dark"] .summary-card.orange strong { color: #f4a363; }
:root[data-theme="dark"] .summary-card.amber { background: #2e2919; }
:root[data-theme="dark"] .summary-card.amber strong { color: #e6bd57; }
:root[data-theme="dark"] .summary-card.blue { background: #14263d; }
:root[data-theme="dark"] .summary-card.blue strong { color: #79acec; }
:root[data-theme="dark"] .result-panel { background: var(--surface); }
:root[data-theme="dark"] .toolbar,
:root[data-theme="dark"] .table-meta { background: #101d2e; }
:root[data-theme="dark"] td { color: #afbbcb; border-color: #25344a; }
:root[data-theme="dark"] td:first-child { color: #d6e2f0; }
:root[data-theme="dark"] tbody tr:hover { background: #152338; }
:root[data-theme="dark"] .description { color: #9ba9bb; }
:root[data-theme="dark"] .empty-result strong { color: #b7c4d6; }
:root[data-theme="dark"] footer { background: #0a1422; }
:root[data-theme="dark"] .footer-inner span:first-child { color: #b4c0d1; }

@media (max-width: 1000px) {
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
  .toolbar { flex-wrap: wrap; }
  .search-field { margin-left: 0; flex: 1; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 28px); max-width: 1180px; }
  .site-header { height: 60px; }
  .header-inner { grid-template-columns: auto 1fr auto; gap: 8px; }
  .brand { font-size: .9rem; }.brand-mark { width: 34px; height: 34px; }
  .brand > span:last-child, .local-pill { display: none; }
  .main-nav { justify-self: end; padding: 3px; }
  .main-nav a { padding: 6px 9px; font-size: .67rem; }
  .header-tools { gap: 0; }
  .theme-toggle { width: 34px; height: 34px; }
  .hero { padding-block: 44px 30px; }
  .hero h1 { font-size: 2.15rem; }.hero-copy { font-size: .92rem; }
  .privacy-note { width: 100%; justify-content: center; }
  .input-grid { grid-template-columns: 1fr; gap: 18px; }
  .compare-symbol { top: 50%; transform: translate(-50%, -50%) rotate(90deg); }
  .paste-card { padding: 18px; } textarea { min-height: 200px; }
  .primary-actions { flex-wrap: wrap; }.shortcut-hint { width: 100%; margin: 2px 0 0; text-align: center; }
  .results-section { padding-block: 44px 55px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-card { min-height: 108px; }.summary-card:first-child { grid-column: span 2; }
  .results-heading { align-items: flex-end; }.processed-time { max-width: 130px; margin: 0; text-align: right; }
  .filter-field { width: 100%; }.filter-field select { flex: 1; min-width: 0; }
  .search-field { width: 100%; flex-basis: calc(100% - 140px); }.button-copy { flex: 1; }
  .legend { display: none; }
  th, td { padding-inline: 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}

@media (max-width: 460px) {
  .hero h1 { font-size: 1.86rem; }.hero-copy { font-size: .85rem; }
  .privacy-note { align-items: flex-start; text-align: left; }
  .paste-card-header { gap: 8px; }.paste-card-header p { margin-left: 0; }
  .source-icon { display: none; }
  .primary-actions .button { width: 100%; }
  .results-heading { display: block; }.processed-time { max-width: none; text-align: left; }
  .summary-grid { gap: 8px; }.summary-card { padding: 13px; }.summary-card strong { font-size: 1.55rem; }
  .search-field, .button-copy { width: 100%; flex-basis: 100%; }
  .button-copy { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
