:root {
  --b: #0a5ccf;
  --c: #00b4d8;
  --bg: #f4f7fc;
  --t: #1b2540;
  --m: #6b7a99;
  --line: #e3e9f3;
  --o: #f97316;
  --shadow: 0 2px 10px rgba(10, 92, 207, 0.06);
  --side: 230px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Poppins, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--t);
  font-size: 13px;
  line-height: 1.45;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: var(--b); text-decoration: none; }
img { max-width: 100%; }
h1 { font-size: 22px; margin: 0; line-height: 1.25; }
h2 { font-size: 15px; margin: 0 0 12px; }
p { margin: 0 0 10px; }
.logo { font-weight: 700; font-size: 18px; color: var(--b); letter-spacing: -0.02em; }
.logo span { color: var(--c); }
.m { color: var(--m); }
.sm { font-size: 11px; }
.b { font-weight: 600; }
.r { text-align: right; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font: 600 13px Poppins, "Segoe UI", sans-serif;
  background: var(--b);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}
.btn.g { background: linear-gradient(90deg, var(--b), var(--c)); }
.btn.o { background: #fff; color: var(--b); border: 1px solid var(--b); }
.btn.r { background: #fff; color: #b91c1c; border: 1px solid #f3b4b4; }
.btn.s { padding: 6px 11px; font-size: 12px; }
.btn.full { display: flex; width: 100%; }
.btn.dis, .btn:disabled { background: #cbd3e3; color: #fff; border-color: transparent; cursor: not-allowed; }
button.linkish, a.linkish {
  background: none; border: 0; padding: 0; color: var(--m); font: inherit; cursor: pointer;
}
button.linkish.danger, a.danger { color: #b91c1c; background: none; border: 0; cursor: pointer; font-weight: 600; }
.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.page { padding: 22px 30px 40px; }
.hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

label { font-size: 12px; color: var(--m); font-weight: 500; display: block; margin: 10px 0 4px; }
.req { color: #dc2626; }
.in, select.in, textarea.in {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
  min-height: 38px;
  outline: none;
}
textarea.in { min-height: 72px; resize: vertical; }
.in:focus, select.in:focus, textarea.in:focus { border-color: var(--b); box-shadow: 0 0 0 3px rgba(10, 92, 207, 0.12); }
.in.ro, .in:disabled { background: #f4f7fc; color: var(--m); }
.in.mini { width: 112px; text-align: right; display: inline-block; min-height: 34px; padding: 6px 8px; }
.in.qty { width: 64px; text-align: center; }
.in.rev { border-color: var(--o); background: #fff7ed; }
.search {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; min-height: 40px;
}
.search input { border: 0; outline: none; width: 100%; font: inherit; background: transparent; min-height: 38px; }

.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.Menunggu { background: #fef3c7; color: #b45309; }
.Diproses { background: #dbeafe; color: #1d4ed8; }
.Dikirim { background: #e0f2fe; color: #0369a1; }
.Selesai { background: #dcfce7; color: #15803d; }
.Dibatalkan { background: #fee2e2; color: #b91c1c; }
.chip.pt { background: #e3eeff; color: #0a5ccf; }
.chip.cv { background: #d5f5ef; color: #0f766e; }
.chip.rev { background: #ffedd5; color: #c2410c; font-size: 10px; padding: 1px 7px; }
.chip.sales { background: #e0f2fe; color: #0369a1; font-size: 10px; padding: 1px 8px; }
.badge {
  background: #dc2626; color: #fff; border-radius: 10px; padding: 1px 7px;
  font-size: 10px; font-weight: 700; margin-left: 4px;
}
.alert { border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; font-weight: 500; }
.alert.ok { background: #dcfce7; color: #166534; }
.alert.err { background: #fee2e2; color: #991b1b; }
.note {
  background: #eaf3ff; color: #1d4ed8; border-radius: 10px; padding: 10px 12px; font-size: 12px;
}
.okbox { background: #dcfce7; color: #166534; border-radius: 10px; padding: 10px 12px; }
.sales-banner {
  background: #f2f7ff; border: 1px solid #cfe0f8; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px;
}
.help { margin-top: 4px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.tabs a, .tabs span {
  border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 7px 14px;
  font-weight: 500; white-space: nowrap; color: var(--t); flex: none;
}
.tabs a.on, .tabs .on { background: var(--b); color: #fff; border-color: var(--b); }

.catalog { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pc {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
}
.img {
  height: 130px; background: linear-gradient(135deg, #eaf1fc, #ddebfb);
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  position: relative; color: var(--b);
}
.img img { width: 100%; height: 130px; object-fit: cover; }
.pcb { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-size: 18px; font-weight: 700; color: var(--b); }
.srp { font-size: 11px; color: var(--m); }
.step {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff;
}
.step button, .step i {
  width: 30px; text-align: center; color: var(--b); font-weight: 700; background: #f4f7fc;
  border: 0; padding: 6px 0; cursor: pointer; font-style: normal;
}
.step input, .step b { width: 36px; text-align: center; border: 0; background: #fff; font-weight: 600; padding: 4px 0; }
.na { opacity: 0.62; }
.na .img { filter: grayscale(1); }
.ovl {
  position: absolute; top: 10px; left: 10px; background: #1b2540; color: #fff;
  font-size: 10px; padding: 2px 8px; border-radius: 8px; font-family: Poppins, sans-serif;
}
.add-row { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.add-row .btn { flex: 1; }

.top {
  background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 20;
}
.top nav { display: flex; gap: 6px; }
.top nav a { padding: 8px 12px; border-radius: 10px; color: var(--m); font-weight: 500; }
.top nav a.on { background: linear-gradient(90deg, var(--b), var(--c)); color: #fff; }
.top .u { margin-left: auto; text-align: right; line-height: 1.3; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--b), var(--c)); color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.tbar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--line); justify-content: space-around; padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
  font-size: 10px; color: var(--m); text-align: center; z-index: 30;
}
.tbar a { color: inherit; min-width: 72px; }
.tbar a.on { color: var(--b); font-weight: 600; }
.tbar .ic { font-size: 16px; display: block; line-height: 1.2; }

.side {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); background: #fff;
  border-right: 1px solid var(--line); padding: 20px 14px; z-index: 40;
  display: flex; flex-direction: column;
}
.side .logo { margin: 0 8px 6px; }
.side .tg { font-size: 10px; color: var(--m); margin: 0 8px 18px; }
.side a.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 12px; border-radius: 10px; color: var(--m); font-weight: 500; margin-bottom: 4px;
}
.side a.nav.on { background: linear-gradient(90deg, var(--b), var(--c)); color: #fff; }
.side .foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); }
main.ad { margin-left: var(--side); padding: 22px 30px 48px; min-height: 100vh; }
.adminbar { display: none; }

.two { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .in, .filters select.in { width: auto; min-width: 140px; flex: 0 0 auto; }
.filters .search { margin: 0; min-width: 220px; flex: 1; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; color: var(--m); font-weight: 500; font-size: 12px;
  padding: 9px 10px; border-bottom: 1px solid var(--line); background: #f8fafd; white-space: nowrap;
}
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 12.5px; }
tr.group td { background: #f2f7ff; font-weight: 600; color: var(--b); }
tr.alt { background: #f7faff; }
tr.total td { background: #f8fafd; font-weight: 700; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.two > *, .split > *, .card, main.ad, .page { min-width: 0; }
.mob-label { display: none; }
.struck { text-decoration: line-through; margin-bottom: 3px; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 10px; }
.kv span { color: var(--m); }
.tl div { display: flex; gap: 10px; margin-bottom: 10px; }
.tl i {
  width: 12px; height: 12px; border-radius: 50%; background: var(--line); margin-top: 4px; flex: none; font-style: normal;
}
.tl .ok i { background: var(--b); }
.pick, .choice {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; display: block; cursor: pointer;
}
.pick.on, .choice.on, .pick:has(input:checked), .choice:has(input:checked) { border: 2px solid var(--b); background: #f2f7ff; }
.choice input, .pick input { margin-right: 6px; }
.rules { border: 1px dashed #f5b000; }
.guest-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eaf1fc, #e0f6fb); padding: 16px;
}
.login-card { width: min(420px, 100%); padding: 28px; }
.demo {
  background: #f8fafd; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 14px;
}
.demo summary { cursor: pointer; font-weight: 600; color: var(--b); }
.demo li { margin: 4px 0; }
.success-card { width: min(520px, 100%); margin: 40px auto; text-align: center; padding: 32px; }
.orderno { font-size: 24px; font-weight: 700; color: var(--b); word-break: break-all; }
.hero-num { background: #f2f7ff; border-radius: 12px; padding: 14px; margin: 16px 0; }
.only-mob { display: none; }
.backdrop { display: none; }
.empty { text-align: center; padding: 28px 10px; color: var(--m); }
.menu-btn {
  display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; font-weight: 700;
}
.subrow td { background: #f7faff; }
.money { color: var(--b); font-weight: 700; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.form-card h2 { margin-bottom: 4px; }

@media (max-width: 1100px) {
  .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two, .split { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 800px) {
  .only-desk { display: none !important; }
  .only-mob { display: block; }
  .page { padding: 14px 14px 96px; }
  main.ad { margin-left: 0; padding: 14px 14px 28px; }
  .catalog { grid-template-columns: 1fr 1fr; gap: 10px; }
  .two, .split, .grid-2 { grid-template-columns: 1fr; }
  .top nav { display: none; }
  .top { padding: 12px 14px; }
  .top .u .desk-meta { display: none; }
  .tbar { display: flex; }
  .price { font-size: 15px; }
  .pcb { padding: 10px; }
  .img { height: 96px; font-size: 34px; }
  .img img { height: 96px; }
  .side { transform: translateX(-105%); transition: transform 0.2s ease; }
  .side.open { transform: none; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(27, 37, 64, 0.45); z-index: 35; }
  .adminbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 25;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 14px;
  }
  .menu-btn { display: inline-flex; }
  .filters .in, .filters select.in, .filters .search { width: 100%; min-width: 0; }
  .hd h1 { font-size: 20px; }
  .login-card { padding: 22px 16px; }
  .kv { grid-template-columns: 108px 1fr; }
  .in.mini { width: 100%; }
  td .in.mini, td .in.qty { width: 88px; }
  .line-table { overflow: visible; }
  .line-table table, .line-table tr, .line-table td { display: block; width: 100%; }
  .line-table tr:first-child { display: none; }
  .line-table tr { padding: 8px 0 12px; }
  .line-table td { border: 0; text-align: left; min-width: 0 !important; padding: 4px 0; white-space: normal; }
  .line-table .mob-label { display: block; margin-bottom: 2px; }
  .line-table td .in.mini, .line-table td .in.qty { width: 100%; max-width: 100%; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .hd h1 { overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .catalog { grid-template-columns: 1fr 1fr; }
  .add-row { flex-direction: column; align-items: stretch; }
  .step { align-self: flex-start; }
}
