/* The Slflo phone, rebuilt from the app's own screens (390 × 844 points). */
.phone {
  --ph-scale: 0.8;
  width: calc(430px * var(--ph-scale));
  height: calc(884px * var(--ph-scale));
  flex: none;
  position: relative;
}
.phone-frame {
  width: 430px; height: 884px; padding: 20px;
  background: var(--ink); border-radius: 60px;
  box-shadow: inset 0 0 0 2px #2a3a34, 0 40px 80px rgba(0, 0, 0, 0.3);
  transform: scale(var(--ph-scale)); transform-origin: top left;
}
.ph {
  width: 390px; height: 844px; border-radius: 42px; overflow: hidden;
  background: var(--ground); position: relative; display: flex; flex-direction: column;
  font-family: Cairo, 'Segoe UI', sans-serif; color: var(--ink); font-size: 15px; line-height: 1.45;
  user-select: none;
}
.ph-status { height: 44px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; font-weight: 600; color: var(--ink-2); }
.ph-status span:last-child { display: flex; gap: 6px; align-items: center; }
.ph-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 6px 18px 0; }
.ph-view[hidden] { display: none; }
.ph-view.is-entering { animation: phIn 0.55s var(--ease-out-expo) both; }
@keyframes phIn { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }

.ph-top { display: flex; gap: 18px; align-items: center; }
.ph-top .back { font-size: 26px; line-height: 1; }
.ph-title { font-size: 22px; font-weight: 800; line-height: 1.25; }
.ph-sub { font-size: 14px; color: var(--ink-3); }
.ph-label { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; }
.ph-box { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.ph-hero { background: var(--green-900); color: #fff; border-radius: 16px; padding: 16px 18px; }
.ph-hero .ph-label { color: var(--mint-300); font-size: 12px; letter-spacing: 0.12em; }
.ph-hero b { display: block; font-size: 22px; font-weight: 800; }
.ph-hero small { font-size: 13px; color: var(--mint-300); }
.ph-bottom { margin-top: auto; padding: 12px 0 18px; display: flex; gap: 10px; }
.ph-btn {
  flex: 1; border-radius: 14px; padding: 14px; text-align: center; font-size: 18px; font-weight: 600;
  background: var(--green-700); color: #fff; border: 0;
  transition: transform 0.14s ease, filter 0.14s ease, background-color 0.25s ease;
}
.ph-btn--quiet { flex: 0 0 110px; background: #fff; color: var(--amber-ink); border: 1px solid var(--line); font-weight: 700; font-size: 16px; }
.ph-btn--line { background: #fff; color: var(--green-700); border: 1.5px solid var(--green-700); font-weight: 700; }
.ph-btn--done { background: var(--green-900); font-weight: 700; }
.ph-btn--off { background: #e2e6e4; color: var(--ink-4); }
.ph-btn--wait { background: #9cb3aa; }
.is-pressed { transform: scale(0.95); filter: brightness(0.9); }

.ph-table { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.ph-table .row { display: grid; grid-template-columns: 1fr 66px 60px 70px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.ph-table .row:last-child { border-bottom: 0; }
.ph-table .row > :not(:first-child) { text-align: right; }
.ph-table .head { color: var(--ink-3); font-size: 13px; padding-block: 10px; border-bottom-color: var(--line); }
.plus { color: var(--green-700); font-weight: 700; }
.ph-note { font-size: 13px; color: var(--ink-3); }

/* Today */
.ph-today { padding-top: 12px; gap: 14px; }
.ph-today .who { display: flex; justify-content: space-between; align-items: center; }
.ph-today .date { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; color: var(--ink-3); }
.ph-today .big { font-size: 28px; font-weight: 800; }
.avatar { width: 52px; height: 52px; border-radius: 26px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: 0.08em; }
.chip { align-self: flex-start; background: var(--mint-100); color: var(--green-900); font-weight: 700; font-size: 14px; padding: 4px 12px; border-radius: 8px; }
.count { display: flex; align-items: baseline; gap: 8px; }
.count b { font-size: 44px; line-height: 1; }
.count i { font-style: normal; font-size: 22px; color: var(--ink-3); }
.segs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-block: 12px; }
.segs span { height: 8px; border-radius: 4px; background: var(--line-2); }
.segs .on { background: var(--green-700); transform-origin: left; animation: grow 0.9s var(--ease-out-expo) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
.stop { display: flex; align-items: center; gap: 14px; padding: 14px 4px; }
.stop .n { width: 36px; height: 36px; border-radius: 18px; border: 2px solid var(--ink-2); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.stop .t { flex: 1; }
.stop .t div:first-child { font-size: 18px; }
.stop .t div:last-child { font-size: 14px; color: var(--ink-3); }
.stop--done { opacity: 0.55; border-top: 1px solid var(--line); }
.stop--done .n { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.stop--next { background: #fff; border: 1.5px solid var(--green-700); border-radius: 14px; margin: 0 -8px; padding-inline: 12px; transition: transform 0.14s ease; }
.stop--next .n { border-color: var(--green-700); color: var(--green-700); animation: pulse 1.8s ease-out infinite; }
.stop--next .t div:first-child { font-weight: 600; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(6, 105, 82, 0.45); } 70% { box-shadow: 0 0 0 12px rgba(6, 105, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(6, 105, 82, 0); } }
.tabbar { margin: auto -18px 0; height: 84px; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: 13px; color: var(--ink-2); }
.tabbar div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 12px; }
.tabbar .on { color: var(--green-700); font-weight: 700; border-top: 3px solid var(--green-700); margin-top: -1px; padding-top: 9px; }

/* Shop */
.where { border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); }
.where .dot { width: 12px; height: 12px; border-radius: 6px; background: #9cb3aa; flex: none; }
.where b { display: block; font-size: 17px; }
.where small { font-size: 13px; color: var(--ink-2); }
.where--in { background: var(--mint-100); border-color: #b8d8ca; }
.where--in b { color: var(--green-700); }
.where--in .dot { background: var(--green-700); animation: pulse 1.8s ease-out infinite; }
.credit .amount { font-size: 34px; font-weight: 800; line-height: 1.1; margin-block: 6px 10px; }
.bar { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.bar span { display: block; height: 10px; background: var(--green-900); transform-origin: left; animation: grow 0.9s var(--ease-out-expo) both; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.pair b { display: block; font-size: 18px; color: var(--ink); }
.inv { display: flex; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.inv small { display: block; color: var(--ink-3); font-size: 13px; }

/* Order */
.ph-order { padding: 0; }
.ph-order > .head { padding: 6px 18px 0; display: flex; flex-direction: column; gap: 12px; }
.search { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink-4); }
.lines { padding: 0 18px; }
.line { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.line:last-child { border-bottom: 0; }
.line .t { flex: 1; }
.line .t div:first-child { font-size: 18px; }
.line .t div:last-child { font-size: 14px; color: var(--ink-3); }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--mint-100); border-radius: 10px; padding: 4px; }
.stepper span { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; color: var(--green-700); font-size: 22px; border-radius: 8px; transition: transform 0.14s ease; }
.stepper output { min-width: 34px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.add-off { width: 46px; height: 46px; border-radius: 10px; background: #e9eeec; color: #9cb3aa; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.basket { margin-top: auto; background: #fff; border-top: 1px solid var(--line); padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.basket .sum { display: flex; justify-content: space-between; align-items: center; }
.basket .ok { color: var(--green-700); font-weight: 700; font-size: 14px; }
.basket .total { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Collect */
.field { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px; height: 58px; font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 2px; transition: border-color 0.2s ease; }
.field.is-active { border-color: var(--green-700); }
.field .cur { color: var(--ink-4); font-size: 18px; font-weight: 600; margin-right: 8px; }
.field .val { font-variant-numeric: tabular-nums; }
.caret { width: 2px; height: 28px; background: var(--green-700); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.methods { display: flex; gap: 8px; }
.method { padding: 10px 18px; border-radius: 999px; background: #fff; border: 1px solid #c9d8d1; font-weight: 700; transition: transform 0.14s ease, background-color 0.2s ease, color 0.2s ease; }
.method.is-on { background: var(--green-900); color: #fff; border-color: var(--green-900); }

/* Receipt sheet (the app's own) */
.sheet-dim { position: absolute; left: 0; right: 0; top: 44px; bottom: 0; background: rgba(15, 26, 22, 0.45); animation: fade 0.35s ease both; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 28px 28px 0 0; padding: 14px 18px 26px; display: flex; flex-direction: column; gap: 12px; align-items: center; animation: sheetUp 0.55s var(--ease-out-expo) both; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: #c9d3cf; }
.sheet .tick { width: 60px; height: 60px; border-radius: 30px; background: var(--green-700); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; animation: pop 0.45s var(--ease-out-expo) 0.15s both; }
.sheet h4 { margin: 0; font-size: 24px; font-weight: 800; }
.sheet p { margin: 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.receipt { align-self: stretch; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 9px; }
.receipt div { display: flex; justify-content: space-between; color: var(--ink-2); }
.receipt div span:last-child { color: var(--ink); }
.receipt .rx { font-weight: 700; color: var(--ink); align-items: center; }
.badge { background: var(--amber-wash); color: var(--amber-ink); font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 8px; }
.receipt .got { border-top: 1px solid var(--line); padding-top: 10px; align-items: baseline; }
.receipt .got b { font-size: 26px; color: var(--ink); }
.sheet .ph-btn { align-self: stretch; flex: none; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: none; } }
.pop { animation: pop 0.4s var(--ease-out-expo) both; }

.ph-home { margin-top: auto; flex: none; height: 22px; display: flex; justify-content: center; align-items: center; background: #fff; position: relative; z-index: 1; }
.ph-home span { width: 130px; height: 5px; border-radius: 3px; background: var(--ink); }

/* Touch cursor */
.touch { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 30; transition-property: transform; transition-timing-function: var(--ease-in-out); will-change: transform; }
.touch .finger { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 22px; background: rgba(255, 255, 255, 0.5); border: 2.5px solid rgba(15, 26, 22, 0.6); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28); transition: transform 0.12s ease; }
.touch.is-down .finger { transform: scale(0.76); }
.touch .ripple { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 24px; background: rgba(63, 181, 138, 0.55); opacity: 0; }
.touch .ripple.go { animation: ripple 0.5s ease-out both; }
@keyframes ripple { 0% { opacity: 0.6; transform: scale(0.35); } 100% { opacity: 0; transform: scale(2.4); } }

@media (prefers-reduced-motion: reduce) {
  .touch { display: none; }
}
