:root {
  --ink: #152033;
  --muted: #738095;
  --line: #e6eaf0;
  --paper: #ffffff;
  --canvas: #f5f7fa;
  --nav: #101826;
  --nav-soft: #1b2738;
  --accent: #ff5d3b;
  --accent-dark: #e6492b;
  --green: #13a779;
  --shadow: 0 18px 50px rgba(30, 42, 62, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }

.app-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px;
  display: flex; flex-direction: column; background: var(--nav); color: #fff;
}
.brand { display: flex; align-items: center; gap: 11px; margin: 0 10px 42px; color: #fff; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent); font-family: Manrope, sans-serif; font-weight: 800;
  box-shadow: 0 8px 24px rgba(255, 93, 59, .3);
}
.brand strong { display: block; font: 800 20px/1 Manrope, sans-serif; letter-spacing: -.6px; }
.brand small { display: block; margin-top: 4px; color: #8793a5; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.nav-list { display: grid; gap: 8px; }
.nav-item {
  border: 0; border-radius: 11px; padding: 13px 14px; display: flex; align-items: center; gap: 12px;
  color: #929dad; background: transparent; font-weight: 600; text-align: left; cursor: pointer; transition: .18s ease;
}
.nav-item span { width: 22px; font-size: 19px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #fff; background: var(--nav-soft); box-shadow: inset 3px 0 var(--accent); }
.sidebar-foot { margin-top: auto; }
.status-dot { margin: 0 10px 18px; color: #768397; font-size: 12px; }
.status-dot i { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #38d39f; box-shadow: 0 0 0 4px rgba(56,211,159,.1); }
.cashier-card { display: flex; align-items: center; gap: 10px; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #28364a; color: #d7dee8; font-size: 12px; font-weight: 700; }
.cashier-card strong, .cashier-card small { display: block; }
.cashier-card strong { font-size: 13px; }
.cashier-card small { margin-top: 2px; color: #78859a; font-size: 11px; }

.workspace { min-width: 0; }
.topbar {
  height: 94px; padding: 0 28px; display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
}
.eyebrow { margin: 0 0 6px; color: #9aa4b3; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font: 800 24px/1.1 Manrope, sans-serif; letter-spacing: -.7px; }
h2 { margin-bottom: 5px; font: 800 20px/1.2 Manrope, sans-serif; letter-spacing: -.45px; }
h3 { margin-bottom: 5px; font: 700 16px/1.3 Manrope, sans-serif; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-box { width: min(32vw, 330px); height: 42px; padding: 0 11px; display: flex; align-items: center; gap: 9px; background: var(--canvas); border: 1px solid transparent; border-radius: 10px; transition: .18s ease; }
.search-box:focus-within { background: #fff; border-color: #cdd4df; box-shadow: 0 0 0 3px rgba(21,32,51,.05); }
.search-box span { color: #7c8899; font-size: 20px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
kbd { padding: 2px 6px; border: 1px solid #d7dce4; border-radius: 5px; background: #fff; color: #8792a2; font-size: 10px; box-shadow: 0 1px 0 #d7dce4; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }

.view { display: none; }
.view.active { display: grid; }
#view-pos { grid-template-columns: minmax(0, 1fr) 370px; height: calc(100vh - 94px); }
.catalog-panel { min-width: 0; padding: 25px 28px 32px; overflow-y: auto; }
.catalog-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.catalog-heading p, .section-heading p, .settings-card p, .report-card p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.outline-button, .primary-button, .text-button {
  border: 0; border-radius: 9px; padding: 10px 13px; background: transparent; font-weight: 700; font-size: 12px; cursor: pointer;
}
.outline-button { border: 1px solid #dce1e9; background: #fff; }
.primary-button { background: var(--nav); color: #fff; }
.full { width: 100%; }
.danger { color: #df4e46; }
.category-list { display: flex; gap: 8px; margin: 22px 0; overflow-x: auto; padding-bottom: 2px; }
.category-button { white-space: nowrap; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #6f7a8c; font-size: 12px; font-weight: 600; cursor: pointer; }
.category-button.active { border-color: var(--nav); background: var(--nav); color: #fff; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 13px; }
.product-card {
  position: relative; min-height: 180px; padding: 13px; border: 1px solid var(--line); border-radius: 15px;
  background: var(--paper); box-shadow: 0 5px 20px rgba(30,42,62,.03); cursor: pointer; transition: .18s ease; overflow: hidden;
}
.product-card:hover { transform: translateY(-2px); border-color: #cdd4de; box-shadow: var(--shadow); }
.product-image { height: 103px; display: grid; place-items: center; border-radius: 11px; background: var(--product-bg); font-size: 42px; }
.product-card h3 { margin: 12px 0 3px; font-family: "DM Sans", sans-serif; font-size: 14px; }
.product-card p { margin: 0; color: var(--muted); font-size: 12px; }
.product-add { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,255,255,.9); font-weight: 700; box-shadow: 0 4px 12px rgba(30,42,62,.1); }

.cart-panel { display: flex; flex-direction: column; min-width: 0; background: #fff; border-left: 1px solid var(--line); }
.cart-heading { display: flex; justify-content: space-between; align-items: center; padding: 25px 23px 14px; }
.cart-heading h2 { margin: 0; font-size: 17px; }
.order-meta { display: flex; gap: 7px; padding: 0 23px 17px; border-bottom: 1px solid var(--line); }
.meta-pill { padding: 7px 10px; border: 0; border-radius: 7px; background: #f4f6f8; color: #637084; font-size: 11px; font-weight: 600; }
.cart-items { flex: 1; padding: 8px 23px; overflow-y: auto; }
.cart-empty { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; color: #98a2b0; }
.cart-empty span { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 12px; border-radius: 50%; background: #f4f6f8; font-size: 22px; }
.cart-empty strong { color: #596579; font-size: 13px; }
.cart-empty small { margin-top: 4px; font-size: 11px; }
.cart-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.cart-thumb { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; background: var(--product-bg); font-size: 23px; }
.cart-product strong { display: block; margin-bottom: 5px; font-size: 12px; }
.cart-product small { color: var(--muted); font-size: 10px; }
.qty-control { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-control button { width: 23px; height: 23px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.qty-control span { min-width: 12px; text-align: center; font-size: 11px; font-weight: 700; }
.row-total { text-align: right; font-size: 12px; font-weight: 700; }
.row-total button { display: block; margin: 8px 0 0 auto; border: 0; background: none; color: #a1a9b5; cursor: pointer; }
.cart-summary { padding: 17px 23px 20px; border-top: 1px solid var(--line); background: #fbfcfd; }
.cart-summary > div { display: flex; justify-content: space-between; margin-bottom: 10px; color: #758094; font-size: 12px; }
.cart-summary > div strong { color: var(--ink); }
.grand-total { align-items: flex-end; margin: 17px 0 !important; padding-top: 14px; border-top: 1px dashed #d8dde5; color: var(--ink) !important; font-weight: 700; }
.grand-total strong { font: 800 22px Manrope, sans-serif; letter-spacing: -.5px; }
.checkout-button { width: 100%; min-height: 50px; padding: 0 17px; display: flex; justify-content: space-between; align-items: center; border: 0; border-radius: 11px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(255,93,59,.22); transition: .18s ease; }
.checkout-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.checkout-button:disabled { background: #dfe3e8; box-shadow: none; cursor: not-allowed; }
.checkout-button strong { font-size: 15px; }
.shortcut-hint { margin: 10px 0 0; text-align: center; color: #9ba4b2; font-size: 10px; }

.content-view { padding: 30px; }
.content-view.active { display: block; }
.table-card, .report-card, .settings-card, .metric-card { border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 6px 24px rgba(30,42,62,.03); }
.table-card { position: relative; min-height: 330px; margin-top: 24px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; border-bottom: 1px solid #edf0f3; text-align: left; font-size: 12px; }
th { color: #8d97a6; background: #fafbfc; font-size: 10px; letter-spacing: .5px; text-transform: uppercase; }
.right { text-align: right; }
.payment-tag { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #edf9f5; color: #15855f; font-size: 10px; font-weight: 700; }
.empty-state { position: absolute; inset: 44px 0 0; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state span { font-size: 28px; color: #a8b1be; }
.empty-state h3 { margin: 10px 0 4px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0 16px; }
.metric-card { padding: 20px; }
.metric-card > span, .metric-card strong, .metric-card small { display: block; }
.metric-card > span { color: var(--muted); font-size: 11px; }
.metric-card strong { margin: 10px 0 6px; font: 800 22px Manrope, sans-serif; letter-spacing: -.7px; }
.metric-card small { color: #a0a8b5; font-size: 10px; }
.metric-card.accent { background: var(--nav); color: #fff; }
.metric-card.accent > span, .metric-card.accent small { color: #8f9bac; }
.report-card { padding: 22px; }
.payment-bars { display: grid; gap: 14px; margin-top: 22px; }
.bar-row { display: grid; grid-template-columns: 100px 1fr 110px; gap: 13px; align-items: center; font-size: 11px; }
.bar-track { height: 8px; border-radius: 99px; background: #eef1f4; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--accent); }
.settings-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 24px; }
.settings-card { display: grid; align-content: start; gap: 19px; padding: 24px; }
.settings-card label { display: grid; gap: 7px; color: #606b7d; font-size: 11px; font-weight: 700; }
.settings-card input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dce1e7; border-radius: 8px; outline: 0; }
.settings-card input:focus { border-color: var(--nav); box-shadow: 0 0 0 3px rgba(16,24,38,.06); }
.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 12px; top: 13px; color: #8d97a6; }
.integration-head { display: flex; justify-content: space-between; align-items: center; }
.doku-logo { color: #e1262f; font: 800 20px Manrope, sans-serif; letter-spacing: -.8px; }
.badge { padding: 5px 8px; border-radius: 999px; background: #fff4e4; color: #a46405; font-size: 9px; font-weight: 700; }
.integration-status { display: flex; align-items: center; gap: 11px; padding: 13px; border-radius: 10px; background: #f6f7f9; }
.integration-status i { width: 9px; height: 9px; border-radius: 50%; background: #abb3bf; }
.integration-status strong, .integration-status small { display: block; }
.integration-status strong { font-size: 12px; }
.integration-status small { color: var(--muted); font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(9,15,24,.58); backdrop-filter: blur(6px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(440px, 100%); padding: 28px; border-radius: 18px; background: #fff; box-shadow: 0 30px 90px rgba(4,9,18,.3); }
.modal-close { position: absolute; top: 15px; right: 16px; border: 0; background: transparent; color: #818b99; font-size: 23px; cursor: pointer; }
.modal-total { margin: 13px 0 22px; font: 800 30px Manrope, sans-serif; letter-spacing: -1px; }
.payment-options { display: grid; gap: 8px; }
.payment-option { display: grid; grid-template-columns: 42px 1fr 20px; gap: 11px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-align: left; cursor: pointer; }
.payment-option.selected { border-color: var(--nav); box-shadow: 0 0 0 2px rgba(16,24,38,.05); }
.payment-option strong, .payment-option small { display: block; }
.payment-option strong { font-size: 12px; }
.payment-option small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.payment-option i { display: none; font-style: normal; color: var(--green); }
.payment-option.selected i { display: block; }
.payment-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; font-size: 13px; font-weight: 800; }
.payment-icon.cash { background: #eaf8f2; color: #15855f; }
.payment-icon.qris { background: #eef2ff; color: #5068c7; }
.payment-icon.card { background: #fff1ee; color: #d74c30; }
.demo-notice { margin: 16px 0; padding: 10px; border-radius: 8px; background: #fff7e9; color: #966526; font-size: 10px; text-align: center; }
.receipt { text-align: center; }
.success-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 50%; background: #e9f9f3; color: var(--green); font-size: 24px; }
.receipt-meta { margin: 18px 0; padding: 14px; border-top: 1px dashed #d7dde5; border-bottom: 1px dashed #d7dde5; color: var(--muted); font-size: 11px; line-height: 1.8; }
.info-copy { color: var(--muted); font-size: 13px; line-height: 1.65; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; padding: 12px 15px; border-radius: 9px; background: var(--nav); color: #fff; font-size: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 78px 1fr; }
  .sidebar { padding-inline: 12px; }
  .brand { margin-inline: auto; }
  .brand > span:last-child, .nav-item:not(.active)::after, .nav-item { font-size: 0; }
  .nav-item { justify-content: center; padding: 13px 8px; }
  .nav-item span { font-size: 19px; }
  .cashier-card > span:last-child, .status-dot { display: none; }
  .cashier-card { justify-content: center; }
  #view-pos { grid-template-columns: minmax(0, 1fr) 330px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; inset: auto 0 0; width: 100%; height: 65px; padding: 7px 12px; flex-direction: row; align-items: center; }
  .brand, .sidebar-foot { display: none; }
  .nav-list { width: 100%; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .nav-item, .nav-item.active { box-shadow: none; }
  .topbar { height: 78px; padding: 0 16px; }
  .topbar h1 { font-size: 20px; }
  .search-box { width: 45vw; }
  .icon-button { display: none; }
  #view-pos { display: block; height: auto; padding-bottom: 65px; }
  .catalog-panel { padding: 18px 16px 390px; overflow: visible; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-panel { position: fixed; z-index: 10; left: 0; right: 0; bottom: 65px; max-height: 355px; border: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 40px rgba(20,30,45,.12); }
  .cart-heading, .order-meta { display: none; }
  .cart-items { max-height: 150px; }
  .cart-summary { padding: 13px 16px; }
  .cart-summary > div:not(.grand-total) { display: none; }
  .grand-total { margin: 0 0 10px !important; padding-top: 0; border: 0; }
  .shortcut-hint { display: none; }
  .content-view { padding: 20px 16px 90px; }
  .metric-grid, .settings-grid { grid-template-columns: 1fr; }
  .table-card { overflow-x: auto; }
  table { min-width: 640px; }
}
