/* Sheets (Slide up from bottom) */
.sheet-overlay { position: fixed; inset: 0; background: rgba(26,22,19,0.55); z-index: 599; display: none; }
.sheet-overlay.open { display: block; }
.sheet {
  /* Must render above .panel-overlay (z-index: 500) — sheets like
     "Add Payment" / "Export Ledger" open from inside an already-open
     full-screen panel (e.g. customer ledger). Previously this was
     below the panel, so the sheet was invisible until something
     (like the back gesture) forced a reflow that exposed it. */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600; background: var(--cream);
  border-radius: 22px 22px 0 0; max-height: 92vh; overflow-y: auto;
  transform: translateY(110%); transition: transform .25s ease;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.3);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; background: var(--line); border-radius: 3px; margin: 10px auto; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 18px 12px; border-bottom: 1px solid var(--line); }
.sheet-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.sheet-close { width: 30px; height: 30px; border-radius: 50%; background: var(--cream-2); border: none; font-size: 16px; color: var(--text-dim); cursor: pointer; }
.sheet-body { padding: 16px 18px 24px; }

/* Panels (Full screen slide) */
.panel-overlay { position: fixed; inset: 0; background: var(--cream); z-index: 500; display: none; overflow-y: auto; }
.panel-overlay.open { display: block; }
.panel-top {
  position: sticky; top: 0; z-index: 10; background: var(--ink); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
}
.panel-back { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.08); border: none; color: var(--gold-light); font-size: 18px; cursor: pointer; }
.panel-top-title { color: var(--gold-light); font-weight: 700; font-size: 15px; flex: 1; }

/* Toast */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 9999;
  background: var(--ink); color: var(--gold-light); padding: 12px 20px; border-radius: 12px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); opacity: 0; transition: .25s; pointer-events: none;
  max-width: 88%; text-align: center;
}
.toast.show { opacity: 1; top: 20px; }
.toast.error { background: #5a2320; color: #ffd9d5; }
.toast.success { background: #20401f; color: #d0f0cc; }

/* PIN Lock Screen */
#pinScreen {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(ellipse at top, #2b241f 0%, var(--ink) 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}
.pin-logo {
  width: 88px; height: 88px; border-radius: 50%; background: #fff; object-fit: contain; padding: 6px;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.25), 0 12px 32px rgba(0,0,0,0.4); margin-bottom: 18px;
}
.pin-brand { color: var(--gold-light); font-family: Georgia,serif; font-size: 24px; letter-spacing: 3px; margin-bottom: 2px; text-transform: uppercase; }
.pin-tagline { color: #a89a86; font-size: 12px; letter-spacing: 1.5px; margin-bottom: 36px; text-transform: uppercase; }
.pin-dots { display: flex; gap: 14px; margin-bottom: 34px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--gold); background: transparent; transition: .15s; }
.pin-dot.filled { background: var(--gold); box-shadow: 0 0 10px rgba(201,169,110,0.6); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; }
.pin-key {
  width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(201,169,110,0.35);
  background: rgba(255,255,255,0.03); color: var(--gold-light); font-size: 24px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s;
}
.pin-key:active { background: rgba(201,169,110,0.25); transform: scale(0.94); }
.pin-key.del { font-size: 18px; }
.pin-err { color: #e08a85; font-size: 13px; margin-top: 18px; min-height: 18px; letter-spacing: 0.5px; }
