/* LOKA dark workspace and compact navigation. */
:root { color-scheme: dark; --paper: #111212; --white: #1b1c1c; --black: #f3f3ef; --line: #303232; --muted: #a1a49f; --orange: #ff5a1f; --orange-dark: #ff814f; --soft-orange: #342119; --red: #ff8f86; }
body { background: #111212; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.app-shell { max-width: 1600px; padding: 32px 34px 40px 126px; }
.topbar { top: 0; left: 0; bottom: 0; width: 92px; min-height: 0; height: 100dvh; padding: 19px 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #191a1a; z-index: 10; gap: 0; overflow-x: hidden; overflow-y: auto; box-shadow: none; transition: width .2s ease, box-shadow .2s ease; }
.sidebar-brand { width: 100%; min-height: 80px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
.topbar .brand-logo { width: 64px; height: 31px; margin: 0; object-fit: cover; object-position: center; }
#menuToggle { padding: 5px; width: 32px; height: 30px; border: 0; border-radius: 7px; background: #262828; color: #bfc2bd; cursor: pointer; }
.topbar .sidebar-label { height: 0; margin: 0; overflow: hidden; opacity: 0; white-space: nowrap; }
.topbar .header-actions { display: flex; flex-direction: column; flex-wrap: nowrap; width: 100%; gap: 5px; }
.topbar .sidebar-action, .topbar .sidebar-cta { width: 100%; height: 45px; flex: none; padding: 12px 23px; gap: 14px; white-space: nowrap; overflow: hidden; font-size: 0; border-radius: 9px; font-weight: 500; justify-content: flex-start; }
.topbar .sidebar-action > span, .topbar .sidebar-cta > span { flex: 0 0 20px; width: 20px; font-size: 20px; color: #9ea29c; }
.topbar .sidebar-action:hover { background: #252727; }
.topbar .sidebar-action.active { background: #2b2d2c; color: #fff; }
.topbar .sidebar-action.active > span { color: var(--orange); }
.topbar .sidebar-signout { margin-top: 22px; }
.topbar .sidebar-cta { color: #fff; background: var(--orange); margin-top: 8px; }
.topbar .sidebar-cta > span { color: #fff; }
.topbar .sync-status { margin: 0 0 12px; height: 32px; padding: 10px 29px; min-height: 32px; gap: 12px; background: transparent; white-space: nowrap; overflow: hidden; font-size: 0; }
.sync-status #syncDot { flex: 0 0 8px; }
.topbar.expanded, .topbar:has(:focus-visible) { width: 252px; box-shadow: 16px 0 40px #0006; }
.topbar.expanded .sidebar-action, .topbar.expanded .sidebar-cta, .topbar:has(:focus-visible) .sidebar-action, .topbar:has(:focus-visible) .sidebar-cta { font-size: 13px; padding-left: 17px; }
.topbar.expanded .sync-status, .topbar:has(:focus-visible) .sync-status { font-size: 11px; padding-left: 23px; }
@media (hover: hover) and (pointer: fine) {
  .topbar:hover { width: 252px; box-shadow: 16px 0 40px #0006; }
  .topbar:hover .sidebar-action, .topbar:hover .sidebar-cta { font-size: 13px; padding-left: 17px; }
  .topbar:hover .sync-status { font-size: 11px; padding-left: 23px; }
}
.period-bar { padding: 4px 0 28px; }
h1 { font-size: 1.9rem; letter-spacing: -.035em; }
h2 { font-size: 1.04rem; }
.eyebrow { font-size: .62rem; letter-spacing: .12em; margin-bottom: 8px; }
.dashboard-subtitle { font-size: .82rem; color: var(--muted); margin-top: 9px; }
.account-card, .account-card:nth-child(2), .account-card:nth-child(4) { background: #1c1d1d; color: #f5f5f0; border-color: var(--line); padding: 22px; min-height: 165px; }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.account-card:first-child { background: linear-gradient(120deg, #e54e15, #9a3516); border-color: #ba421b; }
.account-icon { color: #fff; background: #ffffff12; border-radius: 9px; }
.account-card strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.account-card p { letter-spacing: .03em; }
.panel, .sales-report, .summary-card { background: #1b1c1c; border-color: var(--line); padding: 22px; }
.summary-card.emphasis { background: #211e1a; border-color: #65402b; }
.sales-card, .sales-card.qris, .sales-card.total { background: #242625; border: 1px solid #343635; color: #f5f5f1; }
.sales-card.total { background: #30221a; border-color: #65402b; }
.incoming, .transaction-icon.income { color: #72d9a0; background: #20382b; }
.outgoing { background: #3e2420; color: #ff9b83; }
.transaction-icon.transfer { background: #303232; color: #d3d6ce; }
.transaction-value.income { color: #72d9a0; }
.bar-track { background: #313331; }
.bar { border-radius: 3px; }
.button.primary { color: #fff; }
.button.secondary { border-color: #444743; }
dialog { color: #f3f3ef; background: #1b1c1c; border: 1px solid var(--line); }
.close-button, .remove-sales-item { background: #303232; color: #e6e8e2; }
.shortfall-row { background: #342119; }
.all-carts-head { background: #252727; }
.approval-button.approved { background: #213a2b; color: #80dfa9; border-color: #427653; }
.danger-zone { padding: 18px; border: 1px solid #6e3531; border-radius: 12px; background: #2c1d1c; }
.danger-zone .section-heading { margin-bottom: 8px; }
.danger-button { margin-top: 14px; border: 1px solid #a84b43; background: #7d302b; color: #fff; }
.danger-button:hover { background: #963b34; }
.cart-approval.approved { color: #80dfa9; }
.sales-payment div { background: #30221a; color: #fff; }
.page-view[open] { min-height: calc(100dvh - 72px); background: #151616; }
.page-view[open] form, .page-view[open] .sales-dashboard-content { max-width: none; }
.sales-allocation { margin-top: 22px; padding: 22px; border: 1px solid #65402b; border-radius: 14px; background: #201b18; }
.allocation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.allocation-grid article { min-height: 112px; padding: 16px; border: 1px solid #3a3531; border-radius: 11px; background: #262321; }
.allocation-grid span, .allocation-grid strong, .allocation-grid small { display: block; }
.allocation-grid span { color: #c3a993; font-size: .64rem; font-weight: 800; letter-spacing: .08em; }
.allocation-grid strong { margin: 11px 0 5px; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.allocation-grid small { color: var(--muted); font-size: .68rem; }
.allocation-grid .profit-allocation { background: linear-gradient(125deg, #c84718, #853017); border-color: #c94e22; }
.allocation-grid .profit-allocation span, .allocation-grid .profit-allocation small { color: #fff; opacity: .8; }
.allocation-grid .profit-allocation.negative { background: #3d2020; border-color: #7b3b36; }
.allocation-check { display: flex; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 13px 14px; border-radius: 9px; background: #161717; font-size: .72rem; line-height: 1.45; }
.allocation-check span { color: var(--muted); }
.daily-allocation { margin-top: 14px; overflow-x: auto; }
.daily-allocation-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.daily-allocation-title b { font-size: .76rem; }.daily-allocation-title small { color: var(--muted); font-size: .65rem; }
.daily-allocation-table { min-width: 900px; overflow: hidden; border: 1px solid #3a3531; border-radius: 10px; }
.daily-allocation-head, .daily-allocation-row { display: grid; grid-template-columns: 95px repeat(5, minmax(125px, 1fr)); align-items: center; gap: 9px; padding: 11px 13px; }
.daily-allocation-head { background: #292522; color: #bba796; font-size: .61rem; font-weight: 800; }
.daily-allocation-row { border-top: 1px solid #3a3531; font-size: .7rem; font-variant-numeric: tabular-nums; }
.daily-allocation-row span, .daily-allocation-row strong { text-align: right; }
.daily-allocation-row strong { color: #79dca1; }.daily-allocation-row .negative-value { color: var(--red); }
.hpp-dialog form { max-width: 1000px; }
.source-callout, .source-warning { display: flex; flex-direction: column; gap: 5px; margin: 18px 0; padding: 14px; border: 1px solid #3d3f3d; border-radius: 10px; background: #202221; }
.source-callout b, .source-warning b { font-size: .76rem; }.source-callout span, .source-warning span { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.source-warning { border-color: #65402b; background: #2b211c; }
.operational-setting { display: block; max-width: 380px; margin: 20px 0; font-size: .76rem; font-weight: 700; }
.hpp-table-wrap { margin: 18px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.hpp-table-head, .hpp-product-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) 130px 150px 100px; align-items: center; gap: 10px; min-width: 650px; padding: 10px 14px; }
.hpp-table-head { color: var(--muted); background: #252727; font-size: .65rem; font-weight: 800; }
.hpp-product-row { border-top: 1px solid var(--line); font-size: .75rem; }
.hpp-cost-field { margin: 0; }.hpp-product-row input { margin: 0; padding: 9px; }
.hpp-product-row span, .hpp-product-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.hpp-product-row strong { color: #79dca1; }
.hpp-product-row small { display: none; color: var(--muted); font-size: .6rem; font-weight: 700; }
.sales-dashboard-panel { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: #1b1c1c; }
.sales-dashboard-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.sales-dashboard-panel-heading h3 { font-size: 1rem; }
.sales-dashboard-panel-heading small { color: var(--muted); font-size: .72rem; }
.sales-chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.sales-chart-legend span { display: flex; align-items: center; gap: 6px; }
.sales-chart-legend i { width: 8px; height: 8px; border-radius: 50%; }
.cash-dot { background: var(--orange); }.qris-dot { background: #5387e8; }
.sales-dashboard-chart { margin-top: 18px; }
.trend-graph { display: grid; grid-template-columns: 72px minmax(0, 1fr); min-height: 270px; }
.trend-scale { display: flex; flex-direction: column; justify-content: space-between; padding: 0 10px 39px 0; color: var(--muted); font-size: .62rem; text-align: right; }
.trend-scroll { min-width: 0; overflow-x: auto; border-bottom: 1px solid #3a3c3a; background: repeating-linear-gradient(to bottom, transparent 0, transparent 66px, #292b2a 67px); }
.trend-columns { display: flex; align-items: stretch; gap: 10px; width: max-content; min-width: 100%; height: 270px; padding: 0 8px; }
.trend-column { display: grid; grid-template-rows: 196px 28px 22px; align-items: end; width: max(54px, calc((100% - 80px) / 7)); min-width: 54px; text-align: center; }
.trend-bars { display: flex; align-items: end; justify-content: center; gap: 5px; height: 184px; }
.trend-bar { display: block; width: 15px; min-height: 0; border-radius: 5px 5px 2px 2px; transition: filter .16s ease; }
.trend-column:hover .trend-bar { filter: brightness(1.2); }
.trend-column > b { align-self: center; overflow: hidden; color: #d9dcd6; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.trend-column > span { align-self: center; color: var(--muted); font-size: .62rem; }
.top-products { display: grid; gap: 4px; margin-top: 14px; }
.top-product { display: grid; grid-template-columns: 34px minmax(0, 1fr) 120px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.top-product:last-child { border-bottom: 0; }
.product-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #2b2d2c; color: var(--muted); font-size: .72rem; font-weight: 800; }
.top-product:first-child .product-rank { background: var(--orange); color: #fff; }
.product-rank-main > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.product-rank-main b { font-size: .78rem; }.product-rank-main span { color: var(--muted); font-size: .68rem; }
.product-rank-track { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #303231; }
.product-rank-track i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.top-product > strong { text-align: right; font-size: .76rem; font-variant-numeric: tabular-nums; }
.login-card { background: #1b1c1c; }
#toast { background: #f3f3ef; color: #191a1a; z-index: 20; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
button:disabled { opacity: .45; cursor: not-allowed; }
@media (min-width: 1600px) { .app-shell { padding-left: 110px; } }
@media (max-width: 1000px) { .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .app-shell { padding: 90px 16px 24px; }
  .topbar, .topbar:has(:focus-visible) { width: 100%; height: 66px; bottom: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: none; overflow: hidden; }
  .sidebar-brand { min-height: 40px; margin: 0; flex-direction: row; align-items: center; justify-content: space-between; }
  .topbar .brand-logo { width: 78px; height: 35px; }
  .topbar .header-actions { display: none; }
  .topbar.expanded { height: auto; max-height: 100dvh; overflow-y: auto; }
  .topbar.expanded .header-actions { display: flex; margin-top: 15px; }
  .topbar.expanded .sidebar-action, .topbar.expanded .sidebar-cta { font-size: 13px; }
  .period-bar { gap: 18px; }
  .account-card { min-height: 150px; padding: 16px; }
  .account-card strong { font-size: 1.1rem; }
  .summary-grid, .dashboard-grid { gap: 12px; }
  .page-view[open] form, .page-view[open] .sales-dashboard-content { padding: 16px; }
  .page-view[open] { min-height: 70vh; }
  .sales-dashboard-panel { padding: 16px; }
  .sales-allocation { padding: 16px; }
  .allocation-grid { grid-template-columns: 1fr; }
  .allocation-check { flex-direction: column; gap: 5px; }
  .daily-allocation-title { align-items: start; flex-direction: column; }
  .sales-dashboard-panel-heading { align-items: start; flex-direction: column; }
  .trend-graph { grid-template-columns: 55px minmax(0, 1fr); }
  .top-product { grid-template-columns: 30px minmax(0, 1fr); }
  .top-product > strong { grid-column: 2; text-align: left; color: var(--muted); }
  .hpp-table-head { display: none; }
  .hpp-product-row { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 0; padding: 14px; }
  .hpp-product-row > b { grid-column: 1 / -1; }
  .hpp-product-row small { display: block; margin-bottom: 5px; text-align: left; }
  .hpp-selling { text-align: left !important; }
  .hpp-margin { text-align: right; }
  .hpp-margin strong { display: block; }
}
@media (prefers-reduced-motion: reduce) { .topbar { transition: none; } }
