/* Chekin prototype — design tokens */
:root {
  --bg-page: #EEF1F9;
  --bg-surface: #FFFFFF;
  --navy-900: #121C2F;
  --navy-800: #1A2841;
  --line: #E0E7F1;
  --accent: #FA991A;
  --success: #229A6A;
  --success-bg: #E5F7ED;
  --success-text: #116B3C;
  --danger: #E03939;
  --text-1: #121C2F;
  --text-2: #666666;
  --text-3: #9E9E9E;
  --shadow-card: 0 4px 16px rgba(18, 28, 47, 0.10);
  --shadow-soft: 0 4px 16px rgba(18, 28, 47, 0.08);
  --radius-card: 20px;
  --radius-btn: 16px;
  --radius-input: 12px;
  --radius-chip: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: #2E3440;
  color: var(--text-1);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
}

#root { height: 100vh; }

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; }

/* Phone frame */
.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #3A4455 0%, #1E2532 100%);
  overflow: hidden;
}

.phone-scaler {
  transform-origin: center center;
  transform: scale(var(--phone-scale, 1));
}

.phone-shell {
  width: 395px;
  height: 832px;
  background: #0E1420;
  border-radius: 56px;
  padding: 10px;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.45),
    0 0 0 1.5px rgba(255,255,255,0.06),
    inset 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
}

.phone-screen {
  width: 375px;
  height: 812px;
  background: var(--bg-page);
  border-radius: 46px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 32px;
  background: #000;
  border-radius: 20px;
  z-index: 100;
  pointer-events: none;
}

.status-bar {
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-900);
  z-index: 10;
}

.status-bar .right {
  font-weight: 400;
  font-size: 12px;
  color: #666B78;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* Screen transitions */
.screen-container {
  position: absolute;
  inset: 0;
  top: 50px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.screen-container::-webkit-scrollbar { display: none; }

.screen {
  min-height: calc(100% - 0px);
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Top nav row */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  min-height: 34px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background 0.15s;
}
.icon-btn:hover { background: rgba(18,28,47,0.06); }
.icon-btn:active { background: rgba(18,28,47,0.12); }

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--navy-900);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
}

/* Step nav row */
.step-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}
.step-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}
.progress {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--navy-800);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Cards */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 16px;
}

/* Headline */
.h1 {
  font-size: 26px;
  font-weight: 700;
  line-height: 32px;
  color: var(--text-1);
  margin: 0;
  letter-spacing: -0.4px;
}
.subtitle {
  font-size: 14px;
  line-height: 21px;
  color: var(--text-2);
  margin: 0;
}

/* Button */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s, background 0.15s;
}
.btn-primary:hover { background: #223356; }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { background: #9FA7B7; cursor: not-allowed; }

.btn-ghost {
  background: #fff;
  color: var(--text-1);
  padding: 14px;
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-soft);
  width: 100%;
  font-size: 14px;
  font-weight: 500;
}

/* Form */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px;
  color: var(--text-2);
  line-height: 17px;
  display: flex;
  gap: 2px;
}
.field-label .req { color: var(--danger); }
.input-wrap {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-input);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-wrap.focus { border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(26,40,65,0.08), var(--shadow-soft); }
.input-wrap.error { border-color: var(--danger); }
.input-wrap.filled::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 3px;
  background: var(--success);
  border-radius: 0 var(--radius-input) var(--radius-input) 0;
  opacity: 0.5;
}
.input {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  background: transparent;
  border: none;
  outline: none;
  border-radius: var(--radius-input);
}
.input::placeholder { color: var(--text-3); font-weight: 400; }

.select-trigger {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.select-trigger.placeholder { color: var(--text-3); font-weight: 400; }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  background: var(--line);
  color: var(--text-1);
}
.chip.accent { background: var(--accent); color: var(--navy-800); }
.chip.success { background: var(--success-bg); color: var(--success-text); }

/* Footer hint */
.foot-note {
  font-size: 12px;
  line-height: 17px;
  color: var(--text-2);
  padding: 0 0 4px;
}

/* Screen switch transitions */
@keyframes slideInRight {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-24px); opacity: 0; }
  to   { transform: translateX(0);      opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.4; }
}
.anim-in-right { animation: slideInRight 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.anim-in-left  { animation: slideInLeft 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.anim-fade     { animation: fadeIn 0.3s ease; }

/* Reduce-motion tweak */
.no-motion *, .no-motion *::before, .no-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* Tweaks panel */
.tweaks-fab {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  background: #fff;
  color: var(--text-1);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  gap: 6px;
  align-items: center;
}
.tweaks-panel {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 1000;
  width: 280px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
}
.tweaks-panel h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2); }
.tweaks-panel label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; color: var(--text-1); font-size: 13px; }
.tweaks-panel .swatches { display: flex; gap: 8px; }
.tweaks-panel .swatch {
  width: 26px; height: 26px; border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
}
.tweaks-panel .swatch.on { border-color: var(--navy-800); }
.tweaks-panel select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); }

/* Utility spin */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.9s linear infinite; }

/* Shimmer for skeleton + scan bar */
@keyframes shimmer {
  0% { transform: translateY(0); }
  100% { transform: translateY(180px); }
}
.scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #FF5252, transparent);
  box-shadow: 0 0 12px #FF5252;
  animation: scan-move 1.8s ease-in-out infinite;
}
@keyframes scan-move {
  0%, 100% { top: 14%; }
  50%      { top: 82%; }
}

/* Success check */
@keyframes popIn { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.success-circle { animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.success-check {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.4s 0.3s ease forwards;
}

/* Swipe button */
.swipe-track {
  position: relative;
  height: 61px;
  background: var(--navy-800);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.swipe-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #2A4A82 0%, #34C67A 100%);
  border-radius: var(--radius-btn);
  transition: width 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.swipe-thumb {
  position: absolute; top: 12.5px; left: 12px;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  transition: left 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s;
  z-index: 3;
}
.swipe-thumb:active { cursor: grabbing; }
.swipe-thumb.done { background: #fff; }
.swipe-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff;
  pointer-events: none;
  z-index: 2;
}
.swipe-text .primary { font-size: 14px; line-height: 21px; }
.swipe-text .sec { font-size: 12px; opacity: 0.8; line-height: 16px; }

/* Guest tabs */
.guest-tabs {
  display: flex;
  background: rgba(18,28,47,0.06);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.guest-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-align: center;
  transition: all 0.2s;
}
.guest-tab.active { background: #fff; color: var(--text-1); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.guest-tab.complete { color: var(--success-text); }

/* Dashboard specific */
.dash-hero {
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 12px 24px;
}
.dash-hero-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.dash-hero-col { flex: 1; min-width: 0; }
.dash-hero-col .label {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
  font-weight: 500;
}
.dash-hero-col .time {
  font-size: 26px;
  font-weight: 700;
  line-height: 32px;
}
.dash-hero-col .date {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.checkin-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  position: relative;
}
.checkin-step .accent-bar {
  width: 4px;
  height: 46px;
  border-radius: 999px;
  background: #D1D1D1;
}
.checkin-step.active .accent-bar { background: var(--accent); }
.checkin-step.done .accent-bar { background: var(--success); }
.checkin-step .num {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: #F6F6F6;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: #999;
  flex-shrink: 0;
}
.checkin-step.active .num { background: var(--accent); color: var(--navy-800); font-weight: 500; }
.checkin-step.done .num { background: var(--success); color: #fff; }
.checkin-step .text { flex: 1; min-width: 0; }
.checkin-step .text .t {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  line-height: 20px;
}
.checkin-step.active .text .t,
.checkin-step.done .text .t { color: var(--text-1); }
.checkin-step .text .s {
  font-size: 12px;
  color: var(--text-2);
  line-height: 16px;
  margin-top: 2px;
}
.checkin-step .divider {
  position: absolute;
  left: 68px; right: 16px; bottom: -6px;
  height: 1px;
  background: rgba(0,0,0,0.07);
}

/* Around your stay tile */
.place-tile {
  height: 140px;
  border-radius: var(--radius-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.place-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.75) 100%);
  z-index: 1;
}
.place-tile .tag { font-size: 11px; line-height: 16px; position: relative; z-index: 2; opacity: 0.9; }
.place-tile .name { font-size: 14px; font-weight: 500; line-height: 20px; position: relative; z-index: 2; }

/* Side-by-side 2 cards */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mini-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 16px;
  font-size: 13px;
}
.mini-card .t { display: flex; align-items: center; justify-content: space-between; color: var(--text-1); }
.mini-card .t .l { display: flex; gap: 2px; align-items: center; }
.mini-card .s { font-size: 11px; color: var(--text-2); line-height: 16px; margin-top: 2px; }

/* Payment row */
.pay-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  line-height: 21px;
}
.pay-row .l { color: var(--text-2); }
.pay-row .r { color: var(--text-1); font-weight: 500; }
.pay-row.total .l, .pay-row.total .r { color: var(--text-1); }
.pay-row.total .r { font-weight: 700; }

.divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

/* Camera viewfinder */
.viewfinder {
  width: 100%;
  aspect-ratio: 329 / 210;
  border-radius: 8px;
  background: #0D1320;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewfinder .mock-id {
  position: absolute;
  inset: 12%;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #EFE6C8 0%, #D9CAA0 40%, #C8B88C 100%);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.25);
  padding: 12px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  color: #4A3A1F;
  font-size: 7px;
  font-weight: 600;
  text-align: left;
  transition: transform 0.6s ease, opacity 0.4s ease;
}
.viewfinder .mock-id.exiting { transform: translateY(-24px) scale(0.9); opacity: 0; }
.viewfinder .mock-id .photo {
  background: linear-gradient(180deg, #9E8C6A 0%, #6D5E44 100%);
  border-radius: 4px;
  height: 56px;
}
.viewfinder .mock-id .lines { display: flex; flex-direction: column; gap: 3px; padding-top: 4px; }
.viewfinder .mock-id .lines div {
  height: 3px;
  background: rgba(74, 58, 31, 0.45);
  border-radius: 2px;
}
.viewfinder .mock-id .lines div:nth-child(1) { width: 60%; background: rgba(74, 58, 31, 0.7); height: 4px; }
.viewfinder .mock-id .lines div:nth-child(2) { width: 80%; }
.viewfinder .mock-id .lines div:nth-child(3) { width: 50%; }
.viewfinder .mock-id .lines div:nth-child(4) { width: 70%; }

.vf-frame {
  position: absolute;
  inset: 4%;
  border-radius: 8px;
  border: 2px solid var(--accent);
  pointer-events: none;
}
.vf-frame.aligned { border-color: var(--success); }
.vf-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: #fff;
  border-style: solid;
  border-width: 0;
}
.vf-corner.tl { top: 8px; left: 8px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 4px; }
.vf-corner.tr { top: 8px; right: 8px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 4px; }
.vf-corner.bl { bottom: 8px; left: 8px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 4px; }
.vf-corner.br { bottom: 8px; right: 8px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 4px; }

.vf-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18,28,47,0.8);
  color: #fff;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Bank card mock */
.bank-card {
  width: 36px; height: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #2E4A82 0%, #3B63B0 50%, #5A82D4 100%);
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 0.5px rgba(255,255,255,0.3);
}
.bank-card::after {
  content: "";
  position: absolute;
  right: 3px; bottom: 3px;
  width: 10px; height: 8px;
  background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
  border-radius: 1.5px;
  opacity: 0.85;
}
.bank-card.mini {
  width: 28px; height: 18px;
}

/* Toast */
.toast {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-900);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
  animation: toastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes toastIn {
  from { transform: translateX(-50%) translateY(-8px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* Bottom sheet */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(18,28,47,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}
.sheet {
  width: 100%;
  background: #fff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 12px 16px 24px;
  animation: sheetUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 80%;
  overflow-y: auto;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.sheet .grabber {
  width: 36px; height: 4px;
  background: var(--line);
  border-radius: 999px;
  margin: 0 auto 16px;
}
.sheet .title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}
.sheet .opt {
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.12s;
}
.sheet .opt:hover { background: rgba(18,28,47,0.04); }
.sheet .opt.on { background: rgba(250,153,26,0.12); font-weight: 500; }

/* Review banner */
.review-banner {
  display: flex;
  justify-content: center;
}
.review-banner .pill {
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 24px;
}
