/* CobroPay terminal — kiosk styling, big targets, dark payments look */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0e1220; color: #f2f4f8;
  display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.hidden { display: none !important; }

.screen {
  width: min(440px, 100vw); min-height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 22px; gap: 18px;
}

.brand {
  font-size: 26px; font-weight: 800; letter-spacing: -0.5px;
  color: #8b93ff; margin-bottom: 4px;
}
.brand.small { font-size: 18px; }

.demo-badge {
  position: fixed; top: 10px; right: 10px; z-index: 10;
  background: #ffb020; color: #201500; font-weight: 800; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
}
.panel-link {
  position: fixed; top: 12px; left: 12px; z-index: 10;
  color: #3d4666; font-size: 12px; text-decoration: none;
}

/* pairing */
.pair-title { font-size: 20px; font-weight: 700; color: #aab3d0; margin-top: 8svh; }
.pair-code {
  font-size: 64px; font-weight: 800; letter-spacing: 10px; color: #8b93ff;
  font-variant-numeric: tabular-nums; margin: 10px 0;
}
.pair-help { font-size: 13.5px; color: #7d86a8; text-align: center; line-height: 1.7; max-width: 320px; }
.merchant-name { font-size: 13px; color: #7d86a8; margin-top: -6px; }

/* amount entry */
.amount-display {
  font-size: 64px; font-weight: 700; font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px;
}
.amount-display .currency { font-size: 36px; color: #8b93ff; }

.numpad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  width: 100%; max-width: 340px;
}
.numpad button {
  font-size: 28px; font-weight: 600; color: #f2f4f8;
  background: #1a2036; border: none; border-radius: 16px;
  padding: 20px 0; cursor: pointer;
}
.numpad button:active { background: #262e4d; }
.key-clear, .key-back { color: #8b93ff !important; }

.btn-primary {
  width: 100%; max-width: 340px;
  font-size: 22px; font-weight: 700; color: white;
  background: #5b63f5; border: none; border-radius: 16px;
  padding: 18px 0; cursor: pointer; margin-top: auto;
}
.btn-primary:disabled { opacity: 0.35; cursor: default; }
.btn-primary:not(:disabled):active { background: #4a51d6; }

.btn-ghost {
  background: none; border: none; color: #7d86a8;
  font-size: 16px; padding: 12px; cursor: pointer; margin-top: auto;
}

/* asset selection */
.asset-title { font-size: 18px; color: #aab3d0; }
.asset-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  width: 100%; max-width: 360px;
}
.asset-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 20px; font-weight: 700; color: #f2f4f8;
  background: #1a2036; border: none; border-radius: 18px;
  padding: 22px 0 16px; cursor: pointer;
}
.asset-grid button:active { background: #262e4d; }
.asset-grid small { font-size: 12px; font-weight: 500; color: #7d86a8; }
.asset-icon { font-size: 30px; color: #8b93ff; }
.pay-hint { font-size: 15px; color: #aab3d0; text-align: center; }

/* QR screen */
.qr-amount { font-size: 40px; font-weight: 700; }
.qr-box {
  background: white; padding: 16px; border-radius: 20px;
  width: 264px; height: 264px;
  display: flex; align-items: center; justify-content: center;
}
.invoice-link { color: #7d86a8; font-size: 13px; text-decoration: none; }

.status-pill {
  font-size: 18px; font-weight: 600; padding: 10px 22px; border-radius: 999px;
}
.status-pill.waiting  { background: #1a2036; color: #aab3d0; }
.status-pill.detected { background: #2b2f14; color: #d8e26a; }
.status-pill.error    { background: #3a1620; color: #ff8fa3; }
.countdown { font-size: 14px; color: #7d86a8; font-variant-numeric: tabular-nums; }

/* done screen */
.done-icon {
  width: 120px; height: 120px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 800; margin-top: 15svh;
}
.done-icon.ok   { background: #123a26; color: #4ade80; }
.done-icon.bad  { background: #3a1620; color: #ff8fa3; }
.done-title  { font-size: 32px; font-weight: 800; }
.done-amount { font-size: 26px; color: #aab3d0; }
.done-meta   { font-size: 13px; color: #7d86a8; text-align: center; line-height: 1.7; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.status-pill.waiting { animation: pulse 1.6s infinite; }

/* outcome actions */
.done-hint {
  background: #241a2e; color: #d8b4fe; font-size: 14px;
  padding: 12px 18px; border-radius: 12px; max-width: 360px;
  text-align: center; line-height: 1.5;
}
.done-actions {
  display: flex; flex-direction: column; gap: 10px;
  width: 100%; max-width: 340px; margin-top: auto;
}
.btn-secondary {
  width: 100%; font-size: 18px; font-weight: 600; color: #c7cdf1;
  background: #1a2036; border: none; border-radius: 16px;
  padding: 15px 0; cursor: pointer;
}
.btn-secondary:active { background: #262e4d; }
.done-actions .btn-primary { margin-top: 0; }

/* receipt */
.receipt-card {
  background: #ffffff; color: #111; border-radius: 14px;
  width: 100%; max-width: 340px; padding: 26px 24px;
  font-family: "Courier New", monospace; margin-top: 4svh;
}
.r-brand { text-align: center; font-weight: 700; font-size: 20px; letter-spacing: 1px; margin-bottom: 16px; }
.r-line { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed #ccc; }
.r-total { font-size: 17px; font-weight: 700; }
.r-foot { text-align: center; font-size: 10px; color: #666; margin-top: 16px; line-height: 1.6; }

@media print {
  body { background: white; }
  .screen, .demo-badge, .no-print { display: none !important; }
  #screen-receipt { display: flex !important; }
  .receipt-card { border-radius: 0; max-width: 100%; }
}

/* top navigation (panel pages) */
.topnav {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: #1a2036; border-radius: 14px; padding: 8px 10px; margin-bottom: 20px;
}
.topnav .nav-brand {
  display: flex; align-items: center; font-weight: 800; letter-spacing: -0.3px;
  color: #8b93ff; font-size: 17px; margin-right: 10px; padding: 4px 8px;
}
.topnav a.nav-tab, .topnav button.nav-tab {
  color: #7d86a8; background: none; border: none; font-size: 13.5px; font-weight: 700;
  padding: 8px 14px; border-radius: 10px; text-decoration: none; cursor: pointer;
  font-family: inherit;
}
.topnav a.nav-tab.active { background: #0e1220; color: #f2f4f8; }
.topnav a.nav-tab:hover, .topnav button.nav-tab:hover { color: #c7cdf1; }
.topnav .nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topnav .nav-date { color: #7d86a8; font-size: 12.5px; }

/* employee clock-in */
.user-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  width: 100%; max-width: 360px; max-height: 46svh; overflow-y: auto;
}
.user-grid::-webkit-scrollbar { width: 6px; }
.user-grid::-webkit-scrollbar-thumb { background: #262e4d; border-radius: 3px; }
.user-grid button {
  font-size: 18px; font-weight: 700; color: #f2f4f8;
  background: #1a2036; border: none; border-radius: 16px;
  padding: 22px 8px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-grid button:active { background: #262e4d; }
.pin-area { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.pin-who { font-size: 17px; font-weight: 700; color: #aab3d0; }
.pin-dots { display: flex; gap: 16px; }
.pin-dots span {
  width: 16px; height: 16px; border-radius: 50%;
  background: #1a2036; border: 2px solid #3d4666;
}
.pin-dots span.full { background: #8b93ff; border-color: #8b93ff; }
.pin-msg { font-size: 13px; color: #ff8fa3; min-height: 16px; }
.pin-pad button { padding: 14px 0; font-size: 24px; }
.emp-chip {
  background: #1a2036; border: none; border-radius: 999px; cursor: pointer;
  color: #aab3d0; font-size: 13px; font-weight: 600; padding: 6px 14px;
  margin-top: -8px;
}
.emp-chip:active { background: #262e4d; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.pin-dots.shake { animation: shake 0.25s 2; }

/* brand mark */
.brand-mark { height: 0.92em; vertical-align: -0.08em; margin-right: 7px; }
.r-mark { height: 18px; vertical-align: -3px; margin-right: 5px; }
