/* ═══════════════════════════════════════════════════════════
   Ommer ESS — My Work
   Mobile-first employee app · Cambodia / SEA field-ready
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand: #0d9488;
  --brand-deep: #0f766e;
  --brand-soft: #ccfbf1;
  --brand-glow: rgba(13, 148, 136, 0.18);
  --bg: #f1f5f9;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-soft: #f1f5f9;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 10px;
  --header-h: 56px;
  --nav-h: 68px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --font: "Inter", "Noto Sans Khmer", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  padding: 0;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font-family: inherit;
}

/* ── App shell ───────────────────────────────────────────── */

#appView {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
}

/* ── Sticky header ───────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 12px 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.top-inner {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 0.95rem;
  color: var(--text);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text span {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #2dd4bf 0%, var(--brand-deep) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 0 4px 12px var(--brand-glow);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Segmented language control — single control unit */
.lang-seg {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  height: 34px;
  padding: 3px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  gap: 2px;
}

.lang-seg .ess-lang {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0 11px;
  min-width: 0;
  height: 100%;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lang-seg .ess-lang.active {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Connection status — compact pill with live dot */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: var(--ok-bg);
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.status-pill.is-offline {
  background: var(--warn-bg);
  border-color: #fcd34d;
  color: #b45309;
}

.status-pill.is-offline .dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
  animation: pulse-dot 1.4s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Icon action (logout) */
.icon-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: #f8fafc;
  color: var(--text);
  border-color: #cbd5e1;
  outline: none;
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hide raw online chip text elsewhere if present */
.onlineChip.chip {
  display: none;
}

/* ── Main content ────────────────────────────────────────── */

main {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 14px 14px 20px;
  flex: 1;
}

/* ── Cards ───────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.hero-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(13, 148, 136, 0.12), transparent 50%),
    #fff;
  border-color: #99f6e4;
  box-shadow: var(--shadow);
}

.hero-card .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: rgba(204, 251, 241, 0.7);
  border: 1px solid #99f6e4;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  margin-bottom: 0.65rem;
}

.hero-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.2rem;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero-meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #134e4a;
  border: 1px solid transparent;
  line-height: 1.2;
}

.chip.warn {
  background: var(--warn-bg);
  color: #92400e;
  border-color: #fde68a;
}

.chip.offline {
  background: var(--warn-bg);
  color: #92400e;
}

.chip.cached {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

/* ── Typography ──────────────────────────────────────────── */

h1 {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-net {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}

/* ── Bottom navigation ───────────────────────────────────── */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 0 10px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.05);
}

.bottom-nav-inner {
  max-width: 32rem;
  margin: 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2px;
  padding: 6px 2px 8px;
}

.bottom-nav button {
  flex: 1;
  min-width: 0;
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 6px 2px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, background 0.15s ease;
}

.bottom-nav button .nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.bottom-nav button .nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav button .nav-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav button.active {
  color: var(--brand-deep);
  background: rgba(204, 251, 241, 0.55);
}

.bottom-nav button.active .nav-icon svg {
  stroke-width: 2.15;
}

/* Primary check-in elevated center */
.bottom-nav button.nav-primary {
  position: relative;
  top: -10px;
}

.bottom-nav button.nav-primary .nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(145deg, #2dd4bf, var(--brand-deep));
  color: #fff;
  box-shadow: 0 8px 20px var(--brand-glow);
}

.bottom-nav button.nav-primary .nav-icon svg {
  stroke: #fff;
  width: 22px;
  height: 22px;
}

.bottom-nav button.nav-primary .nav-label {
  color: var(--brand-deep);
  margin-top: 2px;
}

.bottom-nav button.nav-primary.active .nav-icon {
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.35);
}

/* Legacy .tabs hidden when bottom-nav present */
.tabs {
  display: none;
}

.panel {
  display: none;
  animation: fade-in 0.2s ease;
}

.panel.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ── Rows / lists ────────────────────────────────────────── */

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-soft);
  gap: 0.65rem;
}

.row:last-child {
  border-bottom: 0;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: var(--radius-xs);
  padding: 0.7rem 1.05rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #14b8a6, var(--brand-deep));
  color: #fff;
  width: 100%;
  box-shadow: 0 6px 16px var(--brand-glow);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-ghost {
  background: #f8fafc;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  border-radius: 9px;
  width: auto;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Forms ───────────────────────────────────────────────── */

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.7rem 0.85rem;
  font: inherit;
  margin-top: 0.3rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.65rem;
}

.field-block {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.ess-input {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 1rem;
  min-height: 2.85rem;
  font-weight: 500;
}

/* ── LPI preference test ─────────────────────────────────── */

.lpi-back {
  margin: 0 0 0.5rem;
  padding-left: 0;
}

.lpi-prompt {
  margin: 0.85rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.lpi-example {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.lpi-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}

.lpi-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.75rem 0.65rem;
  background: var(--surface, #fff);
}

.lpi-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.lpi-row-label {
  font-weight: 800;
  font-size: 1rem;
  text-transform: lowercase;
}

.lpi-row-status {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
}

.lpi-row-status.ok {
  color: var(--ok, #059669);
}

.lpi-row-status.err {
  color: #b91c1c;
}

.lpi-pool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  min-height: 1.6rem;
}

.lpi-pool-label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text-secondary);
  margin-right: 0.15rem;
}

.lpi-pool-label.ok {
  color: var(--ok, #059669);
  font-weight: 700;
}

.lpi-pool-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid #fcd34d;
}

.lpi-traits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .lpi-traits {
    grid-template-columns: 1fr 1fr;
  }
}

.lpi-trait {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.65rem 0.65rem 0.55rem;
  border-radius: 12px;
  background: var(--bg, #f8fafc);
  border: 1.5px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.lpi-trait.is-ranked {
  border-color: var(--brand, #0d9488);
  background: rgba(13, 148, 136, 0.06);
}

.lpi-trait-text {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.lpi-trait-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 8px;
  background: var(--brand, #0d9488);
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.lpi-trait-en {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
}

.lpi-trait-km {
  display: block;
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 0.05rem;
}

.lpi-rank-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3rem;
}

.lpi-rank-btn {
  min-height: 2.4rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.lpi-rank-btn:hover:not(:disabled) {
  border-color: var(--brand, #0d9488);
  background: rgba(13, 148, 136, 0.08);
}

.lpi-rank-btn.is-selected {
  background: var(--brand, #0d9488);
  border-color: var(--brand, #0d9488);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.lpi-rank-btn.is-taken,
.lpi-rank-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  background: #e2e8f0;
  color: #64748b;
  border-color: #cbd5e1;
}

.lpi-row-clear {
  margin-top: 0.55rem;
  width: 100%;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ── LPI style map (graphic scoreboard) ─────────────────── */

.lpi-totals {
  margin-top: 1.1rem;
  padding: 0;
  border: none;
  background: transparent;
}

.lpi-map {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(139, 92, 246, 0.12), transparent 50%),
    radial-gradient(90% 70% at 0% 100%, rgba(20, 184, 166, 0.14), transparent 45%),
    linear-gradient(165deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
  color: #f8fafc;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lpi-map.has-peak {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(251, 191, 36, 0.2),
    0 0 40px rgba(251, 191, 36, 0.12);
}

.lpi-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.35rem;
}

.lpi-map-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.55);
}

.lpi-map-title {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}

.lpi-grand-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.lpi-grand-ring {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
}

.lpi-grand-ring svg {
  width: 100%;
  height: 100%;
}

.lpi-grand-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}

.lpi-grand-val {
  fill: none;
  stroke: #5eead4;
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}

.lpi-grand-val.ok {
  stroke: #86efac;
}

.lpi-grand-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lpi-grand-text strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: #fff;
}

.lpi-grand-text span {
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.55);
  margin-top: 0.1rem;
}

.lpi-grand-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Hero strongest style */
.lpi-hero {
  position: relative;
  margin: 0.65rem 0.85rem 0.35rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.lpi-hero-glow {
  position: absolute;
  right: -20%;
  top: -40%;
  width: 55%;
  height: 160%;
  background: radial-gradient(circle, var(--lpi-c, #14b8a6) 0%, transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}

.lpi-hero-main {
  position: relative;
  min-width: 0;
  flex: 1;
}

.lpi-hero-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.65);
  margin-bottom: 0.25rem;
}

.lpi-hero-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
}

.lpi-hero-roman {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 9px;
  background: var(--lpi-c, #14b8a6);
  color: #fff;
  font-weight: 900;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--lpi-c, #14b8a6) 45%, transparent);
}

.lpi-hero-name {
  font-size: 1.05rem;
  font-weight: 850;
  color: #fff;
}

.lpi-hero-traits {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(248, 250, 252, 0.62);
}

.lpi-hero-score {
  position: relative;
  text-align: right;
  flex-shrink: 0;
}

.lpi-hero-num {
  display: block;
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 16px color-mix(in srgb, var(--lpi-c, #14b8a6) 50%, transparent);
}

.lpi-hero-den {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.55);
}

.lpi-hero-empty {
  flex-direction: column;
  align-items: flex-start;
}

.lpi-hero-empty p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(248, 250, 252, 0.7);
}

.lpi-hero-hint {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: rgba(248, 250, 252, 0.55);
}

/* ── Peak highlight banner (20/25+) ─────────────────────── */

.lpi-peak-banner {
  margin: 0.65rem 0.85rem 0.4rem;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(120deg, #fde68a, #f59e0b, #fbbf24, #fde68a);
  background-size: 220% 220%;
  animation: lpi-gold-shift 4s ease infinite;
  box-shadow:
    0 12px 32px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(253, 230, 138, 0.4);
}

@keyframes lpi-gold-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.lpi-peak-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 17px;
  background: linear-gradient(145deg, #1c1917 0%, #292524 55%, #422006 100%);
  color: #fffbeb;
}

.lpi-peak-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.25rem;
  background: linear-gradient(145deg, #fde68a, #f59e0b);
  color: #78350f;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  animation: lpi-peak-pulse 1.8s ease-in-out infinite;
}

@keyframes lpi-peak-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 6px 22px rgba(251, 191, 36, 0.65);
  }
}

.lpi-peak-copy {
  flex: 1;
  min-width: 0;
}

.lpi-peak-kicker {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fcd34d;
}

.lpi-peak-title {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.4;
  color: #fffbeb;
}

.lpi-peak-title strong {
  font-weight: 900;
  color: #fff;
}

.lpi-peak-title em {
  font-style: normal;
  font-weight: 800;
  color: #fbbf24;
  font-variant-numeric: tabular-nums;
}

.lpi-peak-sep {
  margin: 0 0.35rem;
  opacity: 0.4;
}

.lpi-peak-threshold {
  flex-shrink: 0;
  text-align: center;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.lpi-peak-num {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lpi-peak-den {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(253, 230, 138, 0.65);
}

/* Radar + style cards */
.lpi-map-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem 0.35rem;
}

@media (min-width: 640px) {
  .lpi-map-stage {
    grid-template-columns: minmax(200px, 0.95fr) 1.15fr;
    align-items: start;
  }
}

.lpi-radar-panel {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0.65rem 0.5rem 0.75rem;
  text-align: center;
}

.lpi-radar-caption {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.45);
}

.lpi-radar-svg {
  width: min(100%, 240px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.lpi-radar-disc {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
}

.lpi-radar-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.lpi-radar-axis {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}

.lpi-radar-label {
  font-size: 11px;
  font-weight: 800;
  font-family: system-ui, sans-serif;
}

.lpi-radar-shape {
  transition: all 0.3s ease;
}

.lpi-radar-legend {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.65rem;
}

.lpi-radar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 650;
  color: rgba(248, 250, 252, 0.75);
}

.lpi-radar-legend i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  display: inline-block;
}

.lpi-radar-legend b {
  font-weight: 850;
  color: #fff;
}

.lpi-style-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lpi-style-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.7rem 0.55rem 0.55rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border: 1.5px solid transparent;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lpi-style-card.is-top {
  border-color: var(--lpi-c);
  box-shadow:
    0 6px 18px color-mix(in srgb, var(--lpi-c) 28%, transparent),
    0 0 0 1px color-mix(in srgb, var(--lpi-c) 35%, transparent);
  transform: translateY(-1px);
}

.lpi-style-card.is-highlight {
  position: relative;
  overflow: hidden;
  border: 2px solid #f59e0b;
  background:
    linear-gradient(135deg, #fffbeb 0%, #ffffff 40%, #fef3c7 100%);
  box-shadow:
    0 10px 28px rgba(245, 158, 11, 0.35),
    0 0 0 1px rgba(251, 191, 36, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px) scale(1.02);
  z-index: 1;
  animation: lpi-card-glow 2.4s ease-in-out infinite;
}

@keyframes lpi-card-glow {
  0%,
  100% {
    box-shadow:
      0 10px 28px rgba(245, 158, 11, 0.32),
      0 0 0 1px rgba(251, 191, 36, 0.45);
  }
  50% {
    box-shadow:
      0 14px 36px rgba(245, 158, 11, 0.5),
      0 0 24px rgba(251, 191, 36, 0.35),
      0 0 0 2px rgba(251, 191, 36, 0.65);
  }
}

.lpi-hi-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: lpi-shine 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lpi-shine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.lpi-style-ring-wrap {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  flex-shrink: 0;
}

.lpi-style-ring-wrap.is-highlight {
  width: 5.25rem;
  height: 5.25rem;
}

.lpi-ring-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lpi-ring-svg.is-highlight {
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.65));
}

.lpi-ring-track {
  fill: none;
  stroke: #e2e8f0;
}

.lpi-ring-value {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dasharray 0.35s ease;
}

.lpi-style-ring-score {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

.lpi-style-card.is-highlight .lpi-style-ring-score strong {
  color: #b45309;
  font-size: 1.2rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lpi-style-card.is-highlight .lpi-style-ring-score span {
  color: #d97706;
  font-weight: 800;
}

.lpi-style-ring-score strong {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
}

.lpi-style-ring-score span {
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  margin-top: 0.12rem;
}

.lpi-style-body {
  min-width: 0;
}

.lpi-style-kicker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.1rem;
}

.lpi-style-roman {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 6px;
  background: var(--lpi-soft, #f1f5f9);
  color: var(--lpi-c, #0d9488);
  font-size: 0.72rem;
  font-weight: 900;
}

.lpi-style-emoji {
  font-size: 0.85rem;
  opacity: 0.85;
}

.lpi-style-badge {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--lpi-c);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.lpi-badge-peak {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fffbeb;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.45);
  animation: lpi-badge-pop 1.6s ease-in-out infinite;
}

@keyframes lpi-badge-pop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.lpi-style-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.lpi-style-card.is-highlight .lpi-style-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #78350f;
}

.lpi-style-meter {
  margin-top: 0.4rem;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.lpi-style-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 0;
  transition: width 0.35s ease;
}

.lpi-style-meter-fill.is-highlight {
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #fde68a);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
}

.lpi-hi-caption {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
}

.lpi-radar-legend li.is-highlight {
  color: #fde68a;
  font-weight: 800;
}

.lpi-radar-legend li.is-highlight b {
  color: #fbbf24;
}

.lpi-style-traits {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  line-height: 1.3;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lpi-map-foot {
  margin: 0.35rem 0.95rem 0.95rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(248, 250, 252, 0.5);
}

/* ── Login ───────────────────────────────────────────────── */

.login-box {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(45, 212, 191, 0.2), transparent 60%),
    var(--bg);
}

.login-box .card {
  width: 100%;
  max-width: 22rem;
  margin: 0;
  padding: 1.35rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-lg);
  border-color: #99f6e4;
}

.login-box h1 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.login-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.alert {
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.alert.err {
  background: var(--danger-bg);
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert.ok {
  background: var(--ok-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.hidden {
  display: none !important;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1.75rem 0.5rem;
  font-size: 0.9rem;
}

.foot {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1rem;
}

.foot a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: none;
}

/* ── Install banner ──────────────────────────────────────── */

.install-banner {
  display: none;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid #99f6e4;
  background: linear-gradient(135deg, #ecfdf5, #fff);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.install-banner.show {
  display: flex;
}

.install-banner p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

/* ── Check-in ────────────────────────────────────────────── */

.punch-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.9rem 0;
}

.punch-more {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.65rem;
}

.punch-more summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text-secondary);
  list-style: none;
  user-select: none;
}

.punch-more summary::-webkit-details-marker {
  display: none;
}

.punch-more summary::before {
  content: '▸ ';
  color: var(--brand);
}

.punch-more[open] summary::before {
  content: '▾ ';
}

.punch-more .ess-check,
.punch-more .field-block {
  margin-top: 0.75rem;
}

.btn-punch {
  min-height: 3.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  width: 100%;
  border-radius: 14px;
}

.btn-punch-sm {
  width: 100%;
  min-height: 2.6rem;
  margin-top: 0.5rem;
  font-weight: 700;
}

.ess-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  line-height: 1.35;
  color: var(--text-secondary);
  font-weight: 500;
}

.ess-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
  accent-color: var(--brand);
}

.punch-scanner {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f172a;
  min-height: 220px;
  margin-top: 0.65rem;
}

.punch-scanner #qrReader {
  width: 100%;
}

.punch-result {
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.4;
}

.punch-result.ok {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid #a7f3d0;
}

.punch-result.err {
  background: var(--danger-bg);
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.punch-result.warn {
  background: var(--warn-bg);
  color: #b45309;
  border: 1px solid #fcd34d;
}

.perm-help {
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--info-bg);
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.88rem;
  line-height: 1.45;
}

.offline-box {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  background: #f8fafc;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.offline-box.has-queue {
  background: var(--warn-bg);
  border-color: #fcd34d;
}

/* ── Service Year ────────────────────────────────────────── */

.service-year-card {
  background:
    radial-gradient(280px 120px at 100% 0%, rgba(251, 191, 36, 0.18), transparent 55%),
    radial-gradient(220px 100px at 0% 100%, rgba(45, 212, 191, 0.15), transparent 50%),
    var(--card);
  border-color: #99f6e4;
}

.service-year-card.celebrate,
.sy-celebrate-popup.celebrate {
  border-color: #fcd34d;
  box-shadow: 0 8px 28px rgba(180, 83, 9, 0.12);
  background:
    radial-gradient(280px 120px at 100% 0%, rgba(251, 191, 36, 0.28), transparent 55%),
    radial-gradient(220px 100px at 0% 100%, rgba(45, 212, 191, 0.18), transparent 50%),
    #fffbeb;
  animation: sy-pop 0.45s ease;
}

@keyframes sy-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.sy-celebrate-popup {
  position: relative;
  z-index: 5;
}

.sy-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sy-emoji {
  font-size: 1.75rem;
  line-height: 1;
  width: 2.5rem;
  text-align: center;
}

.sy-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-deep);
}

.service-year-card h2 {
  margin: 0.1rem 0 0;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.sy-progress-wrap {
  margin-top: 0.25rem;
}

.sy-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.sy-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6, #0f766e);
  transition: width 0.45s ease;
}

.sy-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.sy-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.sy-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: default;
}

.sy-chip.unlocked {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: var(--brand-deep);
  cursor: pointer;
}

.sy-chip.unlocked:active {
  transform: scale(0.98);
}

.sy-chip.locked {
  opacity: 0.65;
}

.sy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.sy-row:last-child {
  border-bottom: 0;
}

/* ── Profile wizard ──────────────────────────────────────── */

.profile-banner {
  border-color: #fcd34d;
  background: linear-gradient(135deg, #fffbeb, #fff);
}

.profile-banner.submitted {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #fff);
}

.profile-banner.verified {
  border-color: #6ee7b7;
  background: linear-gradient(135deg, #ecfdf5, #fff);
}

.profile-banner-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.profile-status-chip {
  flex-shrink: 0;
  text-transform: capitalize;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.profile-status-chip.submitted {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.profile-status-chip.verified {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}

.profile-wizard {
  border-color: #99f6e4;
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.08);
}

.profile-wiz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.profile-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.profile-step {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--border);
}

.profile-step.active {
  background: var(--brand-deep);
  color: #fff;
  border-color: var(--brand-deep);
}

.profile-step.done {
  background: #ccfbf1;
  color: var(--brand-deep);
  border-color: #5eead4;
}

.profile-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 12px;
}

.profile-pane {
  display: none;
}

.profile-pane.active {
  display: block;
}

.profile-wiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.profile-wiz-actions .btn-primary,
.profile-wiz-actions .btn-secondary {
  flex: 1;
  min-width: 5.5rem;
}

.profile-wiz-actions .btn-ghost {
  width: auto;
}

/* ── My profile · identity card (ESS) ─────────────────────── */

.profile-id-card {
  margin-bottom: 0.85rem;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1.15rem 1.1rem 1.2rem;
  background:
    radial-gradient(90% 70% at 100% 0%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(70% 60% at 0% 100%, rgba(139, 92, 246, 0.18), transparent 50%),
    linear-gradient(155deg, #0f172a 0%, #134e4a 48%, #0f766e 100%);
  color: #f8fafc;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-hero-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.35), transparent 70%);
  pointer-events: none;
}

.profile-hero-top {
  position: relative;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1rem;
}

.profile-hero-avatar-wrap {
  flex-shrink: 0;
}

.profile-hero-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  display: block;
  background: #0f172a;
}

.profile-hero-avatar.ph {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 900;
  background: linear-gradient(145deg, #2dd4bf, #0f766e);
  color: #fff;
}

.profile-hero-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.5);
}

.profile-hero-name {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
}

.profile-hero-meta {
  margin: 0.3rem 0 0.55rem;
  font-size: 0.82rem;
  color: rgba(248, 250, 252, 0.65);
  line-height: 1.35;
}

.profile-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
}

.profile-status-pill.verified {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.profile-status-pill.submitted {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.profile-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

@media (min-width: 560px) {
  .profile-hero-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-hero-block {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
  backdrop-filter: blur(6px);
}

.profile-hero-block-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.55);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.profile-hero-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-hero-dl > div {
  display: grid;
  gap: 0.1rem;
}

.profile-hero-dl dt {
  font-size: 0.68rem;
  font-weight: 650;
  color: rgba(248, 250, 252, 0.45);
}

.profile-hero-dl dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
  line-height: 1.3;
}

.profile-media-card {
  margin-bottom: 0.85rem;
}

.profile-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 850;
}

.profile-section-lead {
  margin: 0.3rem 0 0.85rem;
  font-size: 0.85rem;
}

.profile-media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .profile-media-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-media-tile {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem;
  background: var(--bg, #f8fafc);
}

.profile-media-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.profile-media-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}

.profile-media-status {
  font-size: 0.7rem;
  font-weight: 750;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.profile-media-status.ok {
  background: #d1fae5;
  color: #047857;
}

.profile-avatar-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.profile-avatar-img,
.profile-avatar-ph {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 22px;
  object-fit: cover;
}

.profile-avatar-ph {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ccfbf1, #99f6e4);
  color: #0f766e;
  font-size: 1.6rem;
  font-weight: 900;
  border: 2px dashed #5eead4;
}

.profile-id-stage {
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  min-height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.profile-id-img {
  width: 100%;
  max-height: 9rem;
  object-fit: contain;
  display: block;
}

.profile-id-ph {
  color: rgba(248, 250, 252, 0.55);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 1.5rem;
  text-align: center;
}

.profile-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.profile-file-btn {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
}

.profile-media-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
}

.profile-media-alert {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 650;
}

.profile-media-alert.ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.profile-media-alert.err {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.profile-review {
  display: grid;
  gap: 0;
  font-size: 0.88rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
}

.profile-review .rv-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-review .rv-row:last-child {
  border-bottom: 0;
}

.profile-review .rv-row span:first-child {
  color: var(--muted);
  flex-shrink: 0;
  font-weight: 500;
}

.profile-review .rv-row span:last-child {
  font-weight: 650;
  text-align: right;
  word-break: break-word;
}

/* More menu (secondary destinations) */
.more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.more-tile {
  appearance: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem 0.75rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.more-tile:hover,
.more-tile:focus-visible {
  border-color: #99f6e4;
  box-shadow: 0 4px 14px var(--brand-glow);
  outline: none;
}

.more-tile strong {
  font-size: 0.9rem;
  color: var(--text);
}

.more-tile span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.more-tile .tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  margin-bottom: 0.25rem;
}

.more-tile .tile-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Legacy duplicate lang bars inside panels — hide if any remain */
.panel .ess-lang-bar,
.panel .lang-seg.duplicate {
  display: none;
}

@media (display-mode: standalone) {
  .install-banner {
    display: none !important;
  }
}

/* Narrow phones: hide "Online" label, keep dot */
@media (max-width: 360px) {
  .status-pill .status-text {
    display: none;
  }

  .status-pill {
    padding: 0 8px;
    width: 34px;
    justify-content: center;
  }

  .lang-seg .ess-lang {
    padding: 0 8px;
    font-size: 0.68rem;
  }
}

/* Payslip viewer + latest banner */
.ess-payslip-new{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem .85rem;margin-bottom:.75rem;border-radius:14px;border:1px solid #99f6e4;background:linear-gradient(180deg,#f0fdfa,#fff)}
.ess-payslip-new.hidden{display:none}
.ess-payslip-row.is-latest{border-left:3px solid #0d9488;padding-left:.5rem}
.passport-ess-card{border:1px solid #c7d2fe;background:linear-gradient(180deg,#eef2ff 0%,#fff 55%);margin-bottom:.85rem}
.passport-ess-card .btn-row{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.65rem}
.ptd-ess-card{border:1px solid #99f6e4;background:linear-gradient(180deg,#f0fdfa 0%,#fff 55%);margin-bottom:.85rem}
.ptd-ess-head{display:flex;align-items:flex-start;justify-content:space-between;gap:.65rem}
.ptd-ess-net{font-size:1.55rem;font-weight:800;color:#0f766e;font-variant-numeric:tabular-nums;letter-spacing:-.02em;margin:.15rem 0}
.ptd-ess-net-label{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#64748b}
.ptd-ess-rows{list-style:none;margin:.65rem 0 0;padding:0;display:grid;gap:.35rem}
.ptd-ess-rows li{display:flex;justify-content:space-between;gap:.75rem;font-size:.88rem;padding:.25rem 0;border-bottom:1px solid #f1f5f9}
.ptd-ess-rows li span:last-child{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
.ptd-ess-rows li.ded span:last-child{color:#b45309}
.ptd-ess-rows li.net-row{border-bottom:0;font-weight:800;padding-top:.45rem;color:#0f766e}
.ptd-ess-caveats{margin:.55rem 0 0;padding:0;list-style:none;display:grid;gap:.3rem}
.ptd-ess-caveats li{font-size:.78rem;color:#92400e;background:#fffbeb;border:1px solid #fde68a;border-radius:10px;padding:.4rem .55rem;line-height:1.35}
.ptd-ess-meta{font-size:.78rem;color:#64748b;margin:.35rem 0 0}
.ess-payslip-viewer{position:fixed;inset:0;z-index:80;background:#0f172a;display:flex;flex-direction:column}
.ess-payslip-viewer.hidden{display:none}
.ess-payslip-viewer-bar{display:flex;align-items:center;justify-content:space-between;padding:.65rem .85rem;background:#fff;border-bottom:1px solid #e2e8f0}
.ess-payslip-frame{flex:1;width:100%;border:0;background:#fff}
