/* Gritrasindo — token & komponen mengikuti mockup desain */
:root {
  --ink: #17201A; --ink-2: #3E4A42; --ink-3: #4A564E; --muted: #5B665E;
  --bg: #F6F7F4; --card: #FFFFFF; --line: #E1E6E1; --line-2: #EEF1ED; --input: #CBD3CC; --soft: #F8FAF7; --head: #F1F4F0;
  --forest: #0F2A1B; --forest-2: #1C3D2A; --forest-line: #4F6E5A; --green: #14532D; --green-d: #0B3B1F; --green-soft: #E6F2E9;
  --accent: #F59E0B; --amber-d: #B45309; --on-dark: #E3ECE5; --on-dark-2: #C9D8CD; --on-dark-3: #B9CDBF;
  --font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Space Grotesk', Inter, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--green); } a:hover { color: var(--green-d); }
h1, h2, h3 { line-height: 1.15; }
.display { font-family: var(--display); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--green); color: #fff; } .btn-primary:hover { background: var(--green-d); color: #fff; }
.btn-accent { background: var(--accent); color: var(--forest); } .btn-accent:hover { color: var(--forest); filter: brightness(.96); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--input); font-weight: 600; } .btn-ghost:hover { color: var(--ink); border-color: #A9B4AB; }
.btn-outline-dark { color: #fff; border-color: var(--forest-line); font-weight: 600; } .btn-outline-dark:hover { color: #fff; background: rgba(255,255,255,.06); }
.btn-danger { background: #fff; color: #9F1239; border-color: #FBCFE8; font-weight: 600; }
.btn-lg { min-height: 52px; padding: 0 24px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 8px; }

/* Form */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  padding: 12px 14px; border: 1px solid var(--input); border-radius: 8px; font: inherit; font-weight: 400; font-size: 15px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
input[type=file] { padding: 10px; border: 1px dashed #A9B4AB; border-radius: 8px; font: inherit; font-size: 14px; background: var(--soft); width: 100%; }
textarea { resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 16px; } .row > * { flex: 1 1 200px; }
.stack { display: flex; flex-direction: column; gap: 16px; } .stack-sm { display: flex; flex-direction: column; gap: 10px; }
fieldset.card { margin: 0; } legend { padding: 0 6px; font-weight: 700; font-size: 16px; }
.inline-form { display: inline; margin: 0; }

/* Kartu, badge, tabel */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card-flush { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.card-head { padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 18px; }
.card-foot { padding: 12px 20px; font-size: 13px; border-top: 1px solid var(--line-2); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); } .badge-amber { background: #FEF3C7; color: #92400E; }
.badge-blue { background: #DBEAFE; color: #1E3A8A; } .badge-grey { background: #F1F1EF; color: var(--ink-2); } .badge-red { background: #FFE4E6; color: #9F1239; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; background: var(--soft); padding: 12px 20px; font-weight: 600; white-space: nowrap; }
.tbl td { padding: 14px 20px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.tbl td.strong { font-weight: 600; } .tbl td.dim { color: var(--ink-3); } .tbl .right { text-align: right; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi .lbl { font-size: 13px; color: var(--muted); } .kpi .val { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.1; } .kpi .sub { font-size: 13px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; background: #fff; color: var(--ink-2); border: 1px solid var(--input); }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip.round { border-radius: 999px; min-height: 44px; padding: 0 16px; font-size: 14px; }
.flash { border-radius: 12px; padding: 14px 18px; font-weight: 600; }
.flash-ok { background: var(--green-soft); border: 1px solid #A7D3B3; color: var(--green); }
.flash-error { background: #FFF1F2; border: 1px solid #FECDD3; color: #9F1239; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; } .kv > span:first-child { color: var(--muted); } .kv > span:last-child { font-weight: 600; text-align: right; }
.divider { border-top: 1px solid var(--line-2); padding-top: 12px; }
.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 12px; }
.dot { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 999px; background: var(--green); }
.dot.position { background: var(--accent); } .dot.info { background: #94A3B8; } .dot.todo { background: transparent; border: 2px solid var(--input); }
.grid-2 { display: flex; flex-wrap: wrap; gap: 16px; } .grid-2 > * { flex: 1 1 380px; min-width: 0; }
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.offer { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.offer .tag { font-size: 12px; font-weight: 700; color: var(--amber-d); letter-spacing: .5px; text-transform: uppercase; }
.offer .route { font-family: var(--display); font-size: 20px; font-weight: 700; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card span.box { min-height: 72px; padding: 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--input); }
.radio-card input:checked + span.box { background: var(--green-soft); border: 2px solid var(--green); color: var(--green); padding: 13px; }
.radio-card input:focus-visible + span.box { outline: 2px solid var(--green); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--input); border-radius: 10px; }
.stepper button { width: 44px; height: 44px; border: 0; background: transparent; font: inherit; font-size: 20px; cursor: pointer; }
.stepper input { width: 56px; border: 0; text-align: center; font-weight: 700; padding: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Header publik */
.site-header { background: var(--forest); color: #fff; }
.site-header .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; } .brand:hover { color: #fff; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .5px; }
.brand-sub { font-size: 12px; color: var(--on-dark-3); display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; } .site-nav a { color: var(--on-dark); text-decoration: none; } .site-nav a:hover { color: #fff; }
.header-actions { display: flex; gap: 10px; }

/* Landing */
.hero { background: var(--forest); color: #fff; }
.hero .wrap { padding-top: 72px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pill { align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--forest-2); color: #CDE6D3; font-size: 13px; font-weight: 600; }
.hero h1 { margin: 0; font-family: var(--display); font-size: clamp(36px, 5vw, 56px); line-height: 1.05; font-weight: 700; }
.hero p.lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--on-dark-2); max-width: 560px; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 16px; }
.stats b { display: block; font-family: var(--display); font-size: 32px; } .stats span { font-size: 13px; color: var(--on-dark-3); }
.quote-card { flex: 1 1 380px; min-width: 0; background: #fff; color: var(--ink); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.quote-card h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.clients { background: #fff; border-bottom: 1px solid var(--line); }
.clients .wrap { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.clients b { font-family: var(--display); font-size: 20px; color: var(--ink-2); }
.section { padding: 88px 0; } .section-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--green); letter-spacing: 1px; text-transform: uppercase; }
.section h2.big { margin: 8px 0 0; font-family: var(--display); font-size: clamp(28px, 4vw, 40px); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step .num { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--amber-d); } .step h3 { margin: 0; font-size: 18px; } .step p { margin: 0; color: var(--ink-3); }
.split { display: flex; flex-wrap: wrap; gap: 24px; } .split > * { flex: 1 1 460px; min-width: 0; border-radius: 18px; padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.split h2 { margin: 0; font-family: var(--display); font-size: 32px; } .split ul { margin: 0; padding-left: 20px; line-height: 1.9; }
.panel-green { background: var(--green); color: #fff; } .panel-green ul { color: #DCEBDF; }
.panel-white { background: #fff; border: 1px solid var(--line); } .panel-white ul { color: var(--ink-3); }
.site-footer { background: var(--forest); color: var(--on-dark-2); }
.site-footer .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer .col { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; } .site-footer .col b { color: #fff; }
.site-footer a { color: var(--on-dark); } .copyright { border-top: 1px solid #1F3F2C; padding: 18px 24px; text-align: center; font-size: 13px; color: #9FB5A6; }

/* Auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; }
.auth .card { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 16px; }
.auth h1 { margin: 0; font-family: var(--display); font-size: 28px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Shell aplikasi */
.app { min-height: 100vh; display: flex; }
.sidebar { flex: 0 0 248px; background: var(--forest); color: var(--on-dark); padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand-name { font-size: 17px; } .sidebar .brand-mark { width: 36px; height: 36px; border-radius: 9px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.side-nav a { padding: 12px; border-radius: 8px; color: var(--on-dark-2); text-decoration: none; } .side-nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.side-nav a.on { background: var(--forest-2); color: #fff; font-weight: 600; }
.side-box { margin-top: auto; padding: 14px; border-radius: 10px; background: var(--forest-2); font-size: 13px; line-height: 1.5; }
.side-box b { color: #fff; display: block; } .side-box a { color: var(--accent); font-weight: 600; }
.side-logout button { background: none; border: 0; color: var(--on-dark-2); font: inherit; font-size: 14px; cursor: pointer; padding: 8px 12px; }
.main { flex: 1 1 auto; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.page-head h1 { margin: 0; font-family: var(--display); font-size: 30px; } .page-head .who { font-size: 14px; color: var(--muted); }
.searchbox { display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 44px; border: 1px solid var(--input); border-radius: 10px; background: #fff; }
.searchbox input { border: 0; outline: none; padding: 0; width: 180px; font-size: 14px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { position: static; height: auto; flex: none; padding: 14px 16px; gap: 12px; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .side-nav a { white-space: nowrap; padding: 10px 12px; }
  .side-box { display: none; }
  .side-logout { position: absolute; top: 14px; right: 12px; }
  .sidebar { position: relative; }
  .main { padding: 20px 16px 48px; }
  .page-head > * { min-width: 0; }
  .head-actions { width: 100%; }
  .head-actions > * { flex: 1 1 auto; }
  .searchbox { flex: 1 1 100%; } .searchbox input { width: 100%; }
  .page-head h1 { font-size: 26px; }
  .wrap { padding: 0 16px; }
  .hero .wrap { padding-top: 40px; padding-bottom: 56px; }
  .section { padding: 56px 0; }
  .split > * { padding: 28px; }
  .site-nav { display: none; }
  .tbl th, .tbl td { padding-left: 14px; padding-right: 14px; }
}

/* Cetak surat jalan */
.print-page { max-width: 820px; margin: 24px auto; background: #fff; padding: 40px; border: 1px solid var(--line); }
@media print { body { background: #fff; } .no-print { display: none !important; } .print-page { border: 0; margin: 0; padding: 0; max-width: none; } }

/* Logo Gritrasindo: di atas latar putih agar hijau tua tetap terbaca di header gelap */
.brand-logo { background: #fff; border-radius: 10px; padding: 6px 12px; line-height: 0; }
.brand-logo img { height: 48px; width: auto; display: block; }
.side-brand { display: flex; flex-direction: column; gap: 8px; }
.side-brand .brand-logo { align-self: stretch; text-align: center; padding: 8px 10px; }
.side-brand .brand-logo img { height: auto; width: 100%; max-width: 200px; margin: 0 auto; }
.side-brand .brand-sub { padding-left: 4px; }
@media (max-width: 860px) {
  .brand-logo img { height: 40px; }
  .side-brand .brand-logo { align-self: flex-start; }
  .side-brand .brand-logo img { height: 36px; width: auto; }
}

/* Bukti pengiriman dari aplikasi mitra */
.pod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pod-item { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.pod-item img, .pod-doc { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); }
.pod-doc { display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
