/* =========================
   KoperasiMart POS Enterprise
   Modern / Glass / Dark
   ========================= */

:root{
  --bg0:#070b14;
  --bg1:#0b1220;
  --card:rgba(16,27,51,.72);
  --card2:rgba(8,12,24,.55);
  --txt:#eaf0ff;
  --muted:#a8b3d6;
  --muted2:#7e8bb8;

  --accent:#22c55e;
  --accent2:#34d399;

  --blue:#60a5fa;
  --warn:#f59e0b;
  --danger:#ef4444;

  --line:rgba(255,255,255,.10);
  --line2:rgba(255,255,255,.06);

  --shadow: 0 18px 60px rgba(0,0,0,.38);
  --shadow2: 0 10px 30px rgba(0,0,0,.25);

  --radius:18px;
  --radius2:14px;
}

/* ===== Reset ===== */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--txt);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1200px 800px at 18% -10%, rgba(96,165,250,.18), transparent 60%),
    radial-gradient(900px 700px at 85% 0%, rgba(34,197,94,.14), transparent 55%),
    radial-gradient(800px 600px at 40% 110%, rgba(245,158,11,.10), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  overflow-x:hidden;
}

/* nicer scroll */
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:rgba(255,255,255,.04);border-radius:999px}
*::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:999px}
*::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.22)}

/* ===== Topbar ===== */
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line2);
  background:rgba(9,16,33,.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position:sticky;top:0;z-index:20;
}

.brand{display:flex;flex-direction:column;gap:2px}
.brand .title{
  font-size:18px;font-weight:900;letter-spacing:.2px;
  display:flex;align-items:center;gap:10px;
}
.brand .subtitle{font-size:12px;color:var(--muted)}

.pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:3px 10px;border-radius:999px;
  font-size:12px;font-weight:700;
  background:rgba(34,197,94,.14);
  color:var(--accent2);
  border:1px solid rgba(34,197,94,.25);
}

/* ===== Layout ===== */
.wrap{
  display:grid;
  grid-template-columns: 1.7fr 1fr;
  gap:14px;
  padding:14px;
}

.panel{
  background:var(--card);
  border:1px solid var(--line2);
  border-radius:var(--radius);
  padding:14px;
  box-shadow: var(--shadow2);
}

.row{display:flex;gap:10px;align-items:center}
.row.tight{gap:8px}
.row.between{justify-content:space-between}

.hr{
  height:1px;background:var(--line2);
  margin:12px 0;
}

/* ===== Inputs ===== */
.input{
  width:100%;
  padding:12px 12px;
  border-radius:var(--radius2);
  border:1px solid var(--line2);
  background:rgba(0,0,0,.22);
  color:var(--txt);
  outline:none;
  transition:.18s ease;
}

.input::placeholder{color:rgba(168,179,214,.55)}
.input:focus{
  border-color:rgba(96,165,250,.55);
  box-shadow:0 0 0 4px rgba(96,165,250,.15);
}

.input.big{
  font-size:18px;
  padding:14px 14px;
}

/* ===== Buttons ===== */
.btn{
  padding:12px 14px;
  border-radius:var(--radius2);
  border:1px solid var(--line2);
  background:rgba(255,255,255,.06);
  color:var(--txt);
  cursor:pointer;
  font-weight:800;
  transition:.16s ease;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}

.btn:hover{transform:translateY(-1px);filter:brightness(1.06)}
.btn:active{transform:translateY(0px);filter:brightness(0.98)}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}

.btn.primary{
  background:linear-gradient(180deg, rgba(34,197,94,.28), rgba(34,197,94,.18));
  border-color:rgba(34,197,94,.25);
}

.btn.alt{
  background:linear-gradient(180deg, rgba(96,165,250,.26), rgba(96,165,250,.16));
  border-color:rgba(96,165,250,.25);
}

.btn.warn{
  background:linear-gradient(180deg, rgba(245,158,11,.26), rgba(245,158,11,.16));
  border-color:rgba(245,158,11,.25);
}

.btn.danger{
  background:linear-gradient(180deg, rgba(239,68,68,.26), rgba(239,68,68,.16));
  border-color:rgba(239,68,68,.25);
}

.btn.ghost{
  background:rgba(255,255,255,.06);
}

.mini{padding:6px 10px;border-radius:12px;font-weight:900}
.mini.danger{border-color:rgba(239,68,68,.25)}
.miniBtn{padding:8px 10px;border-radius:12px;font-size:12px;font-weight:800}

/* ===== Cart ===== */
.cartHead,.cartRow{
  display:grid;
  grid-template-columns: 1.45fr .72fr .72fr .85fr 42px;
  gap:10px;
  align-items:center;
}

.cartHead{
  margin-top:12px;
  padding:10px;
  border-bottom:1px solid var(--line2);
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.8px;
}

.cartList{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:65vh;
  overflow:auto;
  padding-right:4px;
}

.cartRow{
  padding:10px;
  border:1px solid var(--line2);
  border-radius:16px;
  background:rgba(0,0,0,.14);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.nb{font-weight:900;line-height:1.2}
.meta{font-size:11px;color:var(--muted2);margin-top:3px}

.qty{display:flex;gap:8px;align-items:center;justify-content:center}
.q{min-width:26px;text-align:center;font-weight:900}

/* ===== Totals ===== */
.totals .bigTotal{
  padding:14px;
  border-radius:18px;
  background:rgba(0,0,0,.18);
  border:1px solid var(--line2);
  margin-bottom:12px;
}

.bigTotal .label{font-size:12px;color:var(--muted)}
.bigTotal .value{font-size:30px;font-weight:950;margin-top:4px}

/* ===== Pay Box ===== */
.payBox{
  margin-top:10px;
  padding:12px;
  border:1px dashed rgba(96,165,250,.52);
  border-radius:18px;
  background:rgba(0,0,0,.14);
}

.payTitle{font-weight:950;margin-bottom:8px}
.payBox textarea{
  width:100%;
  min-height:130px;
  border-radius:14px;
  border:1px solid var(--line2);
  background:rgba(0,0,0,.22);
  color:var(--txt);
  padding:10px;
  outline:none;
}

.payBox textarea:focus{
  border-color:rgba(96,165,250,.55);
  box-shadow:0 0 0 4px rgba(96,165,250,.15);
}

.small{font-size:12px;color:var(--muted)}

/* ===== Orders ===== */
.ordersHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.ordersList{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:48vh;
  overflow:auto;
  padding-right:4px;
}

.orderCard{
  padding:12px;
  border-radius:18px;
  border:1px solid var(--line2);
  background:rgba(0,0,0,.14);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}

.orderTop{display:flex;justify-content:space-between;align-items:center}
.orderNota{font-weight:950}
.orderBadge{
  font-size:11px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(245,158,11,.18);
  color:var(--warn);
  border:1px solid rgba(245,158,11,.22);
}

/* ===== Search Dropdown ===== */
.searchBox{position:relative;flex:1}

.dropdown{
  position:absolute;
  top:48px; left:0; right:0;
  z-index:9999;
  background:rgba(10,15,30,.98);
  border:1px solid var(--line2);
  border-radius:16px;
  overflow:hidden;
  box-shadow: var(--shadow);
}

.ddItem{
  padding:10px 12px;
  border-bottom:1px solid var(--line2);
  cursor:pointer;
  transition:.12s ease;
}

.ddItem:last-child{border-bottom:none}
.ddItem:hover{background:rgba(255,255,255,.06)}
.ddName{font-weight:950}
.ddMeta{font-size:11px;color:var(--muted2);margin-top:2px}

/* ===== Toast ===== */
.hidden{display:none}

.toast{
  position:fixed;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);
  background:rgba(0,0,0,.74);
  border:1px solid var(--line2);
  padding:10px 14px;
  border-radius:999px;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index:99999;
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .wrap{grid-template-columns:1fr;gap:12px}
  .cartList{max-height:45vh}
  .ordersList{max-height:38vh}
}

@media (max-width: 560px){
  .topbar{padding:12px 12px}
  .wrap{padding:12px}
  .panel{padding:12px}
  .cartHead{display:none}
  .cartRow{
    grid-template-columns: 1fr;
    gap:8px;
  }
  .qty{justify-content:flex-start}
}