/* Barks Project Tracker – gaya aplikasi (sesuai style guide di kanvas) */
:root {
  --cyan: #17CCEE; --teal: #1F8EB5; --deep: #12708F; --ink: #0B2540;
  --violet: #7B61FF; --amber: #FFB020; --coral: #FF5C7A; --mint: #14C38E;
  --canvas: #F2F8FB; --line: #E3EDF3; --line2: #D5E4EC; --muted: #5B7083; --muted2: #3D5568; --track: #DCE8EF;
  --shadow: 0 1px 2px rgba(11,37,64,.04), 0 10px 30px rgba(11,37,64,.05);
  --r-card: 22px; --r-input: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Sora', 'Plus Jakarta Sans', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--canvas); }
a { color: var(--deep); } a:hover { color: var(--ink); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar { flex: 0 0 264px; width: 264px; background: #fff; box-shadow: 1px 0 0 var(--line); padding: 22px 16px 24px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 0 6px; display: block; }
.sidebar .brand img { height: 44px; width: auto; display: block; }
.nav-group { display: flex; flex-direction: column; gap: 4px; }
.nav-group > span { padding: 0 12px 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 14px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted2); }
.nav-link svg { flex: none; }
.nav-link:hover { background: var(--canvas); color: var(--ink); }
.nav-link.active { background: #E1F8FD; color: #0B5F7A; font-weight: 700; }
.nav-link .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.side-target { margin-top: auto; border-radius: 18px; padding: 16px; background: var(--canvas); display: flex; flex-direction: column; gap: 8px; }
.side-target .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.main { flex: 1; min-width: 0; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 24px; }

.topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.search { flex: 1 1 280px; max-width: 480px; display: flex; align-items: center; gap: 10px; height: 48px; border-radius: 999px; background: #fff; padding: 0 20px; }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 14px; }
.topbar .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 12px; padding-left: 16px; border-left: 1px solid var(--line2); text-decoration: none; color: inherit; }
.me .who { display: flex; flex-direction: column; line-height: 1.25; }
.me .who b { font-size: 14px; } .me .who span { font-size: 13px; color: var(--muted); }
.menu-btn { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head .sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Kartu dan grid */
.card { background: #fff; border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.card-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card.dark { background: var(--ink); color: #fff; }
.card.dark .sub { color: #DCE8EF; }
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.row.stretch { align-items: stretch; }
.grow { flex: 1 1 320px; min-width: 0; }
.grow-2 { flex: 2 1 520px; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }

.kpi { background: #fff; border-radius: var(--r-card); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.kpi .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi .label { font-size: 14px; font-weight: 600; color: var(--muted); }
.kpi .value { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.kpi .note { font-size: 13px; color: var(--muted); }
.tile { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; background: #17CCEE; color: var(--ink); }
.btn:hover { background: #12B8D8; color: var(--ink); }
.btn.outline { background: #fff; color: var(--deep); border: 1.5px solid var(--deep); }
.btn.outline:hover { background: var(--canvas); }
.btn.tonal { background: #E1F8FD; color: #0B5F7A; }
.btn.tonal:hover { background: #CDF2FA; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.danger { background: #FFE6EB; color: #C2294A; }
.btn.ghost { background: transparent; color: var(--deep); padding: 0 12px; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.inline-form { display: inline; }

/* Chip dan avatar */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.sq { border-radius: 3px; }
.avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.avatar.lg { width: 46px; height: 46px; font-family: var(--display); font-size: 14px; }

/* Form */
.form { display: flex; flex-direction: column; gap: 16px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; border-radius: var(--r-input); border: 1.5px solid var(--line); background: #fff; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--ink); }
textarea.input { min-height: 96px; line-height: 1.5; resize: vertical; }
.input:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(23,204,238,.2); }
.input[readonly] { background: var(--canvas); }
.input.right { text-align: right; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--deep); margin: 0; }

.seg { display: inline-flex; gap: 6px; padding: 5px; border-radius: 999px; background: #fff; flex-wrap: wrap; align-self: flex-start; }
.seg.soft { background: var(--canvas); }
.seg a, .seg label { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg a.on, .seg input:checked + span { background: var(--ink); color: #fff; font-weight: 700; }
.seg label { padding: 0; } .seg label span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 999px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--canvas); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.seg a.on .count { background: rgba(255,255,255,.18); color: #fff; }

/* Tabel */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 12px 10px; white-space: nowrap; }
.table td { padding: 12px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #F7FBFD; }
.table .main-cell b { display: block; } .table .main-cell span { font-size: 13px; color: var(--muted); }
.list-row { display: flex; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.list-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row .body b { font-size: 14px; } .list-row .body span { font-size: 13px; color: var(--muted); }

/* Progress bertitik (turunan ikon logo) */
.prog { flex: 1; min-width: 60px; height: 10px; display: flex; align-items: center; }
.prog > div { width: 100%; height: 4px; border-radius: 999px; background: var(--track); display: flex; align-items: center; }
.prog i { display: block; height: 4px; min-width: 10px; border-radius: 999px; background: var(--teal); }
.prog b { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); margin-left: -10px; }

/* Board kanban */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; align-items: start; }
.board-col { background: #E6F0F5; border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.board-col .head { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-weight: 700; }
.board-col .head .n { margin-left: auto; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.bcard { background: #fff; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 2px rgba(11,37,64,.06); text-decoration: none; color: inherit; }
.bcard:hover { box-shadow: 0 4px 14px rgba(11,37,64,.1); }
.bcard .t { font-weight: 700; font-size: 14px; line-height: 1.3; }
.bcard .s { font-size: 13px; color: var(--muted); }
.bcard .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bcard form { display: flex; gap: 6px; }
.bcard select { min-height: 36px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font-size: 12px; font-weight: 600; flex: 1; min-width: 0; }

/* Toggle */
.toggle { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 46px; height: 26px; margin: 0; cursor: pointer; }
.toggle span { width: 46px; height: 26px; border-radius: 999px; background: #C9DAE6; padding: 3px; display: flex; transition: background .15s; }
.toggle span::after { content: ''; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(11,37,64,.25); transition: transform .15s; }
.toggle input:checked + span { background: var(--cyan); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* Checklist */
.task { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--canvas); min-height: 56px; }
.task .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.task .body b { font-size: 14px; } .task .body span { font-size: 13px; color: var(--muted); }
.task.done .body b { text-decoration: line-through; color: var(--muted); }
.task button.box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #7F97A8; background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.task.done button.box { background: var(--mint); border-color: var(--mint); }

/* Pesan */
.flash { padding: 14px 18px; border-radius: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.flash.ok { background: #DCF7EC; color: #0B7A5A; } .flash.error { background: #FFE6EB; color: #C2294A; } .flash.info { background: #E1F8FD; color: #0B5F7A; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line2); border-radius: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num-big { font-family: var(--display); font-weight: 700; font-size: 20px; }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.mt-auto { margin-top: auto; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* Item baris penawaran */
.items { display: flex; flex-direction: column; gap: 10px; }
.item-row { display: grid; grid-template-columns: minmax(0,1fr) 80px 150px 44px; gap: 10px; align-items: center; }
.item-head { display: grid; grid-template-columns: minmax(0,1fr) 80px 150px 44px; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.totals { display: flex; flex-direction: column; gap: 8px; margin-left: auto; width: 100%; max-width: 340px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .grand { padding: 12px 14px; border-radius: 14px; background: var(--cyan); font-weight: 700; }
.totals .grand span:last-child { font-family: var(--display); font-size: 18px; }

/* Login */
.login { display: flex; flex-wrap: wrap; min-height: 100vh; }
.login .art { flex: 1.1 1 480px; min-height: 420px; position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.login .art img { position: absolute; right: -90px; top: -70px; width: 560px; height: 560px; }
.login .art h1 { position: relative; font-size: 44px; line-height: 1.12; max-width: 480px; }
.login .art p { position: relative; margin: 0; max-width: 460px; font-size: 16px; line-height: 1.6; color: #DCE8EF; }
.login .panel { flex: 1 1 440px; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login form { width: 100%; max-width: 400px; }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(11,37,64,.25); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .main { padding: 16px 16px 40px; }
  h1 { font-size: 26px; }
  .me .who { display: none; }
  .topbar { flex-wrap: nowrap; gap: 10px; } .topbar .search { flex: 1 1 auto; min-width: 0; width: auto; } .topbar .spacer { display: none; }
  .item-row, .item-head { grid-template-columns: minmax(0,1fr) 64px 120px 40px; }
  .login .art { padding: 32px; min-height: 300px; } .login .art h1 { font-size: 32px; } .login .art img { width: 360px; height: 360px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
