/* ============================================================
   Admin — Toko Online (orange theme)
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --a: #EA580C;
  --a2: #FB923C;
  --grad: linear-gradient(135deg, #FB923C, #EA580C);
  --ink: #3B2413;
  --mut: #8A6A4C;
  --bg: #FFF8F1;
  --line: #F2E2D1;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 26px rgba(154, 52, 18, .08);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- top ---------- */
.adm-top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.adm-top-in {
  max-width: 1160px; margin: 0 auto; padding: 12px 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.adm-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.adm-brand .logo {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  background: var(--grad); display: grid; place-items: center;
  color: #fff; font-size: 18px;
  box-shadow: 0 6px 14px rgba(234,88,12,.3);
}
.adm-brand .ttl { font-weight: 800; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-brand small { display: block; font-weight: 500; color: var(--mut); font-size: 11px; }
.view-store {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line); color: var(--a);
  font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  white-space: nowrap; background: #FFF7EF;
}
.view-store:hover { border-color: #F4C29B; background: #FFF1E3; }
.logout-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #FFF1E7; color: #B45309; font-size: 13px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px;
}
.adm-nav {
  max-width: 1160px; margin: 0 auto;
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 20px 0;
  scrollbar-width: none;
}
.adm-nav::-webkit-scrollbar { display: none; }
.adm-nav a {
  position: relative; white-space: nowrap;
  font-size: 13.5px; font-weight: 700; color: var(--mut);
  padding: 9px 15px 12px; border-radius: 12px 12px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.adm-nav a .pill {
  background: #FFE4CC; color: #C2410C; font-size: 10.5px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: inline-grid; place-items: center;
}
.adm-nav a:hover { color: var(--a); background: #FFF3E8; }
.adm-nav a.on { color: #fff; background: var(--grad); border-radius: 12px 12px 0 0; }
.adm-nav a.on .pill { background: rgba(255,255,255,.25); color: #fff; }

/* ---------- layout ---------- */
.adm-main { max-width: 1160px; margin: 0 auto; padding: 26px 20px 70px; }
.page-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-bottom: 22px;
}
.page-head h1 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.page-head .sub { color: var(--mut); font-size: 13px; margin-top: 2px; }

/* flash */
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: 14px; padding: 12px 16px; margin-bottom: 20px;
  font-size: 13.5px; font-weight: 600;
}
.flash.ok { background: #E8F7EE; border: 1px solid #BFE6CF; color: #166534; }
.flash.err { background: #FDEBEC; border: 1px solid #F5C2C5; color: #B91C1C; }

/* cards & stats */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 22px;
}
.card h2 { font-size: 16px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 22px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat .ico {
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 10px;
  background: #FFF0E2; display: grid; place-items: center; font-size: 18px;
}
.stat .val { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.stat .lbl { font-size: 12px; color: var(--mut); font-weight: 600; }
.stat.orange { background: var(--grad); border: none; color: #fff; }
.stat.orange .ico { background: rgba(255,255,255,.22); }
.stat.orange .lbl { color: rgba(255,255,255,.85); }

/* table */
.tbl-wrap { overflow-x: auto; }
.tbl { min-width: 640px; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mut); font-weight: 700; padding: 10px 12px;
  border-bottom: 2px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px solid #F8EEE2; font-size: 13.5px; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #FFFBF6; }
.tbl .thumb { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #FFF1E2; }
.tbl .thumb-ph { width: 46px; height: 46px; border-radius: 10px; background: #FFF1E2; display: grid; place-items: center; font-size: 20px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: 11px;
  font-size: 13.5px; font-weight: 700;
  padding: 10px 16px;
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 14px rgba(234,88,12,.25);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--mut); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { color: var(--a); border-color: #F0C39B; background: #FFF7EF; }
.btn.danger { background: linear-gradient(135deg, #F87171, #DC2626); box-shadow: 0 6px 14px rgba(220,38,38,.2); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.warn { background: #FFF0E2; color: #C2410C; box-shadow: none; border: 1px solid #FFD9BC; }
.btn.warn:hover { background: #FFE7D1; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.text-danger { color: #DC2626; }
.text-mut { color: var(--mut); }
.mt { margin-top: 14px; }
.mb { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.right { margin-left: auto; }
.muted-sm { font-size: 12px; color: var(--mut); }

/* badges */
.badge {
  display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: 999px;
}
.badge.green { background: #E5F6EC; color: #157347; }
.badge.red { background: #FDEBEC; color: #B91C1C; }
.badge.orange { background: #FFEBD9; color: #C2410C; }
.badge.gray { background: #F0ECE6; color: #6B5B4B; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--mut); margin-top: 5px; }
.field input[type=text], .field input[type=number], .field input[type=password],
.field input[type=month], .field input[type=url], .field select, .field textarea {
  width: 100%; border: 1.5px solid #EBDCC9; background: #fff;
  border-radius: 11px; padding: 10px 13px; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--a2); box-shadow: 0 0 0 3px rgba(251,146,60,.16);
}
.field textarea { resize: vertical; min-height: 80px; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); margin-top: 8px; }

/* empty state */
.empty {
  text-align: center; padding: 46px 20px; color: var(--mut);
}
.empty .big { font-size: 40px; display: block; margin-bottom: 10px; }

/* terlaris bars */
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar {
  flex: 1; height: 10px; border-radius: 999px; background: #F8E9D8; overflow: hidden;
}
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.bar-num { min-width: 52px; text-align: right; font-weight: 700; font-size: 12.5px; color: var(--a); }

/* order details inside table rows */
.detail-row td { background: #FFF9F2; padding: 0; }
.detail-in { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.detail-grid { display: grid; gap: 8px; max-width: 640px; }
.detail-grid .d { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.detail-grid .d b { font-weight: 600; color: var(--mut); }
.detail-grid .d span { text-align: right; }
.item-lines { margin-top: 6px; padding-top: 8px; border-top: 1px dashed #EAD8C3; }
.item-lines .l { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; padding: 2px 0; }
.item-lines .l span:last-child { font-weight: 700; white-space: nowrap; }

.month-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.month-pick .field { margin-bottom: 0; }
