﻿@charset "UTF-8";

@font-face {
  font-family: Alata;
  src: url("assets/alata-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  font: 100%/1.45 "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --display: Alata, "Segoe UI", system-ui, sans-serif;
  --canvas: #f4f6f4;
  --sidebar: #edf2ee;
  --panel: #fff;
  --well: #ebf0ec;
  --hover: #e3ebe5;
  --ink: #181f1b;
  --muted: #4e5e55;
  --line: #d6e1d9;
  --control-line: #77887e;
  --primary: #146c43;
  --primary-hover: #0b5232;
  --on-primary: #fff;
  --accent: #075b37;
  --accent-soft: #dcefe2;
  --focus: #126e45;
  --import-bg: #e4edf3;
  --import-ink: #284b61;
  --error-bg: #fce9ea;
  --error-ink: #8e2936;
  --error-line: #db9ba4;
  --scrim: #0c1a13a8;
  --sidebar-width: 15rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #0e1310;
  --sidebar: #131815;
  --panel: #1b231e;
  --well: #171f1a;
  --hover: #28362d;
  --ink: #e6ece7;
  --muted: #a8b7ad;
  --line: #34433a;
  --control-line: #718878;
  --primary: #86d8a5;
  --primary-hover: #a2e7b8;
  --on-primary: #00391f;
  --accent: #a4deb9;
  --accent-soft: #243e2e;
  --focus: #8ddeaa;
  --import-bg: #263745;
  --import-ink: #b6d7ec;
  --error-bg: #401f26;
  --error-ink: #ffc1ca;
  --error-line: #905661;
  --scrim: #050807bd;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
h1, h2, h3, h4, p, dl, dd, ul, ol { margin: 0; }
p, dd, li { overflow-wrap: anywhere; }
input, button, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, button[aria-disabled="true"] { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { color: var(--ink); background: var(--accent-soft); }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  inset: 10px auto auto 10px;
  z-index: 3;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--panel);
  border-radius: 8px;
}

.icon {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-areas: "sidebar topbar" "sidebar content";
  grid-template-rows: auto 1fr;
}

.sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 0;
  min-height: 100vh;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.25rem 1rem;
  background: var(--sidebar);
  border-inline-end: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: #146c43;
  color: #fff;
  font: 1.05rem/1 var(--display);
}

.brand-name { min-width: 0; }
.brand-name strong { display: block; font: 1.15rem/1.2 var(--display); letter-spacing: -.02em; }
.brand-name span, .local-note p { color: var(--muted); font-size: .8125rem; }
.workspace-nav { display: grid; gap: .375rem; }
.workspace-nav a {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .7rem;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.workspace-nav a:hover { background: var(--hover); color: var(--ink); }
.workspace-nav a[aria-current="location"] { color: var(--accent); background: var(--accent-soft); }
.local-note {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-size: .875rem;
}
.local-note .icon { color: var(--accent); }
.local-note strong { display: block; font-weight: 650; }

.topbar {
  grid-area: topbar;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.5rem;
  background: var(--sidebar);
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  width: min(100%, 26rem);
  min-width: 0;
  color: var(--muted);
}
.search .icon {
  position: absolute;
  inset: 50% auto auto .875rem;
  transform: translateY(-50%);
  pointer-events: none;
}
.search input { border-radius: 999px; padding-inline-start: 2.5rem; }
.search input::placeholder { color: var(--muted); opacity: 1; }

main {
  grid-area: content;
  width: min(100%, 97rem);
  min-width: 0;
  margin-inline: auto;
  padding: 1.5rem 1.5rem 2rem;
}
#ringkasan, #kanban { scroll-margin-block-start: 1rem; }
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

h1, .board-label h2, .dialog-header h2 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(1.75rem, 2.7vw, 2.25rem); line-height: 1.15; }
.page-heading p { margin-top: .4rem; color: var(--muted); font-size: .9375rem; }
.page-heading .button { flex: none; }

.button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .45rem .95rem;
  border: 1px solid var(--control-line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
}
.button:hover:not(:disabled, [aria-disabled="true"]) { background: var(--hover); }
.button.primary { color: var(--on-primary); background: var(--primary); border-color: transparent; }
.button.primary:hover:not(:disabled) { background: var(--primary-hover); }
.button:active:not(:disabled, [aria-disabled="true"]), .card:active { filter: brightness(.94); }
.theme-toggle { flex: none; }
.theme-toggle[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.icon-button { width: 2.75rem; padding: 0; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .875rem;
}
.metric {
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .5rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}
.metric dt {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
}
.metric dd { font: 2.25rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.metric-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--well);
  color: var(--accent);
}
.metric-icon .icon { width: 1rem; height: 1rem; }
.metric-featured { color: #fff; background: linear-gradient(145deg, #0b3b24, #146c43); border-color: transparent; }
.metric-featured dt { color: #f1faf4; }
.metric-featured .metric-icon { color: #fff; background: #ffffff21; }
.metric-overdue .metric-icon { color: var(--error-ink); background: var(--error-bg); }

.kanban {
  min-width: 0;
  margin-top: 1.5rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.board-heading, .board-label, .board-toolbar, .board-navigation {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.board-heading, .board-toolbar { justify-content: space-between; }
.board-label { flex-wrap: wrap; }
.board-label h2 { font-size: 1.375rem; }
.result-count { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.board-navigation { flex-shrink: 0; }
.board-toolbar { margin-block: .65rem .75rem; }
.segmented {
  display: flex;
  gap: .2rem;
  padding: .2rem;
  border-radius: 999px;
  background: var(--well);
}
.segmented button {
  min-height: 2.25rem;
  padding: .35rem .8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
}
.segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.segmented button:hover:not(:disabled, [aria-pressed="true"]) { background: var(--hover); color: var(--ink); }
.stage-picker { min-width: 0; max-width: 15rem; }
.stage-picker select { border-radius: 999px; }

input, select, textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: .45rem .7rem;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--panel);
  caret-color: var(--accent);
}
textarea { min-height: 5rem; resize: vertical; }

.board {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(12.5rem, 23.8%, 17.5rem);
  gap: .7rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .2rem .2rem .75rem;
  scroll-padding-inline: .2rem;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--control-line) var(--well);
}

.column {
  min-width: 0;
  min-height: 15rem;
  overflow-wrap: anywhere;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 12px;
  scroll-snap-align: start;
}
.column-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem; padding: .75rem .6rem .6rem; }
.column-header h3 { font-size: .875rem; font-weight: 650; line-height: 1.25; }
.column-count {
  flex: none;
  padding: .075rem .45rem;
  border-radius: 999px;
  background: var(--hover);
  color: var(--muted);
  font: 650 .75rem/1.5 "Instrument Sans", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.column-empty { margin: .25rem .6rem .75rem; color: var(--muted); font-size: .8125rem; }
.card-list { display: grid; gap: .45rem; padding: 0 .45rem .45rem; list-style: none; }
.card {
  width: 100%;
  display: grid;
  justify-items: start;
  gap: .2rem;
  padding: .55rem .6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--panel);
  text-align: start;
  overflow-wrap: anywhere;
}
.card:hover { border-color: var(--control-line); background: var(--hover); }
.tag {
  display: inline-block;
  padding: .125rem .45rem;
  border-radius: 999px;
  background: var(--well);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 650;
}
.tag[data-type="impor"] { color: var(--import-ink); background: var(--import-bg); }
.tag[data-type="ekspor"] { color: var(--accent); background: var(--accent-soft); }
.card-reference { font-size: .9375rem; font-weight: 700; }
.card-customer { font-size: .875rem; }
.card-owner { color: var(--muted); font-size: .8125rem; }
.card-state, .card-flag { margin-top: .15rem; font-size: .8125rem; font-weight: 650; }
.card-state { color: var(--accent); }
.card-flag { color: var(--error-ink); }

.message { padding: .6rem .75rem; border-radius: 10px; font-size: .875rem; }
.message.error { color: var(--error-ink); background: var(--error-bg); border: 1px solid var(--error-line); }
.message.success { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--line); }
#startup-error { margin-bottom: .75rem; }
.empty-board {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .6rem;
  color: var(--muted);
  background: var(--well);
  border: 1px solid var(--line);
}

.dialog {
  width: min(38rem, calc(100% - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--ink);
  background: var(--panel);
  overscroll-behavior: contain;
}
.dialog::backdrop { background: var(--scrim); }
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .875rem 1.125rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.dialog-header h2 { font-size: 1.25rem; overflow-wrap: anywhere; }
.dialog-body { padding: 1rem 1.125rem 1.125rem; }
.dialog-body > * + * { margin-top: 1rem; }
.dialog-body h3 { margin-bottom: .4rem; font-size: 1rem; font-weight: 650; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.detail-meta dt, .evidence-list dt { margin-bottom: .1rem; color: var(--muted); font-size: .8125rem; }
.detail-meta dd, .evidence-list dd { font-size: .875rem; font-weight: 650; }
.detail-section { padding-top: .8rem; border-top: 1px solid var(--line); }
.detail-note { color: var(--muted); font-size: .875rem; }
.detail-section summary { cursor: pointer; font-weight: 650; }
.detail-section summary + * { margin-top: .5rem; }
.action-list { display: flex; flex-wrap: wrap; gap: .375rem; }
.action-list .button { text-align: left; overflow-wrap: anywhere; }
.action-list .button[aria-expanded="true"] { color: var(--accent); background: var(--accent-soft); }
.action-panel:not(:empty) { margin-top: .8rem; padding: .7rem; background: var(--well); border-radius: 12px; }
.editor { display: grid; gap: .65rem; }
.field { min-width: 0; display: grid; gap: .25rem; }
.field > label { font-size: .875rem; font-weight: 650; }
.editor-footer { display: flex; justify-content: flex-end; gap: .4rem; }
.history { display: grid; gap: .4rem; padding-inline-start: 1.2rem; font-size: .875rem; }
.history time, .history-date { display: block; margin-top: .1rem; color: var(--muted); font-size: .8125rem; }
.evidence-list { display: grid; gap: .45rem; }
.history-values { margin-top: .4rem; padding: .45rem; background: var(--well); border-radius: 8px; }
.value-text { white-space: pre-wrap; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .button, .card, .workspace-nav a, .segmented button {
    transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
  }
}

@media (max-width: 70rem) {
  :root { --sidebar-width: 12.25rem; }
  .metric { padding-inline: .75rem; }
}

@media (max-width: 56rem) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "sidebar" "topbar" "content";
    grid-template-rows: auto auto 1fr;
  }
  .sidebar {
    position: static;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem 1rem;
    border-inline-end: 0;
  }
  .workspace-nav { display: flex; flex-wrap: wrap; gap: .2rem; }
  .local-note { display: none; }
  .topbar { padding-inline: 1rem; }
  main { padding-inline: 1rem; }
}

@media (max-width: 43rem) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .metric { min-height: 5.4rem; padding: .6rem .7rem; border-radius: 16px; }
  .metric dd { font-size: 1.8rem; }
  .metric-icon { width: 1.55rem; height: 1.55rem; }
  .board { grid-auto-columns: min(82%, 17.5rem); }
}

@media (max-width: 31rem) {
  .sidebar { flex-wrap: wrap; gap: .3rem; }
  .brand-mark { height: 2rem; flex-basis: 2rem; border-radius: 9px; }
  .brand-name span { display: none; }
  .workspace-nav { flex-basis: 100%; }
  .workspace-nav a { min-height: 2.375rem; font-size: .8125rem; }
  .topbar { padding-block: .5rem; }
  .theme-toggle { width: 2.75rem; padding: 0; }
  .theme-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  main { padding: .9rem .75rem 1rem; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: .6rem; margin-bottom: .8rem; }
  .page-heading h1 { text-wrap: wrap; }
  .page-heading p { margin-top: .25rem; font-size: .875rem; }
  .kanban { margin-top: 1rem; padding: .55rem; border-radius: 16px; }
  .board-label { column-gap: .4rem; }
  .board-label h2 { font-size: 1.2rem; }
  .board-toolbar { gap: .4rem; }
  .segmented button { padding-inline: .55rem; font-size: .8125rem; }
  .stage-picker select { font-size: .8125rem; padding-inline: .45rem; }
  .dialog-header, .dialog-body { padding-inline: .75rem; }
}

@media (forced-colors: active) {
  .workspace-nav a[aria-current], .segmented button[aria-pressed="true"], .button[aria-pressed="true"], .action-list .button[aria-expanded="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}
