/* ═══════════════════════════════════════
   DualPOS 2.1 — Global Stylesheet
═══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --blk:   #080808;
  --blk2:  #0f0f0f;
  --blk3:  #141414;
  --blk4:  #1a1a1a;
  --blk5:  #222;
  --wht:   #f0f0f0;
  --g1:    #d0d0d0;
  --g2:    #aaa;
  --g3:    #888;
  --g4:    #555;
  --g5:    #333;
  --red:   #cc1f1f;
  --red-dk:#991515;
  --red-soft: rgba(204,31,31,.1);
  --red-glow: rgba(204,31,31,.25);
  --border:     rgba(255,255,255,.07);
  --border-r:   rgba(204,31,31,.3);
  --success:    #4ade80;
  --success-bg: rgba(74,222,128,.1);
  --warn:       #fbbf24;
  --warn-bg:    rgba(251,191,36,.1);
  --r:    14px;
  --r-sm: 10px;
  --r-lg: 22px;
  --fd:   'Inter', -apple-system, sans-serif;
  --t:    all .2s ease;
  --shadow-dk: 0 20px 60px rgba(0,0,0,.6);
  --shadow-r:  0 8px 32px rgba(204,31,31,.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  background: var(--blk);
  color: var(--wht);
  font-family: var(--fd);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  border-radius: var(--r);
  border: none;
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--t);
  text-decoration: none;
  white-space: nowrap;
  width: 100%;
}
.btn-primary { background: linear-gradient(135deg, var(--red), var(--red-dk)); color: #fff; box-shadow: var(--shadow-r); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(204,31,31,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--blk4); border: 1px solid var(--border); color: var(--g1); }
.btn-secondary:hover { border-color: var(--border-r); background: var(--blk5); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--g2); }
.btn-ghost:hover { border-color: var(--border-r); color: var(--wht); }
.btn-outline { background: transparent; border: 1.5px solid var(--border-r); color: var(--red); }
.btn-outline:hover { background: var(--red-soft); }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn-danger { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
.btn-danger:hover { background: rgba(239,68,68,.25); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

/* ── INPUTS ── */
input, textarea, select {
  background: var(--blk4);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--wht);
  font-family: var(--fd);
  font-size: 14px;
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: var(--t);
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(204,31,31,.5);
  background: rgba(204,31,31,.04);
  box-shadow: 0 0 0 3px rgba(204,31,31,.1);
}
input::placeholder { color: var(--g4); }
select option { background: var(--blk3); color: var(--wht); }

/* ── CARDS ── */
.card {
  background: var(--blk2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 12px;
}
.card:hover { border-color: rgba(255,255,255,.1); }

/* ── FORM GROUP ── */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--g3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 6px;
}

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: var(--r-sm); font-size: 13px; margin-bottom: 14px; }
.alert-error { background: rgba(204,31,31,.1); border: 1px solid rgba(204,31,31,.3); color: #ff8080; }
.alert-success { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.25); color: var(--success); }
.alert-warn { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25); color: var(--warn); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g5); border-radius: 4px; }

/* ── MODAL / OVERLAY BASE ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet {
  background: var(--blk2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: sheetUp .3s cubic-bezier(.34,1.56,.64,1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 36px; height: 4px; background: var(--g5); border-radius: 2px; margin: 12px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.sheet-title { font-size: 17px; font-weight: 700; color: var(--wht); }
.sheet-close { font-size: 22px; cursor: pointer; color: var(--g3); background: none; border: none; line-height: 1; padding: 4px; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--blk3);
  color: var(--g1);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(74,222,128,.4); color: var(--success); }
.toast.error { border-color: var(--border-r); color: var(--red); }
.toast.warn { border-color: rgba(251,191,36,.4); color: var(--warn); }

/* ── AMBIENT ── */
.ambient { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ambient-blob { position: absolute; border-radius: 50%; filter: blur(70px); }
.amb1 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(204,31,31,.14), transparent); top: -80px; left: -80px; animation: ab1 8s ease-in-out infinite; }
.amb2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(150,20,20,.08), transparent); bottom: -100px; right: -100px; animation: ab2 10s ease-in-out infinite; }
@keyframes ab1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,40px); } }
@keyframes ab2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px,-30px); } }

/* ── SPINNER ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ADMIN SPECIFIC ── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-red { background: var(--red-soft); color: var(--red); border: 1px solid var(--border-r); }
.badge-green { background: var(--success-bg); color: var(--success); border: 1px solid rgba(74,222,128,.2); }
.badge-gray { background: var(--blk4); color: var(--g3); border: 1px solid var(--border); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(251,191,36,.2); }
