:root {
  --navy: #15233a;
  --navy-2: #1c2f4d;
  --navy-soft: #243a5c;
  --gold: #c6a15b;
  --gold-2: #d4b36d;
  --gold-deep: #9a7a3a;
  --bg: #eef1f5;
  --card: #ffffff;
  --text: #141414;
  --muted: #6b7280;
  --line: #e5e9ef;
  --shadow: 0 10px 30px rgba(21, 35, 58, 0.08);
  --radius: 18px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --line: #334155;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .topbar .when-time,
html[data-theme="dark"] .topbar .when-date {
  color: #e2e8f0;
}

html[data-theme="dark"] .icon-btn.ghost {
  color: #e2e8f0;
}

html[data-theme="dark"] .bottom-nav {
  background: #0b1220;
  border-color: #1e293b;
}

* { box-sizing: border-box; }
html {
  margin: 0;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans Thai", "Sarabun", sans-serif;
  background: var(--bg);
  color: var(--text);
  /* black-translucent status bar draws over content — keep chrome tappable */
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
button, input, select { font-family: inherit; }

/* iOS Safari auto-zooms focused controls when computed font-size < 16px.
   Use !important so page CSS (e.g. .prt-combo-input { 15px }) cannot reintroduce zoom. */
@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(800px 400px at 10% 0%, rgba(198, 161, 91, 0.18), transparent 50%),
    linear-gradient(180deg, #0f1b2e 0%, #15233a 45%, #1c2f4d 100%);
  color: #fff;
  padding: 0;
}
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background: #101b2e;
  animation: splash-out 0.7s ease 2.1s forwards;
  pointer-events: none;
}
.splash img {
  width: min(340px, 72vw);
  background: #fff;
  border-radius: 22px;
  padding: 16px 20px;
  animation: brand-in 1s ease both;
}
.splash p {
  margin: 0;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--gold);
  animation: brand-in 1s ease 0.25s both;
}
.login-stage {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(360px, 0.95fr);
  min-height: 100vh;
}
.login-visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(600px 400px at 30% 20%, rgba(198,161,91,0.22), transparent 55%),
    linear-gradient(160deg, #0f1b2e, #1c2f4d);
}
.login-visual-stack {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 48px;
}
.login-visual-img {
  width: min(420px, 72%);
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.35));
}
.login-visual-copy {
  position: absolute;
  left: 40px;
  bottom: 48px;
  max-width: 360px;
}
.login-visual-kicker {
  margin: 0 0 6px;
  color: var(--gold);
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.login-visual-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}
.login-panel {
  padding: 40px 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.login-brand { margin-bottom: 22px; }
.login-logo {
  display: block;
  width: min(220px, 70%);
  height: auto;
  background: #fff;
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.login-brand h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.login-brand p {
  margin: 0;
  color: rgba(255,255,255,0.68);
  font-size: 14px;
  line-height: 1.45;
  max-width: 28em;
}
.login-step {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 22px;
}
.team-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(198, 161, 91, 0.22);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  min-height: 0;
  color: inherit;
  text-align: left;
  width: 100%;
  font: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.team-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(198, 161, 91, 0.45);
}
.team-card.active {
  background: rgba(198, 161, 91, 0.16);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(198,161,91,0.35);
}
.team-card:active { transform: scale(0.98); }
.team-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(198,161,91,0.14);
  color: var(--gold);
}
.team-ico svg { width: 22px; height: 22px; }
.team-meta { display: grid; gap: 2px; min-width: 0; }
.team-meta small {
  color: var(--gold);
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 11px;
}
.team-meta strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.team-meta em {
  font-style: normal;
  color: rgba(255,255,255,0.58);
  font-size: 12px;
  line-height: 1.35;
}
.login-form {
  background: #fff;
  /* Light card stays light-theme text even if html[data-theme=dark] */
  color: #141414;
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}
.team-chip {
  background: #f4f6f9;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  color: #141414;
}
.team-chip b { color: #15233a; }
.login-form .field { display: grid; gap: 6px; }
.login-form label { font-size: 13px; color: #6b7280; font-weight: 600; }
.login-form input {
  width: 100%;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  background: #f7f9fc;
  /* Keep dark text on light fields even when app dark theme is on */
  color: #15233a;
  -webkit-text-fill-color: #15233a;
  caret-color: #15233a;
}
.login-form input::placeholder {
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
  opacity: 1;
}
.login-form input:focus {
  outline: 2px solid rgba(198,161,91,0.45);
  outline-offset: 1px;
  background: #fff;
  color: #15233a;
  -webkit-text-fill-color: #15233a;
  caret-color: #15233a;
}
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #15233a;
  caret-color: #15233a;
  box-shadow: 0 0 0 1000px #f7f9fc inset;
  transition: background-color 99999s ease-out;
}
.login-form .input-wrap { position: relative; display: block; }
.login-form .input-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--gold-deep); background: rgba(198,161,91,0.12); }
.pw-toggle[aria-pressed="true"] { color: var(--gold-deep); }
.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.remember input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--gold-deep);
  cursor: pointer;
}
.login-submit {
  width: 100%;
  margin-top: 4px;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a1408;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
}
.error { color: #b42318; font-size: 14px; }
.login-demo {
  margin-top: 16px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}
.login-demo summary {
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  list-style: none;
}
.login-demo summary::-webkit-details-marker { display: none; }
.login-demo ul {
  margin: 10px 0 0;
  padding: 12px 14px;
  list-style: none;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  display: grid;
  gap: 6px;
}
.login-demo li b {
  display: inline-block;
  min-width: 2.5em;
  color: var(--gold);
}
.hq-link { margin-top: 16px; color: rgba(255,255,255,0.75); font-size: 14px; }

/* keep toast assets usable for welcome overlay */
.toast-stage {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1100px;
  overflow: hidden;
}
.toast-stage.fill { position: absolute; inset: 0; }
.toast-stack {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.toast-stack .shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
  will-change: transform, opacity, filter;
}
.toast-stack .shot.a { animation: toast-dim-a 9s cubic-bezier(.45,.05,.25,1) infinite; }
.toast-stack .shot.b { animation: toast-dim-b 9s cubic-bezier(.45,.05,.25,1) infinite; }
.video-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 27, 46, 0.08), rgba(15, 27, 46, 0.52));
  pointer-events: none;
  z-index: 1;
}

.app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100dvh;
  align-self: start;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 14px;
  padding: 8px 10px;
}
.brand .sub { color: rgba(255,255,255,0.55); font-size: 12px; margin-top: 8px; }
.side-nav {
  margin-top: 28px;
  display: grid;
  gap: 8px;
  align-content: start;
  flex: 1 1 auto;
}
.side-nav a, .logout-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  color: rgba(255,255,255,0.82);
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700; /* reserve bold metrics — avoid jump when .active toggles */
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 3px 0 0 transparent; /* reserve gold rail slot */
  transform: none;
}
.side-nav a.active {
  background: rgba(255,255,255,0.96);
  color: var(--navy);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.side-nav a:hover:not(.active) { background: rgba(255,255,255,0.08); }
.side-nav a:active,
.logout-btn:active { transform: none; } /* was scale(0.98) — caused shake */
.logout-btn { color: #f2c9c6; margin-top: 4px; }
.logout-btn:hover { background: rgba(242, 201, 198, 0.08); }

.nav-tile {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  color: rgba(255,255,255,0.92);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)),
    rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.nav-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198,161,91,0.22), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.side-tile { width: 44px; height: 44px; }
.dock-tile { width: 46px; height: 46px; border-radius: 16px; }
.nav-ico { width: 28px; height: 28px; position: relative; z-index: 1; }
.side-nav .nav-ico { width: 26px; height: 26px; }
.nav-text { position: relative; z-index: 1; letter-spacing: 0.01em; }
.nav-label {
  font-size: 10px;
  letter-spacing: 0.03em;
  position: relative;
  z-index: 1;
}

.side-nav a.active .nav-tile,
.bottom-nav a.active .nav-tile {
  color: var(--navy);
  background: linear-gradient(145deg, #e8c97a, #c6a15b 52%, #9a7a3a);
  border-color: rgba(255,255,255,0.35);
  box-shadow:
    0 6px 18px rgba(154, 122, 58, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.45);
}
.side-nav a.active .nav-tile::after,
.bottom-nav a.active .nav-tile::after { opacity: 1; }

.main {
  padding: 22px 28px 90px;
  min-width: 0;
  max-width: 100%;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.app-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 6px 4px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.app-back:active { transform: scale(0.96); }
.app-back .ico { display: block; flex: 0 0 auto; }
.app-back-label { white-space: nowrap; }
.topbar .when { color: var(--muted); }
.when-time, .when-date { display: none; }
/* Desktop + mobile: theme + notify bell (was hidden on wide screens) */
.icon-btn.ghost {
  display: grid;
  place-items: center;
}
.top-right { display: flex; align-items: center; gap: 12px; }
.hello {
  font-weight: 700;
  color: var(--navy);
  font-size: 14.5px;
  letter-spacing: 0.01em;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  position: relative;
}
.icon-btn:active { transform: scale(0.96); }
.app-notify-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
  pointer-events: none;
}
.app-notify-badge[hidden] { display: none !important; }
/* PC Admin — approvals bell always visible (desktop + mobile) */
a.pc-approvals-bell {
  display: grid;
  text-decoration: none;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
}
a.pc-approvals-bell:hover {
  border-color: rgba(198, 161, 91, 0.55);
  background: #fbf7ee;
}
.pc-body a.pc-approvals-bell {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.pc-nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.pc-body .app.pc-shell.is-side-collapsed .pc-nav-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  margin: 0;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  font-size: 9px;
  padding: 0 4px;
}
.pc-body .pc-sidebar .side-nav a {
  position: relative;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy);
  color: #fff;
  -webkit-text-fill-color: #fff;
  display: grid; place-items: center; font-weight: 700;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.avatar.has-img,
.npm-avatar.has-img,
.pc-side-avatar.has-img,
.profile-avatar.has-img {
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 0;
}
.avatar .avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.hero {
  color: #fff;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 280px;
}
.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 27, 46, 0.88) 12%, rgba(15, 27, 46, 0.35) 70%, transparent);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 36px 32px;
  max-width: 560px;
}
.hero h1 { margin: 0 0 8px; font-size: 30px; font-weight: 700; }
.hero-copy > p { margin: 0 0 18px; color: rgba(255,255,255,0.78); }
.hero-status { margin: 0 0 10px; color: var(--gold); font-size: 12px; letter-spacing: 0.08em; font-weight: 600; }
.cta-checkin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.journey {
  margin: 18px 0 8px;
  overflow: hidden;
}
.journey-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.journey-head span {
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}
.journey-head small { color: var(--muted); font-size: 12px; }
.journey-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.journey-step {
  text-align: center;
}
.journey-visual {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(21, 35, 58, 0.12);
  border: 1px solid rgba(198, 161, 91, 0.28);
}
.journey-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tone-checkin, .tone-shelf, .tone-report, .tone-promo { background: var(--navy); }

.journey-step b { display: block; font-size: 14px; }
.journey-step span { color: var(--muted); font-size: 12px; }

.viz-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 14px 0 18px;
}
.viz-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 210px;
  position: relative;
  animation: card-rise 0.55s ease both;
}
.viz-card:nth-child(2) { animation-delay: 0.06s; }
.viz-card:nth-child(3) { animation-delay: 0.12s; }
.viz-card:nth-child(4) { animation-delay: 0.18s; }
.viz-media {
  position: relative;
  height: 88px;
  overflow: hidden;
}
.viz-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
  transition: transform 0.5s ease;
}
.viz-card:hover .viz-media img { transform: scale(1.1); }
.viz-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(15, 27, 46, 0.55));
}
.viz-media.soft::after {
  background: linear-gradient(180deg, rgba(21,35,58,0.15), rgba(21,35,58,0.72));
}
.viz-body { padding: 14px 14px 16px; display: grid; align-content: start; gap: 4px; }
.viz-kicker {
  color: var(--gold-deep);
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.viz-value { font-size: 30px; font-weight: 700; line-height: 1.1; color: var(--navy); }
.viz-label { color: var(--muted); font-size: 13px; }
.viz-duo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: start;
  margin-top: 2px;
}
.viz-duo-item { display: grid; gap: 2px; min-width: 0; }
.viz-duo-item .viz-value { font-size: 26px; }
.viz-duo-item .viz-label { font-size: 12px; line-height: 1.3; }
.viz-duo-sep {
  width: 1px;
  align-self: stretch;
  margin: 4px 0;
  background: #e5e9f0;
}
.viz-time-stack {
  display: grid;
  gap: 10px;
  margin: 6px 0 2px;
}
.viz-time-row {
  display: grid;
  gap: 2px;
}
.viz-time-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.viz-time-num {
  color: var(--navy);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.viz-meter {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}
.viz-meter i {
  display: block;
  height: 100%;
  width: 72%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  animation: meter-fill 1s ease both;
}
.viz-ring {
  --p: 0;
  width: 84px;
  height: 84px;
  margin: 16px auto 0;
  position: relative;
}
.viz-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #edf0f5; stroke-width: 3.2; }
.ring-fg {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p));
  transition: stroke-dashoffset 1s ease;
}
.viz-ring.gold .ring-fg { stroke: var(--gold-deep); }
.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold-deep);
}
.ring-center.pct { font-weight: 700; font-size: 15px; color: var(--navy); }
.motif-sm { width: 28px; height: 28px; }
.barrel-fill, .progress-fill {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: #efe6d4;
  overflow: hidden;
  border: 1px solid rgba(154, 122, 58, 0.25);
}
.barrel-fill span {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, #d4b36d, #8a6a32);
  border-radius: inherit;
  transition: height 0.9s ease;
}
.progress-fill span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  border-radius: inherit;
  transition: width 0.9s ease;
}
.wheat-row, .dot-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.wheat-ear {
  width: 18px;
  height: 18px;
  color: #d7dbe3;
}
.wheat-ear.on { color: var(--gold); animation: wheat-glow 0.5s ease both; }
.dot-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d7dbe3;
  display: block;
}
.dot-row i.on {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.18);
  animation: wheat-glow 0.5s ease both;
}
.pending-stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 4px;
}
.pending-stack span {
  width: 42px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transform: rotate(-8deg);
}
.pending-stack span:nth-child(2) { width: 48px; transform: rotate(4deg); background: rgba(198,161,91,0.9); }
.pending-stack span:nth-child(3) { width: 36px; transform: rotate(-2deg); }
.viz-chip {
  margin-top: 8px;
  justify-self: start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
}
.viz-chip.warn { background: #f8e8d8; color: #8a4b12; }
.viz-chip.ok { background: #e8f5e9; color: #1b5e20; }

@keyframes card-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes meter-fill {
  from { width: 0; }
}
@keyframes wheat-glow {
  from { transform: scale(0.7); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 18px 0;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat .no {
  display: block;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.stat::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transform: rotate(-32deg);
}
.stat .ico { color: var(--gold-deep); margin-bottom: 6px; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 32px; font-weight: 700; margin-top: 8px; }

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.acc {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.acc summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary span { flex: 1; }
.acc summary b { display: block; }
.acc summary small { color: var(--muted); }
.acc .chev { color: var(--gold); margin-left: auto; transition: transform 0.2s ease; }
.acc[open] .chev { transform: rotate(180deg); }
.acc .ico.lg { margin-bottom: 0; color: var(--navy); }
.acc-body {
  display: grid;
  gap: 4px;
  padding: 0 18px 14px 58px;
}
.acc-body a { color: var(--muted); font-size: 14px; padding: 6px 0; }

.page-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 20px; }
.form-row select, .form-row button, .form-row input {
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
}
.kind-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.kind { background: #f7f8fb; border-radius: 14px; padding: 14px; border: 1px solid var(--line); }
.kind b { display: block; margin-bottom: 4px; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #eef4ff; color: var(--navy); font-size: 12px; font-weight: 700;
}
.badge.gold { background: #f4ead4; color: var(--gold-deep); }

.bottom-nav { display: none; }

/* Desktop sidebar — clean list, no heavy tiles */
@media (min-width: 981px) {
  .side-nav a, .logout-btn { gap: 12px; padding: 11px 12px; border-radius: 12px; }
  .side-nav a.active {
    background: #d9e4f2;
    box-shadow: inset 3px 0 0 #c6a15b;
  }
  .side-nav a:hover:not(.active) {
    background: rgba(255,255,255,0.10);
    box-shadow: inset 3px 0 0 transparent;
  }
  .side-nav .side-tile {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 8px;
  }
  .side-nav .side-tile::after { display: none; }
  .side-nav a.active .side-tile {
    background: rgba(198, 161, 91, 0.22);
    color: var(--gold-deep);
    box-shadow: none;
  }
  .side-nav .nav-ico { width: 22px; height: 22px; }
  .logout-btn .side-tile { color: #f2c9c6; }
}

@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .main {
    padding: 12px 8px 112px;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }
  .main > * {
    min-width: 0;
    max-width: 100%;
  }
  .badge, .when { display: none; }
  .when-time, .when-date, .icon-btn.ghost { display: grid; }
  .top-right { min-width: 0; gap: 8px; }
  .hello {
    font-size: 13px;
    max-width: min(42vw, 11.5em);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Time+date left column · hello/icons right — avoid date (margin-left:auto) overlapping name */
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 1px;
    margin-bottom: 12px;
    position: sticky;
    top: 0;
    z-index: 16;
    background: var(--bg);
    padding: 6px 0 8px;
    /* body already has safe-area-top; keep bar clear of notch on scroll */
  }
  .top-left {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 1 auto;
    min-width: 0;
    grid-column: 1;
    grid-row: 1 / -1;
  }
  .app-back {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 10px;
  }
  .app-back-label { display: none; }
  .when-time {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    place-items: center start;
    font-weight: 700;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    font-size: 16px;
    line-height: 1.1;
    min-width: 0;
  }
  .when-date {
    grid-column: 1;
    grid-row: 2;
    display: block;
    margin-left: 0;
    margin-right: 0;
    justify-self: start;
    max-width: 100%;
    color: var(--navy);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .pc-body .when-date { display: none; }
  .pc-body .topbar {
    grid-template-rows: auto;
  }
  .top-right {
    grid-column: 2;
    grid-row: 1 / -1;
    flex: 0 0 auto;
    justify-self: end;
    align-self: center;
    gap: 8px;
  }
  .icon-btn.ghost {
    width: 34px; height: 34px; place-items: center;
    border: 0; background: transparent; color: var(--navy);
  }
  .avatar { width: 34px; height: 34px; font-size: 13px; }
  .team-grid, .stats, .kind-grid, .viz-stats { grid-template-columns: 1fr 1fr; }
  .duo, .acc-list { grid-template-columns: 1fr; }
  .hero {
    min-height: 220px;
  }
  .hero-photo::after {
    background: linear-gradient(180deg, rgba(15, 27, 46, 0.35) 0%, rgba(15, 27, 46, 0.88) 72%);
  }
  .hero-copy { max-width: none; padding: 22px 18px 18px; }
  .hero h1 { font-size: 24px; line-height: 1.25; max-width: 12em; }
  .hero p { font-size: 13px; }
  .cta-checkin {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    border-radius: 12px;
    padding: 13px 16px;
  }
  .journey-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding: 0;
  }
  .journey-step {
    flex: none;
    min-width: 0;
    scroll-snap-align: none;
  }
  .journey-visual {
    width: 100%;
    max-width: none;
    aspect-ratio: 1;
    height: auto;
    margin-inline: auto;
    border-radius: 20px;
  }
  .journey-step b { font-size: 13px; }
  .journey-step span { font-size: 11px; display: block; line-height: 1.3; }
  .viz-card { min-height: 0; grid-template-rows: none; }
  .viz-card.tone-time,
  .viz-card.tone-pending { grid-template-rows: 72px 1fr; }
  .viz-card.tone-route,
  .viz-card.tone-rate {
    grid-template-rows: auto 1fr;
    padding-bottom: 4px;
  }
  .viz-card .viz-ring { width: 72px; height: 72px; margin: 12px auto 0; }
  .viz-media { height: 72px; }
  .viz-value { font-size: 26px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 28px; }

  .login-stage {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .login-visual {
    min-height: 0;
    height: 22vh;
    max-height: 180px;
  }
  .login-visual-stack { padding: 20px 16px 28px; align-content: end; }
  .login-visual-img {
    width: min(140px, 34vw);
    position: absolute;
    right: 16px;
    bottom: 12px;
    opacity: 0.9;
  }
  .login-visual-copy {
    position: relative;
    left: auto;
    bottom: auto;
    max-width: 70%;
  }
  .login-visual-title { font-size: 18px; }
  .login-panel {
    margin-top: -20px;
    padding: 0 16px 28px;
    max-width: none;
    position: relative;
    z-index: 2;
    justify-content: flex-start;
  }
  .login-brand {
    text-align: center;
    margin-bottom: 16px;
  }
  .login-logo {
    margin: 0 auto 12px;
    width: min(180px, 58vw);
    box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  }
  .login-brand h1 { font-size: 22px; }
  .login-brand p { font-size: 13px; margin-inline: auto; }
  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .team-card {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    min-height: 108px;
  }
  .team-ico { width: 36px; height: 36px; border-radius: 10px; }
  .team-meta strong { font-size: 13px; }
  .team-meta em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .login-form {
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.22);
  }
  .login-demo { margin-top: 14px; text-align: center; }

  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    position: fixed;
    left: 6px;
    right: 6px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 21, 36, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 8px 8px 10px;
    border-radius: 26px;
    z-index: 20;
    box-shadow: 0 16px 36px rgba(8, 14, 26, 0.38);
    border: 1px solid rgba(198, 161, 91, 0.18);
    transform: translate3d(0, 0, 0);
    opacity: 1;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
    will-change: transform, opacity;
    pointer-events: auto;
  }
  .bottom-nav.is-away {
    transform: translate3d(0, calc(100% + 28px), 0);
    opacity: 0;
    pointer-events: none;
  }
  .bottom-nav a {
    display: grid;
    place-items: center;
    gap: 4px;
    color: rgba(255,255,255,0.5);
    position: relative;
    padding: 2px 0 0;
    transition: color 0.2s ease, transform 0.15s ease;
  }
  .bottom-nav .dock-tile {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
  .bottom-nav .nav-ico { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--gold-2); font-weight: 700; }
  .bottom-nav a:active { transform: scale(0.96); }
  .bottom-nav .nav-fab {
    transform: translateY(-12px);
    color: rgba(255,255,255,0.88);
    gap: 5px;
  }
  .bottom-nav .nav-fab:active { transform: translateY(-10px) scale(0.96); }
  .bottom-nav .nav-fab .fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--navy);
    background: linear-gradient(160deg, #edd089 0%, #c6a15b 48%, #9a7a3a 100%);
    box-shadow: 0 8px 20px rgba(154, 122, 58, 0.38);
  }
  .bottom-nav .nav-fab .nav-ico { width: 22px; height: 22px; }
  .bottom-nav .nav-fab .nav-label {
    font-weight: 700;
    font-size: 10px;
  }
  .bottom-nav .nav-fab.active { color: var(--gold-2); }
  .bottom-nav .nav-fab.active .fab-btn {
    box-shadow: 0 10px 24px rgba(198, 161, 91, 0.48);
  }
  .bottom-nav a.active .dock-tile {
    transform: translateY(-1px);
  }
  /* PC dock is a flat row. Supervisor has 5 items; other PC roles keep 4. */
  .bottom-nav.pcd-dock { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
  /* BP dock drops แจ้งลา; CVS still uses the five-column bar. */
  .bottom-nav.bp-dock { grid-template-columns: repeat(4, 1fr); }
}
.nav-profile { position: relative; display: flex; }
.avatar.nav-profile-btn {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  border: 1.5px solid rgba(198, 161, 91, 0.45);
  box-shadow: 0 2px 8px rgba(21, 35, 58, 0.12);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  margin: 0;
  /* Safari/iOS button UA keeps -webkit-text-fill-color black unless overridden */
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.avatar.nav-profile-btn .avatar-initial {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 700;
}
.avatar.nav-profile-btn:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.28);
}
.avatar.nav-profile-btn[aria-expanded="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.55);
}
/* Profile dropdown — Steel Navy + Gold (desktop + mobile) */
.nav-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(260px, calc(100vw - 28px));
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(165deg, #1a2b45 0%, #15233a 55%, #101c30 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(198, 161, 91, 0.32);
  box-shadow:
    0 18px 40px rgba(8, 14, 26, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  z-index: 40;
  transform-origin: top right;
  animation: npm-in 0.16s ease-out;
}
.nav-profile-menu[hidden] { display: none; }
.npm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid rgba(198, 161, 91, 0.18);
  margin-bottom: 8px;
  min-width: 0;
}
.npm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
  background: linear-gradient(160deg, #edd089, #c6a15b 55%, #9a7a3a);
  flex: 0 0 auto;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.35);
}
.npm-who {
  display: grid;
  gap: 2px;
  line-height: 1.25;
  min-width: 0;
  flex: 1 1 auto;
}
.npm-who b {
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.npm-who small {
  color: rgba(212, 179, 109, 0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-profile-menu a,
.nav-profile-menu .npm-danger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-profile-menu a .ico,
.nav-profile-menu .npm-danger .ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.85;
  color: var(--gold-2);
}
.nav-profile-menu a:hover,
.nav-profile-menu a:focus-visible {
  background: rgba(198, 161, 91, 0.14);
  color: #fff;
  outline: none;
}
.nav-profile-menu a:active,
.nav-profile-menu .npm-danger:active {
  background: rgba(255, 255, 255, 0.08);
}
.nav-profile-menu .npm-danger {
  color: #f0b4ae;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0 12px 12px;
  padding-top: 14px;
}
.nav-profile-menu .npm-danger .ico { color: #f0b4ae; }
.nav-profile-menu .npm-danger:hover,
.nav-profile-menu .npm-danger:focus-visible {
  background: rgba(192, 57, 43, 0.18);
  color: #ffd4d0;
  outline: none;
}
.nav-profile-menu form { margin: 0; }
.nav-profile-backdrop {
  display: none;
}
@media (max-width: 980px) {
  /* Keep avatar+menu above the dim backdrop (topbar z-index:16 otherwise traps the menu behind it on iOS) */
  body.nav-profile-open {
    overflow: hidden;
  }
  body.nav-profile-open .topbar {
    z-index: 130;
  }
  .nav-profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 131;
  }
  .nav-profile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(6, 11, 20, 0.35);
    -webkit-tap-highlight-color: transparent;
  }
  .nav-profile-backdrop[hidden] { display: none; }
}
@keyframes npm-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nav-pop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes fab-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@media (min-width: 1100px) {
  .kind-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 520px) {
  .kind-grid { grid-template-columns: 1fr; }
}

.ico { width: 20px; height: 20px; flex: 0 0 auto; }
.ico.lg { width: 28px; height: 28px; display: block; margin-bottom: 10px; }
.side-nav a .ico, .logout-btn .ico { width: 18px; height: 18px; }
.bottom-nav .ico { width: 20px; height: 20px; position: relative; z-index: 1; }
.panel .ico { color: var(--gold-deep); }

.toast-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  animation: overlay-out 0.6s ease 2.4s forwards;
  pointer-events: none;
}
.toast-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}
.toast-overlay .toast-video {
  position: absolute;
  inset: 0;
  filter: brightness(0.55);
}
.toast-overlay .video-veil {
  z-index: 0;
}
.toast-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}
.toast-copy .clink-svg { width: min(320px, 80vw); }
.toast-copy p { letter-spacing: 0.12em; color: var(--gold-2); }

@keyframes toast-dim-a {
  0%, 38% {
    opacity: 1;
    transform: rotateY(0deg) translateZ(0) scale(1);
    filter: brightness(1);
  }
  48%, 88% {
    opacity: 0;
    transform: rotateY(-22deg) translateZ(-80px) scale(0.94);
    filter: brightness(0.85);
  }
  100% {
    opacity: 1;
    transform: rotateY(0deg) translateZ(0) scale(1);
    filter: brightness(1);
  }
}
@keyframes toast-dim-b {
  0%, 38% {
    opacity: 0;
    transform: rotateY(22deg) translateZ(-80px) scale(0.94);
    filter: brightness(0.85);
  }
  48%, 88% {
    opacity: 1;
    transform: rotateY(0deg) translateZ(0) scale(1);
    filter: brightness(1);
  }
  100% {
    opacity: 0;
    transform: rotateY(22deg) translateZ(-80px) scale(0.94);
    filter: brightness(0.85);
  }
}
@keyframes brand-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes splash-out {
  to { opacity: 0; visibility: hidden; }
}
@keyframes overlay-out {
  to { opacity: 0; visibility: hidden; }
}
@keyframes clink-l {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(11deg); }
  55% { transform: rotate(11deg); }
}
@keyframes clink-r {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(-11deg); }
  55% { transform: rotate(-11deg); }
}
@keyframes spark {
  0%, 40%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .splash, .toast-overlay, .glass-l, .glass-r, .spark, .toast-stack .shot,
  .viz-card, .viz-meter i, .wheat-ear.on {
    animation: none !important;
  }
  .toast-stack .shot.b { display: none; }
  .splash, .toast-overlay { display: none; }
}

.checkin-page { display: grid; gap: 16px; }
.checkin-hero {
  background:
    linear-gradient(115deg, rgba(198, 161, 91, 0.16), transparent 42%),
    repeating-linear-gradient(-42deg, transparent 0 16px, rgba(198, 161, 91, 0.08) 16px 17px),
    var(--navy);
  color: #fff;
  border-radius: 22px;
  padding: 22px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  overflow: hidden;
}
.checkin-hero-text { min-width: 0; }
.checkin-hero h1 { margin: 0 0 8px; font-size: 26px; }
.checkin-hero p { margin: 0; color: rgba(255,255,255,0.75); font-size: 14px; }
.checkin-hero-art {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(198,161,91,0.28);
  background: rgba(0,0,0,0.18);
}
.checkin-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.checkin-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
}
.checkin-form {
  display: grid;
  gap: 16px;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.checkin-block { display: grid; gap: 10px; }
.field-label {
  font-size: 12px;
  color: var(--gold-deep);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.store-pick { display: grid; gap: 10px; }
.store-card {
  display: block;
  position: relative;
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
}
.store-card input { position: absolute; opacity: 0; pointer-events: none; }
.store-body {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid transparent;
}
.store-body b { display: block; }
.store-body small { color: var(--muted); }
.store-card input:checked + .store-body {
  border-color: var(--gold);
  background: #fbf7ee;
}
.kind-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kind-toggle label {
  position: relative;
  background: #f7f8fb;
  border-radius: 14px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.kind-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.kind-toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 2px solid transparent;
  border-radius: 14px;
  font-weight: 700;
}
.kind-toggle input:checked + span {
  border-color: var(--gold);
  background: #fbf7ee;
  color: var(--navy);
}
.checkin-form .cta-checkin {
  width: 100%;
  justify-content: center;
  border-radius: 12px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.history-block {
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.history-block h2 { margin: 0 0 12px; font-size: 18px; }
.history-list { display: grid; gap: 10px; }
.history-item {
  background: #f7f8fb;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.history-item b { display: block; }
.history-item small { color: var(--muted); font-size: 12px; }
.pill {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 999px;
  padding: 4px 10px;
}
.pill.in { background: #e8f5e9; color: #1b5e20; }
.pill.out { background: #fce8e6; color: #8a1c14; }
.empty-note { color: var(--muted); margin: 0; }
.history-empty {
  color: var(--muted);
  margin: 0;
  padding: 14px 12px;
  text-align: center;
  background: #f7f8fb;
  border-radius: 14px;
  font-size: 14px;
}
.history-more-link,
.history-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.history-more-link:hover,
.history-back-link:hover { text-decoration: underline; }
.hist-card-list { display: grid; gap: 10px; }

.hist-session-card {
  background: #f7f8fb;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.hist-session-thumbs {
  display: flex;
  gap: 4px;
  align-items: center;
}
.hist-session-thumb {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  background: #e8ecf2;
  flex-shrink: 0;
}
.hist-session-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hist-session-thumb.empty,
.hist-session-thumb.live {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}
.hist-session-thumb-tag {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(21, 35, 58, 0.72);
  color: #fff;
}
.hist-session-body { min-width: 0; position: relative; }
.hist-session-body b {
  display: block;
  font-size: 14.5px;
  color: var(--navy);
  line-height: 1.3;
}
.hist-session-times {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.hist-session-open { color: #1b5e20; font-weight: 600; }
.hist-session-open.forgot { color: #b42318; }
.hist-session-pin { margin-top: 4px; }
.hist-session-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.hist-session-badge.live {
  background: #e8f5e9;
  color: #1b5e20;
}
.hist-session-badge.forgot {
  background: #fef2f2;
  color: #b42318;
  border: 1px solid #fecaca;
}
.hist-session-badge.done {
  background: #eef2f7;
  color: var(--navy);
  border: 1px solid var(--line);
}

.hist-card {
  background: #f7f8fb;
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.hist-card-body { min-width: 0; }
.hist-card-body b {
  display: block;
  font-size: 14.5px;
  color: var(--navy);
  line-height: 1.3;
}
.hist-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.hist-card-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 52px;
  display: block;
  background: #e8ecf2;
}
.hist-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hist-card-thumb-empty {
  background:
    linear-gradient(135deg, #eef2f7 0%, #e2e8f0 100%);
}
.hist-pin {
  width: 10px;
  height: 10px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--gold);
  flex-shrink: 0;
}
.hist-card .pill { flex-shrink: 0; align-self: center; }

.pc-history-sheet {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: #f4f6f9;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.pc-history-sheet[hidden] { display: none !important; }
body.pc-history-open { overflow: hidden; }
.pc-history-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 24px rgba(21, 35, 58, 0.18);
}
.pc-history-head h2 {
  margin: 0;
  font-size: 17px;
  text-align: center;
  padding-right: 72px;
}
.pc-history-back {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.pc-history-filters-wrap {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.pc-history-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hist-filter-cal.open {
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.45);
}
.pc-history-filters {
  padding-bottom: 12px;
}
.pc-history-filters-wrap:has(.hist-filter-pick-panel:not([hidden])) .pc-history-filters {
  padding-bottom: 0;
}
.pc-history-filters::-webkit-scrollbar { display: none; }
.hist-filter-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.hist-filter-chip.active {
  background: linear-gradient(180deg, #d8ba78 0%, #c6a15b 100%);
  border-color: transparent;
  color: #15233a;
  box-shadow: 0 4px 12px rgba(198, 161, 91, 0.28);
}
.hist-filter-cal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  min-width: 40px;
}
.hist-filter-cal .hist-filter-cal-ico,
.hist-filter-cal svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  pointer-events: none;
}
.hist-filter-cal-label {
  font-size: 12px;
  line-height: 1;
  max-width: 4.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.hist-filter-cal.active {
  background: linear-gradient(180deg, #d8ba78 0%, #c6a15b 100%);
  border-color: transparent;
  color: #15233a;
  box-shadow: 0 4px 12px rgba(198, 161, 91, 0.28);
}
.hist-filter-pick-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 16px 12px;
  background: #fff;
}
.hist-filter-pick-panel[hidden] { display: none !important; }
.hist-filter-pick-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.hist-filter-pick-row span {
  flex: 0 0 auto;
}
.hist-filter-date-input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--navy);
  background: #fff;
}
.pc-history-scroll {
  flex: 1;
  overflow: auto;
  padding: 12px 16px 8px;
  -webkit-overflow-scrolling: touch;
}
.pc-history-footer {
  padding: 8px 16px 16px;
  background: #f4f6f9;
  border-top: 1px solid var(--line);
}
.pc-history-footer[hidden] { display: none !important; }
.hist-load-more {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.hist-load-more:disabled {
  opacity: 0.55;
  cursor: wait;
}
.hist-load-more:active:not(:disabled) { transform: scale(0.99); }
.hist-date-group { margin-bottom: 16px; }
.hist-date-head {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 8px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  background: rgba(244, 246, 249, 0.92);
  backdrop-filter: blur(6px);
}
.hist-date-list { display: grid; gap: 8px; }

.pc-leave-quick {
  display: block;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gold-deep);
  text-decoration: none;
  line-height: 1.45;
}
.pc-leave-quick:hover { text-decoration: underline; }

.profile-page { display: grid; gap: 14px; padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #243a5c, #15233a);
  background-size: cover;
  background-position: center;
}
.profile-avatar.has-img {
  background-color: #15233a;
  font-size: 0;
  color: transparent;
}
.profile-avatar-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.profile-avatar-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #15233a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  border: 1px solid rgba(198, 161, 91, 0.35);
  font-family: inherit;
}
.profile-avatar-upload:active { opacity: 0.88; }
.profile-avatar-upload-txt { letter-spacing: 0.01em; }
.profile-avatar-sheet {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  display: grid;
  gap: 4px;
}
.profile-avatar-sheet[hidden] { display: none !important; }
.profile-avatar-sheet-opt,
.profile-avatar-sheet-cancel {
  appearance: none;
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.profile-avatar-sheet-opt:active,
.profile-avatar-sheet-cancel:active { background: #eef2f7; }
.profile-avatar-sheet-cancel {
  color: #64748b;
  font-weight: 600;
  background: transparent;
}
.profile-avatar-msg {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  max-width: 140px;
}
.profile-avatar-msg.is-err { color: #b42318; }
.profile-avatar-msg.is-ok { color: #15803d; }
.profile-hero h2 { margin: 0 0 4px; font-size: 20px; }
.profile-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.profile-menu { padding: 8px; display: grid; gap: 4px; }
.profile-menu-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}
.profile-menu-item:active { background: #f7f8fb; }
.profile-menu-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f3f0e7;
  color: var(--navy);
}
.profile-menu-svg {
  width: 18px;
  height: 18px;
  display: block;
}
.profile-logout-wrap { margin: 2px 0 0; }
.profile-logout-btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(176, 72, 72, 0.22);
  border-radius: 14px;
  background: transparent;
  color: #9a3d3d;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.profile-logout-btn:active { background: rgba(176, 72, 72, 0.06); }
.profile-logout-svg { width: 18px; height: 18px; display: block; }
.payroll-page {
  display: grid;
  gap: 14px;
  padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
}
.payroll-back {
  width: fit-content;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.payroll-summary-grid article b { font-size: 16px; }
.payroll-empty {
  display: grid;
  gap: 6px;
  padding: 18px 14px;
  border-radius: 14px;
  background: #f7f8fb;
  border: 1px dashed var(--line);
  text-align: center;
}
.payroll-empty b {
  font-size: 15px;
  color: var(--navy);
}
.payroll-empty small,
.payroll-empty-history {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.payroll-empty-history {
  margin: 0;
  padding: 18px 8px;
  text-align: center;
}
.payroll-history h2 { margin: 0 0 12px; font-size: 18px; }
.payroll-slip-list {
  display: grid;
  gap: 10px;
}
.payroll-slip-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f8fb;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.payroll-slip-card:hover {
  border-color: rgba(198, 161, 91, 0.45);
  background: #fbf7ee;
}
.payroll-slip-card:active { transform: scale(0.99); }
.payroll-slip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.payroll-slip-top b {
  font-size: 15px;
  color: var(--navy);
}
.payroll-slip-figures {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  min-width: 0;
}
.payroll-fig {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.payroll-fig-sep {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: var(--muted);
  font-weight: 700;
  flex-shrink: 0;
}
.payroll-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.payroll-modal[hidden] { display: none !important; }
body.payroll-modal-open { overflow: hidden; }
.payroll-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(21, 35, 58, 0.45);
  cursor: pointer;
}
.payroll-modal-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(21, 35, 58, 0.28);
  display: flex;
  flex-direction: column;
  animation: pc-dialog-in 0.22s ease;
}
@keyframes payroll-sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes pc-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.payroll-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.payroll-modal-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.payroll-modal-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: var(--navy);
}
.payroll-modal-x {
  border: 0;
  background: #f0f2f6;
  color: var(--navy);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.payroll-modal-body {
  overflow: auto;
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.payroll-modal-employee {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.payroll-modal-block { margin-bottom: 16px; }
.payroll-modal-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--navy);
}
.payroll-line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.payroll-line-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f8fb;
  font-size: 13px;
}
.payroll-line-list li span { color: var(--muted); }
.payroll-line-list li b { color: #1b5e20; font-variant-numeric: tabular-nums; }
.payroll-line-list.deduct li b { color: #8a1c14; }
.payroll-modal-net {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbf7ee 0%, #f3e8cf 100%);
  border: 1px solid rgba(198, 161, 91, 0.35);
}
.payroll-modal-net span {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.payroll-modal-net b {
  font-size: 22px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.payroll-download-btn {
  width: 100%;
  min-height: 52px;
}
.payroll-download-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.profile-menu-copy b { display: block; font-size: 14.5px; color: var(--navy); }
.profile-menu-copy small { color: var(--muted); font-size: 12px; }
.profile-menu-arrow { color: var(--muted); font-size: 20px; }

/* PC personal history block (profile page) */
.profile-personal {
  border-radius: 14px;
  background: #f7f8fb;
  overflow: hidden;
}
.profile-personal-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.profile-personal-toggle .profile-personal-chevron {
  transition: transform 0.18s ease;
  display: inline-block;
}
.profile-personal-toggle.is-open .profile-personal-chevron {
  transform: rotate(90deg);
}
.profile-personal-panel {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(21, 35, 58, 0.06);
}
.profile-personal-panel[hidden] { display: none; }
.profile-password {
  border-radius: 14px;
  background: #f7f8fb;
  overflow: hidden;
}
.profile-password-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.profile-password-toggle .profile-password-chevron {
  transition: transform 0.18s ease;
  display: inline-block;
}
.profile-password-toggle.is-open .profile-password-chevron {
  transform: rotate(90deg);
}
.profile-password-panel {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(21, 35, 58, 0.06);
}
.profile-password-panel[hidden] { display: none !important; }
.profile-password-box {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(21, 35, 58, 0.08);
}
.profile-password-note {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.profile-password-field {
  position: relative;
  margin-bottom: 4px;
}
.profile-password-field .profile-salary-input {
  width: 100%;
  padding-right: 46px;
}
.profile-password-eye {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.profile-password-ok {
  margin: 8px 0 0;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
}
.profile-password-ok[hidden] { display: none !important; }
.profile-password-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.profile-personal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin: 0 0 12px;
}
.profile-personal-grid .wide { grid-column: 1 / -1; }
.profile-personal-grid dt {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}
.profile-personal-grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  word-break: break-word;
}
.profile-salary {
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(21, 35, 58, 0.08);
}
.profile-salary-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.profile-salary-head span {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.profile-salary-head small {
  font-size: 11px;
  color: var(--muted);
}
.profile-salary-mask {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 8px;
}
.profile-salary-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.profile-salary-row {
  display: flex;
  gap: 8px;
}
.profile-salary-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(21, 35, 58, 0.14);
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
  letter-spacing: 0.06em;
}
.profile-salary-btn {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.profile-salary-btn:disabled { opacity: 0.6; cursor: wait; }
.profile-salary-err {
  margin: 8px 0 0;
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}
.profile-salary-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.profile-salary-open b {
  font-size: 22px;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.profile-salary-hide {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}
.profile-salary-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.profile-address-block .profile-address-current {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  word-break: break-word;
}
.profile-address-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(21, 35, 58, 0.14);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 72px;
  background: #fff;
}
.profile-address-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}
.profile-address-wait {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8e8;
  border: 1px solid rgba(198, 161, 91, 0.35);
  display: grid;
  gap: 4px;
}
.profile-address-wait b {
  font-size: 12px;
  color: #9a7a3a;
}
.profile-address-wait span {
  font-size: 13px;
  color: var(--navy);
  font-weight: 600;
  word-break: break-word;
}
.profile-leave-quota dd {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-leave-quota-vals {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}
.profile-leave-quota-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.pc-addr-card {
  border: 1px solid rgba(21, 35, 58, 0.08);
  border-radius: 14px;
  padding: 14px;
  background: #f7f8fb;
}
.pc-addr-card-h b { display: block; font-size: 15px; color: var(--navy); }
.pc-addr-card-h small { color: var(--muted); font-size: 12px; }
.pc-addr-diff {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.pc-addr-diff span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.pc-addr-diff p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  color: var(--navy);
  word-break: break-word;
}
.pc-addr-diff .pc-addr-new {
  border: 1px solid rgba(17, 122, 101, 0.35);
  background: #eafaf4;
}
.pc-addr-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.pc-addr-note {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(21, 35, 58, 0.14);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.pc-addr-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pc-addr-btn.approve { background: #117a65; color: #fff; }
.pc-addr-btn.reject { background: #fff; color: #b42318; border: 1px solid rgba(180, 35, 24, 0.35); }
.bpsu-alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1f0;
  color: #b42318;
  border: 1px solid #f5c2c0;
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 420px) {
  .profile-personal-grid { grid-template-columns: 1fr; }
  .pc-addr-actions { grid-template-columns: 1fr; }
}


.promotions-shell {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
  overflow-x: hidden;
  min-height: 100vh;
  min-width: 0;
  box-sizing: border-box;
  padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
}
.promotions-page {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.promo-hero, .leave-hero { margin-bottom: 0; }
.promo-campaign {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line);
  overflow: hidden;
  box-sizing: border-box;
}
.promo-campaign h2,
.promo-campaign-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}
@media (min-width: 400px) {
  .promo-campaign-title { font-size: 17px; }
}
.promo-campaign p { margin: 0 0 6px; color: var(--muted); line-height: 1.5; }
.promo-campaign small { color: var(--muted); font-size: 12px; }
.promo-campaign-link {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.promo-campaign-link:hover,
.promo-campaign-link:focus-visible {
  text-decoration: underline;
  outline: none;
}
.promo-campaign-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}
.promo-gallery {
  overflow: hidden;
  min-width: 0;
  padding: 16px;
  box-sizing: border-box;
}
.promo-gallery-head h2 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.35;
}
.promo-gallery-head p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.promo-filter-empty {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scrollbar-none::-webkit-scrollbar { display: none; }
.promo-brand-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 12px;
}
.promo-brand-bar {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 2px 0 4px;
  box-sizing: border-box;
}
.promo-brand-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.promo-brand-chip.active {
  background: linear-gradient(180deg, #d8ba78 0%, #c6a15b 100%);
  border-color: transparent;
  color: #15233a;
}
.promo-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.promo-media-card[hidden] { display: none !important; }
.promo-media-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #f7f8fb;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  box-sizing: border-box;
}
.promo-media-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  background: #e8ecf2;
  overflow: hidden;
}
.promo-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promo-media-body {
  display: grid;
  gap: 6px;
  padding: 10px 10px 12px;
  min-width: 0;
}
.promo-media-body b {
  font-size: 12px;
  line-height: 1.35;
  color: var(--navy);
  overflow-wrap: anywhere;
}
.promo-media-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8ecf2;
  color: var(--navy);
  font-size: 10px;
  font-weight: 700;
}
.promo-lb {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #0c1422;
  display: flex;
  flex-direction: column;
}
.promo-lb[hidden] { display: none !important; }
body.promo-lb-open { overflow: hidden; }
.promo-lb-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.promo-lb-stage {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  display: grid;
  place-items: center;
  padding: 56px 12px 8px;
}
.promo-lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}
.promo-lb-meta {
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  color: #fff;
}
.promo-lb-meta h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}
.promo-lb-meta p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.promo-modal[hidden] { display: none !important; }
body.promo-modal-open { overflow: hidden; }
.promo-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(21, 35, 58, 0.45);
  cursor: pointer;
}
.promo-modal-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(21, 35, 58, 0.28);
  display: flex;
  flex-direction: column;
  animation: pc-dialog-in 0.22s ease;
}
@keyframes promo-sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.promo-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
  border-bottom: 1px solid var(--line);
}
.promo-modal-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: var(--navy);
}
.promo-modal-x {
  border: 0;
  background: #f0f2f6;
  color: var(--navy);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.promo-modal-body {
  overflow: auto;
  padding: 12px 16px 24px;
  -webkit-overflow-scrolling: touch;
}
.promo-modal-period {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.promo-modal-block { margin-bottom: 16px; }
.promo-modal-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--navy);
}
.promo-channel-list,
.promo-mechanics-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.promo-channel-list li,
.promo-mechanics-list li { margin-bottom: 4px; }
.promo-posm-figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f7f8fb;
}
.promo-posm-figure img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: #eef1f6;
}
.promo-posm-figure figcaption {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.leave-page {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
  padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}
.leave-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: #eef1f6;
}
.leave-tab {
  border: 0;
  border-radius: 11px;
  min-height: 44px;
  padding: 8px 10px;
  background: transparent;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
}
.leave-tab.active {
  background: linear-gradient(180deg, #d8ba78 0%, #c6a15b 100%);
  color: #15233a;
  box-shadow: 0 4px 12px rgba(198, 161, 91, 0.28);
}
.leave-panel { display: grid; gap: 14px; padding-bottom: 8px; height: auto; max-height: none; overflow: visible; }
.leave-panel[hidden] { display: none !important; }
#leave-panel-request {
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}
.leave-form-end {
  height: 4rem;
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}
@media (max-width: 980px) {
  html:has(.leave-page),
  body:has(.leave-page) {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .app:has(.leave-page) {
    display: block;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }
  .app:has(.leave-page) .main {
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  }
}
.leave-goto-request {
  width: 100%;
  position: sticky;
  bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  margin-top: 4px;
  box-shadow: 0 10px 24px rgba(21, 35, 58, 0.18);
}
.leave-quota h2 { margin: 0 0 12px; font-size: 18px; }
.leave-quota-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.leave-quota-card {
  background: #f7f8fb;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}
.leave-quota-card span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.3;
}
.leave-quota-card b { display: block; font-size: 22px; color: var(--navy); line-height: 1.15; }
.leave-quota-card small { font-size: 11px; color: var(--muted); }
.leave-quota-grid article {
  background: #f7f8fb;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  min-width: 0;
}
.leave-quota-grid article span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.leave-quota-grid article b { font-size: 16px; color: var(--navy); }
.leave-quota-grid article small { font-size: 11px; color: var(--muted); }
.leave-quota-grid article.accent {
  background: linear-gradient(180deg, #fbf7ee 0%, #f3e8cf 100%);
  border: 1px solid rgba(198, 161, 91, 0.35);
}
.leave-quota-card-sick b { font-size: 12px; font-weight: 700; padding-top: 6px; }
.leave-quota-card.active {
  background: linear-gradient(180deg, #fbf7ee 0%, #f3e8cf 100%);
  border-color: #c6a15b;
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.35);
}
.leave-date-shell {
  position: relative;
  display: block;
  min-height: 44px;
}
.leave-date-display {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 44px;
  background: #fff;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.35;
  pointer-events: none; /* taps go to the native date input underneath */
  user-select: none;
  -webkit-user-select: none;
}
.leave-date-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* iOS Safari ignores taps on fully transparent date inputs */
  opacity: 0.011;
  width: 100%;
  height: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px; /* avoid iOS focus-zoom */
  background: transparent;
  color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.leave-date-input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.leave-days-banner {
  margin: 0;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f3f0e7;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}
.leave-days-banner[hidden] { display: none !important; }
.leave-days-banner b { font-weight: 800; }
.leave-attach {
  display: grid;
  gap: 8px;
  position: relative;
  scroll-margin-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}
.leave-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.leave-attach-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f7f8fb;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.leave-attach-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f7f8fb;
  border: 1px solid var(--line);
}
.leave-attach-chip[hidden] { display: none !important; }
.leave-attach-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.leave-attach-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leave-attach-remove {
  border: 0;
  background: transparent;
  color: #9a3d3d;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}
.leave-history-head {
  display: grid;
  gap: 8px;
}
.leave-history-head h2 { margin: 0; font-size: 18px; }
.leave-filter-reset {
  width: fit-content;
  max-width: 100%;
  border: 0;
  background: #f3f0e7;
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.leave-filter-reset[hidden] { display: none !important; }
.leave-history-item[hidden] { display: none !important; }
.leave-history-empty {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.leave-history-empty[hidden] { display: none !important; }
.leave-form {
  display: grid;
  gap: 12px;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: visible;
}
.leave-rule-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}
.leave-form h2 { margin: 0; font-size: 18px; }
.leave-note {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 88px;
}
.leave-submit {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 0;
  scroll-margin-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}
.leave-form-error {
  margin: 0;
  color: #9a3d3d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.leave-form-error[hidden] { display: none !important; }
.leave-approve-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 14px;
  padding: 14px 16px;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  border-radius: 16px;
}
.leave-history-list { display: grid; gap: 8px; margin-top: 8px; }
.leave-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f7f8fb;
  border-radius: 14px;
}
.leave-history-item b { display: block; }
.leave-history-item small { color: var(--muted); font-size: 12px; }
.history-page-body { display: grid; gap: 12px; }
.checkin-capture-stack {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.pc-checkin-flow {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.pc-checkin-step[hidden] {
  display: none !important;
}
.pc-checkin-step:not([hidden]) {
  animation: pc-step-in 0.32s ease both;
}
@keyframes pc-step-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pc-checkin-step:not([hidden]) { animation: none; }
}
.checkin-capture-stack .pc-gps,
.checkin-capture-stack .pc-photo {
  width: 100%;
}
.checkin-capture-stack .pc-photo-placeholder {
  margin: 0 auto;
  max-width: 280px;
}
.pc-btn-hint {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}
.pc-btn-hint.ready {
  color: #1b5e20;
  font-weight: 600;
}

@media (max-width: 980px) {
  .checkin-layout { grid-template-columns: 1fr; }
  .checkin-hero { grid-template-columns: 1fr auto; padding: 18px; }
  .checkin-hero h1 { font-size: 22px; }
  .checkin-hero-art { width: 72px; height: 72px; border-radius: 18px; }
  .checkin-form, .history-block { border-radius: 18px; padding: 16px; }
}

.pc-saved {
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: #e8f5e9;
  color: #1b5e20;
  font-weight: 700;
}
.pc-saved-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  color: #14532d;
  box-shadow: 0 8px 24px rgba(22, 101, 52, 0.08);
}
.pc-saved-card.live {
  border-color: #c6a15b;
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
  color: #15233a;
  box-shadow: 0 8px 24px rgba(21, 35, 58, 0.06);
}
.pc-saved-card-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  background: #16a34a;
  color: #fff;
}
.pc-saved-card.live .pc-saved-card-ico {
  background: #15233a;
  color: #c6a15b;
  font-size: 16px;
}
.pc-saved-card-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.pc-saved-card-body b {
  font-size: 17px;
  line-height: 1.25;
}
.pc-saved-card-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: inherit;
  opacity: 0.92;
}
.pc-saved-card-body small {
  font-size: 12px;
  font-weight: 700;
  color: #166534;
}
.pc-saved-card.live .pc-saved-card-body small {
  color: #9a7a3a;
}
.pc-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fce8e6;
  color: #8a1c14;
  font-weight: 700;
}
.pc-nocoords-dialog {
  box-sizing: border-box;
  border: 0;
  padding: 0;
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(21, 35, 58, 0.28);
  overflow: hidden;
}
.pc-nocoords-dialog::backdrop {
  background: rgba(21, 35, 58, 0.52);
}
.pc-nocoords-dialog-inner {
  padding: 18px 16px 16px;
}
.pc-nocoords-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pc-nocoords-dialog-head h2 {
  margin: 0;
  font-size: 18px;
  color: #15233a;
}
.pc-nocoords-dialog-close {
  flex-shrink: 0;
  border: 0;
  background: #f3f5f8;
  color: #15233a;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.pc-nocoords-dialog-msg {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #92400e;
}
.pc-nocoords-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pc-nocoords-fix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d8b878, #c6a15b);
  color: #1a1408;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.pc-nocoords-fix[hidden] { display: none; }
.pc-nocoords-dialog-dismiss {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d7dde7;
  background: #fff;
  color: #15233a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pc-photo {
  background: #f7f8fb;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.pc-photo.need { border-color: #c62828; background: #fff5f4; }
.pc-photo-preview-wrap img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.pc-photo-placeholder {
  text-align: center;
  padding: 18px 8px 4px;
}
.pc-photo-cam {
  display: block;
  width: 42px;
  height: 32px;
  margin: 0 auto 10px;
  border-radius: 8px;
  border: 2px solid var(--gold);
  position: relative;
  background: transparent;
}
.pc-photo-cam::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 2px solid var(--gold);
}
.pc-photo-placeholder b { display: block; }
.pc-photo-placeholder small { color: var(--muted); }
.pc-photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pc-photo-btn {
  border: 0;
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc-photo-btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.pc-file-slot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.pc-file-slot input,
.pc-file-native {
  display: none !important;
}
.pc-store-locked {
  background: #fbf7ee;
  border: 1px solid rgba(198, 161, 91, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
}
.pc-store-locked b { display: block; color: var(--navy); font-size: 15px; }
.pc-store-locked small { color: var(--muted); font-size: 12px; line-height: 1.45; }
.pc-store-locked .pc-shift-locked {
  display: block;
  margin-top: 6px;
  color: #5f4718;
  font-weight: 600;
}

/* PC-only: shift / break pick after store (scoped under .pc-checkin-kc) */
.pc-checkin-kc .pc-visit-type {
  display: grid;
  gap: 10px;
}
.pc-checkin-kc .pc-visit-type-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.pc-checkin-kc .pc-visit-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 12px;
  border: 1.5px solid #e8ecf2;
  border-radius: 14px;
  background: #fafbfc;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  user-select: none;
}
.pc-checkin-kc .pc-visit-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pc-checkin-kc .pc-visit-chip-ic {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(198, 161, 91, 0.18);
  flex-shrink: 0;
  font-size: 14px;
}
.pc-checkin-kc .pc-visit-chip.is-on {
  border-color: var(--navy);
  background: #0b1c2c;
  color: #fff;
  box-shadow: 0 4px 12px rgba(11, 28, 44, 0.18);
}
.pc-checkin-kc .pc-visit-chip.is-on .pc-visit-chip-ic {
  background: rgba(198, 161, 91, 0.35);
}
.pc-checkin-kc .pc-stock-request {
  display: grid;
  gap: 10px;
}
.pc-checkin-kc .pc-stock-request[hidden] {
  display: none !important;
}
.pc-checkin-kc .pc-stock-status {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a6700;
}
.pc-checkin-kc .pc-stock-status.ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.pc-checkin-kc .pc-stock-status b {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}
.pc-checkin-kc .pc-stock-status small {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
  opacity: .92;
}
.pc-checkin-kc .pc-stock-req-form {
  display: grid;
  gap: 8px;
}
.pc-checkin-kc .pc-meeting-pick {
  display: grid;
  gap: 10px;
}
.pc-checkin-kc .pc-meeting-pick[hidden] {
  display: none !important;
}
.pc-checkin-kc .pc-meeting-hint {
  margin: 0;
  font-size: 12px;
  color: #067647;
  background: #ecfdf3;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.4;
}
.pc-checkin-kc .pc-store-pick[hidden] {
  display: none !important;
}
.pc-checkin-kc .pc-shift-pick {
  display: grid;
  gap: 10px;
}
.pc-checkin-kc .pc-break-label {
  margin-top: 6px;
}
.pc-checkin-kc .pc-shift-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pc-checkin-kc .pc-shift-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 12px;
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  background: #fafbfc;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  user-select: none;
}
.pc-checkin-kc .pc-break-grid .pc-shift-chip.is-suggested {
  border-color: #c6a15b;
  background: #fff8e8;
}
.pc-checkin-kc .pc-break-grid .pc-shift-chip.is-dimmed {
  opacity: 0.45;
}
.pc-checkin-kc .pc-shift-chip input {
  accent-color: #1e3a5f;
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
}
.pc-checkin-kc .pc-shift-chip:has(input:checked) {
  border-color: #1e3a5f;
  background: #eef3f9;
  box-shadow: inset 0 0 0 1px rgba(30, 58, 95, 0.25);
  opacity: 1;
}
.pc-checkin-kc .pc-shift-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.pc-checkin-kc .pc-shift-hint[hidden] {
  display: none !important;
}
.pc-checkin-kc .pc-break-show {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #ecdcb8;
  border-radius: 12px;
  background: #fff8e8;
  font-size: 14px;
  color: var(--navy);
}
.pc-checkin-kc .pc-break-show[hidden] {
  display: none !important;
}
.pc-other-wrap[hidden] { display: none !important; }
.pc-other-wrap:not([hidden]) {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.pc-checkin-kc .checkin-block.pc-store-pick {
  gap: 8px;
  margin-bottom: -2px;
}
.pc-checkin-kc .pc-store-pick + .checkin-capture-stack {
  margin-top: 0;
}
.pc-status {
  background: #f7f8fb;
  border: 1px solid #e8ecf2;
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
}
.pc-status .ok { color: #1b5e20; display: block; }
.pc-status small { color: var(--muted); }
.pc-store-select {
  width: 100%;
  border: 1px solid #e8ecf2;
  border-radius: 16px;
  padding: 14px 42px 14px 16px;
  font-size: 15px;
  background-color: #fafbfc;
  color: var(--navy);
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9a7a3a 50%),
    linear-gradient(135deg, #9a7a3a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.pc-store-select:focus {
  outline: none;
  border-color: var(--gold);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(198,161,91,0.18);
}
.pc-store-select-sync {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  appearance: none !important;
  background: none !important;
}
.pc-store-combo {
  position: relative;
  display: grid;
  gap: 6px;
  z-index: 5;
}
.pc-store-search-wrap {
  position: relative;
  display: grid;
  gap: 6px;
  z-index: 6;
}
.pc-store-search-hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}
.pc-store-search {
  width: 100%;
  border: 1px solid #e8ecf2;
  border-radius: 16px;
  padding: 14px 42px 14px 16px;
  font-size: 15px;
  background-color: #fafbfc;
  color: var(--navy);
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #9a7a3a 50%),
    linear-gradient(135deg, #9a7a3a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.pc-store-search:focus {
  outline: none;
  border-color: var(--gold);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(198,161,91,0.18);
}
.pc-store-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: min(280px, 45vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid #e0c98a;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(21,35,58,.16);
  padding: 6px;
  list-style: none;
  margin: 0;
}
.pc-store-results[hidden] { display: none !important; }
.pc-store-hit {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  line-height: 1.35;
}
.pc-store-hit:hover,
.pc-store-hit:focus,
.pc-store-hit.is-active {
  background: #fff8eb;
  outline: none;
}
.pc-store-hit small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.pc-store-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}
.pc-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.pc-btn-row-single {
  grid-template-columns: 1fr;
}
.pc-btn {
  min-height: 52px;
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  border: 0;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.pc-btn-in {
  background: linear-gradient(180deg, #d8ba78 0%, #c6a15b 100%);
  color: #15233a;
  box-shadow: 0 10px 22px rgba(198, 161, 91, 0.3);
}
.pc-btn-out {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(21, 35, 58, 0.08);
  border: 1px solid #e8ecf2;
}
.pc-btn-row-single .pc-btn-out {
  background: linear-gradient(180deg, #d8ba78 0%, #c6a15b 100%);
  color: #15233a;
  border: 0;
  box-shadow: 0 10px 22px rgba(198, 161, 91, 0.3);
}
.pc-btn:active:not(:disabled) { transform: scale(0.98); }
.pc-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
  box-shadow: none;
}
.pc-checkin-kc .pc-photo {
  cursor: pointer;
  border-radius: 18px;
  border: 1.5px dashed rgba(198,161,91,0.55);
  background: linear-gradient(180deg, #fbfcfe 0%, #f7f8fb 100%);
}
.pc-checkin-kc .pc-gps-retry {
  border-radius: 999px;
  border: 1px solid #e8ecf2;
  background: #fafbfc;
  color: var(--navy);
  font-weight: 600;
}
.pc-cam-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  color: #fff;
}
.pc-cam-overlay[hidden] { display: none !important; }
body.pc-cam-open { overflow: hidden; }
.pc-cam-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.pc-cam-popup {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: min(92vh, 780px);
  display: grid;
  grid-template-rows: auto auto minmax(200px, 1fr) auto auto;
  background: #151a24;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  animation: pc-cam-pop 0.22s ease-out;
}
.pc-cam-meta {
  display: grid;
  gap: 8px;
  padding: 0 12px 10px;
  background: #1b2230;
}
.pc-cam-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pc-cam-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(198, 161, 91, 0.22);
  color: #f3e2b8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-cam-chip.muted {
  background: rgba(255,255,255,0.08);
  color: #d7dbe3;
  font-weight: 600;
}
.pc-cam-chip.out {
  background: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}
.pc-cam-gps-card {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
}
.pc-cam-gps-card b {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}
.pc-cam-gps-card small {
  display: block;
  color: #c6a15b;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
}
.pc-cam-gps-card[data-state="wait"] b { color: #fde68a; }
.pc-cam-gps-card[data-state="ok"] b { color: #86efac; }
.pc-cam-gps-card[data-state="ok"] small { color: #bbf7d0; }
.pc-cam-gps-card[data-state="deny"] b,
.pc-cam-gps-card[data-state="off"] b { color: #fda4af; }
.pc-cam-gps-card[data-state="deny"] small,
.pc-cam-gps-card[data-state="off"] small { color: #fecdd3; }
.pc-cam-shot {
  width: 100%;
  height: 100%;
  min-height: 240px;
  max-height: 46vh;
  object-fit: cover;
  display: block;
  background: #0b0f16;
}
.pc-cam-shot[hidden] { display: none !important; }
.pc-cam-popup[data-mode="review"] #pc-cam-video,
.pc-cam-popup[data-mode="review"] #cvs-cam-video { display: none; }
.pc-cam-popup[data-mode="live"] #pc-cam-shot,
.pc-cam-popup[data-mode="live"] #cvs-cam-shot { display: none !important; }
.pc-cam-popup[data-mode="review"] #pc-cam-flip,
.pc-cam-popup[data-mode="review"] #cvs-cam-flip { visibility: hidden; }
.pc-cam-popup[data-mode="review"] .pc-cam-filters,
.pc-cam-popup[data-mode="review"] .pc-cam-soft,
.pc-cam-popup[data-mode="review"] .pc-cam-fx { display: none !important; }
.pc-cam-popup[data-mode="live"] .pc-cam-filters { display: flex; }
.pc-cam-actions {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 12px 14px 16px;
  background: #151a24;
}
.pc-cam-actions[hidden] { display: none !important; }
.pc-cam-hint {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
}
.pc-cam-actions-review {
  gap: 10px;
}
.pc-cam-review-status {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  line-height: 1.4;
}
.pc-cam-review-status.is-wait {
  color: #fde68a;
}
.pc-cam-review-status.is-clear {
  color: #86efac;
}
.pc-cam-review-status.is-blur {
  color: #fca5a5;
}
.pc-cam-review-btns {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  width: 100%;
}
.pc-cam-btn-ghost,
.pc-cam-btn-confirm {
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  font-weight: 800;
  cursor: pointer;
}
.pc-cam-btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.pc-cam-btn-confirm {
  background: linear-gradient(180deg, #e4c078 0%, #c6a15b 100%);
  color: var(--navy);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}
.pc-cam-btn-confirm:disabled,
.pc-cam-btn-confirm.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}
.pc-cam-btn-confirm.out {
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
  color: #fff;
}
@keyframes pc-cam-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.pc-cam-bar {
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #1b2230;
  font-weight: 700;
  text-align: center;
  font-size: 15px;
}
.pc-cam-bar button {
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
}
.pc-cam-stage {
  position: relative;
  min-height: 240px;
  background: #0b0f16;
}
.pc-cam-overlay video {
  width: 100%;
  height: 100%;
  min-height: 240px;
  max-height: 52vh;
  object-fit: cover;
  display: block;
  background: #0b0f16;
}

.pc-cam-overlay video.pc-cam-mirror {
  transform: scaleX(-1);
}
.pc-cam-soft {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 240px;
  max-height: 52vh;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: soft-light;
  z-index: 1;
}
.pc-cam-soft[hidden] { display: none !important; }
.pc-cam-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.18s ease;
}
.pc-cam-fx-glow {
  background:
    radial-gradient(ellipse at 50% 28%, rgba(255,220,200,.55) 0%, transparent 42%),
    radial-gradient(ellipse at 50% 70%, rgba(255,180,200,.22) 0%, transparent 55%);
  mix-blend-mode: soft-light;
}
.pc-cam-fx-peach {
  background: linear-gradient(180deg, rgba(255,200,170,.28), transparent 35%, rgba(255,150,180,.18) 100%);
  mix-blend-mode: overlay;
}
.pc-cam-fx-blush {
  background:
    radial-gradient(ellipse at 28% 48%, rgba(255,120,140,.35) 0%, transparent 28%),
    radial-gradient(ellipse at 72% 48%, rgba(255,120,140,.35) 0%, transparent 28%);
  mix-blend-mode: soft-light;
}
.pc-cam-fx-cool {
  background: linear-gradient(135deg, rgba(160,200,255,.25), transparent 40%, rgba(255,160,220,.2));
  mix-blend-mode: soft-light;
}
.pc-cam-fx-vig {
  background: radial-gradient(ellipse at center, transparent 45%, rgba(40,10,30,.45) 100%);
  mix-blend-mode: multiply;
}
.pc-cam-fx-spark {
  background:
    radial-gradient(circle at 22% 24%, rgba(255,255,255,.55) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 78% 30%, rgba(255,255,255,.4) 0 1px, transparent 2px),
    radial-gradient(circle at 65% 18%, rgba(255,240,220,.5) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.35) 0 1px, transparent 2px);
  mix-blend-mode: screen;
}
.pc-cam-stage .pc-cam-shot,
.pc-cam-stage .pc-cam-fail { z-index: 4; }
.pc-cam-filters {
  display: none;
  gap: 8px;
  padding: 8px 10px 2px;
  background: #111827;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pc-cam-filters::-webkit-scrollbar { display: none; }
.pc-cam-fchip {
  flex: 0 0 auto;
  width: 64px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-align: center;
}
.pc-cam-fsw {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 4px;
  border-radius: 14px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.pc-cam-fchip.is-on { color: #f9a8d4; }
.pc-cam-fchip.is-on .pc-cam-fsw {
  border-color: #f9a8d4;
  box-shadow: 0 0 0 2px rgba(244,114,182,.28);
}
.pc-cam-fsw-none { background: linear-gradient(135deg,#64748b,#334155); }
.pc-cam-fsw-glass { background: linear-gradient(135deg,#ffe4ec,#ffd6a8 50%,#fff1f8); }
.pc-cam-fsw-doll { background: linear-gradient(135deg,#ffb7d5,#ffd0e8 40%,#fff0f6); }
.pc-cam-fsw-glow { background: linear-gradient(135deg,#fff7ed,#fdba74 45%,#fecdd3); }
.pc-cam-fsw-idol { background: linear-gradient(135deg,#e0e7ff,#fbcfe8 50%,#fef3c7); }
.pc-cam-fsw-film { background: linear-gradient(135deg,#fde68a,#f9a8d4 55%,#c4b5fd); }
.pc-cam-fsw-clear { background: linear-gradient(135deg,#bae6fd,#fce7f3 50%,#fff); }
.pc-cam-fail {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 20px;
  background: rgba(11, 15, 22, 0.92);
  text-align: center;
  z-index: 2;
}
.pc-cam-fail[hidden] { display: none !important; }
.pc-cam-fail p {
  margin: 0;
  color: #f3f4f6;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}
.pc-cam-fail button {
  justify-self: center;
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 18px;
  background: linear-gradient(180deg, #e4c078 0%, #c6a15b 100%);
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}
.pc-cam-shutter {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.85);
  background: linear-gradient(180deg, #e4c078 0%, #c6a15b 100%);
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
}
.pc-cam-shutter:active { transform: scale(0.96); }

/* PC only: native device camera — hide in-web live controls (BP/CVS unchanged) */
.pc-checkin-kc[data-team="PC"] .pc-cam-popup[data-mode="live"] .pc-cam-filters,
.pc-checkin-kc[data-team="PC"] .pc-cam-popup[data-mode="live"] #pc-cam-video,
.pc-checkin-kc[data-team="PC"] .pc-cam-popup[data-mode="live"] .pc-cam-soft,
.pc-checkin-kc[data-team="PC"] .pc-cam-popup[data-mode="live"] .pc-cam-fx,
.pc-checkin-kc[data-team="PC"] .pc-cam-popup[data-mode="live"] .pc-cam-shutter,
.pc-checkin-kc[data-team="PC"] .pc-cam-popup[data-mode="live"] #pc-cam-actions-live {
  display: none !important;
}

/* BP/AP camera: preview shrinks so the shutter stays on screen */
.bp-cam-sheet.pc-cam-overlay {
  place-items: end center;
  padding: 0;
}
.bp-cam-sheet .pc-cam-popup {
  display: flex;
  flex-direction: column;
  width: min(100%, 420px);
  max-height: 100%;
  overflow: hidden;
}
.bp-cam-sheet .pc-cam-bar,
.bp-cam-sheet .pc-cam-meta,
.bp-cam-sheet .pc-cam-filters,
.bp-cam-sheet .pc-cam-actions {
  flex: 0 0 auto;
}
.bp-cam-sheet .pc-cam-actions[hidden],
.bp-cam-sheet .pc-cam-filters[hidden] {
  display: none !important;
}
.bp-cam-sheet .pc-cam-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.bp-cam-sheet video,
.bp-cam-sheet .pc-cam-shot,
.bp-cam-sheet .pc-cam-soft {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  max-height: 100%;
}
.bp-cam-sheet .pc-cam-actions {
  position: relative;
  z-index: 3;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: #121722;
}
@media (max-width: 520px) {
  .pc-cam-overlay {
    place-items: end center;
    padding: 0;
  }
  .pc-cam-popup {
    width: 100%;
    max-height: min(92vh, 780px);
    border-radius: 22px 22px 0 0;
    animation: pc-cam-sheet 0.24s ease-out;
  }
  @keyframes pc-cam-sheet {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
  }
  .bp-cam-sheet .pc-cam-popup {
    max-height: 100svh;
    animation: none;
  }
}
.history-item.has-photo { align-items: stretch; }
.history-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 56px;
}
.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pc-gps {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  background: #f7f8fb;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.pc-gps[data-bp-range="out"] {
  border: 2px solid #dc2626;
  background: #fef2f2;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}
.pc-gps[data-bp-range="out"] .pc-gps-pin {
  background: #dc2626;
}
.pc-gps[data-bp-range="out"] .pc-gps-copy small {
  color: #b42318;
  font-weight: 600;
}
.pc-gps[data-bp-range="in"] {
  border-color: #86efac;
}
.pc-geo-map-wrap {
  margin-top: 10px;
}
.pc-geo-map,
.pc-geo-map.leaflet-container {
  width: 100% !important;
  height: 200px !important;
  min-height: 200px !important;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8eef5;
  z-index: 0;
}
/* Prevent global img rules from breaking Leaflet tiles */
.pc-geo-map .leaflet-tile-pane img,
.pc-geo-map img.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  width: 256px !important;
  height: 256px !important;
}
.pc-geo-map-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.pc-geo-store-icon {
  background: transparent !important;
  border: none !important;
}
.pc-geo-store-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  background: #c6a15b;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(21, 35, 58, 0.35);
}
.pc-geo-store-pin svg {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
  display: block;
}
.pc-geo-user-icon {
  background: transparent;
  border: none;
}
.pc-geo-user-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e88e5;
  border: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.28);
}
.pc-geo-dist-label {
  background: transparent !important;
  border: none !important;
}
.pc-geo-dist-chip {
  display: inline-block;
  transform: translate(-50%, -120%);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(21, 35, 58, 0.88);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
@media (max-width: 600px) {
  .pc-geo-map,
  .pc-geo-map.leaflet-container {
    height: 180px !important;
    min-height: 180px !important;
  }
}
.pc-gps-map {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(198,161,91,0.35), transparent 42%),
    repeating-linear-gradient(90deg, #d9e2ec 0 8px, #cfd8e3 8px 16px),
    repeating-linear-gradient(0deg, #d9e2ec 0 8px, #cfd8e3 8px 16px);
  position: relative;
}
.pc-gps-pin {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--gold);
}
.pc-gps[data-state="ok"] .pc-gps-pin { background: #2e7d32; }
.pc-gps[data-state="idle"] {
  border-color: #fdba74;
  background: #fff7ed;
}
.pc-gps[data-state="idle"] .pc-gps-pin { background: #c2410c; }
.pc-gps[data-state="deny"] .pc-gps-pin,
.pc-gps[data-state="off"] .pc-gps-pin { background: #9aa3b2; }
.pc-gps-copy b { display: block; font-size: 14px; }
.pc-gps-copy small { color: var(--muted); font-size: 12px; }
.pc-gps-retry {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.pc-photo.gps-locked {
  border-color: #fdba74;
  background: #fff7ed;
  opacity: 0.92;
}
.pc-photo.gps-locked .pc-photo-placeholder b { color: #9a3412; }
.pc-photo.gps-locked .pc-photo-placeholder small { color: #c2410c; }
.pc-store-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  background: #fff;
  /* Keep dark text on white field even when app dark theme is on */
  color: #15233a;
  -webkit-text-fill-color: #15233a;
  caret-color: #15233a;
}
.pc-store-input::placeholder {
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
  opacity: 1;
}
.pc-store-input:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
  color: #15233a;
  -webkit-text-fill-color: #15233a;
  caret-color: #15233a;
}
.pc-store-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pc-chip {
  border: 1px solid var(--line);
  background: #f7f8fb;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--navy);
}
.pc-chip.active {
  border-color: var(--gold);
  background: #fbf7ee;
  font-weight: 700;
}
@media (max-width: 720px) {
  .pc-gps { grid-template-columns: 56px 1fr; }
  .pc-gps-map { width: 56px; height: 56px; }
  .pc-gps-retry { grid-column: 1 / -1; }
}


/* Header notification center */
.app-notify-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.45);
}
.app-notify-backdrop[hidden],
.app-notify-panel[hidden] {
  display: none !important;
}
body.app-notify-open {
  overflow: hidden;
}
.app-notify-panel {
  position: fixed;
  z-index: 121;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  /* definite height so flex child can scroll (max-height alone fails on iOS) */
  height: min(72vh, 520px);
  max-height: min(72vh, 520px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-notify-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.app-notify-head h2 {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}
.app-notify-ops-link {
  display: block;
  margin: 10px 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(198, 161, 91, 0.12);
  border: 1px solid rgba(198, 161, 91, 0.35);
  color: inherit;
}
.app-notify-ops-link b {
  display: block;
  font-size: 14px;
  color: var(--navy);
}
.app-notify-ops-link span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted, #64748b);
}
html[data-theme="dark"] .app-notify-head h2 {
  color: #f8fafc;
}
.app-notify-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.app-notify-close:active {
  transform: scale(0.96);
  background: rgba(148, 163, 184, 0.15);
}
.app-notify-list {
  margin: 0;
  padding: 10px 12px 14px;
  flex: 1 1 0; /* basis 0 → takes remaining panel height, then scrolls */
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  /* block layout — flex column was shrinking sections instead of scrolling */
  display: block;
}
.app-notify-sec {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  margin-bottom: 12px;
}
.app-notify-sec:last-child {
  margin-bottom: 0;
}
.app-notify-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  border-top: 3px solid #94a3b8;
}
.app-notify-sec-h b {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
}
.app-notify-sec-h span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 8px;
}
html[data-theme="dark"] .app-notify-sec-h b { color: #f8fafc; }
html[data-theme="dark"] .app-notify-sec-h span { background: #1f2937; color: #cbd5e1; }
.app-notify-sec.tone-out .app-notify-sec-h {
  border-top-color: #f59e0b;
  background: #fffbeb;
}
.app-notify-sec.tone-key .app-notify-sec-h {
  border-top-color: #2563eb;
  background: #eff6ff;
}
.app-notify-sec.tone-late .app-notify-sec-h {
  border-top-color: #dc2626;
  background: #fef2f2;
}
.app-notify-sec.tone-approve .app-notify-sec-h {
  border-top-color: #c6a15b;
  background: rgba(198, 161, 91, 0.12);
}
.app-notify-sec.tone-warn .app-notify-sec-h {
  border-top-color: #ea580c;
  background: #fff7ed;
}
.app-notify-sec.tone-info .app-notify-sec-h {
  border-top-color: #64748b;
  background: #f8fafc;
}
html[data-theme="dark"] .app-notify-sec.tone-out .app-notify-sec-h { background: rgba(245, 158, 11, 0.12); }
html[data-theme="dark"] .app-notify-sec.tone-key .app-notify-sec-h { background: rgba(37, 99, 235, 0.14); }
html[data-theme="dark"] .app-notify-sec.tone-late .app-notify-sec-h { background: rgba(220, 38, 38, 0.14); }
.app-notify-sec-body { display: flex; flex-direction: column; }
.app-notify-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none;
  color: inherit;
}
.app-notify-row:last-child { border-bottom: 0; }
html[data-theme="dark"] .app-notify-row { border-bottom-color: #1f2937; }
.app-notify-row-top {
  display: contents;
}
.app-notify-row strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
html[data-theme="dark"] .app-notify-row strong { color: #f8fafc; }
.app-notify-row small {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}
.app-notify-age {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}
.app-notify-age.hot { color: #dc2626; }
/* legacy flat items (if any page still injects) */
.app-notify-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: var(--bg);
}
.app-notify-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 4px;
}

/* ========== PC desktop shell (CVS/BP keep 980px rules) ========== */
.pc-side-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(198,161,91,0.22);
}
.pc-side-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--navy);
  background: linear-gradient(160deg, #edd089, #c6a15b 55%, #9a7a3a);
}
.pc-side-who { min-width: 0; display: grid; gap: 2px; }
.pc-side-who b {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-side-role {
  font-size: 11px;
  color: rgba(255,255,255,0.58);
  line-height: 1.3;
}
.hq-team-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 18px;
}
.hq-team-cards--side {
  margin: 12px 12px 4px;
}
.hq-team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 4px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(198,161,91,0.22);
  color: rgba(255,255,255,0.72);
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}
a.hq-team-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a.hq-team-card:hover {
  background: rgba(198,161,91,0.16);
  border-color: rgba(198,161,91,0.45);
  color: #fff;
  text-decoration: none;
}
a.hq-team-card:focus-visible {
  outline: 2px solid #c6a15b;
  outline-offset: 2px;
}
.hq-team-card.is-active {
  border-color: rgba(198,161,91,0.6);
  box-shadow: inset 0 0 0 1px rgba(198,161,91,0.3);
  cursor: default;
}
.hq-team-card .pc-side-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 13px;
  pointer-events: none;
}
a.hq-team-card .pc-side-avatar {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
}
.hq-team-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  pointer-events: none;
}
.hq-team-card.is-active .hq-team-label {
  color: #c6a15b;
}
.pc-side-collapse {
  display: none;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: auto;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.pc-side-collapse:hover { background: rgba(255,255,255,0.08); }
.pc-side-collapse-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.pc-side-logout { margin-top: 0; }
.pc-sidebar .brand {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}
.pc-sidebar .brand-logo {
  width: auto;
  max-width: 132px;
  height: auto;
  padding: 6px 8px;
  border-radius: 10px;
  margin-inline: auto;
}
.pc-sidebar .brand .sub {
  margin-top: 0;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  width: 100%;
}
.pc-sidebar .side-nav { margin-top: 14px; }
.leave-layout { display: grid; gap: 14px; }
.payroll-layout { display: grid; gap: 14px; }
.payroll-breakdown {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.payroll-breakdown h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--navy);
}
.payroll-breakdown .payroll-line-list { margin-bottom: 10px; }
.payroll-slip-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.payroll-slip-row .payroll-slip-card { min-width: 0; }
.payroll-slip-quick-dl {
  width: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}
.payroll-slip-quick-dl:hover {
  border-color: rgba(198,161,91,0.55);
  background: #fbf7ee;
}
.payroll-slip-quick-dl:disabled { opacity: 0.55; cursor: wait; }

@media (max-width: 980px) {
  .pc-body .app.pc-shell {
    grid-template-columns: 1fr;
  }
  .pc-body .app.pc-shell .sidebar { display: none; }
  .pc-body .app.pc-shell .main {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 12px 8px 112px;
    box-sizing: border-box;
  }
}

@media (min-width: 981px) {
  .pc-body .app.pc-shell {
    grid-template-columns: 272px 1fr;
    min-height: 100vh;
  }
  .pc-body .app.pc-shell.is-side-collapsed {
    grid-template-columns: 88px 1fr;
  }
  .pc-body .app.pc-shell .sidebar {
    display: flex;
  }
  .pc-body .app.pc-shell .pc-side-collapse {
    display: flex;
  }
  .pc-body .app.pc-shell.is-side-collapsed .nav-text,
  .pc-body .app.pc-shell.is-side-collapsed .brand .sub,
  .pc-body .app.pc-shell.is-side-collapsed .pc-side-who,
  .pc-body .app.pc-shell.is-side-collapsed .pc-side-role {
    display: none;
  }
  .pc-body .app.pc-shell.is-side-collapsed .brand-logo {
    max-width: 48px;
    padding: 4px;
    border-radius: 8px;
  }
  .pc-body .app.pc-shell.is-side-collapsed .pc-side-user {
    justify-content: center;
    padding: 10px;
  }
  .pc-body .app.pc-shell.is-side-collapsed .hq-team-cards {
    grid-template-columns: 1fr;
  }
  .pc-body .app.pc-shell.is-side-collapsed .hq-team-card {
    padding: 8px 4px;
  }
  .pc-body .app.pc-shell.is-side-collapsed .hq-team-label {
    display: none;
  }
  .pc-body .app.pc-shell.is-side-collapsed .side-nav a,
  .pc-body .app.pc-shell.is-side-collapsed .logout-btn,
  .pc-body .app.pc-shell.is-side-collapsed .pc-side-collapse {
    justify-content: center;
    padding-inline: 8px;
  }
  .pc-body .app.pc-shell.is-side-collapsed .pc-side-collapse-ico {
    transform: scaleX(-1);
  }
  .pc-body .bottom-nav.pcd-dock {
    display: none !important;
  }
  .pc-body .app.pc-shell .main {
    width: 100%;
    max-width: none;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
  }
  .pc-body .app.pc-shell .main > .leave-page,
  .pc-body .app.pc-shell .main > .payroll-page,
  .pc-body .app.pc-shell .main > .profile-page,
  .pc-body .app.pc-shell .main > .promotions-shell,
  .pc-body .app.pc-shell .main > .checkin-page,
  .pc-body .app.pc-shell .main > .pcd-home {
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
  }
  .pc-body .promotions-shell {
    max-width: 72rem;
    padding-bottom: 2rem;
  }
  .pc-body .leave-page,
  .pc-body .payroll-page {
    padding-bottom: 2rem;
  }
  .pc-body .leave-tabs { display: none; }
  .pc-body .leave-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
  .pc-body .leave-col-form { order: 1; }
  .pc-body .leave-col-side { order: 2; }
  .pc-body #leave-panel-request,
  .pc-body #leave-panel-history,
  .pc-body #leave-panel-swap {
    display: grid;
    padding-bottom: 0;
  }
  .pc-body #leave-panel-request:not([hidden]),
  .pc-body #leave-panel-history:not([hidden]) {
    display: grid !important;
  }
  .pc-body #leave-panel-request[hidden],
  .pc-body #leave-panel-history[hidden],
  .pc-body #leave-panel-swap[hidden] {
    display: none !important;
  }
  .pc-body #leave-panel-swap:not([hidden]) {
    display: grid !important;
  }
  .pc-body .leave-goto-request { display: none; }
  .pc-body .leave-form-end { display: none; }
  .pc-body .payroll-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
  .pc-body .promo-media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
  .pc-body .payroll-modal-sheet,
  .pc-body .promo-modal-sheet {
    border-radius: 18px;
    margin-bottom: 24px;
    max-height: min(86vh, 760px);
  }
  .pc-body .payroll-modal,
  .pc-body .promo-modal {
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .pc-body .promo-media-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ========== PC desktop UI patterns: tables, hover, dialogs ========== */
.pc-table-wrap { display: none; width: 100%; overflow-x: auto; }
.pc-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}
.pc-data-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pc-data-table td {
  padding: 12px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
  color: var(--navy);
}
.pc-data-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.pc-data-table tbody tr:hover {
  background: #f8fafc;
}
.pc-data-table tbody tr[hidden] { display: none; }
.pc-td-date { white-space: nowrap; font-weight: 600; }
.pc-td-type { min-width: 8rem; }
.pc-td-actions {
  white-space: nowrap;
  text-align: right;
}
.pc-table-muted { color: var(--muted); }
.pc-table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  margin-left: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pc-table-btn:hover {
  background: #f3f0e7;
  border-color: rgba(198,161,91,0.55);
}
.pc-table-btn.ghost {
  background: #f7f8fb;
}
.pc-table-btn.ghost:hover {
  background: #eef1f6;
}

@media (min-width: 981px) {
  .pc-body .leave-history-list,
  .pc-body .payroll-slip-list {
    display: none !important;
  }
  .pc-body .pc-table-wrap {
    display: block;
    margin-top: 8px;
  }

  /* Stronger mouse affordances — no transform (avoids sidebar shake) */
  .pc-body .pc-sidebar .side-nav a,
  .pc-body .pc-sidebar .logout-btn,
  .pc-body .pc-side-collapse {
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }
  .pc-body .pc-sidebar .side-nav a:hover:not(.active) {
    background: rgba(255,255,255,0.12);
    color: #fff;
  }
  .pc-body .pc-sidebar .side-nav a:active,
  .pc-body .pc-sidebar .logout-btn:active,
  .pc-body .pc-side-collapse:active {
    transform: none;
  }
  .pc-body .pc-sidebar .logout-btn:hover {
    background: rgba(242, 201, 198, 0.14);
  }
  .pc-body .pc-sidebar .side-nav { gap: 3px; }
  .pc-body .pc-sidebar .side-nav a,
  .pc-body .pc-sidebar .logout-btn {
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
  }
  .pc-body .pc-sidebar .side-tile { width: 26px; height: 26px; }
  .pc-body .pc-sidebar .nav-ico { width: 18px; height: 18px; }
  .pc-body .leave-quota-card,
  .pc-body .leave-tab,
  .pc-body .leave-attach-pick,
  .pc-body .promo-brand-chip,
  .pc-body .promo-media-card,
  .pc-body .payroll-back {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }
  .pc-body .leave-quota-card:hover {
    border-color: rgba(198,161,91,0.45);
    background: #fbf7ee;
  }
  .pc-body .leave-attach-pick:hover {
    border-color: rgba(198,161,91,0.55);
    background: #fbf7ee;
  }
  .pc-body .promo-media-card:hover {
    border-color: rgba(198,161,91,0.45);
    box-shadow: 0 8px 20px rgba(21,35,58,0.08);
  }
  .pc-body .pc-btn {
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  }
  .pc-body .pc-btn:hover:not(:disabled) {
    filter: brightness(1.04);
    box-shadow: 0 12px 26px rgba(198, 161, 91, 0.34);
  }
  .pc-body .payroll-back:hover {
    color: var(--gold-deep);
  }

  /* Centered dialogs instead of bottom sheets */
  .pc-body .payroll-modal,
  .pc-body .promo-modal {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .pc-body .payroll-modal-sheet,
  .pc-body .promo-modal-sheet {
    width: min(100%, 42rem);
    max-width: 42rem;
    max-height: min(86vh, 760px);
    border-radius: 18px;
    margin: 0;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
    animation: pc-dialog-in 0.22s ease;
  }
  .pc-body .promo-modal-sheet {
    width: min(100%, 36rem);
    max-width: 36rem;
  }
  @keyframes pc-dialog-in {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Promo lightbox as centered stage on desktop */
  .pc-body .promo-lb {
    background: rgba(8, 14, 26, 0.72);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 28px;
  }
  .pc-body .promo-lb-stage {
    width: min(100%, 56rem);
    max-height: min(78vh, 820px);
    background: #0c1422;
    border-radius: 18px;
    padding: 48px 20px 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.45);
  }
  .pc-body .promo-lb-meta {
    width: min(100%, 56rem);
    margin-top: 12px;
    padding: 0 4px;
    border-radius: 0;
  }
  .pc-body .promo-lb-close {
    position: fixed;
    top: 24px;
    right: 24px;
  }
}
.promo-ack {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}
.promo-ack-hint { margin: 0 0 10px; color: #1e3a5f; font-size: 13px; }
.promo-ack-ok { margin: 0; color: #146c43; font-weight: 700; font-size: 13px; }
.promo-ack-btn {
  border: 0;
  background: #15233a;
  color: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.leave-cert-opts {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}
.leave-cert-opt {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #15233a;
}
.leave-duration {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
.leave-duration-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid #d7dde8;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #15233a;
  cursor: pointer;
}
.leave-duration-opt.is-on {
  border-color: #c6a15b;
  background: #fff8e8;
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.2);
}
.leave-duration-opt:has(input:checked) {
  border-color: #c6a15b;
  background: #fff8e8;
  box-shadow: 0 0 0 2px rgba(198, 161, 91, 0.2);
}
.leave-duration-opt input {
  width: 18px;
  height: 18px;
  accent-color: #7a5c22;
}
#leave-half-box {
  margin: 0 0 12px;
}
#leave-to-wrap[hidden],
#leave-half-box[hidden] {
  display: none !important;
}

/* ========== PWA push opt-in banner ========== */
.pwa-push-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
}
.pwa-push-banner[hidden] { display: none !important; }
.pwa-push-banner-inner {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #15233a;
  color: #fff;
  box-shadow: 0 12px 32px rgba(21, 35, 58, 0.35);
  border: 1px solid rgba(198, 161, 91, 0.35);
}
.pwa-push-banner-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #edd089;
  margin-bottom: 4px;
}
.pwa-push-banner-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}
.pwa-push-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pwa-push-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pwa-push-btn.primary {
  background: linear-gradient(160deg, #edd089, #c6a15b 55%, #9a7a3a);
  color: #15233a;
}
.pwa-push-btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
html[data-theme="dark"] .pwa-push-banner-inner {
  background: #0f172a;
}
@media (min-width: 981px) {
  .pwa-push-banner {
    left: auto;
    right: 24px;
    bottom: 24px;
    width: min(380px, calc(100vw - 48px));
  }
}

/* First-login PDPA gate — fullscreen · LINE-style · Diageo gold */
.pdpa-gate {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: #fff;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  margin: 0;
}
.pdpa-gate-modal {
  width: 100%;
  height: 100%;
  max-height: none;
  background: #fff;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
}
.pdpa-gate-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  background: #fff;
}
.pdpa-gate-topbar h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
}
.pdpa-gate-top-cancel {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #efefef;
  color: #333;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pdpa-gate-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  overscroll-behavior: contain;
}
.pdpa-gate-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 8px;
}
.pdpa-gate-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  box-sizing: border-box;
}
.pdpa-gate-brand b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.pdpa-gate-brand small {
  color: var(--muted);
  font-size: 12px;
}
.pdpa-gate-perms {
  padding: 4px 16px 8px;
}
.pdpa-gate-perms h3 {
  margin: 8px 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}
.pdpa-perm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
.pdpa-perm-row:last-child { border-bottom: 0; }
.pdpa-perm-label {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
}
.pdpa-perm-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.pdpa-perm-check {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  pointer-events: none !important;
}
.pdpa-perm-switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #d1d1d6;
  border: 0;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  transition: background .15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.pdpa-perm-switch::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.pdpa-perm-switch.is-on {
  background: linear-gradient(145deg, var(--gold-2), var(--gold), var(--gold-deep));
}
.pdpa-perm-switch.is-on::after {
  transform: translateX(20px);
}
.pdpa-gate-important {
  padding: 4px 16px 20px;
}
.pdpa-doc {
  max-width: 42rem;
  margin: 0 auto;
  color: #1e293b;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.pdpa-doc h3 {
  margin: 4px 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
}
.pdpa-doc ol {
  margin: 0;
  padding-left: 18px;
}
.pdpa-doc li { margin-bottom: 8px; }
.pdpa-doc a { color: #0a66c2; text-decoration: none; }
.pdpa-gate-actions {
  flex: 0 0 auto;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pdpa-gate-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.pdpa-gate-hint.ready {
  color: var(--gold-deep);
  font-weight: 700;
}
.pdpa-gate-btn {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.pdpa-gate-btn.accept {
  background: #c5ccd6;
  color: #fff;
  cursor: not-allowed;
  transition: background .15s ease, box-shadow .15s ease, filter .15s ease;
}
.pdpa-gate-btn.accept.is-ready {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  color: #1a1408;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(154, 122, 58, 0.35);
}
.pdpa-gate-btn.accept.is-ready:hover {
  filter: brightness(1.04);
  box-shadow: 0 6px 18px rgba(154, 122, 58, 0.42);
}
.pdpa-gate-btn.deny {
  background: transparent;
  color: #8e8e93;
  font-size: 15px;
  font-weight: 700;
  min-height: 40px;
}
.pdpa-gate-note {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
}

/* PC ? back to main menu (all subpages via base.html) */
.pc-back-main-wrap {
  padding: 0 16px 8px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.pc-back-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #0b1c2c;
  font-size: 13px;
  font-weight: 800;
  background: #fff;
  border: 1px solid #c6a15b;
  border-radius: 999px;
  padding: 7px 12px;
  box-shadow: 0 1px 0 rgba(198, 161, 91, 0.25);
  line-height: 1.2;
}
.pc-back-main:active {
  transform: scale(0.98);
}
@media (max-width: 720px) {
  .pc-back-main-wrap {
    padding: 0 12px 8px;
  }
}

/* PC sales admin mobile gutters */
@media (max-width: 980px) {
  .app:has(.pas-page) .main {
    padding-left: 8px;
    padding-right: 8px;
  }
  .app:has(.pas-page) .pc-back-main-wrap {
    padding-left: 0;
    padding-right: 0;
  }
}

