/* ---- Fairstone brand tokens (extracted from fairstone.co.uk, 2026-10-09) ---- */
:root {
  --fs-purple: #24174c;
  --fs-purple-soft: #3e2e62;
  --fs-lavender: #7f78ab;
  --fs-green: #23b07b;
  --fs-green-bright: #29bb89;
  --fs-green-accent: #3dd3a2;
  --fs-green-dark: #1aa36f;
  --fs-bg: #f3f5f7;
  --fs-card: #ffffff;
  --fs-ink: #24174c;
  --fs-body: #3d3a50;
  --fs-muted: #6f6c85;
  --fs-border: rgba(16, 24, 40, 0.1);
  --fs-radius-sm: 8px;
  --fs-radius-md: 10px;
  --fs-radius-lg: 14px;
  --fs-radius-xl: 16px;
  --fs-radius-2xl: 18px;
  --fs-radius-pill: 999px;
  --fs-shadow-card: 0 10px 26px rgba(0, 0, 0, 0.06);
  --fs-shadow-hero: 0 14px 40px rgba(0, 0, 0, 0.12);
  --font-head: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Open Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--fs-body);
  background: var(--fs-purple);
  -webkit-font-smoothing: antialiased;
}

/* ---- Phone frame: full-bleed on mobile, framed on desktop ---- */
.phone {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--fs-bg);
  overflow: hidden;
}
@media (min-width: 768px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
      radial-gradient(1200px 600px at 80% -10%, rgba(127, 120, 171, 0.25), transparent 60%),
      var(--fs-purple);
    padding: 24px;
  }
  .phone {
    width: 390px;
    height: min(844px, calc(100vh - 48px));
    border-radius: 44px;
    border: 10px solid #140d2e;
    box-shadow: var(--fs-shadow-hero), 0 40px 90px rgba(0, 0, 0, 0.45);
  }
}

.app { height: 100%; overflow-y: auto; overflow-x: hidden; }
.screen { min-height: 100%; display: flex; flex-direction: column; animation: screen-in 0.28s ease; }
@keyframes screen-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { font-family: var(--font-head); font-weight: 500; color: var(--fs-ink); }

/* ---- Buttons (site style: 4px radius, Open Sans 700) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 13px 20px; border-radius: 4px; border: none; cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
  width: 100%;
}
.btn-primary { background: var(--fs-green-bright); color: #fff; }
.btn-primary:hover { background: var(--fs-green-dark); }
.btn-primary:disabled { opacity: 0.45; cursor: default; }
.btn-ghost { background: transparent; color: var(--fs-purple); border: 1.5px solid var(--fs-border); }
.btn-ghost:hover { border-color: var(--fs-lavender); }
.btn-quiet { background: transparent; color: var(--fs-muted); font-weight: 600; }

.link { color: var(--fs-green-dark); font-weight: 700; text-decoration: none; cursor: pointer; }

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; text-align: left; }
.field label { font-size: 13px; font-weight: 700; color: var(--fs-ink); }
.field input {
  font-family: var(--font-body); font-size: 16px; color: var(--fs-ink);
  padding: 13px 14px; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-sm);
  background: #fff; outline: none; width: 100%;
}
.field input:focus { border-color: var(--fs-green); box-shadow: 0 0 0 3px rgba(35, 176, 123, 0.15); }

/* ---- Splash ---- */
.splash {
  position: absolute; inset: 0; z-index: 50;
  background: var(--fs-purple);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  cursor: pointer;
}
.splash.leaving { animation: splash-out 0.45s ease forwards; }
@keyframes splash-out { to { opacity: 0; } }
.splash-mark { width: 96px; height: 96px; animation: mark-in 0.9s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
@keyframes mark-in { from { transform: rotate(-120deg) scale(0.55); opacity: 0; } to { transform: none; opacity: 1; } }
.splash-mark .petal { opacity: 0; animation: petal-in 0.5s ease forwards; }
@keyframes petal-in { from { opacity: 0; } to { opacity: 1; } }
.splash-word { height: 34px; opacity: 0; animation: word-in 0.6s ease 0.75s forwards; }
@keyframes word-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.splash-tag {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fs-lavender);
  opacity: 0; animation: word-in 0.6s ease 1.05s forwards;
}

/* ---- Auth screens ---- */
.auth-hero {
  background: var(--fs-purple); color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 56px) 28px 44px;
}
.auth-hero .logo { height: 28px; margin-bottom: 36px; }
.auth-hero h1 { color: #fff; font-size: 28px; line-height: 1.25; }
.auth-hero p { margin-top: 10px; font-size: 14.5px; color: #cfcbe3; }
.auth-sheet {
  flex: 1; background: var(--fs-card);
  border-radius: var(--fs-radius-2xl) var(--fs-radius-2xl) 0 0;
  margin-top: -20px; padding: 30px 28px calc(env(safe-area-inset-bottom, 0px) + 30px);
  box-shadow: var(--fs-shadow-card);
}
.divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: var(--fs-muted); font-size: 12.5px; font-weight: 600;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--fs-border); }
.sso-row { display: flex; gap: 10px; }
.sso-row .btn { font-weight: 600; font-size: 14px; }
.auth-foot { margin-top: 24px; text-align: center; font-size: 14px; color: var(--fs-muted); }

.back-row { padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 0; }
.back-btn {
  border: none; background: none; cursor: pointer; font-family: var(--font-body);
  color: var(--fs-purple); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 6px;
}

/* ---- OTP ---- */
.otp-wrap { padding: 26px 28px; text-align: center; }
.otp-wrap h1 { font-size: 24px; }
.otp-wrap .sub { margin: 10px 0 28px; font-size: 14.5px; color: var(--fs-muted); }
.otp-boxes { display: flex; gap: 9px; justify-content: center; margin-bottom: 26px; }
.otp-boxes input {
  width: 46px; height: 56px; text-align: center; font-size: 24px; font-weight: 700;
  font-family: var(--font-head); color: var(--fs-ink);
  border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-md); background: #fff; outline: none;
  caret-color: var(--fs-green);
}
.otp-boxes input:focus { border-color: var(--fs-green); box-shadow: 0 0 0 3px rgba(35, 176, 123, 0.15); }
.otp-boxes input.filled { border-color: var(--fs-green); background: rgba(35, 176, 123, 0.06); }

/* ---- Biometric ---- */
.bio-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; gap: 18px; }
.bio-icon {
  width: 92px; height: 92px; border-radius: 26px; background: var(--fs-purple);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--fs-shadow-card);
}
.bio-wrap h1 { font-size: 24px; }
.bio-wrap p { font-size: 14.5px; color: var(--fs-muted); max-width: 280px; }
.bio-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* ---- Home placeholder ---- */
.home-hero {
  background: var(--fs-purple); color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 50px) 24px 40px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.home-hero .logo { height: 24px; }
.home-hero h1 { color: #fff; font-size: 24px; margin-top: 18px; }
.home-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--fs-card); border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-card); padding: 20px;
}

/* ---- Toast ---- */
.toast {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  transform: translate(-50%, 20px); z-index: 90;
  background: var(--fs-purple); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 11px 18px; border-radius: var(--fs-radius-pill); box-shadow: var(--fs-shadow-hero);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 86%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ======== Phase 2: dashboard ======== */
.dash-hero {
  background: var(--fs-purple); color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 40px) 20px 24px;
}
.dash-hero .row { display: flex; align-items: center; justify-content: space-between; }
.dash-hero .logo { height: 22px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--fs-purple-soft);
  color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center;
  justify-content: center; border: 1.5px solid var(--fs-lavender); cursor: pointer;
}
.dash-hero h1 { color: #fff; font-size: 23px; margin-top: 18px; }
.dash-hero .sub { font-size: 13px; color: #cfcbe3; margin-top: 4px; }

.flexbar {
  position: sticky; top: 0; z-index: 20;
  background: #fff; border-bottom: 1px solid var(--fs-border);
  padding: 12px 20px; box-shadow: 0 6px 16px rgba(36, 23, 76, 0.06);
}
.flexbar .line { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.flexbar .line strong { color: var(--fs-ink); font-size: 14px; }
.flexbar .line .takehome { color: var(--fs-muted); font-weight: 600; }
.flexbar .track { height: 6px; border-radius: 999px; background: #e7eaef; margin-top: 8px; overflow: hidden; }
.flexbar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--fs-green), var(--fs-green-accent)); transition: width 0.4s ease; }
.flexbar.pulse { animation: flex-pulse 0.5s ease; }
@keyframes flex-pulse { 50% { background: rgba(35, 176, 123, 0.08); } }

.chips { display: flex; gap: 8px; padding: 16px 20px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--fs-muted);
  background: #fff; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-pill);
  padding: 7px 14px; cursor: pointer; font-family: var(--font-body);
}
.chip.on { background: var(--fs-purple); border-color: var(--fs-purple); color: #fff; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 20px 8px; }
.tile {
  position: relative; background: #fff; border: 1px solid var(--fs-border);
  border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-card);
  padding: 14px 14px 16px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 10px; min-height: 148px;
  font-family: var(--font-body); transition: transform 0.12s ease;
}
.tile:active { transform: scale(0.98); }
.tile.dim { opacity: 0.55; }
.tile .ticon {
  width: 42px; height: 42px; border-radius: 12px; background: rgba(36, 23, 76, 0.06);
  display: flex; align-items: center; justify-content: center; color: var(--fs-purple);
}
.tile .ticon svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font-size: 14.5px; line-height: 1.3; }
.tile .tag { font-size: 12px; color: var(--fs-muted); margin-top: auto; }
.pill {
  position: absolute; top: 10px; right: 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  border-radius: var(--fs-radius-pill); padding: 4px 9px;
}
.pill.active { background: rgba(35, 176, 123, 0.14); color: var(--fs-green-dark); }
.pill.available { background: rgba(127, 120, 171, 0.16); color: var(--fs-purple-soft); }
.pill.soon { background: #ffe8b8; color: #8a6d1a; }
.dash-foot { text-align: center; padding: 18px 20px calc(env(safe-area-inset-bottom, 0px) + 24px); }

/* ======== Phase 2: benefit page ======== */
.bhead {
  background: var(--fs-purple); color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 22px;
}
.bhead .back-btn { color: #fff; margin-bottom: 14px; }
.bhead .trow { display: flex; align-items: center; gap: 12px; }
.bhead .ticon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center; color: var(--fs-green-accent); flex: 0 0 auto;
}
.bhead .ticon svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bhead h1 { color: #fff; font-size: 21px; line-height: 1.25; }
.bhead .pill { position: static; display: inline-block; margin-top: 6px; }

.bbody { padding: 18px 20px 120px; display: flex; flex-direction: column; gap: 14px; }
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv .krow { display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; }
.kv .krow .k { color: var(--fs-muted); }
.kv .krow .v { color: var(--fs-ink); font-weight: 700; text-align: right; }
.blurb { font-size: 14px; line-height: 1.55; }
.sect { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fs-muted); margin-top: 6px; }

.opt {
  background: #fff; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-lg);
  box-shadow: var(--fs-shadow-card); padding: 14px 16px; cursor: pointer;
  font-family: var(--font-body); text-align: left; width: 100%;
  transition: border-color 0.15s ease;
}
.opt.sel { border-color: var(--fs-green); box-shadow: 0 0 0 3px rgba(35, 176, 123, 0.12), var(--fs-shadow-card); }
.opt .orow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.opt .oname { font-family: var(--font-head); font-weight: 500; font-size: 15.5px; color: var(--fs-ink); }
.opt .oprice { font-weight: 700; font-size: 14.5px; color: var(--fs-ink); white-space: nowrap; }
.opt .oprice .free { color: var(--fs-green-dark); }
.opt ul { margin: 8px 0 0 2px; padding: 0; list-style: none; }
.opt li { font-size: 12.5px; color: var(--fs-muted); padding-left: 16px; position: relative; margin-top: 3px; }
.opt li::before { content: ""; position: absolute; left: 0; top: 6px; width: 7px; height: 7px; border-radius: 2px; background: var(--fs-green-accent); }
.opt .check {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--fs-border);
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
}
.opt.sel .check { background: var(--fs-green); border-color: var(--fs-green); }
.opt.sel .check::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

.seg { display: flex; background: #e7eaef; border-radius: var(--fs-radius-md); padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: none; border-radius: 7px; padding: 9px; font-family: var(--font-body);
  font-weight: 700; font-size: 13.5px; color: var(--fs-muted); background: transparent; cursor: pointer;
}
.seg button.on { background: #fff; color: var(--fs-ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); }

.stepper { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 6px 0; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--fs-border);
  background: #fff; color: var(--fs-purple); font-size: 22px; font-weight: 700; cursor: pointer;
}
.stepper button:disabled { opacity: 0.35; cursor: default; }
.stepper .num { font-family: var(--font-head); font-size: 34px; color: var(--fs-ink); min-width: 70px; text-align: center; }
.stepper .num small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--fs-muted); font-weight: 600; }

input[type="range"] { width: 100%; accent-color: var(--fs-green); margin: 8px 0 2px; }
.range-val { text-align: center; font-family: var(--font-head); font-size: 26px; color: var(--fs-ink); }

.sticky-bar {
  position: sticky; bottom: 0; z-index: 20; margin-top: auto;
  background: #fff; border-top: 1px solid var(--fs-border);
  padding: 12px 20px calc(env(safe-area-inset-bottom, 0px) + 14px);
  box-shadow: 0 -8px 24px rgba(36, 23, 76, 0.08);
  display: flex; align-items: center; gap: 14px;
}
.sticky-bar .impact { flex: 1; font-size: 12.5px; color: var(--fs-muted); }
.sticky-bar .impact strong { display: block; font-size: 16px; color: var(--fs-ink); font-family: var(--font-head); font-weight: 600; }
.sticky-bar .btn { width: auto; padding: 12px 26px; }

.bhead .pill.active, .bhead .pill.available, .bhead .pill.soon {
  background: rgba(255, 255, 255, 0.16); color: #fff;
}

/* ======== Phase 3: tab bar ======== */
.tabbar {
  position: sticky; bottom: 0; z-index: 30; margin-top: auto;
  display: flex; background: #fff; border-top: 1px solid var(--fs-border);
  padding: 6px 4px calc(env(safe-area-inset-bottom, 0px) + 8px);
  box-shadow: 0 -8px 24px rgba(36, 23, 76, 0.07);
}
.tabbar button {
  flex: 1; border: none; background: none; cursor: pointer; font-family: var(--font-body);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; color: var(--fs-muted); padding: 4px 0;
}
.tabbar button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--fs-green-dark); }

.page-hero {
  background: var(--fs-purple); color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 40px) 20px 26px;
}
.page-hero h1 { color: #fff; font-size: 24px; }
.page-hero .sub { font-size: 13.5px; color: #cfcbe3; margin-top: 5px; }
.page-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; }

/* ======== Phase 3: payslip ======== */
.hero-num { font-family: var(--font-head); font-weight: 600; font-size: 34px; color: var(--fs-ink); }
.hero-num small { font-size: 15px; color: var(--fs-muted); font-weight: 500; }
.stackbar { display: flex; height: 18px; border-radius: 6px; overflow: hidden; gap: 2px; margin: 12px 0 4px; }
.stackbar .segm { height: 100%; min-width: 4px; }
.ded-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; cursor: pointer; font-family: var(--font-body);
  padding: 11px 0; border-top: 1px solid var(--fs-border); text-align: left;
}
.ded-row:first-of-type { border-top: none; }
.ded-row .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.ded-row .meta { flex: 1; min-width: 0; }
.ded-row .meta .n { display: block; font-size: 14px; font-weight: 700; color: var(--fs-ink); }
.ded-row .meta .l { display: block; font-size: 12px; color: var(--fs-muted); margin-top: 1px; }
.ded-row .amt .a { display: block; }
.ded-row .amt .s { display: block; }
.ded-row .amt { text-align: right; }
.ded-row .amt .a { font-size: 14.5px; font-weight: 700; color: var(--fs-ink); }
.ded-row .amt .a.pos { color: var(--fs-green-dark); }
.ded-row .amt .s { font-size: 11px; color: var(--fs-muted); }

/* ======== Phase 3: reward (TRS) ======== */
.trs-row { padding: 10px 0; border-top: 1px solid var(--fs-border); }
.trs-row:first-of-type { border-top: none; }
.trs-row .line { display: flex; justify-content: space-between; font-size: 13.5px; }
.trs-row .line .k { color: var(--fs-body); font-weight: 600; }
.trs-row .line .v { color: var(--fs-ink); font-weight: 700; }
.trs-row .track { height: 8px; border-radius: 4px; background: #eef0f3; margin-top: 7px; overflow: hidden; }
.trs-row .bar { height: 100%; border-radius: 4px; background: #1f9e6e; }

/* ======== Phase 3: adviser ======== */
.day-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; width: 62px; padding: 9px 0; text-align: center; cursor: pointer;
  background: #fff; border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-md);
  font-family: var(--font-body);
}
.day-chip .dow { font-size: 11px; font-weight: 700; color: var(--fs-muted); text-transform: uppercase; }
.day-chip .dom { font-family: var(--font-head); font-size: 19px; color: var(--fs-ink); margin-top: 2px; }
.day-chip.on { border-color: var(--fs-green); background: rgba(35, 176, 123, 0.07); }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  padding: 11px 0; text-align: center; font-family: var(--font-body); font-size: 13.5px; font-weight: 700;
  color: var(--fs-ink); background: #fff; border: 1.5px solid var(--fs-border);
  border-radius: var(--fs-radius-md); cursor: pointer;
}
.slot.on { border-color: var(--fs-green); background: rgba(35, 176, 123, 0.07); color: var(--fs-green-dark); }
.booked {
  display: flex; flex-direction: column; gap: 6px; text-align: center; align-items: center; padding: 26px 20px;
}
.booked .tick {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(35, 176, 123, 0.12);
  color: var(--fs-green-dark); font-size: 26px; display: flex; align-items: center; justify-content: center;
}

/* ======== Phase 3: profile ======== */
.prof-head { display: flex; align-items: center; gap: 14px; }
.prof-head .avatar { width: 54px; height: 54px; font-size: 19px; background: var(--fs-purple); border-color: var(--fs-lavender); }
.prof-head h2 { font-size: 19px; }
.prof-head .sub { font-size: 12.5px; color: var(--fs-muted); margin-top: 2px; }
.prow { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--fs-border); gap: 12px; }
.prow:first-of-type { border-top: none; }
.prow .k { font-size: 13.5px; font-weight: 700; color: var(--fs-ink); }
.prow .hint { display: block; font-size: 11.5px; color: var(--fs-muted); font-weight: 500; margin-top: 1px; }
.mini-step { display: flex; align-items: center; gap: 12px; }
.mini-step button {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--fs-border);
  background: #fff; color: var(--fs-purple); font-size: 17px; font-weight: 700; cursor: pointer;
}
.mini-step button:disabled { opacity: 0.35; cursor: default; }
.mini-step .mv { font-family: var(--font-head); font-size: 17px; color: var(--fs-ink); min-width: 34px; text-align: center; }
.sal-input {
  font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--fs-ink);
  width: 110px; text-align: right; padding: 8px 10px;
  border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-sm); outline: none;
}
.sal-input:focus { border-color: var(--fs-green); }
.switch { position: relative; width: 46px; height: 27px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: absolute; z-index: 2; }
.switch .knob {
  position: absolute; inset: 0; border-radius: 999px; background: #d4d9e0; transition: background 0.15s ease;
}
.switch .knob::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); transition: left 0.15s ease;
}
.switch input:checked + .knob { background: var(--fs-green); }
.switch input:checked + .knob::after { left: 22px; }

/* ======== Phase 4: employer portal ======== */
@media (min-width: 768px) {
  body.employer .phone {
    width: min(1200px, calc(100vw - 48px));
    height: calc(100vh - 48px);
    border: none; border-radius: var(--fs-radius-xl);
  }
}
.emp-shell { display: flex; min-height: 100%; }
.emp-side {
  width: 220px; flex: 0 0 auto; background: var(--fs-purple); color: #fff;
  display: flex; flex-direction: column; padding: 26px 14px 18px;
}
.emp-side .logo { height: 22px; align-self: flex-start; margin: 0 10px 8px; }
.emp-side .org { font-size: 11.5px; color: var(--fs-lavender); margin: 0 10px 22px; }
.emp-nav { display: flex; flex-direction: column; gap: 2px; }
.emp-nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: var(--font-body);
  color: #cfcbe3; font-size: 14px; font-weight: 600; padding: 10px 10px; border-radius: 8px;
}
.emp-nav button svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.emp-nav button.on { background: rgba(255, 255, 255, 0.1); color: #fff; }
.emp-nav button:hover { color: #fff; }
.emp-exit { margin-top: auto; }
.emp-main { flex: 1; min-width: 0; background: var(--fs-bg); padding: 26px 28px 40px; overflow-x: hidden; }
.emp-main h1 { font-size: 24px; margin-bottom: 4px; }
.emp-main .psub { font-size: 13.5px; color: var(--fs-muted); margin-bottom: 20px; }

@media (max-width: 767px) {
  .emp-shell { flex-direction: column; }
  .emp-side { width: 100%; flex-direction: row; align-items: center; gap: 6px; padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px 10px; flex-wrap: wrap; }
  .emp-side .logo { margin: 0 6px 0 4px; height: 18px; }
  .emp-side .org { display: none; }
  .emp-nav { flex-direction: row; flex: 1; overflow-x: auto; scrollbar-width: none; }
  .emp-nav button { padding: 8px 9px; font-size: 12.5px; white-space: nowrap; }
  .emp-nav button svg { display: none; }
  .emp-exit { margin-top: 0; }
  .emp-main { padding: 18px 16px 32px; }
}

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--fs-border); border-radius: var(--fs-radius-lg); box-shadow: var(--fs-shadow-card); padding: 16px; }
.kpi .kv1 { font-family: var(--font-head); font-weight: 600; font-size: 26px; color: var(--fs-ink); }
.kpi .kl { font-size: 12px; color: var(--fs-muted); font-weight: 600; margin-top: 3px; }
.emp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }

.search-row { display: flex; gap: 10px; margin-bottom: 14px; }
.search-row input {
  flex: 1; font-family: var(--font-body); font-size: 14px; padding: 11px 14px;
  border: 1.5px solid var(--fs-border); border-radius: var(--fs-radius-sm); outline: none; background: #fff;
}
.search-row input:focus { border-color: var(--fs-green); }
.emp-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; border-top: 1px solid var(--fs-border);
  padding: 11px 2px; cursor: pointer; font-family: var(--font-body);
}
.emp-row:first-of-type { border-top: none; }
.emp-row .avatar { width: 36px; height: 36px; font-size: 12.5px; background: var(--fs-purple); flex: 0 0 auto; }
.emp-row .meta { flex: 1; min-width: 0; }
.emp-row .meta .n { display: block; font-size: 14px; font-weight: 700; color: var(--fs-ink); }
.emp-row .meta .l { display: block; font-size: 12px; color: var(--fs-muted); }
.emp-row .pill { position: static; flex: 0 0 auto; }
.pill.probation { background: #ffe8b8; color: #8a6d1a; }
.pill.leaver { background: #fde3e3; color: #a63d3d; }
.emp-row .chev { color: var(--fs-muted); flex: 0 0 auto; }

.appr-row { border-top: 1px solid var(--fs-border); padding: 13px 2px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.appr-row:first-of-type { border-top: none; }
.appr-row .meta { flex: 1; min-width: 170px; }
.appr-row .meta .n { display: block; font-size: 14px; font-weight: 700; color: var(--fs-ink); }
.appr-row .meta .l { display: block; font-size: 12px; color: var(--fs-muted); }
.appr-act { display: flex; gap: 6px; }
.appr-act button {
  font-family: var(--font-body); font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 7px 13px; border-radius: var(--fs-radius-pill); border: 1.5px solid var(--fs-border);
  background: #fff; color: var(--fs-muted);
}
.appr-act button.ok.on { background: rgba(35, 176, 123, 0.12); border-color: var(--fs-green); color: var(--fs-green-dark); }
.appr-act button.no.on { background: #fde3e3; border-color: #d98080; color: #a63d3d; }
.hist-status.Approved { color: var(--fs-green-dark); font-weight: 700; font-size: 12.5px; }
.hist-status.Declined { color: #a63d3d; font-weight: 700; font-size: 12.5px; }

.report-tile { display: flex; flex-direction: column; gap: 8px; }
.report-tile h3 { font-size: 16px; }
.report-tile p { font-size: 12.5px; color: var(--fs-muted); }
.report-tile .btn { margin-top: 6px; width: auto; align-self: flex-start; padding: 9px 16px; font-size: 13px; }

/* ======== Phase 5: small-screen QA ======== */
@media (max-width: 374px) {
  .otp-boxes { gap: 6px; }
  .otp-boxes input { width: 40px; height: 50px; font-size: 20px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 9px; padding: 10px 14px 8px; }
  .tile { padding: 12px 11px 13px; min-height: 136px; }
  .dash-hero, .page-hero { padding-left: 16px; padding-right: 16px; }
  .page-body, .bbody { padding-left: 16px; padding-right: 16px; }
  .flexbar { padding: 10px 16px; }
  .flexbar .line { flex-wrap: wrap; gap: 2px; }
  .stepper .num { font-size: 28px; min-width: 56px; }
  .slot-grid { grid-template-columns: repeat(2, 1fr); }
}
