:root {
  color-scheme: light;
  --navy: #102d48;
  --navy-2: #163c59;
  --teal: #188b9d;
  --teal-soft: #e5f4f5;
  --canvas: #f2f6f7;
  --card: #ffffff;
  --line: #d9e4e8;
  --muted: #6f8497;
  --green: #19814b;
  --green-soft: #e7f4ec;
  --blue: #3074a8;
  --red: #c6404d;
  --red-soft: #fdebed;
  --amber: #a86b0d;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--navy); background: var(--canvas); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }

.demo-ribbon { position: fixed; inset: 0 0 auto; z-index: 20; height: 28px; display: grid; place-items: center; color: #fff; background: #a46608; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.app-shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; padding-top: 28px; }
.sidebar { position: sticky; top: 28px; height: calc(100vh - 28px); display: flex; flex-direction: column; padding: 28px 18px 20px; color: #fff; background: linear-gradient(165deg, #163e5a 0%, #0c263d 72%); }
.brand-line { display: flex; align-items: center; gap: 12px; }
.brand-line strong, .brand-line small { display: block; }
.brand-line strong { font-size: 15px; letter-spacing: .11em; }
.brand-line small { margin-top: 3px; color: #a9bfcd; font-size: 12px; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.23); border-radius: 13px; background: var(--teal); color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 12px 30px rgba(0,0,0,.17); }
.sidebar nav { display: grid; gap: 6px; margin-top: 38px; }
.nav-item { display: flex; min-height: 45px; align-items: center; gap: 12px; padding: 0 13px; border: 0; border-radius: 11px; color: #b9cbd6; background: transparent; font-size: 14px; font-weight: 650; text-align: left; cursor: pointer; }
.nav-item span { width: 18px; color: #8fb7c5; font-size: 18px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(31,157,172,.22); box-shadow: inset 3px 0 var(--teal); }
.sidebar-foot { margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.05); }
.sidebar-foot strong { display: inline-block; margin-left: 6px; font-size: 14px; }
.viewer-badge { display: inline-flex; padding: 4px 7px; border-radius: 99px; color: #bfeef0; background: rgba(32,170,183,.2); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.sidebar-foot form { margin-top: 12px; }
.logout { width: 100%; padding: 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: #c6d5dd; background: transparent; cursor: pointer; }
.logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.workspace { min-width: 0; padding: 34px 36px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--teal); font-size: 12px; font-weight: 900; letter-spacing: .15em; }
h1 { margin: 0; font-size: clamp(27px, 3vw, 39px); letter-spacing: -.045em; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.updated { color: var(--muted); font-size: 12px; text-align: right; }
.updated strong { display: block; margin-top: 3px; color: #425f73; }
.period-button { min-height: 43px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 13px; font-weight: 750; cursor: pointer; }
.mobile-menu { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.notice { display: flex; align-items: center; gap: 13px; margin: 25px 0 20px; padding: 13px 16px; border: 1px solid #efd8a9; border-radius: 12px; color: #80530c; background: #fff7e5; font-size: 13px; }
.notice strong { white-space: nowrap; }
.notice span { color: #8b6a36; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .panel { border: 1px solid rgba(16,45,72,.08); background: var(--card); box-shadow: 0 8px 26px rgba(28,55,73,.055); }
.metric-card { position: relative; overflow: hidden; min-height: 138px; padding: 20px; border-radius: 16px; }
.metric-card::after { content: ""; position: absolute; right: -25px; bottom: -35px; width: 95px; height: 95px; border-radius: 50%; background: var(--accent-soft, #edf3f5); }
.metric-card.teal { --accent: var(--teal); --accent-soft: #e5f4f5; }
.metric-card.blue { --accent: var(--blue); --accent-soft: #eaf2f8; }
.metric-card.green { --accent: var(--green); --accent-soft: #e7f4ec; }
.metric-card.navy { --accent: var(--navy); --accent-soft: #ebeff3; }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-value { position: relative; z-index: 1; margin-top: 13px; font-size: clamp(22px, 2.2vw, 30px); font-weight: 850; letter-spacing: -.04em; }
.delta { display: inline-flex; margin-top: 12px; color: var(--accent); font-size: 12px; font-weight: 800; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 16px; margin-top: 16px; }
.panel { min-width: 0; padding: 21px; border-radius: 16px; }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.panel-header h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--dot); }
.chart { min-height: 270px; overflow: hidden; }
.chart svg { display: block; width: 100%; height: 270px; overflow: visible; }
.chart-grid { stroke: #e5ecef; stroke-width: 1; }
.chart-axis { fill: #7b8fa0; font-size: 10px; }
.chart-area { fill: url(#areaFill); }
.chart-line { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: #fff; stroke: var(--teal); stroke-width: 3; }
.mini-list { display: grid; gap: 17px; }
.mini-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; }
.mini-row strong { font-size: 13px; }
.mini-row > span { color: var(--navy); font-size: 13px; font-weight: 800; }
.progress { grid-column: 1 / -1; height: 7px; overflow: hidden; border-radius: 99px; background: #eaf0f2; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #2ba6b4); }

.section-stack { display: grid; gap: 16px; }
.section-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.summary-box { padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #f9fbfc; }
.summary-box small { display: block; color: var(--muted); font-size: 12px; }
.summary-box strong { display: block; margin-top: 8px; font-size: 22px; letter-spacing: -.025em; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 12px 14px; color: #718797; background: #f5f8f9; font-size: 11px; letter-spacing: .045em; text-align: left; text-transform: uppercase; }
td { padding: 15px 14px; border-bottom: 1px solid #edf1f3; color: #385469; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--navy); }
.status { display: inline-flex; padding: 5px 8px; border-radius: 99px; color: var(--green); background: #e7f6ed; font-size: 11px; font-weight: 800; }
.readonly-card { display: grid; place-items: center; min-height: 320px; padding: 40px; text-align: center; }
.lock-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 20px; color: var(--teal); background: var(--teal-soft); font-size: 28px; }
.readonly-card h2 { margin: 18px 0 8px; font-size: 23px; }
.readonly-card p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.65; }
.readonly-card button { margin-top: 20px; padding: 11px 16px; border: 0; border-radius: 10px; color: #fff; background: var(--navy-2); cursor: pointer; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: 330px; padding: 13px 16px; border-radius: 11px; color: #fff; background: #153a55; box-shadow: 0 14px 42px rgba(12,38,61,.25); font-size: 13px; transform: translateY(24px); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

.login-body { background: radial-gradient(circle at 8% 5%, rgba(29,144,158,.14), transparent 34rem), #eef4f6; }
.login-shell { display: grid; grid-template-columns: minmax(340px, 42%) 1fr; min-height: 100vh; }
.login-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: #fff; background: radial-gradient(circle at 10% 10%, rgba(44,177,188,.26), transparent 25rem), linear-gradient(160deg, #173f5c, #0b243a 76%); }
.login-copy { max-width: 510px; }
.demo-pill { display: inline-flex; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; color: #c6f1f3; background: rgba(31,157,172,.14); font-size: 11px; font-weight: 900; letter-spacing: .15em; }
.login-copy h1 { margin-top: 20px; color: #fff; font-size: clamp(38px, 5vw, 66px); line-height: 1.03; }
.login-copy p { margin: 20px 0 0; color: #b6cbd6; font-size: 16px; line-height: 1.7; }
.secure-note { color: #99b2c1; font-size: 12px; }
.login-form-wrap { display: grid; place-items: center; padding: 30px; }
.login-card { width: min(100%, 490px); padding: 38px; border: 1px solid rgba(16,45,72,.08); border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(18,47,70,.12); }
.login-card h2 { margin: 0; font-size: 31px; letter-spacing: -.04em; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-card form { display: grid; gap: 15px; margin-top: 24px; }
.login-card label { display: grid; gap: 7px; color: #405e73; font-size: 12px; font-weight: 750; }
.login-card input { min-height: 48px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--navy); background: #fbfcfd; }
.login-card input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(24,139,157,.12); background: #fff; }
.login-card button { min-height: 49px; margin-top: 3px; border: 0; border-radius: 11px; color: #fff; background: var(--navy-2); font-weight: 800; cursor: pointer; }
.login-card button:hover { background: #0d304c; }
.login-alert { padding: 11px 13px; border-radius: 10px; color: #96333b; background: #fdebed; font-size: 13px; }

@media (max-width: 1120px) {
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .demo-ribbon { height: 34px; padding: 0 12px; font-size: 10px; text-align: center; }
  .app-shell { display: block; padding-top: 34px; }
  .sidebar { position: fixed; top: 34px; bottom: 0; left: 0; z-index: 30; width: 272px; height: auto; transform: translateX(-105%); transition: transform .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .workspace { padding: 22px 17px 36px; }
  .mobile-menu { display: grid; flex: 0 0 auto; place-items: center; }
  .topbar { align-items: flex-start; }
  .topbar > div:nth-child(2) { flex: 1; }
  .top-actions .updated { display: none; }
  .period-button { padding: 0 10px; font-size: 12px; }
  .notice { align-items: flex-start; flex-direction: column; gap: 4px; }
  .metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 124px; }
  .section-summary { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 340px; padding: 28px; }
  .login-copy h1 { font-size: 39px; }
  .login-form-wrap { padding: 20px; }
  .login-card { padding: 27px 22px; }
}

/* Dashboard demo mengikuti bahasa visual dashboard produksi. */
body:not(.login-body) {
  overflow-x: clip;
  color: #16324a;
  font-family: Arial, Helvetica, sans-serif;
  font-variant-numeric: tabular-nums;
}
body:not(.login-body) .app-shell { display: block; min-width: 0; min-height: 100vh; padding-top: 0; }
body:not(.login-body) .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 258px;
  height: auto;
  flex-direction: column;
  overflow-y: auto;
  padding: 30px 22px 22px;
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(46,151,160,.22), transparent 32%), linear-gradient(180deg,#112f4b 0%,#0c2740 100%);
}
body:not(.login-body) .brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; }
body:not(.login-body) .brand-mark {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 15px;
  background: #102b46 url('/assets/favicon.svg') center / cover no-repeat;
  box-shadow: 0 10px 28px rgba(0,0,0,.2);
}
body:not(.login-body) .brand strong, body:not(.login-body) .brand small { display: block; }
body:not(.login-body) .brand strong { font-size: 14px; letter-spacing: .07em; white-space: nowrap; }
body:not(.login-body) .brand small { margin-top: 3px; color: #a9bfce; font-size: 11px; }
body:not(.login-body) .sidebar nav { display: grid; gap: 5px; margin-top: 0; }
body:not(.login-body) .nav-item,
body:not(.login-body) .nav-group-toggle,
body:not(.login-body) .account-link {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border: 0;
  border-radius: 10px;
  color: #afc2d0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
  transition: 160ms ease;
}
body:not(.login-body) .nav-item:hover,
body:not(.login-body) .nav-item.active,
body:not(.login-body) .nav-group-toggle:hover,
body:not(.login-body) .nav-group-toggle.has-active,
body:not(.login-body) .account-link:hover { color: #fff; background: rgba(31,135,149,.24); box-shadow: none; }
body:not(.login-body) .nav-icon { display: grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; color: #6f91a8; font-size: 16px; line-height: 1; }
body:not(.login-body) .nav-item:hover .nav-icon,
body:not(.login-body) .nav-item.active .nav-icon,
body:not(.login-body) .nav-group-toggle:hover .nav-icon,
body:not(.login-body) .nav-group-toggle.has-active .nav-icon { color: #7cd0d7; }
body:not(.login-body) .nav-group { display: grid; gap: 5px; }
body:not(.login-body) .nav-group-chevron { width: 15px; height: 15px; margin-left: auto; color: #6f91a8; font-size: 17px; transition: transform 160ms ease; }
body:not(.login-body) .nav-group-toggle[aria-expanded='true'] .nav-group-chevron { transform: rotate(180deg); }
body:not(.login-body) .nav-submenu { display: grid; gap: 4px; margin-left: 22px; padding-left: 10px; border-left: 1px solid rgba(124,208,215,.22); }
body:not(.login-body) .nav-submenu[hidden] { display: none; }
body:not(.login-body) .nav-submenu .nav-item { padding: 9px 11px; font-size: 12.5px; }
body:not(.login-body) .nav-submenu .nav-icon { width: 16px; height: 16px; flex-basis: 16px; font-size: 14px; }
body:not(.login-body) .source-card { display: flex; gap: 10px; margin-top: auto; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.05); }
body:not(.login-body) .source-card strong, body:not(.login-body) .source-card small { display: block; }
body:not(.login-body) .source-card strong { font-size: 12px; }
body:not(.login-body) .source-card small { margin-top: 4px; color: #97aebe; font-size: 10px; line-height: 1.5; }
body:not(.login-body) .status-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 3px; border-radius: 50%; background: #45d07d; box-shadow: 0 0 0 4px rgba(69,208,125,.12); }
body:not(.login-body) .account-link { margin-top: 2px; font-size: 11px; }
.sheet-link-demo { display: flex; width: 100%; justify-content: space-between; margin-top: 8px; padding: 11px 14px; border: 0; border-radius: 9px; color: #a9bfce; background: transparent; cursor: pointer; font-size: 11px; text-align: left; }
.sheet-link-demo:hover { color: #fff; background: rgba(31,135,149,.16); }
.sidebar-logout { margin-top: 3px; }
.sidebar-logout button { width: 100%; padding: 10px 14px; border: 0; border-radius: 9px; color: #8fa8b8; background: transparent; cursor: pointer; font-size: 10px; text-align: left; }
.sidebar-logout button:hover { color: #fff; background: rgba(255,255,255,.06); }

.content { min-width: 0; margin-left: 258px; padding: 38px 42px 100px; }
body:not(.login-body) .topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
body:not(.login-body) .topbar h1 { margin: 0; color: var(--navy); font-size: clamp(28px,3vw,42px); letter-spacing: -.04em; }
body:not(.login-body) .topbar p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.title-line { display: flex; align-items: center; gap: 10px; }
.title-line .eyebrow { margin: 0 0 7px; font-size: 10px; }
.demo-mode-badge, .mobile-demo-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #8b5b0e; background: #f9e5b9; font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.header-actions { display: flex; align-items: flex-end; gap: 18px; }
body:not(.login-body) .updated { padding-bottom: 10px; color: var(--muted); font-size: 11px; text-align: left; }
body:not(.login-body) .month-select span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
body:not(.login-body) .month-select select { min-width: 154px; padding: 10px 34px 10px 12px; border: 1px solid var(--line); border-radius: 9px; color: #16324a; background: #fff; outline: none; }
.demo-boundary { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 13px; border: 1px solid #eedba7; border-radius: 11px; color: #80601e; background: #fffaf0; font-size: 10px; }
.demo-boundary strong { white-space: nowrap; }
.demo-boundary span { color: #8d733f; }

.hero-summary { position: relative; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(340px,.8fr); gap: 40px; overflow: hidden; padding: 34px 38px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 82% 20%,rgba(50,169,178,.23),transparent 30%),linear-gradient(120deg,#102d49 0%,#153b59 100%); box-shadow: 0 18px 50px rgba(17,49,73,.08); }
.hero-summary::after { position: absolute; right: -110px; bottom: -140px; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ''; }
.period-chip { display: inline-flex; padding: 6px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #acd8dc; background: rgba(255,255,255,.06); font-size: 10px; font-weight: 700; }
.hero-copy p { margin: 22px 0 6px; color: #b5c8d3; font-size: 13px; }
.hero-copy h2 { margin: 0; font-size: clamp(38px,5vw,65px); letter-spacing: -.055em; }
.profit-caption { display: flex; align-items: center; gap: 12px; margin-top: 17px; color: #9eb5c4; font-size: 11px; }
.positive-pill { padding: 6px 9px; border-radius: 999px; color: #91e8af; background: rgba(44,166,91,.16); font-weight: 700; }
.hero-breakdown { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 22px 26px; }
.hero-breakdown div { padding-left: 14px; border-left: 2px solid rgba(94,191,199,.45); }
.hero-breakdown span, .hero-breakdown strong { display: block; }
.hero-breakdown span { color: #9fb6c5; font-size: 10px; }
.hero-breakdown strong { margin-top: 5px; font-size: 15px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin: 16px 0; }
.kpi-card { min-width: 0; padding: 20px; border: 1px solid rgba(16,43,70,.05); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(17,49,73,.045); }
.kpi-card > div { display: flex; min-width: 0; align-items: center; justify-content: space-between; }
.kpi-card span { color: #5b6f81; font-size: 12px; }
.kpi-card strong { display: block; margin: 12px 0 5px; color: var(--navy); font-size: 25px; letter-spacing: -.04em; overflow-wrap: anywhere; }
.kpi-card small { color: #5f7385; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.mini-trend { display: flex; width: auto !important; height: 16px; align-items: flex-end; gap: 2px; }
.mini-trend i { display: block; width: 3px; border-radius: 3px; background: var(--teal); }
.mini-trend i:nth-child(1){height:7px}.mini-trend i:nth-child(2){height:11px}.mini-trend i:nth-child(3){height:8px}.mini-trend i:nth-child(4){height:15px}
.mini-trend.green i{background:var(--green)}.mini-trend.red i{background:var(--red)}.mini-trend.gold i{background:#c98d20}
.positive-text { color: var(--green) !important; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(320px,.75fr); gap: 16px; margin-bottom: 16px; }
body:not(.login-body) .panel { min-width: 0; padding: 24px; border: 1px solid rgba(16,43,70,.055); border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(17,49,73,.04); }
body:not(.login-body) .panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
body:not(.login-body) .panel-header h3 { margin: 0; color: var(--navy); font-size: 17px; letter-spacing: -.02em; }
body:not(.login-body) .panel-header small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.teal { background: var(--teal); }
.quality-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 136px; }
.quality-panel h3 { margin: 0; color: var(--navy); font-size: 17px; letter-spacing: -.02em; }
.quality-panel small { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.quality-actions { display: flex; align-items: center; gap: 12px; }
.quality-count { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-size: 11px; font-weight: 800; }
.quality-actions button { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #cfe2e5; border-radius: 999px; color: var(--teal); background: #f6fbfb; cursor: pointer; font-size: 10px; font-weight: 800; }
.insight-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 16px; padding: 18px 20px; border: 1px solid #eedba7; border-radius: 14px; background: #fffaf0; }
.insight-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #8e641c; background: #f2d995; font-weight: 900; }
.insight-strip strong { color: #6f501b; font-size: 11px; }
.insight-strip p { margin: 4px 0 0; color: #8d733f; font-size: 10px; line-height: 1.5; }
.sync-actions button { padding: 8px 11px; border: 1px solid #d9bd77; border-radius: 9px; color: #7e5b1f; background: #fff; cursor: pointer; font-size: 10px; font-weight: 800; }
body:not(.login-body) footer { display: flex; justify-content: space-between; padding: 24px 2px 0; color: #8a99a5; font-size: 9px; }
.table-caption { color: var(--muted); font-size: 10px; }
.mobile-topbar, .sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .content { padding-right: 28px; padding-left: 28px; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  body:not(.login-body) .mobile-topbar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg,#112f4b 0%,#0c2740 100%); }
  .mobile-nav-toggle { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; color: #fff; background: rgba(255,255,255,.06); cursor: pointer; }
  .mobile-topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: #fff; }
  body:not(.login-body) .mobile-topbar-brand .brand-mark { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; box-shadow: none; }
  .mobile-topbar-brand strong { overflow: hidden; font-size: 13px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-demo-badge { margin-left: auto; }
  body:not(.login-body) .sidebar { top: 0; bottom: 0; width: min(288px,84vw); height: auto; padding-top: 79px; transform: translateX(-100%); visibility: hidden; box-shadow: 0 22px 60px rgba(6,24,40,.45); transition: transform 220ms ease,visibility 220ms ease; }
  body:not(.login-body) .sidebar .brand { display: none; }
  body.menu-open:not(.login-body) .sidebar { transform: translateX(0); visibility: visible; }
  body.menu-open:not(.login-body) .sidebar-backdrop { position: fixed; inset: 0; z-index: 19; display: block; background: rgba(6,24,40,.55); backdrop-filter: blur(2px); }
  .content { margin-left: 0; padding: 24px 18px calc(28px + env(safe-area-inset-bottom)); }
  body:not(.login-body) .topbar { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; align-items: center; justify-content: space-between; }
  body:not(.login-body) .updated { padding: 0; }
  .hero-summary { grid-template-columns: 1fr; padding: 28px 24px; }
  .profit-caption { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-breakdown { grid-template-columns: 1fr; gap: 14px; }
  .hero-copy h2 { font-size: 38px; overflow-wrap: anywhere; }
  .header-actions { align-items: flex-start; flex-direction: column; }
  .demo-boundary { align-items: flex-start; flex-direction: column; }
  .insight-strip { grid-template-columns: auto 1fr; }
  .sync-actions { grid-column: 1 / -1; }
  body:not(.login-body) footer { gap: 8px; flex-direction: column; }
}

/* Komponen isi seluruh halaman demo. */
#view-root { display: grid; gap: 16px; min-width: 0; }
#view-root > .kpi-grid { margin: 0; }
#header-filters:empty { display: none; }
.header-filter-row { display: flex; align-items: flex-end; gap: 10px; }
.negative-text { color: var(--red) !important; }
.cell-subtitle { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 500; }
.mono { color: #4c687c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.period-pill { display: inline-flex; padding: 7px 10px; border-radius: 999px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 800; white-space: nowrap; }
.kpi-grid.kpi-three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.table-panel { overflow: hidden; }
.table-panel + .table-panel { margin-top: 0; }
.financial-table { min-width: 100%; }
.financial-table th { height: 48px; padding: 13px 15px; background: #f4f7f8; color: #718697; font-size: 10px; font-weight: 800; letter-spacing: .055em; }
.financial-table td { height: 56px; padding: 14px 15px; color: #35536a; font-size: 11px; }
.financial-table tbody tr { transition: background 140ms ease; }
.financial-table tbody tr:hover { background: #fafcfd; }
.financial-table tfoot td { border-top: 1px solid #dce6e9; border-bottom: 0; color: #183750; background: #f8fafb; font-size: 11px; font-weight: 800; }
.financial-table td .status { vertical-align: middle; }
.table-action { padding: 7px 9px; border: 1px solid #cfe1e5; border-radius: 8px; color: #147d8d; background: #f7fbfb; cursor: pointer; font-size: 10px; font-weight: 800; white-space: nowrap; }
.table-action:hover { border-color: #9ccbd1; background: #edf8f9; }
.status { align-items: center; justify-content: center; }
.status-info { color: #0f7485; background: #e3f3f5; }
.status-neutral { color: #506979; background: #edf2f4; }
.status-warning { color: #a0660b; background: #fff1d5; }
.status-error { color: #a73843; background: #fdebed; }

.viewer-restricted { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid #e5d5a7; border-radius: 14px; color: #6f501b; background: #fffaf0; }
.viewer-restricted .lock-mini { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #8a631a; background: #f3dfa7; font-size: 16px; font-weight: 900; }
.viewer-restricted strong { display: block; font-size: 11px; }
.viewer-restricted p { margin: 4px 0 0; color: #8b7447; font-size: 10px; line-height: 1.5; }
.viewer-role { padding: 5px 8px; border-radius: 999px; color: #8b5b0e; background: #f9e5b9; font-size: 9px; font-weight: 900; letter-spacing: .09em; }

.filter-bar { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)) auto; gap: 12px; margin-bottom: 18px; padding: 16px; border: 1px solid #dce7ea; border-radius: 14px; background: #f4f8f9; }
.filter-bar label { display: grid; gap: 7px; }
.filter-bar label > span, .shipping-method > span { color: #60768a; font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.filter-bar select, .filter-bar input, .inline-search input, .shipping-method select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #d4e1e5; border-radius: 10px; outline: none; color: #183750; background: #fff; font: inherit; font-size: 11px; font-weight: 650; }
.filter-bar .search-field { grid-column: span 2; }
.filter-bar > button { align-self: end; min-height: 43px; padding: 0 14px; border: 1px solid #d2e3e6; border-radius: 10px; color: #4b8390; background: #f9fcfc; cursor: pointer; font-size: 10px; font-weight: 800; }
.inline-search { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.inline-search input { max-width: 440px; }
.inline-search span { color: var(--muted); font-size: 10px; white-space: nowrap; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: -3px 0 8px; color: #657b8c; font-size: 10px; }
.legend span::before { width: 8px; height: 8px; margin-right: 6px; background: var(--dot); }
.multi-chart { min-height: 250px; }
.multi-chart svg { display: block; width: 100%; min-width: 520px; height: 250px; }
.multi-chart .svg-grid line { stroke: #e6edef; stroke-width: 1; }
.multi-chart .series { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.multi-chart .series.orders { stroke: #188b9d; }
.multi-chart .series.delivered { stroke: #19814b; }
.multi-chart .series.returns { stroke: #c6404d; }
.multi-chart text { fill: #7a8f9f; font-size: 10px; }
.profit-bars { display: grid; gap: 19px; padding-top: 18px; }
.profit-bars div { display: grid; grid-template-columns: 48px 1fr 72px; align-items: center; gap: 10px; }
.profit-bars span { color: #607589; font-size: 10px; }
.profit-bars progress { display: block; width: 100%; height: 9px; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: #eaf0f2; }
.profit-bars progress::-webkit-progress-bar { border-radius: 99px; background: #eaf0f2; }
.profit-bars progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg,#1a8b9d,#29a8b6); }
.profit-bars progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg,#1a8b9d,#29a8b6); }
.profit-bars strong { color: #17364f; font-size: 10px; text-align: right; }

.rate-overview { display: grid; gap: 4px; }
.rate-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rate-card-grid button { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 19px; border: 1px solid #dce6e9; border-radius: 13px; color: #183750; background: #f9fbfc; cursor: pointer; text-align: left; }
.rate-card-grid button > span { color: #5c7385; font-size: 11px; font-weight: 700; }
.rate-card-grid button > strong { grid-row: span 2; align-self: center; font-size: 25px; letter-spacing: -.04em; }
.rate-card-grid button > small { color: var(--muted); font-size: 9px; }
.rate-card-grid button > .rate-progress { display: block; grid-column: 1 / -1; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 99px; appearance: none; background: #e5ecef; }
.rate-progress::-webkit-progress-bar { border-radius: 99px; background: #e5ecef; }
.rate-progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg,#168b55,#28a56b); transition: width 420ms ease; }
.rate-progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg,#168b55,#28a56b); }
.rate-progress.red::-webkit-progress-value { min-width: 8px; background: linear-gradient(90deg,#bf3543,#db5662); }
.rate-progress.red::-moz-progress-bar { min-width: 8px; background: linear-gradient(90deg,#bf3543,#db5662); }
.channel-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.channel-breakdown div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #e1e9ec; border-radius: 11px; }
.channel-breakdown strong { font-size: 11px; }
.channel-breakdown span { color: var(--muted); font-size: 10px; }

.source-layout { display: grid; grid-template-columns: 290px minmax(0,1fr); align-items: center; gap: 50px; padding: 14px 28px 24px; }
.donut { display: grid; width: 230px; height: 230px; place-items: center; border-radius: 50%; background: conic-gradient(#178a9d 0 53%,#3d7cad 53% 87%,#d3a43b 87% 100%); }
.donut::before { position: absolute; width: 150px; height: 150px; border-radius: 50%; background: #fff; content: ''; }
.donut > div { position: relative; z-index: 1; display: grid; gap: 4px; text-align: center; }
.donut strong { font-size: 21px; letter-spacing: -.03em; }
.donut span { color: var(--muted); font-size: 10px; }
.source-list { display: grid; gap: 7px; }
.source-list > div { display: grid; grid-template-columns: auto minmax(130px,1fr) auto 48px; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #e8eef0; }
.source-list > div:last-child { border-bottom: 0; }
.source-swatch { width: 10px; height: 10px; border-radius: 50%; background: #178a9d; }
.source-swatch.swatch-1 { background: #3d7cad; }
.source-swatch.swatch-2 { background: #d3a43b; }
.source-list span strong, .source-list span small { display: block; }
.source-list span strong { font-size: 11px; }
.source-list span small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.source-list b { font-size: 11px; }
.source-list em { color: var(--teal); font-size: 11px; font-style: normal; font-weight: 800; text-align: right; }

.wallet-disclaimer { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid #d9e5e8; border-radius: 12px; color: #597083; background: #f7fafb; font-size: 10px; }
.wallet-disclaimer strong { color: #183750; white-space: nowrap; }
.platform-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.platform-badge.shopee { color: #b55228; background: #fff0e8; }
.platform-badge.tiktok { color: #4b5361; background: #edf0f2; }

.queue-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; padding: 7px; border: 1px solid #dce7ea; border-radius: 13px; background: #eaf2f4; }
.queue-tabs button { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid transparent; border-radius: 10px; color: #607789; background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.queue-tabs button strong { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 999px; color: #577080; background: rgba(255,255,255,.7); font-size: 10px; }
.queue-tabs button.active { border-color: #cae0e4; color: #183750; background: #fff; box-shadow: 0 5px 16px rgba(24,59,80,.05); }
.queue-tabs button.active strong { color: #fff; background: var(--teal); }
.selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; padding: 13px 15px; border: 1px solid #b9dfe3; border-radius: 12px; background: #edf9fa; }
.selection-bar span strong, .selection-bar span small { display: block; }
.selection-bar span strong { font-size: 11px; }
.selection-bar span small { margin-top: 4px; color: #5f7989; font-size: 9px; }
.selection-bar > button { padding: 10px 13px; border: 0; border-radius: 9px; color: #fff; background: #153a55; cursor: pointer; font-size: 10px; font-weight: 850; }
.row-check { width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; }
.shipping-table { min-width: 1230px; }
.shipping-status-stack { display: grid; justify-items: start; gap: 5px; }
.shipping-status-stack .printed { color: var(--green); font-size: 9px; font-weight: 800; }

.return-summary { display: grid; grid-template-columns: repeat(4,minmax(110px,1fr)); gap: 8px; margin: -2px 0 20px; }
.return-summary > span, .return-summary > button { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid #dfe8eb; border-radius: 11px; color: #183750; background: #f8fafb; text-align: left; }
.return-summary > button { cursor: pointer; }
.return-summary small { color: var(--muted); font-size: 9px; }
.return-summary strong { font-size: 16px; }
.return-summary button span { color: var(--teal); font-size: 9px; font-weight: 800; }
.panel-toggle { padding: 9px 12px; border: 1px solid #cfe0e4; border-radius: 9px; color: var(--teal); background: #f8fcfc; cursor: pointer; font-size: 10px; font-weight: 800; }
.billing-detail-panel .panel-toggle { margin-bottom: 2px; }
.billing-detail-panel #billing-month-detail { margin-top: 18px; }

.dataset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dataset-grid article { position: relative; min-height: 125px; padding: 20px; border: 1px solid #dfe8eb; border-radius: 13px; background: #f9fbfc; }
.dataset-grid article > span { position: absolute; top: 16px; right: 16px; color: #c4d4da; font-size: 25px; font-weight: 850; }
.dataset-grid strong { display: block; font-size: 12px; }
.dataset-grid p { max-width: 310px; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.integration-alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #d0e5e8; border-radius: 10px; color: #39707a; background: #f2fafb; font-size: 10px; line-height: 1.5; }
.integration-endpoints { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.integration-endpoints > div { display: grid; gap: 5px; min-width: 0; padding: 13px 14px; border: 1px solid #e0e9ec; border-radius: 10px; background: #f9fbfc; }
.integration-endpoints span { color: var(--muted); font-size: 9px; }
.integration-endpoints strong, .integration-endpoints code { overflow: hidden; color: #183750; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.connection-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.connection-grid article { padding: 17px; border: 1px solid #dfe8eb; border-radius: 13px; }
.connection-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.connection-title strong, .connection-title small { display: block; }
.connection-title strong { font-size: 12px; }
.connection-title small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.connection-grid dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
.connection-grid dl > div { padding-top: 10px; border-top: 1px solid #e7edef; }
.connection-grid dt { color: var(--muted); font-size: 9px; }
.connection-grid dd { margin: 4px 0 0; color: #24445d; font-size: 10px; font-weight: 750; }

.account-profile { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.account-avatar { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg,#188b9d,#125a74); font-size: 20px; font-weight: 900; }
.account-profile > div:nth-child(2) strong, .account-profile > div:nth-child(2) span, .account-profile > div:nth-child(2) small { display: block; }
.account-profile > div:nth-child(2) strong { font-size: 14px; }
.account-profile > div:nth-child(2) span { margin-top: 3px; color: #50697b; font-size: 11px; }
.account-profile > div:nth-child(2) small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.account-actions { display: flex; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e7edef; }
.account-actions button { padding: 9px 12px; border: 1px solid #d2e1e5; border-radius: 9px; color: #567181; background: #f8fafb; cursor: pointer; font-size: 10px; font-weight: 800; }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.permission-grid > div { display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; padding: 15px; border: 1px solid #dce8e3; border-radius: 11px; background: #f8fcfa; }
.permission-grid > div > span { grid-row: span 2; color: var(--green); font-weight: 900; }
.permission-grid strong { font-size: 11px; }
.permission-grid small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.permission-grid > div.blocked { border-color: #eadfe1; background: #fffafa; }
.permission-grid > div.blocked > span { color: var(--red); }

.demo-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(8,32,50,.7); backdrop-filter: blur(3px); }
.demo-modal { width: min(1080px,calc(100vw - 34px)); max-height: calc(100vh - 42px); overflow: auto; border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(5,26,42,.35); }
.demo-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 28px; border-bottom: 1px solid #e0e8eb; }
.demo-modal > header h2 { margin: 0; color: #17354d; font-size: 22px; letter-spacing: -.03em; }
.demo-modal > header span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.demo-modal > header > button { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; padding: 0; border: 1px solid #d9e4e8; border-radius: 50%; color: #17354d; background: #fff; cursor: pointer; font-size: 24px; }
.demo-modal > .table-wrap { padding: 20px 28px; }
.demo-modal > footer { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 18px 28px; border-top: 1px solid #e0e8eb; }
.demo-modal > footer span { color: var(--muted); font-size: 10px; }
.demo-modal > footer strong { font-size: 13px; }
.shipping-dialog { width: min(930px,calc(100vw - 34px)); }
.shipping-review { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 22px 28px 0; }
.shipping-review > div { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; border: 1px solid #dce7ea; border-radius: 11px; background: #f8fafb; }
.shipping-review span { font-size: 11px; }
.shipping-review strong { font-size: 11px; }
.shipping-method { display: grid; gap: 8px; margin: 18px 28px 0; }
.shipping-method small { color: var(--muted); font-size: 9px; }
.shipping-notice { display: grid; gap: 7px; margin: 20px 28px; padding: 17px; border-radius: 12px; color: #775312; background: #fff3d8; }
.shipping-notice strong { font-size: 11px; }
.shipping-notice span { font-size: 10px; line-height: 1.55; }
.shipping-progress { display: grid; gap: 10px; margin: 0 28px 20px; padding: 15px; border: 1px solid #cfe4e7; border-radius: 12px; background: #f3fafb; }
.shipping-progress[hidden] { display: none; }
.shipping-progress > div:first-child, .shipping-progress > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shipping-progress strong { font-size: 10px; }
.shipping-progress span { color: #5d7586; font-size: 9px; }
.progress-track { display: block; width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #dce9ec; }
.progress-track::-webkit-progress-bar { border-radius: 999px; background: #dce9ec; }
.progress-track::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg,#168797,#26a3b1); transition: width 300ms ease; }
.progress-track::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg,#168797,#26a3b1); }
.secondary-action, .primary-action { min-height: 40px; padding: 0 14px; border-radius: 9px; cursor: pointer; font-size: 10px; font-weight: 850; }
.secondary-action { border: 1px solid #d7e2e6; color: #536e80; background: #fff; }
.primary-action { border: 0; color: #fff; background: #143852; }
.primary-action:disabled { cursor: wait; opacity: .68; }

@media (max-width: 1180px) {
  .filter-bar { grid-template-columns: repeat(2,minmax(150px,1fr)); }
  .filter-bar > button { justify-self: start; }
  .source-layout { grid-template-columns: 240px minmax(0,1fr); gap: 26px; padding-right: 0; padding-left: 10px; }
  .donut { width: 205px; height: 205px; }
  .donut::before { width: 134px; height: 134px; }
}

@media (max-width: 840px) {
  .kpi-grid.kpi-three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .viewer-restricted { grid-template-columns: auto 1fr; }
  .viewer-role { grid-column: 2; justify-self: start; }
  .source-layout { grid-template-columns: 1fr; justify-items: center; }
  .source-list { width: 100%; }
  .integration-endpoints, .connection-grid { grid-template-columns: 1fr; }
  .return-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .header-filter-row { align-items: stretch; flex-direction: column; width: 100%; }
  #header-filters, #header-filters .month-select, #header-filters select { width: 100%; }
  .kpi-grid.kpi-three, .rate-card-grid, .channel-breakdown, .dataset-grid, .permission-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; padding: 12px; }
  .filter-bar .search-field { grid-column: auto; }
  .queue-tabs { grid-template-columns: 1fr; }
  .selection-bar { align-items: stretch; flex-direction: column; }
  .financial-table.mobile-card-table { min-width: 0; white-space: normal; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; width: 100%; }
  .mobile-card-table tbody { display: grid; gap: 12px; }
  .mobile-card-table tbody tr { overflow: hidden; border: 1px solid #dde7ea; border-radius: 12px; background: #fff; }
  .mobile-card-table td { display: grid; grid-template-columns: minmax(105px,.65fr) minmax(0,1fr); align-items: start; gap: 12px; height: auto; min-height: 44px; padding: 11px 13px; white-space: normal; overflow-wrap: anywhere; }
  .mobile-card-table td::before { color: #778b9a; font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; content: attr(data-label); }
  .mobile-card-table td:empty { display: none; }
  .mobile-card-table tfoot { display: none; }
  .return-summary { grid-template-columns: 1fr; }
  .source-list > div { grid-template-columns: auto minmax(100px,1fr) auto; }
  .source-list em { grid-column: 2 / -1; text-align: left; }
  .demo-modal-backdrop { padding: 10px; }
  .demo-modal { width: 100%; max-height: calc(100vh - 20px); }
  .demo-modal > header, .demo-modal > footer { padding: 18px; }
  .demo-modal > .table-wrap { padding: 14px 18px; }
  .shipping-review { grid-template-columns: 1fr; padding: 18px 18px 0; }
  .shipping-method, .shipping-notice, .shipping-progress { margin-right: 18px; margin-left: 18px; }
}

/* Form simulasi dan alur import mengikuti komponen dashboard produksi. */
body:not(.login-body) .nav-icon svg,
body:not(.login-body) svg.nav-icon {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

body:not(.login-body) .nav-group-chevron svg,
body:not(.login-body) svg.nav-group-chevron {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

body:not(.login-body) .feature-form-panel,
body:not(.login-body) .import-panel,
body:not(.login-body) .import-history-panel {
  padding: 26px 28px;
  border-color: rgba(31, 135, 149, .14);
  background:
    radial-gradient(circle at 100% 0%, rgba(31, 135, 149, .09), transparent 30%),
    #fff;
  scroll-margin-top: 18px;
}

.feature-form-header,
.import-panel > .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.feature-form-header h3,
.import-panel > .panel-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  letter-spacing: -.02em;
}

.feature-form-header small,
.import-panel > .panel-header small {
  display: block;
  max-width: 720px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sim-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid #c9e2e6;
  border-radius: 999px;
  color: #147788;
  background: #edf8f9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .045em;
  white-space: nowrap;
}

.sim-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  content: '';
}

.form-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.field-span-2 { grid-column: span 2; }
.field-span-3 { grid-column: span 3; }
.field-span-4 { grid-column: 1 / -1; }

.form-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  align-self: stretch;
  align-content: end;
  color: var(--navy);
}

.form-field > span:first-child,
.form-field > label:first-child {
  display: block;
  margin-left: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #16324a;
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 11px;
}

.form-field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: rgba(31, 135, 149, .65);
  box-shadow: 0 0 0 3px rgba(31, 135, 149, .1);
}

.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled,
.form-field input[readonly] {
  color: var(--muted);
  background: #f2f5f6;
  cursor: not-allowed;
}

.currency-field {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.currency-field:focus-within {
  border-color: rgba(31, 135, 149, .65);
  box-shadow: 0 0 0 3px rgba(31, 135, 149, .1);
}

.currency-field > b,
.currency-field > span:first-child {
  align-self: stretch;
  display: grid;
  min-width: 42px;
  place-items: center;
  border-right: 1px solid var(--line);
  color: #5d7486;
  background: #f4f7f8;
  font-size: 10px;
  font-weight: 800;
}

.form-field .currency-field input,
.currency-field > input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.form-help {
  display: block;
  margin: 0 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 9px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.primary-action {
  min-width: 210px;
  border: 1px solid var(--navy);
  color: #fff;
  background: var(--navy);
  box-shadow: 0 8px 18px rgba(16, 43, 70, .14);
}

.primary-action:hover:not(:disabled),
.primary-action:focus-visible {
  border-color: var(--teal);
  background: var(--teal);
  outline: none;
}

.secondary-action {
  border: 1px solid #cadce1;
  color: var(--navy);
  background: #fff;
}

.secondary-action:hover:not(:disabled),
.secondary-action:focus-visible {
  border-color: #98c8cf;
  color: var(--teal);
  background: #f4fbfb;
  outline: none;
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: .5;
  box-shadow: none;
}

.form-message {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #cfe4e7;
  border-radius: 9px;
  color: #2f6d77;
  background: #f1f9fa;
  font-size: 10px;
  line-height: 1.5;
}
.form-message:empty { display: none; }

.form-message strong,
.form-message span { display: block; }
.form-message.success { border-color: #cce6d5; color: var(--green); background: var(--green-soft); }
.form-message.error { border-color: #f0cbd0; color: #9b2f3a; background: var(--red-soft); }

.tax-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #dbe7ea;
  border-radius: 11px;
  background: #dbe7ea;
}

.tax-preview > div,
.tax-preview > span {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  color: var(--muted);
  background: #f7fafb;
  font-size: 9px;
}

.tax-preview strong,
.tax-preview b { color: var(--navy); font-size: 12px; }

.field-shortcut {
  justify-self: start;
  padding: 0;
  border: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.confirmation-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid #d9e7ea;
  border-radius: 11px;
  background: #f7fafb;
}
.confirmation-card span { color: var(--muted); font-size: 10px; }
.confirmation-card strong { color: var(--navy); font-size: 13px; }
.confirmation-card small { margin-left: auto; color: var(--muted); font-size: 9px; }
.mapping-table { min-width: 1320px; }

body:not(.login-body) .import-panel { margin-bottom: 2px; }
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .65fr);
  gap: 20px;
}

.import-controls { min-width: 0; }
.import-field-grid {
  display: grid;
  grid-template-columns: 1fr .8fr 1.2fr;
  gap: 11px;
}

.import-field-grid label {
  display: grid;
  min-width: 0;
  gap: 7px;
  align-content: end;
}

.import-field-grid label > span {
  display: block;
  margin-left: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.import-field-grid label > span em {
  color: #9caab4;
  font-size: 8px;
  font-style: normal;
  font-weight: 500;
  text-transform: none;
}

.import-field-grid input,
.import-field-grid select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #16324a;
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 11px;
}

.import-field-grid input:focus,
.import-field-grid select:focus {
  border-color: rgba(31, 135, 149, .65);
  box-shadow: 0 0 0 3px rgba(31, 135, 149, .1);
}

.target-preview {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--muted);
  background: #f4f8f9;
  font-size: 9px;
}

.target-preview strong {
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 10px;
}

.target-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-drop {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 112px;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1.5px dashed #bdcbd3;
  border-radius: 13px;
  background: #fbfcfc;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.file-drop:hover,
.file-drop.dragging {
  border-color: var(--teal);
  background: #eff8f9;
}

.file-drop.dragging { transform: translateY(-1px); }
.file-drop.has-file { border-style: solid; border-color: #b9dec4; background: #f6fbf7; }

.file-drop > input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop > svg,
.file-drop-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 11px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(31, 135, 149, .2);
}
.file-drop-icon svg { display: block; width: 22px; height: 22px; }

.file-drop-copy { min-width: 0; }
.file-drop-copy strong,
.file-drop-copy small { display: block; }
.file-drop-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-drop-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; }

.file-drop > button {
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.import-actions > span,
.import-actions > small {
  flex: 1 1 190px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.import-guide {
  padding: 18px;
  border: 1px solid #e5ecef;
  border-radius: 13px;
  background: #f8fafb;
}

.import-guide ol {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
  counter-reset: import-steps;
}

.import-guide li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  counter-increment: import-steps;
}

.import-guide h3 { margin: 0; font-size: 16px; }
.import-guide li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--teal); background: var(--teal-soft); font-size: 9px; font-weight: 900; }
.import-guide li div strong,
.import-guide li div small { display: block; }
.import-guide li div small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.import-guide li b,
.import-guide li strong { color: var(--navy); font-size: 9px; }
.import-guide p:last-child {
  margin: 14px 0 0;
  padding: 11px;
  border-left: 3px solid var(--teal);
  border-radius: 0 7px 7px 0;
  color: #526b7e;
  background: #eaf4f5;
  font-size: 9px;
  line-height: 1.5;
}

.import-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid #d7e8dc;
  border-radius: 12px;
  background: #d7e8dc;
}
.import-result[hidden] { display: none; }

.import-result > div { padding: 13px 14px; background: #f7fbf8; }
.import-result > div span,
.import-result > div strong { display: block; }
.import-result > div span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.import-result > div strong { margin-top: 5px; color: var(--navy); font-size: 17px; }
.import-result > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 14px;
  color: #42614c;
  background: #eaf5ed;
  font-size: 9px;
  line-height: 1.5;
}

body:not(.login-body) .import-history-panel { margin-top: 0; }
.import-history-panel .panel-header { align-items: center; }
.import-history-panel .table-wrap { margin-top: 14px; }
.import-history-panel table { min-width: 900px; }
.import-history-panel td strong,
.import-history-panel td small { display: block; }
.import-history-panel td small { margin-top: 4px; color: var(--muted); font-size: 9px; }

.migration-layout {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 3fr);
  gap: 10px;
  margin-top: 18px;
}

.migration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.migration-upload,
.migration-card {
  min-height: 104px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f9fbfc;
}

.migration-upload {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: center;
  gap: 9px;
  border-style: dashed;
  border-color: rgba(31, 135, 149, .4);
  color: var(--teal);
  background: rgba(31, 135, 149, .055);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.migration-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.migration-upload > span { grid-row: span 2; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #fff; background: var(--teal); }
.migration-upload > span svg { width: 19px; height: 19px; }
.migration-upload strong, .migration-upload small { display: block; }
.migration-upload small { color: var(--muted); font-size: 8px; font-weight: 500; }

.migration-upload:hover:not(:disabled) {
  border-style: solid;
  background: rgba(31, 135, 149, .1);
}

.migration-upload svg { width: 20px; height: 20px; flex: 0 0 20px; }
.migration-card { display: grid; align-content: center; gap: 5px; }
.migration-card span { color: var(--muted); font-size: 10px; }
.migration-card strong { color: var(--navy); font-size: 17px; }
.migration-card small, .migration-card p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.migration-card > div { display: flex; gap: 7px; margin-top: 7px; }
.migration-card button { padding: 7px 9px; border: 1px solid #cbdde1; border-radius: 7px; color: var(--teal); background: #fff; cursor: pointer; font-size: 9px; font-weight: 800; }
.migration-card button:last-child { border-color: var(--navy); color: #fff; background: var(--navy); }
.migration-card.is-ready { border-color: #cce3d3; background: #f5fbf7; }

/* Produksi memakai satu panel informasi, bukan kartu peringatan tiga kolom. */
body:not(.login-body) .viewer-restricted {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: initial;
  padding: 22px 26px;
  border: 1px solid rgba(31, 135, 149, .16);
  border-radius: 16px;
  color: var(--navy);
  background: #f6fbfc;
  box-shadow: 0 8px 30px rgba(17, 49, 73, .025);
}

.viewer-restricted .lock-mini,
.viewer-restricted .viewer-role { display: none; }
.viewer-restricted > div { display: grid; gap: 4px; }
.viewer-restricted h3,
.viewer-restricted strong { margin: 2px 0 0; color: var(--navy); font-size: 17px; letter-spacing: -.02em; }
.viewer-restricted small,
.viewer-restricted > div > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

@media (max-width: 1100px) {
  .form-field-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .field-span-3,
  .field-span-4 { grid-column: 1 / -1; }
  .import-layout { grid-template-columns: 1fr; }
  .migration-layout { grid-template-columns: 1fr; }
  .migration-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .content { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .feature-form-header,
  .import-panel > .panel-header { align-items: flex-start; flex-direction: column; }
  .form-field-grid,
  .import-field-grid,
  .tax-preview,
  .import-result,
  .migration-grid { grid-template-columns: 1fr; }
  .field-span-2,
  .field-span-3,
  .field-span-4 { grid-column: auto; }
  .form-actions,
  .import-actions { align-items: stretch; flex-direction: column; }
  .confirmation-card { align-items: flex-start; flex-direction: column; }
  .confirmation-card small { margin-left: 0; }
  .form-actions .primary-action,
  .form-actions .secondary-action,
  .import-actions .primary-action,
  .import-actions .secondary-action { width: 100%; }
  .import-actions > span,
  .import-actions > small { flex-basis: auto; }
  .target-preview { grid-template-columns: 1fr; }
  .target-preview small { overflow: visible; white-space: normal; }
  .file-drop { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .file-drop > button { grid-column: 1 / -1; width: 100%; }
  .import-result > p { grid-column: auto; }
  .import-guide li { grid-template-columns: 32px 1fr; }
}

/* Interaksi demo mengikuti drill-down, tooltip, dan dialog dashboard produksi. */
button.kpi-card {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
}

.clickable-kpi {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-color: rgba(31, 135, 149, .2);
  background: linear-gradient(145deg, #fff 58%, #f5fbfc);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .clickable-kpi:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 135, 149, .34);
    box-shadow: 0 14px 34px rgba(17, 49, 73, .1);
  }
}

.clickable-kpi:focus-visible {
  outline: 3px solid rgba(31, 135, 149, .25);
  outline-offset: 3px;
}

.clickable-kpi:active {
  transform: translateY(0) scale(.985);
  border-color: rgba(31, 135, 149, .52);
  background: #f1fafb;
  box-shadow: 0 5px 18px rgba(17, 49, 73, .08);
}

.clickable-kpi[aria-expanded='true'],
.rate-summary-card[aria-expanded='true'],
.clickable-kpi.is-active {
  border-color: rgba(31, 135, 149, .28);
  background: linear-gradient(145deg, #fff 45%, #edf8f9);
  box-shadow: inset 3px 0 0 rgba(31, 135, 149, .58), 0 10px 26px rgba(17, 49, 73, .08);
}

.kpi-action,
.card-action {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 850;
}

.kpi-action svg,
.card-action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  transition: transform 180ms ease;
}

.clickable-kpi[aria-expanded='true'] .kpi-action svg,
.rate-summary-card[aria-expanded='true'] .dropdown-icon,
.rate-channel-card[aria-expanded='true'] .dropdown-icon {
  transform: rotate(180deg);
}

.summary-rate-breakdown,
.rate-breakdown-grid {
  display: grid;
  gap: 12px;
  margin: -2px 0 16px;
  padding: 18px;
  border: 1px solid rgba(31, 135, 149, .18);
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f6fbfc);
  box-shadow: 0 9px 28px rgba(17, 49, 73, .045);
}

.summary-rate-breakdown[hidden],
.rate-breakdown-grid[hidden],
.rate-source-grid[hidden],
.source-rate-breakdown[hidden] {
  display: none;
}

.summary-rate-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.summary-rate-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
  letter-spacing: -.02em;
}

.summary-rate-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.rate-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rate-channel-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
  padding: 16px;
  border: 1px solid #dce7ea;
  border-radius: 12px;
  color: var(--navy);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.rate-channel-card:hover,
.rate-channel-card:focus-visible,
.rate-channel-card[aria-expanded='true'],
.rate-channel-card.is-active {
  border-color: rgba(31, 135, 149, .48);
  box-shadow: 0 8px 23px rgba(17, 49, 73, .08);
  outline: none;
}

.rate-channel-card:hover { transform: translateY(-1px); }
.rate-channel-card > span,
.rate-channel-card > small { color: var(--muted); font-size: 9px; }
.rate-channel-card > span { grid-column: 1; grid-row: 1; font-size: 10px; font-weight: 800; }
.rate-channel-card > strong { grid-column: 2; grid-row: 1; color: var(--navy); font-size: 18px; text-align: right; }
.rate-channel-card > small { grid-column: 1 / -1; grid-row: 2; }
.rate-channel-card > div { display: flex; grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; padding-top: 9px; border-top: 1px solid #e6edef; }
.rate-channel-card > div b { color: #496678; font-size: 9px; }
.rate-channel-card > i { grid-column: 1 / -1; grid-row: 4; color: var(--teal); font-size: 9px; font-style: normal; font-weight: 850; }
.rate-channel-card .dropdown-icon { align-self: center; grid-column: 2; grid-row: 1 / span 3; width: 15px; height: 15px; color: var(--teal); }

.rate-source-grid,
.source-rate-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.rate-source-grid.is-marketplace,
.source-rate-breakdown:has(.source-rate-card:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-source-card,
.source-rate-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(31, 135, 149, .16);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(17, 49, 73, .04);
}

.rate-source-card.is-selected,
.source-rate-card.is-selected {
  border-color: rgba(31, 135, 149, .44);
  box-shadow: 0 8px 24px rgba(31, 135, 149, .1);
}

.rate-source-head,
.source-rate-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.rate-source-head > div > span,
.rate-source-head > div > strong { display: block; }
.rate-source-head > div > span { color: var(--muted); font-size: 8px; }
.rate-source-head > div > strong { margin-top: 4px; color: var(--navy); font-size: 13px; }
.rate-source-section { display: grid; gap: 12px; padding-top: 4px; }
.rate-source-section[hidden] { display: none; }
.rate-source-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding-top: 4px; border-top: 1px solid #e4ecef; }
.rate-source-title h4 { margin: 0; color: var(--navy); font-size: 13px; }
.rate-source-title > span { color: var(--muted); font-size: 9px; }

.rate-source-name,
.source-rate-source {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 7px;
  color: #fff;
  background: #4292a1;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 3px 9px rgba(17, 49, 73, .1);
}

.rate-source-name[data-source='Mengantar'],
.source-rate-source[data-source='Mengantar'] { background: #3346b3; }
.rate-source-name[data-source='Lincah'],
.source-rate-source[data-source='Lincah'] { background: #dc3c44; }
.rate-source-name[data-source='Shopee'],
.source-rate-source[data-source='Shopee'] { background: #ee4d2d; }
.rate-source-name[data-source='TikTok Shop'],
.source-rate-source[data-source='TikTok Shop'] { background: #42b549; }

.rate-source-rate,
.source-rate-heading > span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #286743;
  background: var(--green-soft);
  font-size: 9px;
  font-weight: 850;
}

.rate-source-card dl,
.source-rate-card dl,
.rate-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.rate-source-card dl > div,
.source-rate-card dl > div,
.rate-stat-grid > div {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid #e6edef;
}

.rate-source-card dt,
.source-rate-card dt,
.rate-stat-grid span { display: block; color: var(--muted); font-size: 8.5px; }
.rate-source-card dd,
.source-rate-card dd,
.rate-stat-grid strong { display: block; margin: 4px 0 0; color: var(--navy); font-size: 13px; font-weight: 850; }

.rate-status-action,
.source-status-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 0;
  border: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
}

.rate-status-action:hover,
.rate-status-action:focus-visible,
.source-status-detail-toggle:hover,
.source-status-detail-toggle:focus-visible { color: #0b6574; outline: none; text-decoration: underline; }

.rate-source-ratios { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.rate-source-ratios > span { display: flex; justify-content: space-between; gap: 8px; padding: 8px 9px; border-radius: 8px; color: var(--muted); background: #f3f7f8; font-size: 8.5px; }
.rate-source-ratios strong { color: var(--navy); font-size: 9px; }
.rate-status-actions { display: grid; gap: 2px; margin-top: 8px; padding-top: 6px; border-top: 1px solid #e6edef; }
.rate-status-action { justify-content: space-between; text-align: left; }
.rate-status-action b { color: inherit; font-size: 8px; }
.rate-status-action.danger { color: var(--red); }

.quality-panel {
  flex-wrap: wrap;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.quality-summary {
  display: flex;
  width: 100%;
  flex: 1 0 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.quality-panel.is-expanded {
  align-items: flex-start;
  border-color: rgba(31, 135, 149, .2);
  box-shadow: 0 10px 32px rgba(17, 49, 73, .065);
}

.quality-detail-toggle[aria-expanded='true'] svg,
.quality-panel.is-expanded .quality-actions button svg { transform: rotate(180deg); }

.quality-panel .quality-actions button svg,
.quality-detail-toggle svg { width: 14px; height: 14px; transition: transform 160ms ease; }

.quality-panel .quality-actions button:hover,
.quality-panel .quality-actions button:focus-visible,
.quality-detail-toggle:hover,
.quality-detail-toggle:focus-visible,
.quality-detail-toggle.is-open {
  border-color: #7fc1ca;
  background: #eaf7f8;
  outline: none;
}

.validation-list,
.quality-check-list {
  display: grid;
  width: 100%;
  flex: 1 0 100%;
  gap: 8px;
  padding-top: 17px;
  border-top: 1px solid #e7edef;
}

.validation-list[hidden],
.quality-check-list[hidden] { display: none; }

.validation-row,
.quality-check-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #e8eef1;
  border-radius: 11px;
  background: #fbfcfc;
}

.validation-status,
.quality-check-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 900;
}

.validation-row strong,
.quality-check-row strong { display: block; color: var(--navy); font-size: 10px; }
.validation-row small,
.quality-check-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.validation-row > span:last-child,
.quality-check-row > span:last-child,
.quality-check-row > b,
.validation-row > b { color: var(--green); font-size: 9px; font-weight: 850; }

body:has(.transaction-drawer-backdrop),
body:has(.detail-backdrop),
body:has(.daily-order-detail-backdrop) { overflow: hidden; }

body:has(.transaction-drawer-backdrop) > .demo-modal-backdrop { z-index: 180; }

.transaction-drawer-backdrop,
.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 24, 39, .62);
  backdrop-filter: blur(3px);
}

.transaction-drawer {
  display: flex;
  width: min(1280px, calc(100vw - 48px));
  height: min(900px, calc(100dvh - 48px));
  flex-direction: column;
  padding: 0 28px 34px;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 22px;
  color: #16324a;
  background: #f5f8f9;
  box-shadow: 0 28px 80px rgba(6, 25, 42, .28);
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 -28px;
  padding: 27px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 248, 249, .97);
  backdrop-filter: blur(8px);
}

.drawer-header .eyebrow { margin-bottom: 6px; }
.drawer-header h2 { margin: 0; color: var(--navy); font-size: 27px; letter-spacing: -.04em; }
.drawer-header span { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }

.drawer-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.drawer-header > [data-close-drawer] {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.drawer-close:hover,
.drawer-close:focus-visible,
.drawer-header > [data-close-drawer]:hover,
.drawer-header > [data-close-drawer]:focus-visible { color: #fff; border-color: var(--navy); background: var(--navy); outline: none; }

.drawer-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 1px 3px;
  scrollbar-color: rgba(31, 135, 149, .42) transparent;
}

.drawer-section { margin-top: 23px; }
.drawer-section-title { margin: 0 0 11px; }
.drawer-section-title .eyebrow,
.drawer-section-title p { margin: 0 0 5px; }
.drawer-section-title h3 { margin: 0; color: var(--navy); font-size: 15px; letter-spacing: -.02em; }

.drawer-section-title { margin: 23px 0 10px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.drawer-section .drawer-section-title { margin: 0 0 11px; text-transform: none; }

.drawer-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.drawer-metric-grid.finance { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.drawer-metric {
  display: flex;
  min-width: 0;
  min-height: 118px;
  flex-direction: column;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
}

.drawer-metric > span,
.drawer-metric > strong,
.drawer-metric > small { display: block; }
.drawer-metric > span { color: var(--muted); font-size: 9px; }
.drawer-metric > strong { margin-top: 8px; color: var(--navy); font-size: 20px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.drawer-metric > small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.drawer-metric > i { margin-top: auto; padding-top: 9px; color: var(--teal); font-size: 9px; font-style: normal; font-weight: 850; }

.drawer-metric-action {
  cursor: pointer;
  border-color: rgba(31, 135, 149, .22);
  background: linear-gradient(145deg, #fff, #f6fbfc);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.drawer-metric-action:hover,
.drawer-metric-action:focus-visible { transform: translateY(-1px); border-color: rgba(31, 135, 149, .52); box-shadow: 0 8px 22px rgba(17, 49, 73, .09); outline: none; }

.drawer-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 10px;
}

.drawer-summary > div,
.drawer-summary > button,
.drawer-summary-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
}

button.drawer-summary-card,
.drawer-summary > button { cursor: pointer; transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
button.drawer-summary-card:hover,
button.drawer-summary-card:focus-visible,
.drawer-summary > button:hover,
.drawer-summary > button:focus-visible { transform: translateY(-1px); border-color: rgba(31, 135, 149, .5); box-shadow: 0 8px 22px rgba(17, 49, 73, .09); outline: none; }

.drawer-summary span,
.drawer-summary strong,
.drawer-summary-card span,
.drawer-summary-card strong { display: block; }
.drawer-summary span,
.drawer-summary-card span { color: var(--muted); font-size: 9px; }
.drawer-summary strong,
.drawer-summary-card strong { margin-top: 8px; color: var(--navy); font-size: 21px; overflow-wrap: anywhere; }
.drawer-summary .processing-text { color: #956917; }
.drawer-summary .drawer-summary-action { margin-top: 8px; color: var(--teal); font-size: 9px; font-weight: 850; }

.drawer-finance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}

.drawer-finance-summary > div { min-width: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.drawer-finance-summary span,
.drawer-finance-summary strong { display: block; }
.drawer-finance-summary span { color: var(--muted); font-size: 9px; }
.drawer-finance-summary strong { margin-top: 7px; color: var(--navy); font-size: 15px; overflow-wrap: anywhere; }

.detail-month-list { display: grid; gap: 10px; }
.detail-month { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.detail-month.expanded { border-color: rgba(31, 135, 149, .34); box-shadow: 0 12px 30px rgba(17, 49, 73, .07); }
.detail-month-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(150px, 1.25fr) repeat(5, minmax(88px, .72fr)) 24px;
  align-items: center;
  gap: 10px;
  padding: 17px 18px;
  border: 0;
  color: #16324a;
  background: transparent;
  font: inherit;
  text-align: right;
  cursor: pointer;
}
.detail-month-toggle:hover,
.detail-month-toggle:focus-visible { background: #f3f9f9; outline: none; }
.detail-month-toggle span { font-size: 10px; font-weight: 750; }
.detail-month-toggle small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 500; }
.detail-month-name { text-align: left; }
.detail-month-name strong,
.detail-month-name small { display: block; }
.detail-month-name strong { color: var(--navy); font-size: 13px; }
.detail-month-name small { margin: 4px 0 0; }
.detail-month-toggle i { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-style: normal; font-weight: 850; }
.detail-month.expanded .detail-month-toggle i { transform: rotate(180deg); }
.daily-detail-wrap { padding: 0 18px 18px; overflow-x: auto; }
.detail-data-note { position: sticky; left: 0; margin: 0 0 10px; padding: 11px 13px; border: 1px solid #dbe8eb; border-radius: 10px; color: #52717e; background: #eef7f8; font-size: 9px; line-height: 1.5; }
.drawer-detail-table { min-width: 1420px; }
.drawer-detail-table th,
.drawer-detail-table td { padding: 10px; font-size: 9px; }

.drawer-month {
  overflow: hidden;
  margin-top: 23px;
  border: 1px solid rgba(31, 135, 149, .3);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17, 49, 73, .06);
}

.drawer-month-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border: 0;
  color: var(--navy);
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.drawer-month-toggle:hover,
.drawer-month-toggle:focus-visible { background: #f3f9f9; outline: none; }
.drawer-month-toggle span,
.drawer-month-toggle b,
.drawer-month-toggle small { display: block; }
.drawer-month-toggle b { font-size: 13px; }
.drawer-month-toggle small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 500; }
.drawer-month-toggle i { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 50%; color: var(--teal); background: var(--teal-soft); font-style: normal; font-weight: 850; }
.drawer-month > [data-drawer-month-detail] { padding: 0 18px 18px; overflow-x: auto; }
.drawer-month > [data-drawer-month-detail][hidden] { display: none; }

.multi-chart { overflow-x: auto; overscroll-behavior-inline: contain; }
.multi-chart svg.interactive-chart,
.multi-chart .interactive-chart,
.line-chart.interactive { cursor: crosshair; outline: none; }
.multi-chart svg.interactive-chart:focus-visible,
.multi-chart .interactive-chart:focus-visible,
.line-chart.interactive:focus-visible { border-radius: 8px; box-shadow: inset 0 0 0 2px rgba(31, 135, 149, .32); }
.chart-hover-layer { pointer-events: none; }
.chart-hover-layer[hidden],
.demo-chart-tooltip[hidden],
.chart-tooltip[hidden] { display: none; }
.chart-hover-guide { stroke: rgba(91, 112, 131, .62); stroke-dasharray: 4 4; stroke-width: 1; }
.chart-active-dot { stroke: #fff; stroke-width: 2.4; filter: drop-shadow(0 1px 2px rgba(16, 43, 70, .22)); }
.chart-hover-dot { stroke: #fff; stroke-width: 2.4; filter: drop-shadow(0 1px 2px rgba(16, 43, 70, .22)); }
.chart-active-dot.orders { fill: var(--teal); }
.chart-hover-dot.orders { fill: var(--teal); }
.chart-active-dot.delivered { fill: var(--green); }
.chart-hover-dot.delivered { fill: var(--green); }
.chart-active-dot.returns,
.chart-active-dot.returned,
.chart-hover-dot.returns,
.chart-hover-dot.returned { fill: var(--red); }
.demo-chart-tooltip rect,
.chart-tooltip rect {
  fill: rgba(255, 255, 255, .985);
  stroke: rgba(16, 43, 70, .14);
  stroke-width: 1;
  filter: drop-shadow(0 8px 12px rgba(16, 43, 70, .16));
}
.demo-chart-tooltip text,
.chart-tooltip text { font-family: Arial, Helvetica, sans-serif; }
.chart-tooltip-date,
.chart-tooltip-title,
.demo-chart-tooltip [data-chart-date] { fill: var(--navy) !important; font-size: 11px !important; font-weight: 850; }
.chart-tooltip-divider { stroke: #e8eef1; stroke-width: 1; }
.chart-tooltip-label { fill: var(--muted) !important; font-size: 10px !important; }
.chart-tooltip-value { fill: var(--navy) !important; font-size: 11px !important; font-weight: 850; }
.demo-chart-tooltip circle.orders { fill: var(--teal); }
.demo-chart-tooltip circle.orders:nth-of-type(1) { fill: #c98d20; }
.demo-chart-tooltip circle.delivered { fill: var(--green); }
.demo-chart-tooltip circle.returns,
.demo-chart-tooltip circle.returned { fill: var(--red); }
.chart-hit-area { cursor: crosshair; pointer-events: all; }
.tooltip-dot.orders { fill: var(--teal); }
.tooltip-dot.order-revenue,
.tooltip-dot.revenue { fill: #c98d20; }
.tooltip-dot.delivered { fill: var(--green); }
.tooltip-dot.returns,
.tooltip-dot.returned { fill: var(--red); }
.legend-orders::before { background: var(--teal) !important; }
.legend-delivered::before { background: var(--green) !important; }
.legend-returns::before { background: var(--red) !important; }
.legend-return::before { background: var(--red) !important; }

.daily-date-detail-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(31, 135, 149, .22);
  border-radius: 8px;
  color: var(--teal);
  background: var(--teal-soft);
  font: inherit;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}
.daily-date-detail-button svg { width: 13px; height: 13px; transform: rotate(-90deg); }
.daily-date-detail-button:hover,
.daily-date-detail-button:focus-visible { border-color: var(--teal); background: #dff2f4; outline: none; }

.daily-order-detail-backdrop { z-index: 150; }
.demo-modal.daily-order-detail-modal,
.daily-order-detail-modal {
  display: flex;
  width: min(1280px, calc(100vw - 56px));
  max-height: min(88vh, 900px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #f7fafb;
}
.demo-modal.summary-status-modal {
  display: flex;
  width: min(1120px, calc(100vw - 56px));
  max-height: min(88vh, 860px);
  flex-direction: column;
  overflow: hidden;
  background: #f7fafb;
}
.daily-order-detail-modal > header { flex: 0 0 auto; background: #fff; }
.summary-status-modal > header { flex: 0 0 auto; background: #fff; }
.daily-order-detail-modal > header p { margin: 0 0 5px; }
.daily-detail-toolbar,
.source-status-modal-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid #dfe8eb;
  background: #f7fafb;
}
.daily-detail-toolbar > label {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.daily-detail-toolbar > label.search-field { min-width: 260px; flex: 1 1 420px; }
.daily-detail-toolbar > label input,
.daily-detail-toolbar > label select {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #cfdde2;
  border-radius: 10px;
  color: var(--navy);
  background: #fff;
  outline: none;
  font: inherit;
  font-size: 11px;
  text-transform: none;
}
.daily-detail-toolbar > label input:focus,
.daily-detail-toolbar > label select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 135, 149, .1); }
.daily-detail-filters,
.daily-order-detail-filters { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; gap: 12px; }
.daily-detail-search,
.source-status-search {
  display: flex;
  width: min(480px, 100%);
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #cfdde2;
  border-radius: 10px;
  background: #fff;
}
.daily-detail-search:focus-within,
.source-status-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 135, 149, .1); }
.daily-detail-search svg,
.source-status-search svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--muted); }
.daily-detail-search input,
.source-status-search input { width: 100%; min-width: 0; padding: 9px 0; border: 0; color: var(--navy); background: transparent; outline: none; font: inherit; font-size: 11px; }
.daily-detail-filter,
.daily-order-product-filter { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.daily-detail-filter select,
.daily-order-product-filter select { min-width: 150px; padding: 9px 32px 9px 11px; border: 1px solid #cfdde2; border-radius: 10px; color: var(--navy); background: #fff; outline: none; font: inherit; font-size: 11px; text-transform: none; }
.daily-detail-filter select:focus-visible,
.daily-order-product-filter select:focus-visible { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 135, 149, .1); }
.daily-detail-count { flex: 0 0 auto; color: var(--muted); font-size: 10px; font-weight: 750; }
.daily-detail-body,
.daily-order-detail-modal > .table-wrap {
  min-height: 180px;
  padding: 0 24px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.daily-order-detail-modal > .modal-table-wrap,
.summary-status-modal > .modal-table-wrap {
  min-height: 180px;
  flex: 1 1 auto;
  padding: 0 24px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.daily-order-detail-modal > .modal-table-wrap table,
.summary-status-modal > .modal-table-wrap table { border: 1px solid #dce7eb; border-radius: 9px; background: #fff; }
.daily-detail-body .table-wrap { overflow: visible; border: 1px solid #dce7eb; border-radius: 9px; background: #fff; }
.daily-order-detail-table { min-width: 1120px; }
.daily-order-table { min-width: 1120px; }
.daily-order-detail-table th,
.daily-order-detail-table td,
.daily-order-table th,
.daily-order-table td { padding: 10px 12px; font-size: 10px; }
.daily-order-detail-table th { position: sticky; top: 0; z-index: 2; background: #f3f7f8; box-shadow: 0 1px 0 #dce7eb; }
.daily-order-table th { position: sticky; top: 0; z-index: 2; background: #f3f7f8; box-shadow: 0 1px 0 #dce7eb; }
.daily-source-badge,
.daily-status-badge {
  display: inline-flex;
  min-width: 82px;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #425b69;
  background: #eaf0f2;
  font-size: 9px;
  font-weight: 850;
}
.daily-source-badge.shopee,
.daily-source-badge[data-source='Shopee'] { color: #b55228; background: #fff0e8; }
.daily-source-badge.tiktok,
.daily-source-badge.tiktok-shop,
.daily-source-badge[data-source='TikTok Shop'] { color: #303746; background: #edf0f2; }
.daily-source-badge.everpro,
.daily-source-badge[data-source='Everpro'] { color: #116d7a; background: #e3f3f5; }
.daily-source-badge.mengantar { color: #3346b3; background: #eceeff; }
.daily-source-badge.lincah { color: #ae3038; background: #fdebed; }
.daily-status-badge.delivered,
.daily-status-badge[data-status='Terkirim'] { color: var(--green); background: var(--green-soft); }
.daily-status-badge.processing,
.daily-status-badge[data-status='Dalam proses'] { color: #986113; background: #fff0cf; }
.daily-status-badge.returned,
.daily-status-badge.return,
.daily-status-badge[data-status='Return'] { color: var(--red); background: var(--red-soft); }

.daily-detail-pagination,
.transaction-table-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  padding: 13px 24px;
  border-top: 1px solid #dfe8eb;
  background: #fff;
}
.daily-detail-pagination label,
.daily-detail-pagination > span,
.transaction-table-pagination label,
.transaction-table-pagination > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.daily-detail-pagination label,
.transaction-table-pagination label { display: inline-flex; align-items: center; gap: 7px; }
.daily-detail-pagination select,
.transaction-table-pagination select { padding: 7px 26px 7px 9px; border: 1px solid #cfdde2; border-radius: 8px; color: var(--navy); background: #fff; font: inherit; font-size: 10px; font-weight: 850; }
.daily-detail-pagination > span,
.transaction-table-pagination > span { text-align: center; }
.daily-detail-pagination > div,
.transaction-table-pagination > div { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.daily-detail-pagination button,
.transaction-table-pagination button { padding: 7px 10px; border: 1px solid #cfdde2; border-radius: 8px; color: var(--teal); background: #fff; cursor: pointer; font: inherit; font-size: 10px; font-weight: 850; }
.daily-detail-pagination button:hover:not(:disabled),
.daily-detail-pagination button:focus-visible,
.transaction-table-pagination button:hover:not(:disabled),
.transaction-table-pagination button:focus-visible { border-color: var(--teal); background: var(--teal-soft); outline: none; }
.daily-detail-pagination button:disabled,
.transaction-table-pagination button:disabled { cursor: default; opacity: .42; }
.daily-detail-pagination strong,
.transaction-table-pagination strong { min-width: 48px; color: var(--navy); text-align: center; }

.profit-row {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 48px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
}
button.profit-row { cursor: pointer; }
.profit-row:focus-visible { border-radius: 7px; outline: 2px solid rgba(31, 135, 149, .38); outline-offset: 4px; }
.profit-row-tooltip {
  position: absolute;
  z-index: 5;
  right: 74px;
  bottom: calc(100% + 5px);
  visibility: hidden;
  padding: 7px 9px;
  border: 1px solid rgba(16, 43, 70, .14);
  border-radius: 8px;
  color: var(--navy);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 18px rgba(16, 43, 70, .14);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}
.profit-row:hover .profit-row-tooltip,
.profit-row:focus-visible .profit-row-tooltip,
.profit-row.is-active .profit-row-tooltip { visibility: visible; opacity: 1; transform: translateY(0); }

.profit-bars {
  max-height: 255px;
  padding-right: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(31, 135, 149, .42) transparent;
}

.profit-detail-button {
  display: grid;
  gap: 3px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: right;
}
.profit-detail-button strong,
.profit-detail-button small { display: block; }
.profit-detail-button small { color: var(--teal); font-size: 8px; font-weight: 800; }
.profit-detail-button:hover,
.profit-detail-button:focus-visible { border-color: rgba(31, 135, 149, .28); background: var(--teal-soft); outline: none; }

.profit-calculation-modal { width: min(620px, calc(100vw - 34px)); }
.profit-formula { display: grid; gap: 0; padding: 22px 28px 28px; }
.profit-formula > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 2px; border-bottom: 1px solid #e7edef; }
.profit-formula > div > span { color: var(--muted); font-size: 11px; }
.profit-formula > div > strong { color: var(--navy); font-size: 12px; }
.profit-formula > .profit-formula-total { margin-top: 10px; padding: 16px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(120deg, #102d49, #153b59); }
.profit-formula > .profit-formula-total span { color: #b8ced8; font-weight: 750; }
.profit-formula > .profit-formula-total strong { color: #fff; font-size: 18px; }

.empty-table-state { padding: 30px 12px !important; color: var(--muted) !important; text-align: center !important; }

@media (max-width: 840px) {
  .rate-source-grid,
  .source-rate-breakdown,
  .rate-source-grid.is-marketplace,
  .source-rate-breakdown:has(.source-rate-card:nth-child(2):last-child) { grid-template-columns: 1fr; }
  .transaction-drawer-backdrop,
  .detail-backdrop { padding: 12px; }
  .transaction-drawer { width: 100%; height: min(92dvh, 900px); padding: 0 16px 28px; border-radius: 18px; }
  .drawer-header { margin: 0 -16px; padding: 20px 16px; }
  .drawer-header h2 { font-size: 23px; }
  .drawer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer-finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drawer-metric-grid,
  .drawer-metric-grid.finance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-month-toggle { min-width: 780px; }
}

@media (max-width: 640px) {
  .rate-channel-grid,
  .rate-stat-grid { grid-template-columns: 1fr; }
  .summary-rate-heading { flex-direction: column; }
  .validation-row,
  .quality-check-row { grid-template-columns: 26px minmax(0, 1fr); }
  .validation-row > span:last-child,
  .quality-check-row > span:last-child { grid-column: 2; }
  .daily-order-detail-backdrop { padding: 0; }
  .demo-modal.daily-order-detail-modal,
  .daily-order-detail-modal { width: 100%; height: 100%; max-height: none; border-radius: 0; }
  .daily-detail-toolbar,
  .source-status-modal-toolbar { align-items: stretch; flex-direction: column; padding: 12px 16px; }
  .daily-detail-toolbar > label,
  .daily-detail-toolbar > label.search-field { width: 100%; min-width: 0; flex-basis: auto; }
  .daily-detail-filters,
  .daily-order-detail-filters { align-items: stretch; flex-direction: column; }
  .daily-detail-search,
  .source-status-search { width: 100%; }
  .daily-detail-filter,
  .daily-order-product-filter { justify-content: space-between; }
  .daily-detail-filter select,
  .daily-order-product-filter select { min-width: 0; flex: 1 1 auto; }
  .daily-detail-body,
  .daily-order-detail-modal > .table-wrap { padding-right: 16px; padding-left: 16px; }
  .daily-detail-pagination,
  .transaction-table-pagination { grid-template-columns: 1fr auto; gap: 10px; padding: 12px 16px; }
  .daily-detail-pagination > span,
  .transaction-table-pagination > span { grid-column: 1 / -1; grid-row: 1; }
  .daily-detail-pagination label,
  .transaction-table-pagination label { grid-row: 2; }
  .daily-detail-pagination > div,
  .transaction-table-pagination > div { grid-row: 2; }
  .profit-row-tooltip { right: 0; }
  .drawer-metric-grid,
  .drawer-metric-grid.finance { grid-template-columns: 1fr; }
  .drawer-metric { min-height: 105px; }
}
