/* Slip Employee Portal (T-256). Colours follow the pitch pack. */
:root { --navy: #0b1f3a; --ink: #0b1f3a; --muted: #5b6b82; --line: #dde3ec; --bg: #f4f6fa; --teal: #0f766e; --mint: #34d399; --bad: #b42318; --warn: #92400e; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; padding-bottom: 84px; }
body.dark { background: var(--navy); padding-bottom: 24px; }
.wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px; }
h1 { font-size: 24px; margin: 4px 0 16px; }
h2 { font-size: 17px; margin: 24px 0 10px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input { width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid #c9d3e0; border-radius: 12px; background: #fff; color: var(--ink); }
input:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
input.big { font-size: 24px; letter-spacing: 6px; text-align: center; font-weight: 700; }
.btn { display: block; width: 100%; margin-top: 18px; padding: 15px; border: 0; border-radius: 12px; background: var(--teal); color: #fff; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; min-height: 48px; }
.btn:disabled { opacity: .6; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #c9d3e0; }
.chip { font: inherit; font-size: 14px; font-weight: 700; padding: 10px 14px; min-height: 44px; border-radius: 999px; border: 1px solid #c9d3e0; background: #fff; color: var(--ink); cursor: pointer; }
.link { color: var(--teal); font-weight: 600; font-size: 14px; text-decoration: none; display: inline-block; margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 700; }
.err { color: var(--bad); font-size: 14px; margin: 8px 0 0; }
.notice { background: #ecfdf5; color: #065f46; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.card { background: #fff; border-radius: 18px; padding: 18px; margin-bottom: 12px; }
.card.lift { box-shadow: 0 8px 24px rgba(11, 31, 58, .10); margin-top: -64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 20px; margin: 12px 0 20px; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: var(--mint); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.auth h1 { margin-top: 0; }
.hero { background: var(--navy); color: #fff; padding: 28px 20px 84px; display: flex; justify-content: space-between; align-items: center; }
.hero .sub { font-size: 14px; color: #b8c6d9; }
.hero .hello { font-size: 22px; font-weight: 800; margin-top: 2px; }
.hero .chip { background: transparent; color: #fff; border-color: #3b5373; }
.label { font-size: 14px; font-weight: 600; color: var(--muted); }
.amount { font-size: 36px; font-weight: 800; margin: 6px 0 12px; }
.bar { height: 10px; border-radius: 5px; background: #e6ecf3; overflow: hidden; }
.fill { display: block; height: 10px; background: var(--mint); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; }
.item { display: flex; justify-content: space-between; align-items: center; }
.item.col { display: block; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.wait { background: #fef3c7; color: var(--warn); }
.pill.good { background: #e0e7ff; color: #3730a3; }
.pill.bad { background: #fee4e2; color: var(--bad); }
.money { display: flex; align-items: center; gap: 8px; border: 2px solid var(--teal); border-radius: 14px; padding: 6px 14px; background: #fff; }
.money span { font-weight: 700; color: var(--muted); }
.money input { border: 0; font-size: 28px; font-weight: 800; padding: 8px 0; }
.money input:focus { outline: 0; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quote { background: var(--bg); margin-top: 16px; }
.quote .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.track { list-style: none; padding: 0; margin: 12px 0; }
.track li { position: relative; padding: 0 0 12px 26px; font-size: 14px; color: var(--muted); }
.track li::before { content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 7px; border: 2px solid #c9d3e0; background: #fff; }
.track li.done { color: var(--ink); }
.track li.done::before { background: var(--teal); border-color: var(--teal); }
.track li.now { color: var(--ink); font-weight: 700; }
.track li.now::before { border-color: #f59e0b; border-width: 3px; }
.track li.bad { color: var(--bad); }
.track li.bad::before { background: var(--bad); border-color: var(--bad); }
.pager { display: flex; justify-content: space-between; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0 calc(10px + env(safe-area-inset-bottom)); }
.tabs a { display: flex; align-items: center; justify-content: center; min-height: 48px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; border-top: 3px solid transparent; }
.tabs a.on { color: var(--teal); border-top-color: var(--teal); }
.stack > * { margin-top: 0; }
[hidden] { display: none !important; }
.w0 { width: 0%; }
.w5 { width: 5%; }
.w10 { width: 10%; }
.w15 { width: 15%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w35 { width: 35%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w55 { width: 55%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.w90 { width: 90%; }
.w95 { width: 95%; }
.w100 { width: 100%; }
/* T-329: business chooser */
.choice .choice-btn { text-align: left; }
.choice .choice-btn span { display: block; font-weight: 400; margin-top: 2px; opacity: .8; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; font-weight: 600; font-size: 14px; margin-top: 14px; cursor: pointer; }
.hero .switch { color: #9fe3dc; font-weight: 700; text-decoration: none; }

/* T-371: fingerprint / face (as Slip Pay) */
.btn.small { width: auto; display: inline-block; margin-top: 10px; padding: 10px 16px; min-height: 44px; font-size: 14px; }
.bio { border: 2px dashed #9fe3dc; }
.flat { margin: 0; }

/* T-370: sign-in screens centred on the screen */
body.dark .wrap { min-height: calc(100vh - 24px); min-height: calc(100svh - 24px); display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }

/* T-372: app-like moves between tabs. Browsers with page transitions (Chrome / Android, Safari 18.2+): the tab bar
   stays, the content slides in. Others: the new page fades in. The tapped tab lights at once and a thin bar shows
   while the next page loads. Off for people who ask for less motion. */
@view-transition { navigation: auto; }
.tabs { view-transition-name: app-tabs; }
::view-transition-old(root) { animation: 140ms ease-in both slip-out; }
::view-transition-new(root) { animation: 200ms ease-out both slip-in; }
@keyframes slip-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes slip-in { from { opacity: 0; transform: translateY(10px); } }
@supports not (view-transition-name: none) {
    .wrap { animation: 200ms ease-out both slip-in; }
}
body.leaving .wrap { opacity: .55; transition: opacity 120ms; }
body.leaving::before { content: ''; position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--mint); z-index: 1000; animation: slip-bar 1.5s ease-out forwards; }
@keyframes slip-bar { to { width: 85%; } }
.tabs a { transition: color 120ms, border-color 120ms; -webkit-tap-highlight-color: transparent; }
.tabs a:active { background: #f0fdfa; }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .wrap { animation: none !important; }
    body.leaving::before { animation: none; width: 85%; }
}

/* T-376: tabs with icons; the active tab gets a light pill behind its icon */
.tabs { background: rgba(255, 255, 255, .97); box-shadow: 0 -4px 16px rgba(11, 31, 58, .06); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.tabs a { flex-direction: column; gap: 3px; min-height: 56px; font-size: 12px; border-top: 0; }
.tabs .ti { display: flex; align-items: center; justify-content: center; width: 56px; height: 30px; border-radius: 999px; transition: background 160ms, transform 160ms; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--teal); }
.tabs a.on .ti { background: #ccfbf1; }
.tabs a:active { background: transparent; }
.tabs a:active .ti { transform: scale(.92); }

/* T-375: switch as a button in the header */
.hero .switch-btn, .hero-actions .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; background: rgba(255, 255, 255, .08); color: #fff; border-color: #3b5373; }
.switch-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-actions { display: flex; gap: 8px; align-items: center; }

/* T-373: install banner */
.install { position: relative; }
.install-close { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); padding: 6px 10px; cursor: pointer; }

/* T-374: slide in from the side of the tapped tab; loader while the next page loads */
html.vt-fwd::view-transition-old(root) { animation: 160ms ease-in both slip-left-out; }
html.vt-fwd::view-transition-new(root) { animation: 240ms cubic-bezier(.2, .8, .2, 1) both slip-right-in; }
html.vt-back::view-transition-old(root) { animation: 160ms ease-in both slip-right-out; }
html.vt-back::view-transition-new(root) { animation: 240ms cubic-bezier(.2, .8, .2, 1) both slip-left-in; }
@keyframes slip-left-out { to { opacity: 0; transform: translateX(-24%); } }
@keyframes slip-right-out { to { opacity: 0; transform: translateX(24%); } }
@keyframes slip-right-in { from { opacity: 0; transform: translateX(28%); } }
@keyframes slip-left-in { from { opacity: 0; transform: translateX(-28%); } }
@supports not (view-transition-name: none) {
    html.vt-fwd .wrap { animation: 240ms cubic-bezier(.2, .8, .2, 1) both slip-right-in; }
    html.vt-back .wrap { animation: 240ms cubic-bezier(.2, .8, .2, 1) both slip-left-in; }
}
body.leaving::after { content: ''; position: fixed; top: 42%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; border: 3px solid #ccfbf1; border-top-color: var(--teal); z-index: 1001; opacity: 0; animation: slip-spin .7s linear infinite, slip-show 1ms linear 120ms forwards; }
@keyframes slip-spin { to { transform: rotate(360deg); } }
@keyframes slip-show { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    html.vt-fwd .wrap, html.vt-back .wrap { animation: none !important; }
    body.leaving::after { animation: slip-show 1ms linear 120ms forwards; }
}

/* T-388: the tapped link / card / button lights at once while the next page loads */
.tapped { opacity: .7; transform: scale(.985); transition: opacity 80ms, transform 80ms; }
.tx.card.tapped, .tile.tapped { border-color: var(--teal); }
