/* ═══════════════════════════════════
   DESIGN TOKENS — Materially Style
═══════════════════════════════════ */
:root {
  /* Backgrounds */
  --bg:      #f0f2f8;
  --surface: #ffffff;
  --surface2: #f8f8f9;

  /* Borders */
  --bd:      #e3e8f0;
  --bd2:     #c9d3e0;

  /* Text */
  --tx:      #242c3a;
  --tx2:     #425466;
  --tx3:     #8896ab;

  /* Primary — Materially blue */
  --blue:    #3366ff;
  --blueD:   #0043a9;
  --blueL:   #e8eeff;
  --blueBd:  #b3c4ff;

  /* Status colors */
  --grn:     #00ac69;
  --grnL:    #e6f7f1;
  --grnBd:   #80d9b4;

  --orn:     #f4a100;
  --ornL:    #fff8e6;
  --ornBd:   #fad680;

  --red:     #ff413a;
  --redL:    #fff0ef;
  --redBd:   #ffb3b0;

  --vio:     #7c4dff;
  --vioL:    #f0ebff;
  --vioBd:   #c5adff;

  --ylw:     #aa7000;
  --ylwL:    #fff8e1;
  --ylwBd:   #f6d87a;

  /* Radius */
  --r:  12px;
  --r2:  8px;
  --r3:  4px;

  /* Shadow — Material elevation */
  --sh:  0 2px 8px rgba(51,102,255,.08), 0 1px 3px rgba(0,0,0,.06);
  --sh2: 0 4px 20px rgba(51,102,255,.12), 0 2px 6px rgba(0,0,0,.08);
}

/* ═══════════════════════════════════ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--tx);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

/* ═══════════════════════════════════ SCREEN SYSTEM */
.sc { display: none; }
.sc.on { display: block; animation: pageIn .18s ease; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
.wrap { max-width: 540px; margin: 0 auto; padding: 14px 14px 92px; }

/* PC */
@media (min-width: 860px) {
  .wrap { max-width: none; padding: 24px 32px 40px; }
  .stkg  { grid-template-columns: repeat(6, 1fr) !important; }
  .mgrid { grid-template-columns: repeat(3, 1fr) !important; }
  .bnav  { display: none !important; }
  .pcsb  { display: flex !important; }
  body   { padding-left: 240px; }
}

/* ═══════════════════════════════════ TOPBAR */
.topbar {
  background: var(--surface);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--bd);
  box-shadow: 0 1px 10px rgba(51,102,255,.08);
}
.tlogo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(51,102,255,.35);
}
.tco {
  font-size: 8px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--tx3);
  font-family: 'JetBrains Mono', monospace;
}
.tap {
  font-size: 14px; font-weight: 700;
  color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbtn {
  flex-shrink: 0; padding: 6px 14px; border-radius: 8px;
  background: var(--blueL);
  border: 1.5px solid var(--blueBd);
  font-size: 12px; font-weight: 700; color: var(--blue);
  cursor: pointer; font-family: 'JetBrains Mono', monospace;
  transition: .12s;
}
.tbtn:active { background: var(--blue); color: #fff; }

/* ═══════════════════════════════════ PC SIDEBAR */
.pcsb {
  display: none; flex-direction: column;
  position: fixed; left: 0; top: 60px; bottom: 0; width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--bd);
  z-index: 90; overflow-y: auto;
  padding: 8px 0 24px;
}
.pns {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--tx3); padding: 18px 20px 6px;
  font-family: 'Poppins', sans-serif;
}
.pni {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; font-size: 13.5px; font-weight: 500;
  color: var(--tx2); cursor: pointer;
  border-radius: 0; margin: 1px 12px;
  border-radius: 8px;
  transition: .15s;
}
.pni:hover { background: var(--blueL); color: var(--blue); }
.pni.on    {
  background: var(--blue); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px rgba(51,102,255,.30);
}
.pni .ni   { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }

/* ═══════════════════════════════════ CARD */
.card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 14px;
  border: 1px solid var(--bd);
  box-shadow: var(--sh);
}

/* ═══════════════════════════════════ FORM HEADER */
.fhd {
  border-radius: var(--r) var(--r) 0 0;
  padding: 13px 16px 12px;
  margin: -16px -16px 15px;
  border-bottom: 1px solid var(--bd);
}
.fhd.m  { background: linear-gradient(120deg, #E6F8F1 0%, #F2FCF7 100%); }
.fhd.k  { background: linear-gradient(120deg, #FFF3E6 0%, #FFF8F2 100%); }
.fhd.s  { background: linear-gradient(120deg, #F0EAF8 0%, #F7F3FC 100%); }
.fhd-ttl { font-size: 17px; font-weight: 700; color: var(--tx); }
.fhd-sub { font-size: 11.5px; color: var(--tx3); margin-top: 3px; }
.cm { color: var(--grn); }
.ck { color: var(--orn); }
.cv { color: var(--vio); }

/* ═══════════════════════════════════ FIELD */
.fld { margin-bottom: 14px; }
.fld > label {
  display: block;
  font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--tx3); margin-bottom: 6px;
  font-family: 'Poppins', sans-serif;
}
.req { color: var(--red); }

input[type=text],
input[type=date],
textarea,
select {
  width: 100%; padding: 10px 14px;
  border-radius: var(--r2);
  border: 1.5px solid var(--bd);
  background: var(--surface);
  font-family: 'Poppins', sans-serif;
  font-size: 14px; color: var(--tx);
  outline: none; transition: .15s;
  -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--tx3); font-size: 13.5px; }
input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(51,102,255,.12);
}
textarea { resize: vertical; min-height: 62px; line-height: 1.55; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238896ab'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* SN monospace */
.sn-inp {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13.5px !important; font-weight: 700 !important;
  letter-spacing: .04em !important; color: var(--blue) !important;
}
input.sn-inp::placeholder { color: var(--tx3) !important; font-weight: 500 !important; }

/* ═══════════════════════════════════ PILLS (generic) */
.pills-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.pill {
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid var(--bd);
  background: var(--surface);
  font-size: 13px; font-weight: 500;
  color: var(--tx2); cursor: pointer;
  transition: .15s; white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}
.pill:hover { border-color: var(--blue); color: var(--blue); background: var(--blueL); }

/* Tipe unit */
.pill.on          { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 3px 10px rgba(51,102,255,.3); }
.pill.on.chiller  { background: var(--grn);  border-color: var(--grn);  color: #fff; box-shadow: 0 3px 10px rgba(0,172,105,.3); }
.pill.on.showcase { background: var(--orn);  border-color: var(--orn);  color: #fff; box-shadow: 0 3px 10px rgba(244,161,0,.3); }

/* Ukuran & keterangan default on */
/* (reuse .pill.on — blue) */

/* Tipe pintu */
.pill.on.sliding  { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill.on.box      { background: var(--orn);  border-color: var(--orn);  color: #fff; }

/* ═══════════════════════════════════ SN STATUS */
.sn-st {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: var(--r2);
  font-size: 12.5px; font-weight: 600;
  margin-top: 7px; font-family: 'JetBrains Mono', monospace;
}
.sn-st.ok { background: var(--grnL); color: var(--grn); border: 1.5px solid var(--grnBd); }
.sn-st.no { background: var(--redL); color: var(--red); border: 1.5px solid var(--redBd); }
.sn-st.ld { background: var(--surface2); color: var(--tx3); border: 1.5px solid var(--bd); }
.sn-st.hd { display: none; }

.sn-info {
  background: var(--surface2); border-radius: var(--r2);
  padding: 9px 12px; margin-top: 6px;
  border: 1px solid var(--bd); font-size: 13px; display: none;
}
.sn-info.on { display: block; }
.sn-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.sn-row:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════ AUTOCOMPLETE */
.acw { position: relative; }
.acdd {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--blue);
  border-radius: var(--r2);
  max-height: 205px; overflow-y: auto;
  z-index: 400; box-shadow: 0 8px 28px rgba(0,0,0,.14);
  display: none;
}
.acdd.on { display: block; }
.acr {
  padding: 10px 13px; font-size: 14px;
  color: var(--tx2); cursor: pointer;
  border-bottom: 1px solid var(--bd);
}
.acr:last-child { border-bottom: none; }
.acr:hover, .acr:active { background: var(--blueL); color: var(--blue); }
.acr mark { background: none; color: var(--blue); font-weight: 700; }
.ace { padding: 11px; font-size: 13px; color: var(--tx3); text-align: center; }

/* ═══════════════════════════════════ PHOTO */
.phblk {
  border: 1.5px dashed var(--bd2);
  border-radius: var(--r2); padding: 11px;
  margin-bottom: 9px; background: var(--surface2);
}
.phlbl {
  font-size: 11px; font-weight: 700; color: var(--tx2);
  margin-bottom: 7px; text-transform: uppercase;
  letter-spacing: .08em; font-family: 'JetBrains Mono', monospace;
}
.phbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.phb {
  position: relative; overflow: hidden;
  padding: 9px 6px; border-radius: var(--r2); text-align: center;
  background: var(--surface); border: 1.5px solid var(--bd);
  font-size: 13px; font-weight: 600; color: var(--tx2); cursor: pointer;
  transition: .12s;
}
.phb input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.phb:hover { border-color: var(--blue); color: var(--blue); background: var(--blueL); }
.phb:active { background: var(--blueL); }
.phst { font-size: 11.5px; font-weight: 500; color: var(--tx3); margin-top: 6px; }
.phst.ok { color: var(--grn); font-weight: 600; }
.pvw { margin-top: 8px; border-radius: var(--r2); overflow: hidden; position: relative; display: none; }
.pvw.on { display: block; }
.pvw img { width: 100%; display: block; max-height: 150px; object-fit: cover; }
.pvdel {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; border-radius: 50%;
  width: 24px; height: 24px; font-size: 12px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════ BUTTONS */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px;
  border-radius: var(--r2); border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .15s; letter-spacing: .01em;
}
.bBl  { background: var(--blue);  color: #fff; box-shadow: 0 4px 14px rgba(51,102,255,.35); }
.bBl:hover   { background: var(--blueD); box-shadow: 0 6px 20px rgba(51,102,255,.45); }
.bBl:active  { background: var(--blueD); box-shadow: none; }
.bBl:disabled  { opacity: .45; cursor: not-allowed; box-shadow: none; }

.bGn  { background: var(--grn);   color: #fff; box-shadow: 0 4px 14px rgba(0,172,105,.30); }
.bGn:hover   { filter: brightness(.92); }
.bGn:active  { filter: brightness(.85); }
.bGn:disabled  { opacity: .45; cursor: not-allowed; }

.bOr  { background: var(--orn);   color: #fff; box-shadow: 0 4px 14px rgba(244,161,0,.30); }
.bOr:hover   { filter: brightness(.92); }
.bOr:active  { filter: brightness(.85); }
.bOr:disabled  { opacity: .45; cursor: not-allowed; }

.bVi  { background: var(--vio);   color: #fff; box-shadow: 0 4px 14px rgba(124,77,255,.30); }
.bVi:hover   { filter: brightness(.92); }
.bVi:active  { filter: brightness(.85); }
.bVi:disabled  { opacity: .45; cursor: not-allowed; }

.bGhost {
  background: #fff; color: var(--blue);
  border: 1.5px solid var(--bd); box-shadow: var(--sh);
}
.bGhost:hover  { border-color: var(--blue); background: var(--blueL); }
.bGhost:active { background: var(--blueL); }
.bsm { padding: 8px 16px; width: auto; font-size: 13px; border-radius: var(--r2); }

/* ═══════════════════════════════════ STOK GRID */
.stkg { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 12px; }
.sk {
  border-radius: var(--r); padding: 14px 8px;
  text-align: center; background: var(--surface);
  border: 1px solid var(--bd); box-shadow: var(--sh);
  position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  cursor: default;
}
.sk:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.sk::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
}
.sk-b::after  { background: var(--blue); }
.sk-r::after  { background: var(--orn); }
.sk-bg::after { background: var(--grn); }
.sk-rd::after { background: var(--vio); }
.sk-p::after  { background: var(--ylw); }
.sk-t::after  { background: var(--bd2); }
.dtab { transition: background .2s, color .2s; user-select:none; }

.sk .sv {
  font-size: 28px; font-weight: 700; line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}
.sk .sl {
  font-size: 8.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  margin-top: 5px; color: var(--tx3); font-family: 'Poppins', sans-serif;
}
.sk .ss { font-size: 9px; color: var(--tx3); margin-top: 1px; }
.sk-b .sv  { color: var(--blue); }
.sk-r .sv  { color: var(--orn);  }
.sk-bg .sv { color: var(--grn);  }
.sk-rd .sv { color: var(--vio);  }
.sk-p .sv  { color: var(--ylw);  }
.sk-t .sv  { color: var(--tx);   }

/* ═══════════════════════════════════ ACTION TILES */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.mtile {
  background: var(--surface);
  border-radius: var(--r); padding: 22px 16px;
  text-align: center; cursor: pointer;
  border: 1.5px solid var(--bd);
  box-shadow: var(--sh); transition: .18s;
}
.mtile:active { transform: scale(.95); box-shadow: none; }
.mtile:hover  { transform: translateY(-2px); box-shadow: var(--sh2); border-color: var(--blue); }
.mtile .ico { font-size: 30px; margin-bottom: 9px; line-height: 1; }
.mtile .lbl { font-size: 14px; font-weight: 600; font-family: 'Poppins', sans-serif; }
.mtile .sub { font-size: 11px; color: var(--tx3); margin-top: 3px; font-family: 'Poppins', sans-serif; font-weight: 400; }
.tm { border-color: var(--grnBd); background: linear-gradient(135deg,#fff 60%,var(--grnL)); }
.tm .lbl { color: var(--grn); }
.tk { border-color: var(--ornBd); background: linear-gradient(135deg,#fff 60%,var(--ornL)); }
.tk .lbl { color: var(--orn); }
.tv { border-color: var(--vioBd); background: linear-gradient(135deg,#fff 60%,var(--vioL)); }
.tv .lbl { color: var(--vio); }

/* ═══════════════════════════════════ LOG ITEM */
.li {
  background: var(--surface);
  border-radius: var(--r); padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--bd);
  border-left: 4px solid var(--bd);
  box-shadow: var(--sh);
  transition: box-shadow .15s;
}
.li:hover { box-shadow: var(--sh2); }
.li.masuk  { border-left-color: var(--grn); }
.li.keluar { border-left-color: var(--orn); }
.li.servis { border-left-color: var(--vio); }

.lir1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.lbdg {
  font-size: 10px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .06em;
  font-family: 'Poppins', sans-serif;
}
.lbdg.masuk  { background: var(--grnL); color: var(--grn); }
.lbdg.keluar { background: var(--ornL); color: var(--orn); }
.lbdg.servis { background: var(--vioL); color: var(--vio); }
.ltipe {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; background: var(--blueL);
  color: var(--blue);
  margin-left: 6px; font-family: 'Poppins', sans-serif;
}
.ldate { font-size: 11px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.lsn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700; color: var(--blue); margin-top: 4px;
}
.ltoko { font-size: 13px; color: var(--tx2); margin-top: 3px; font-weight: 500; }
.lket {
  display: inline-block; font-size: 12px;
  background: var(--surface2); padding: 3px 10px;
  border-radius: 20px; color: var(--tx2);
  margin-top: 5px; border: 1px solid var(--bd);
  font-weight: 500;
}
.lform {
  font-size: 11px; color: var(--tx3); margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.ltags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ltag {
  font-size: 11px; font-weight: 600; padding: 2px 10px;
  border-radius: 20px; font-family: 'Poppins', sans-serif;
}
.ltag.ukuran { background: var(--blueL); color: var(--blue); }
.ltag.pintu  { background: var(--vioL);  color: var(--vio); }
.lfotos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flnk {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--blue); background: var(--blueL);
  padding: 4px 10px; border-radius: 20px;
  text-decoration: none;
}

/* ═══════════════════════════════════ UNIT TABLE */
.unit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.unit-table th {
  background: var(--surface2); color: var(--tx3);
  padding: 10px 12px; text-align: left; font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 2px solid var(--bd);
  font-family: 'Poppins', sans-serif;
}
.unit-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bd);
  vertical-align: middle; color: var(--tx2); font-size: 13px;
}
.unit-table tr:hover td { background: var(--blueL); }

.stbdg {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  font-family: 'Poppins', sans-serif;
}
.st-Baru     { background: var(--blueL); color: var(--blue); }
.st-Rusak    { background: var(--ornL);  color: var(--orn);  }
.st-Bagus    { background: var(--grnL);  color: var(--grn);  }
.st-Ready    { background: var(--vioL);  color: var(--vio);  }
.st-Pinjaman { background: var(--ylwL);  color: var(--ylw);  }
.st-Keluar   { background: var(--surface2); color: var(--tx3); }

/* ═══════════════════════════════════ FILTER BAR */
.fbar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.fc {
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  border: 1.5px solid var(--bd); color: var(--tx2);
  cursor: pointer; background: var(--surface);
  transition: .15s; font-family: 'Poppins', sans-serif;
}
.fc:hover { border-color: var(--blue); color: var(--blue); background: var(--blueL); }
.fc.on    { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 3px 10px rgba(51,102,255,.25); }
.sr { display: flex; gap: 7px; margin-bottom: 10px; align-items: flex-start; }
.sr input { flex: 1; }

/* ═══════════════════════════════════ SN DETAIL */
.sn-dhd {
  border-radius: var(--r); padding: 15px; margin-bottom: 11px;
  border: 1px solid var(--bd); background: var(--surface); box-shadow: var(--sh);
}
.sn-dsn { font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 700; color: var(--blue); }
.sn-nums { display: flex; gap: 20px; margin-top: 10px; flex-wrap: wrap; }
.snn .v { font-size: 24px; font-weight: 700; color: var(--tx); line-height: 1; font-family: 'JetBrains Mono', monospace; }
.snn .l { font-size: 10px; color: var(--tx3); text-transform: uppercase; letter-spacing: .09em; font-family: 'JetBrains Mono', monospace; }
.tline  { padding-left: 14px; border-left: 2px solid var(--bd); margin-top: 10px; }
.tli    { position: relative; padding: 0 0 14px 16px; }
.tli::before {
  content: ''; position: absolute; left: -5px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bd2);
  border: 2px solid var(--surface);
}
.tli.masuk::before  { background: var(--grn); }
.tli.keluar::before { background: var(--orn); }
.tli.servis::before { background: var(--vio); }
.tld { font-size: 11px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }
.tla { font-size: 14px; font-weight: 600; color: var(--tx); margin-top: 2px; }
.tlt { font-size: 12px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; }
.tlk { display: inline-block; font-size: 12px; background: var(--surface2); padding: 2px 9px; border-radius: 3px; color: var(--tx2); margin-top: 3px; border: 1px solid var(--bd); }

/* ═══════════════════════════════════ MISC */
.slbl {
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--tx3);
  margin: 16px 0 9px; font-family: 'JetBrains Mono', monospace;
}
.sec-ttl {
  font-size: 14px; font-weight: 700; color: var(--tx);
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.sec-ttl::before {
  content: ''; width: 3px; height: 15px;
  background: var(--blue); border-radius: 2px; display: block;
}
.alert-ready {
  background: var(--vioL); border: 1.5px solid var(--vioBd);
  color: var(--vio); padding: 10px 13px; border-radius: var(--r2);
  font-size: 13px; margin-bottom: 9px;
}
.empty { text-align: center; padding: 40px 18px; }
.empty .ei { font-size: 38px; margin-bottom: 9px; opacity: .35; }
.empty .et { font-size: 15px; font-weight: 600; color: var(--tx3); }
.empty .es { font-size: 13px; color: var(--tx3); margin-top: 4px; opacity: .7; }
.bk {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--blue);
  cursor: pointer; margin-bottom: 13px; padding: 4px 0;
  font-family: 'JetBrains Mono', monospace;
}
.bk:hover { opacity: .7; }
.ldel {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--blue); background: var(--blueL);
  border: 1px solid var(--blueBd); padding: 3px 10px;
  border-radius: 3px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
}
.lupd { font-size: 11px; color: var(--tx3); font-family: 'JetBrains Mono', monospace; margin-top: 5px; }
.pg-ttl { font-size: 18px; font-weight: 700; color: var(--tx); margin-bottom: 14px; font-family: 'Poppins', sans-serif; }

/* ═══════════════════════════════════ BOTTOM NAV */
.bnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--bd);
  display: flex; z-index: 100;
  box-shadow: 0 -4px 20px rgba(51,102,255,.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bni {
  flex: 1; padding: 8px 2px 10px; text-align: center;
  cursor: pointer; color: var(--tx3);
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  font-family: 'Poppins', sans-serif; transition: .15s;
}
.bni .bi { font-size: 20px; display: block; margin-bottom: 3px; }
.bni.on  { color: var(--blue); }
.bni:active { background: var(--blueL); }

/* ═══════════════════════════════════ SPINNER */
.spin {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: sp .5s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════ TOAST */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translate(-50%, 160%);
  padding: 10px 20px; border-radius: var(--r2);
  font-size: 13.5px; font-weight: 700;
  z-index: 9999; transition: .25s;
  max-width: 320px; text-align: center;
  pointer-events: none;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.toast.up    { transform: translate(-50%, 0); }
.toast.ok    { background: var(--grn); color: #fff; }
.toast.err   { background: var(--red); color: #fff; }
.toast.warn  { background: var(--orn); color: #fff; }

/* Success notification modal */
.suc-modal-bg {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(36,44,58,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeInBg .2s ease;
}
@keyframes fadeInBg { from{opacity:0} to{opacity:1} }
.suc-modal {
  background: #fff; border-radius: 20px;
  padding: 32px 28px 24px;
  width: 100%; max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(51,102,255,.2), 0 4px 20px rgba(0,0,0,.1);
  animation: slideUp .22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp { from{transform:translateY(24px) scale(.96);opacity:0} to{transform:none;opacity:1} }
.suc-icon { font-size: 48px; margin-bottom: 12px; }
.suc-title { font-size: 18px; font-weight: 700; color: var(--tx); margin-bottom: 8px; font-family: 'Poppins',sans-serif; }
.suc-msg   { font-size: 13.5px; color: var(--tx3); margin-bottom: 8px; line-height: 1.6; font-family: 'Poppins',sans-serif; }
.suc-progress { height: 3px; background: var(--bd); border-radius: 2px; margin-bottom: 20px; overflow: hidden; }
.suc-progress-bar {
  height: 100%; background: var(--blue); border-radius: 2px; width: 100%;
  animation: sucDrain 3.5s linear forwards;
}
@keyframes sucDrain { from{width:100%} to{width:0%} }
.suc-btn   { width: 100%; padding: 12px; background: var(--blue); color: #fff; border: none;
             border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer;
             font-family: 'Poppins', sans-serif;
             box-shadow: 0 4px 14px rgba(51,102,255,.35); transition: .15s; }
.suc-btn:hover { background: var(--blueD); }
.suc-btn:active { filter: brightness(.88); }
/* ═══════════════════════════════════ LOGIN SCREEN */
#loginScreen {
  position: fixed; inset: 0; z-index: 99999;
  background: linear-gradient(135deg, #1a3aff 0%, #3366ff 50%, #6b8fff 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  transition: opacity .3s ease;
}
#loginScreen.hide {
  opacity: 0; pointer-events: none;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  width: 100%; max-width: 360px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  text-align: center;
}
.login-logo {
  font-size: 52px; margin-bottom: 8px; line-height: 1;
}
.login-company {
  font-size: 10px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--tx3);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 4px;
}
.login-title {
  font-size: 18px; font-weight: 700; color: var(--tx);
  margin-bottom: 28px;
}
.login-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .12em; color: var(--tx3);
  font-family: 'JetBrains Mono', monospace;
  text-align: left; display: block; margin-bottom: 8px;
}
.login-pin {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 10px;
}
.pin-digit {
  width: 46px; height: 56px;
  border: 2px solid var(--bd);
  border-radius: 10px;
  background: var(--surface2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 700;
  color: var(--blue); text-align: center;
  outline: none; transition: .14s;
  -webkit-appearance: none;
  /* Sembunyikan angka — tampilkan dot */
  -webkit-text-security: disc;
  text-security: disc;
}
.pin-digit:focus {
  border-color: var(--blue);
  background: var(--blueL);
  box-shadow: 0 0 0 3px rgba(29,111,168,.15);
}
.pin-digit.filled {
  border-color: var(--blue);
  background: var(--blueL);
}
.pin-digit.error {
  border-color: var(--red) !important;
  background: var(--redL) !important;
  animation: shake .35s ease;
}
@keyframes shake {
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-6px)}
  40%{transform:translateX(6px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(4px)}
}
.login-err {
  font-size: 13px; color: var(--red); font-weight: 600;
  margin-bottom: 12px; min-height: 20px;
  font-family: 'JetBrains Mono', monospace;
}
.login-btn {
  width: 100%; padding: 13px;
  background: var(--blue); color: #fff; border: none;
  border-radius: 10px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: 'Poppins', sans-serif;
  transition: .14s; margin-top: 4px;
}
.login-btn:active { background: var(--blueD); }
.login-btn:disabled { opacity: .5; cursor: not-allowed; }
.login-version {
  margin-top: 20px; font-size: 11px; color: rgba(255,255,255,.5);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Autocomplete enhancements ── */
.acdd mark { background: rgba(29,111,168,.15); color: var(--blue); font-style: normal; border-radius: 2px; padding: 0 1px; }
.acdd .acr { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.acdd .ace { padding: 11px 13px; font-size: 12px; color: var(--tx3); text-align: center; font-style: italic; }
.acw { position: relative; flex: 1; min-width: 0; }
.acdd { z-index: 500; }
.acdd { max-height: 260px; overflow-y: auto; }
.ac-hint { font-size: 10px; color: var(--tx3); padding: 5px 13px 3px; border-bottom: 1px solid var(--bd); font-style: italic; display: flex; align-items: center; gap: 5px; }
