/* ============================================================
   Admin — Showroom Kendaraan (dark premium automotive)
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --a: #E11D2E;
  --a2: #FF4757;
  --grad: linear-gradient(135deg, #FF3B4E, #C1121F);
  --metal: linear-gradient(120deg, #E9EDF3 0%, #AAB4C2 45%, #F3F6FA 100%);
  --ink: #EEF2F8;
  --mut: #98A3B3;
  --bg: #0A0C11;
  --card: #141922;
  --card2: #1A2029;
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --radius: 16px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .38);
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 460px at 92% -12%, rgba(225, 29, 46, .16), transparent 62%),
    radial-gradient(700px 420px at -10% 10%, rgba(70, 84, 110, .3), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  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: rgba(10, 12, 17, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.adm-top-in {
  max-width: 1200px; 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: 40px; height: 40px; flex: none; border-radius: 13px;
  background: var(--grad); display: grid; place-items: center;
  color: #fff; font-size: 19px;
  box-shadow: 0 8px 18px rgba(225, 29, 46, .34);
}
.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: 600; color: var(--mut); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.view-store {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line2); color: #D7DEE8;
  font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 999px;
  white-space: nowrap; background: rgba(255, 255, 255, .04);
}
.view-store:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.logout-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(220, 38, 38, .16); border: 1px solid rgba(248, 113, 113, .3);
  color: #FCA5A5; font-size: 13px; font-weight: 700;
  padding: 7px 12px; border-radius: 999px;
}
.logout-btn:hover { background: rgba(220, 38, 38, .26); }
.adm-nav {
  max-width: 1200px; 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: rgba(255, 255, 255, .1); color: #D7DEE8; 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: #fff; background: rgba(255, 255, 255, .05); }
.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: 1200px; margin: 0 auto; padding: 26px 20px 80px; }
.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: rgba(34, 197, 94, .12); border: 1px solid rgba(74, 222, 128, .32); color: #86EFAC; }
.flash.err { background: rgba(220, 38, 38, .14); border: 1px solid rgba(248, 113, 113, .38); color: #FCA5A5; }

/* cards & stats */
.card {
  background: linear-gradient(170deg, var(--card2), 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: 16px; margin-bottom: 22px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.stat {
  background: linear-gradient(170deg, var(--card2), var(--card));
  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: rgba(255, 255, 255, .07); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 18px;
}
.stat .val { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.stat .lbl { font-size: 12px; color: var(--mut); font-weight: 600; }
.stat.red { background: var(--grad); border: none; color: #fff; }
.stat.red .ico { background: rgba(255, 255, 255, .22); border-color: transparent; }
.stat.red .val { color: #fff; }
.stat.red .lbl { color: rgba(255, 255, 255, .88); }
.stat.silver { background: var(--metal); border: none; color: #14171D; }
.stat.silver .ico { background: rgba(0, 0, 0, .1); border-color: transparent; }
.stat.silver .val { color: #14171D; }
.stat.silver .lbl { color: rgba(20, 23, 29, .7); }

/* table */
.tbl-wrap { overflow-x: auto; }
.tbl { min-width: 660px; }
.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--mut); font-weight: 800; padding: 10px 12px;
  border-bottom: 2px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 13.5px; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
.tbl .thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, .05); }
.tbl .thumb-ph { width: 52px; height: 52px; border-radius: 10px; background: rgba(255, 255, 255, .05); 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 8px 18px rgba(225, 29, 46, .26);
  transition: filter .15s ease, transform .1s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: rgba(255, 255, 255, .05); color: #CBD3DE; border: 1px solid var(--line2); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn.danger { background: linear-gradient(135deg, #F87171, #B91C1C); box-shadow: 0 8px 18px rgba(185, 28, 28, .26); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn.warn { background: rgba(255, 255, 255, .07); color: #DCE3EC; box-shadow: none; border: 1px solid var(--line2); }
.btn.warn:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.text-danger { color: #F87171; }
.text-mut { color: var(--mut); }
.text-green { color: #6EE7A8; }
.text-red { color: #FCA5A5; }
.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: rgba(34, 197, 94, .16); color: #86EFAC; }
.badge.red { background: rgba(220, 38, 38, .18); color: #FCA5A5; }
.badge.orange { background: rgba(255, 71, 87, .16); color: #FFB3BA; }
.badge.gray { background: rgba(255, 255, 255, .08); color: #C6CEDA; }
.badge.silver { background: var(--metal); color: #14171D; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .form-grid.three { grid-template-columns: repeat(3, 1fr); } }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: #CBD3DE; }
.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: 1px solid var(--line2); background: #0C1017;
  border-radius: 11px; padding: 10px 13px; font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #5D6779; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--a2); box-shadow: 0 0 0 3px rgba(255, 71, 87, .16);
}
.field select option { background: #10141C; color: var(--ink); }
.field textarea { resize: vertical; min-height: 90px; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); margin-top: 8px; }
input[type=file] { color: var(--mut); font-size: 13px; }

/* kata counter (deskripsi) */
.kata-count { font-size: 11.5px; font-weight: 700; margin-top: 6px; color: var(--mut); }
.kata-count.ok { color: #86EFAC; }
.kata-count.warn { color: #FCD34D; }

/* money summary strip */
.money-strip {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-top: 4px;
}
@media (min-width: 760px) { .money-strip { grid-template-columns: repeat(3, 1fr); } }
.money-strip .m { display: flex; flex-direction: column; gap: 2px; }
.money-strip .m b { font-size: 12px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
.money-strip .m span { font-size: 16px; font-weight: 800; }

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

/* bars */
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar { flex: 1; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }
.bar i.green { background: linear-gradient(135deg, #34D399, #059669); }
.bar-num { min-width: 52px; text-align: right; font-weight: 700; font-size: 12.5px; color: #FFB3BA; }

/* order details inside table rows */
.detail-row td { background: rgba(255, 255, 255, .03); padding: 0; }
.detail-in { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.detail-grid { display: grid; gap: 8px; max-width: 660px; }
.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 solid var(--line); }
.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; }
