/* ──────────────────────────────────────────────────────────────
   Delicias Warhoco — Sistema de Inventario PWA
   Tokens derivados del brand book Delicias
   ────────────────────────────────────────────────────────────── */

:root {
  /* Brand */
  --d-blue:        #0072BC;   /* Recibo */
  --d-blue-dk:     #005A95;
  --d-blue-lt:     #E6F2FA;
  --d-orange:      #F7941D;   /* Warning */
  --d-yellow:      #FFF23A;
  --d-green-br:    #8DC63F;   /* Brand light green */
  --d-green:       #5BA82B;   /* Alistamiento primary */
  --d-green-dk:    #46851F;
  --d-green-lt:    #ECF6E0;

  --d-red:         #DC2626;   /* High alert */
  --d-red-lt:      #FEE2E2;
  --d-warn-lt:     #FFF4E2;

  /* Neutrals */
  --ink-900:       #0F172A;
  --ink-700:       #1F2937;
  --ink-500:       #475569;
  --ink-400:       #64748B;
  --ink-300:       #94A3B8;
  --ink-200:       #CBD5E1;
  --ink-100:       #E2E8F0;
  --ink-50:        #F1F5F9;
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;

  /* Type */
  --font:          "Montserrat", system-ui, -apple-system, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --sh-2: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
  --sh-3: 0 12px 32px rgba(15, 23, 42, .12), 0 4px 8px rgba(15, 23, 42, .06);
  --sh-blue: 0 8px 24px rgba(0, 114, 188, .35);
  --sh-green: 0 8px 24px rgba(91, 168, 43, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font); background: #0e1116; color: var(--ink-900); }
button { font-family: inherit; }
input { font-family: inherit; }

/* ── PWA viewport (inside Android frame) ───────────────────── */
.pwa {
  width: 100%;
  height: 100%;
  background: var(--bg);
  font-family: var(--font);
  color: var(--ink-900);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.pwa-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.pwa-scroll::-webkit-scrollbar { width: 0; }

/* ── Top app header (mode-tinted) ──────────────────────────── */
.app-header {
  padding: 14px 20px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.app-header.blue   { background: var(--d-blue); }
.app-header.green  { background: var(--d-green); }
.app-header.dark   { background: var(--ink-900); }

.app-header .title { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.app-header .sub   { font-size: 12px; font-weight: 500; opacity: .85; margin-top: 2px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.15); border: 0;
  display: grid; place-items: center;
  color: #fff; cursor: pointer;
  transition: background .15s;
}
.icon-btn:active { background: rgba(255,255,255,.28); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  height: 56px;
  border: 0;
  border-radius: var(--r);
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .01em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  transition: transform .08s, box-shadow .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn-primary.blue  { background: var(--d-blue);  color: #fff; box-shadow: var(--sh-blue); }
.btn-primary.green { background: var(--d-green); color: #fff; box-shadow: var(--sh-green); }
.btn-primary.blue:active:not(:disabled)  { background: var(--d-blue-dk); }
.btn-primary.green:active:not(:disabled) { background: var(--d-green-dk); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink-700);
  border: 1.5px solid var(--ink-200);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-500);
  font-size: 14px;
  height: 48px;
}
.btn-danger { background: var(--d-red); color: #fff; }
.btn-warn   { background: var(--d-orange); color: #fff; }
.btn-sm     { height: 44px; font-size: 14px; }
.btn-lg     { height: 64px; font-size: 17px; }

/* ── Counter cards (menu home) ─────────────────────────────── */
.counter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.counter {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px 16px 18px;
  box-shadow: var(--sh-1);
  border: 1px solid var(--ink-100);
}
.counter .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.counter .value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-top: 8px;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.counter .unit {
  font-size: 12px;
  color: var(--ink-400);
  font-weight: 600;
  margin-top: 4px;
}
.counter.blue .value  { color: var(--d-blue); }
.counter.green .value { color: var(--d-green); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--sh-1);
  border: 1px solid var(--ink-100);
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 12px;
}

/* ── Inputs ───────────────────────────────────────────────── */
.field {
  display: block;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  margin-bottom: 8px;
  display: block;
}
.text-input {
  width: 100%;
  height: 56px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r);
  background: var(--surface);
  padding: 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
}
.text-input:focus {
  outline: none;
  border-color: var(--d-blue);
  box-shadow: 0 0 0 3px var(--d-blue-lt);
}
.text-input.green:focus {
  border-color: var(--d-green);
  box-shadow: 0 0 0 3px var(--d-green-lt);
}
.text-input::placeholder { color: var(--ink-300); font-weight: 500; }

.num-input {
  width: 100%;
  height: 72px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 32px;
  font-weight: 800;
  color: var(--ink-900);
  font-family: var(--font);
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  transition: border-color .15s, box-shadow .15s;
}
.num-input:focus {
  outline: none;
  border-color: var(--d-blue);
  box-shadow: 0 0 0 3px var(--d-blue-lt);
}
.num-input.green:focus {
  border-color: var(--d-green);
  box-shadow: 0 0 0 3px var(--d-green-lt);
}

/* ── Stepper around num input ─────────────────────────────── */
.stepper {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  gap: 8px;
  align-items: center;
}
.step-btn {
  height: 72px;
  border-radius: var(--r);
  border: 1.5px solid var(--ink-200);
  background: var(--surface);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-700);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.step-btn:active { background: var(--ink-50); }

/* ── Alert banner ─────────────────────────────────────────── */
.alert {
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.alert-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 900;
  flex-shrink: 0;
  font-size: 14px;
}
.alert-danger {
  background: var(--d-red-lt);
  color: #7F1D1D;
  border: 1px solid #FCA5A5;
}
.alert-danger .alert-icon { background: var(--d-red); color: #fff; }
.alert-warn {
  background: var(--d-warn-lt);
  color: #7C3A06;
  border: 1px solid #FCD7A0;
}
.alert-warn .alert-icon { background: var(--d-orange); color: #fff; }

/* ── Product block ─────────────────────────────────────────── */
.product-block .name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink-900);
}
.product-block .meta {
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 6px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.product-block .meta .sep { color: var(--ink-300); margin: 0 6px; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.stat {
  background: var(--ink-50);
  border-radius: var(--r);
  padding: 10px 12px;
}
.stat .lab {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-400);
}
.stat .val {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
  letter-spacing: -.01em;
}

/* ── Session pill (alistamiento) ──────────────────────────── */
.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--d-green-lt);
  color: var(--d-green-dk);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.session-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--d-green);
  box-shadow: 0 0 0 3px rgba(91,168,43,.25);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(91,168,43,.25); }
  50%     { box-shadow: 0 0 0 6px rgba(91,168,43,.10); }
}

/* ── Transaction list (recent transactions) ───────────────── */
.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ink-100);
}
.tx-row:last-child { border-bottom: 0; }
.tx-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.tx-icon.in  { background: var(--d-blue-lt); color: var(--d-blue); }
.tx-icon.out { background: var(--d-green-lt); color: var(--d-green-dk); }
.tx-row .tx-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-row .tx-meta {
  font-size: 11px;
  color: var(--ink-400);
  font-weight: 600;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.tx-row .tx-qty {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.tx-row .tx-qty.in  { color: var(--d-blue); }
.tx-row .tx-qty.out { color: var(--d-green-dk); }

/* ── Camera viewfinder ─────────────────────────────────────── */
.viewfinder {
  flex: 1;
  background: #0a0d12;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vf-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(255,255,255,.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(255,255,255,.03) 0%, transparent 50%),
    linear-gradient(180deg, #14181f 0%, #0a0d12 100%);
}
.vf-grain {
  position: absolute; inset: 0;
  opacity: .04;
  background-image:
    repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 3px);
}
.vf-product-ghost {
  position: absolute;
  left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  width: 60%;
  opacity: .18;
  filter: blur(.5px);
}
.vf-frame {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  aspect-ratio: 4/2.5;
}
.vf-corner {
  position: absolute;
  width: 30px; height: 30px;
  border: 3px solid #fff;
}
.vf-corner.tl { top: 0;    left: 0;    border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.vf-corner.tr { top: 0;    right: 0;   border-left: 0;  border-bottom: 0; border-top-right-radius: 8px; }
.vf-corner.bl { bottom: 0; left: 0;    border-right: 0; border-top: 0;    border-bottom-left-radius: 8px; }
.vf-corner.br { bottom: 0; right: 0;   border-left: 0;  border-top: 0;    border-bottom-right-radius: 8px; }
.vf-laser {
  position: absolute;
  left: 4%; right: 4%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF3B30 20%, #FF3B30 80%, transparent);
  box-shadow: 0 0 12px rgba(255,59,48,.9), 0 0 24px rgba(255,59,48,.5);
  animation: laser 1.6s ease-in-out infinite;
}
@keyframes laser {
  0%,100% { top: 30%; }
  50%     { top: 70%; }
}
.vf-frame.green .vf-corner { border-color: #8DC63F; }
.vf-frame.green .vf-laser { background: linear-gradient(90deg, transparent, #8DC63F 20%, #8DC63F 80%, transparent); box-shadow: 0 0 12px rgba(141,198,63,.9); }

.vf-status {
  position: absolute;
  top: 20px;
  left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.vf-status .ind {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #FF3B30;
  animation: blink 1.2s ease-in-out infinite;
}
.vf-status.green .ind { background: #8DC63F; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.vf-bottom-controls {
  position: absolute;
  left: 16px; right: 16px;
  bottom: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.vf-bottom-controls .btn-secondary {
  background: rgba(255,255,255,.95);
  border: 0;
}
.vf-bottom-controls .btn-ghost {
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r);
  height: 44px;
}

/* ── Live camera video + scanner overlay ──────────────────── */
.vf-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.vf-canvas {
  display: none;
}
.vf-bg     { z-index: 2; pointer-events: none; }
.vf-grain  { z-index: 3; pointer-events: none; }
.vf-status { z-index: 6; }
.vf-frame  { z-index: 5; pointer-events: none; }
.vf-bottom-controls { z-index: 7; }

/* When camera is active: hide opaque bg so video shows through */
.viewfinder.camera-active .vf-bg,
.viewfinder.camera-active .vf-grain {
  display: none;
}
/* Lock viewfinder height when camera is active */
.viewfinder.camera-active {
  height: 280px;
  max-height: 280px;
  min-height: 280px;
}

/* ── Scanning feedback: pulsing frame + counter ──────────── */
.viewfinder.camera-active .vf-frame {
  animation: framePulse 1.5s ease-in-out infinite;
}
@keyframes framePulse {
  0%, 100% { opacity: .7; }
  50%      { opacity: 1; }
}

/* Scan counter badge (top-right) */
.vf-scan-counter {
  position: absolute;
  top: 20px;
  right: 16px;
  z-index: 8;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.7);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: none;
}
.viewfinder.camera-active .vf-scan-counter {
  display: block;
}

/* Detected code preview strip (bottom, above controls) */
.vf-detection-preview {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 68px;
  z-index: 8;
  background: rgba(0, 114, 188, .85);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  display: none;
  align-items: center;
  gap: 8px;
  animation: slideUp .2s ease-out;
}
.vf-detection-preview.green {
  background: rgba(91, 168, 43, .85);
}
.vf-detection-preview.visible {
  display: flex;
}
.vf-detection-preview .det-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
}
.vf-detection-preview .det-info {
  font-size: 10px;
  font-weight: 600;
  opacity: .8;
  margin-top: 1px;
}
@keyframes slideUp {
  0%   { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Error state for status pill */
.vf-status.error {
  background: rgba(220, 38, 38, .7);
}
.vf-status.error .ind {
  background: #fff;
  animation: none;
}

/* ── Scan success overlay ─────────────────────────────────── */
.vf-success-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  animation: fadeInOverlay .25s ease-out;
}
.vf-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--d-blue);
  color: #fff;
  font-size: 36px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px rgba(0, 114, 188, .3), 0 12px 32px rgba(0, 0, 0, .4);
  animation: pop .35s cubic-bezier(.34,1.56,.64,1) both;
}
.vf-success-icon.green {
  background: var(--d-green);
  box-shadow: 0 0 0 6px rgba(91, 168, 43, .3), 0 12px 32px rgba(0, 0, 0, .4);
}
.vf-success-code {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .1);
  padding: 8px 20px;
  border-radius: var(--r-pill);
  backdrop-filter: blur(4px);
}
@keyframes fadeInOverlay {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ── Confirmation screen ──────────────────────────────────── */
.confirm-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 12px;
}
.confirm-check {
  width: 88px; height: 88px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  position: relative;
  animation: pop .35s cubic-bezier(.34,1.56,.64,1) both;
}
.confirm-check::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid currentColor;
  opacity: .25;
  animation: ring .6s ease-out both;
}
.confirm-check.blue  { background: var(--d-blue);  color: #fff; }
.confirm-check.green { background: var(--d-green); color: #fff; }
.confirm-check.blue::after  { color: var(--d-blue); }
.confirm-check.green::after { color: var(--d-green); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ring { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.2); opacity: 0; } }

.confirm-title {
  font-size: 24px;
  font-weight: 800;
  margin-top: 16px;
  letter-spacing: -.02em;
}
.confirm-sub {
  font-size: 14px;
  color: var(--ink-500);
  margin-top: 4px;
  font-weight: 600;
}

/* ── Login screen ──────────────────────────────────────────── */
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  background: linear-gradient(180deg, #fff 0%, #F8FAFC 50%, #E6F2FA 100%);
}
.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
  margin-bottom: 40px;
}
.login-logo img { width: 180px; height: auto; }
.login-logo .tagline {
  font-size: 11px;
  color: var(--ink-400);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 24px;
}
.login-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--sh-2);
  border: 1px solid var(--ink-100);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.login-sub {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 600;
  margin-bottom: 8px;
}
.login-help {
  text-align: center;
  font-size: 12px;
  color: var(--ink-400);
  font-weight: 600;
  margin-top: 20px;
}
.login-version {
  /*margin-top: auto;*/
  text-align: center;
  padding-top: 60px;
  font-size: 11px;
  color: var(--ink-300);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-dev {
  text-align: center;
  padding-top: 5px;
  font-size: 11px;
  color: var(--ink-300);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Generic util ──────────────────────────────────────────── */
.row { display: flex; gap: 12px; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.mt-20  { margin-top: 20px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.p-16   { padding: 16px; }
.p-20   { padding: 20px; }
.p-24   { padding: 24px; }
.px-20  { padding-left: 20px; padding-right: 20px; }
.py-16  { padding-top: 16px; padding-bottom: 16px; }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.muted  { color: var(--ink-400); }
.bold   { font-weight: 700; }

/* ── Sticky bottom button bar ─────────────────────────────── */
.bottom-bar {
  flex-shrink: 0;
  padding: 12px 20px 16px;
  background: var(--surface);
  border-top: 1px solid var(--ink-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Phone shell stage ────────────────────────────────────── */
.stage {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(0,114,188,.10) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 100%, rgba(91,168,43,.08) 0%, transparent 50%),
    #0e1116;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  flex-direction: column;
  gap: 16px;
}
.stage-info {
  color: #94A3B8;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  max-width: 360px;
  line-height: 1.5;
}
.stage-info b { color: #fff; font-weight: 800; }

/* Phone bezel */
.phone-bezel {
  width: 392px;
  height: 820px;
  border-radius: 44px;
  background: #0a0d12;
  padding: 12px;
  position: relative;
  box-shadow:
    0 0 0 2px #1a1f29,
    0 50px 100px rgba(0,0,0,.5),
    0 20px 40px rgba(0,114,188,.15);
}
.phone-bezel::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 26px;
  background: #0a0d12;
  border-radius: 14px;
  z-index: 10;
}
.phone-bezel::after {
  content: '';
  position: absolute;
  top: 33px;
  left: 50%;
  transform: translateX(2px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a1f29;
  z-index: 11;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Status bar inside screen */
.status-bar {
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 0 28px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.status-bar.dark { color: #fff; }
.status-bar .right { display: flex; align-items: center; gap: 6px; }

/* Home indicator */
.home-indicator {
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-indicator .bar {
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-900);
  opacity: .85;
}
.home-indicator.dark .bar { background: #fff; opacity: .6; }
.dev-link{
  color: var(--d-blue, #0072BC);
  text-decoration: none;
  font-weight: 700;
  transition: color .15s;
}
.dev-link:hover{
  color: var(--d-blue-dk, #005A95);
  text-decoration: underline;
}
