/* =========================================================
   小满打卡 · design tokens
   ========================================================= */
:root {
  --bg: #f1eee6;
  --paper: #f6f2e9;
  --card: #fffdf9;
  --white: #ffffff;
  --ink: #14231c;
  --ink-2: #33463b;
  --muted: #6d776e;
  --muted-2: #939a91;
  --line: rgba(20, 35, 28, 0.09);
  --line-strong: rgba(20, 35, 28, 0.16);
  --forest: #143f31;
  --forest-2: #1a503e;
  --forest-deep: #0b2a20;
  --lime: #ddf29a;
  --lime-strong: #cbe779;
  --cream: #f5f0e4;
  --coral: #ef8b68;
  --danger: #a84734;
  --danger-soft: #f7e8e2;
  --gold: #a77a3f;
  --shadow-card: 0 12px 30px rgba(17, 45, 35, 0.055);
  --shadow-float: 0 24px 60px rgba(9, 29, 22, 0.22);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --font-sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "SF Pro Display", "Avenir Next", "Segoe UI", "DIN Alternate", "Bahnschrift", var(--font-sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  flex-shrink: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--forest-deep);
  background: var(--lime);
}

:focus-visible {
  outline: 2px solid #7da36c;
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Boot
   ========================================================= */
.auth-body {
  background: var(--forest-deep);
}

.boot-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--cream);
  background:
    radial-gradient(circle at 20% 20%, rgba(93, 137, 100, 0.32), transparent 34%),
    var(--forest-deep);
}

.boot-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.25);
  animation: bootFloat 2.2s ease-in-out infinite;
}

.boot-mark svg {
  width: 100%;
  height: 100%;
}

.boot-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(245, 240, 228, 0.72);
}

.boot-loader {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.boot-loader span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  opacity: 0.35;
  animation: bootDots 1.2s ease-in-out infinite;
}

.boot-loader span:nth-child(2) { animation-delay: 0.15s; }
.boot-loader span:nth-child(3) { animation-delay: 0.3s; }

/* =========================================================
   Login
   ========================================================= */
.login-page {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  color: var(--cream);
  background:
    radial-gradient(circle at 12% 10%, rgba(88, 139, 98, 0.35), transparent 32%),
    radial-gradient(circle at 88% 88%, rgba(221, 242, 154, 0.09), transparent 28%),
    linear-gradient(145deg, #0c2b21 0%, #0a241b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  z-index: 0;
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(245, 240, 228, 0.075);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.orbit-a {
  width: min(68vw, 860px);
  aspect-ratio: 1;
  left: -28vw;
  top: -40vw;
}

.orbit-b {
  width: min(48vw, 620px);
  aspect-ratio: 1;
  right: -20vw;
  bottom: -28vw;
  border-color: rgba(221, 242, 154, 0.13);
}

.orbit-c {
  width: 10px;
  height: 10px;
  border: 0;
  background: var(--lime);
  right: 18%;
  top: 18%;
  opacity: 0.8;
  box-shadow: 0 0 0 7px rgba(221, 242, 154, 0.07);
}

.login-layout {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 424px;
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
}

.login-copy {
  max-width: 560px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 14px;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.brand-en {
  font-size: 8px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: rgba(245, 240, 228, 0.42);
}

.login-headline {
  margin-top: clamp(46px, 7vh, 80px);
  font-size: clamp(44px, 5vw, 66px);
  line-height: 1.14;
  font-weight: 650;
  letter-spacing: -0.055em;
}

.login-headline span {
  color: var(--lime);
}

.login-subcopy {
  max-width: 390px;
  margin-top: 24px;
  color: rgba(245, 240, 228, 0.56);
  font-size: 14px;
  line-height: 1.85;
}

.login-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 23px;
  margin-top: clamp(42px, 7vh, 68px);
  padding-top: 22px;
  border-top: 1px solid rgba(245, 240, 228, 0.12);
  max-width: 480px;
}

.login-feature {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.login-feature-index {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--lime);
}

.login-feature strong {
  font-size: 13px;
  font-weight: 600;
  color: rgba(245, 240, 228, 0.9);
}

.login-feature p {
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(245, 240, 228, 0.4);
}

.login-quote {
  margin-top: clamp(52px, 9vh, 90px);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 228, 0.28);
}

.login-quote::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-right: 11px;
  vertical-align: middle;
  background: rgba(221, 242, 154, 0.35);
}

.mobile-brand {
  display: none;
  align-items: center;
  justify-content: space-between;
  color: var(--cream);
}

.mobile-brand .brand-name {
  color: var(--cream);
}

.mobile-brand .brand-en {
  color: rgba(245, 240, 228, 0.38);
}

.mobile-brand-tag {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(245, 240, 228, 0.43);
  text-transform: uppercase;
}

.login-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.login-card {
  position: relative;
  width: 100%;
  padding: 34px 32px 27px;
  color: var(--ink);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 42%),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-xl);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-card::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 25px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forest);
  opacity: 0.15;
  box-shadow: 12px 0 0 rgba(20, 63, 49, 0.08), 0 12px 0 rgba(20, 63, 49, 0.08);
}

.login-kicker,
.eyebrow {
  font-size: 9.5px;
  line-height: 1.4;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.login-card h2 {
  margin-top: 7px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.login-intro {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.login-form {
  margin-top: 28px;
}

.field {
  display: block;
  min-width: 0;
  margin-bottom: 16px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
}

.field-label small {
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 500;
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(20, 35, 28, 0.12);
  border-radius: 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input-shell:focus-within {
  background: #fffefa;
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(20, 63, 49, 0.075);
}

.input-shell.is-invalid {
  border-color: #c8735e;
  box-shadow: 0 0 0 4px rgba(168, 71, 52, 0.07);
}

.input-shell input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
  font-weight: 550;
}

.input-shell input::placeholder {
  color: #a7a79f;
  font-weight: 400;
  letter-spacing: 0;
}

.input-shell input[name="code"] {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.input-shell input[name="pin"] {
  letter-spacing: 0.24em;
  font-family: var(--font-display);
}

.input-shell input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.input-shell input[type="number"]::-webkit-inner-spin-button,
.input-shell input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-shell input:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.input-prefix {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.input-suffix {
  flex-shrink: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  white-space: nowrap;
}

.input-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: -6px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.input-action:hover {
  color: var(--ink);
  background: rgba(20, 35, 28, 0.05);
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 2px 0 13px;
  padding: 10px 11px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(168, 71, 52, 0.12);
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.55;
}

.form-error svg {
  margin-top: 1px;
}

.login-submit,
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.login-submit {
  width: 100%;
  height: 54px;
  padding: 0 10px 0 18px;
  color: var(--cream);
  background: var(--forest);
  box-shadow: 0 12px 22px rgba(20, 63, 49, 0.16);
  font-size: 14px;
}

.login-submit:hover {
  background: var(--forest-deep);
  box-shadow: 0 14px 26px rgba(20, 63, 49, 0.22);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit .submit-label {
  flex: 1;
  text-align: left;
}

.login-submit .submit-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--forest-deep);
  background: var(--lime);
}

.login-submit:disabled {
  opacity: 0.65;
}

.login-submit .spinner {
  color: var(--lime);
}

.demo-block {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed rgba(20, 35, 28, 0.14);
}

.demo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.demo-head strong {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.demo-head span {
  font-size: 9px;
  color: var(--muted-2);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.demo-account {
  min-width: 0;
  padding: 9px 8px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(20, 35, 28, 0.08);
  border-radius: 11px;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.demo-account:hover {
  background: #fffefa;
  border-color: rgba(20, 63, 49, 0.24);
  transform: translateY(-1px);
}

.demo-account:active {
  transform: translateY(0);
}

.demo-account.is-selected {
  background: #fffefa;
  border-color: var(--forest);
  box-shadow: 0 0 0 2px rgba(20, 63, 49, 0.06);
}

.demo-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--forest);
  opacity: 0.35;
}

.demo-account.is-admin .demo-dot {
  background: var(--gold);
  opacity: 1;
}

.demo-code {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.demo-more {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.login-card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 19px;
  color: var(--muted-2);
  font-size: 9.5px;
}

/* =========================================================
   App frame
   ========================================================= */
body.app-body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(91, 137, 99, 0.45), transparent 42%),
    #102c22;
}

.app-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  height: calc(100dvh - 32px);
  margin: 16px auto;
  overflow: hidden;
  background: var(--bg);
  border-radius: 34px;
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.34);
}

.app-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.app-scroll::-webkit-scrollbar {
  display: none;
}

.page {
  min-height: 100%;
  padding-bottom: 118px;
  animation: pageIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 27px 21px 14px;
}

.topbar-copy {
  min-width: 0;
}

.topbar .eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eyebrow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--forest);
  opacity: 0.35;
}

.topbar h1 {
  margin-top: 5px;
  font-size: 25px;
  line-height: 1.24;
  font-weight: 680;
  letter-spacing: -0.045em;
}

.topbar-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.avatar-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  padding: 0;
  color: var(--forest-deep);
  background: var(--lime);
  border: 1px solid rgba(20, 35, 28, 0.07);
  border-radius: 15px;
  box-shadow: 0 7px 18px rgba(20, 35, 28, 0.08);
  font-size: 15px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.avatar-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(20, 35, 28, 0.11);
}

.avatar-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  background: var(--forest);
  border: 2px solid var(--bg);
  border-radius: 50%;
}

.page-content {
  padding: 0 20px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  padding: 0;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: background 160ms ease, border-color 160ms ease;
}

.icon-button:hover {
  background: var(--white);
  border-color: var(--line-strong);
}

/* =========================================================
   Bottom navigation
   ========================================================= */
.bottom-nav {
  position: absolute;
  right: 13px;
  bottom: 13px;
  left: 13px;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 6px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 40, 30, 0.13);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 50px;
  padding: 0 5px;
  color: var(--muted);
  border-radius: 16px;
  font-size: 10.5px;
  font-weight: 550;
  transition: color 180ms ease, background 180ms ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(20, 35, 28, 0.035);
}

.nav-item.active {
  color: var(--cream);
  background: var(--forest);
  box-shadow: 0 7px 14px rgba(20, 63, 49, 0.18);
}

/* =========================================================
   Home · hero
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 19px 19px 14px;
  color: var(--cream);
  background:
    radial-gradient(circle at 93% 4%, rgba(221, 242, 154, 0.13), transparent 28%),
    linear-gradient(150deg, #194d3a 0%, #0c2c22 68%, #0a281e 100%);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: var(--radius-xl);
  box-shadow: 0 19px 40px rgba(11, 42, 32, 0.22);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -178px;
  right: -170px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(245, 240, 228, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(245, 240, 228, 0.018),
    0 0 0 70px rgba(245, 240, 228, 0.014);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 21%;
  bottom: -68px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(221, 242, 154, 0.08);
  filter: blur(25px);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 25px;
  padding: 0 9px;
  color: rgba(245, 240, 228, 0.72);
  background: rgba(245, 240, 228, 0.07);
  border: 1px solid rgba(245, 240, 228, 0.09);
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(245, 240, 228, 0.42);
}

.status-pill.working {
  color: var(--lime);
  background: rgba(221, 242, 154, 0.1);
  border-color: rgba(221, 242, 154, 0.15);
}

.status-pill.working .status-dot {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(221, 242, 154, 0.09);
  animation: statusPulse 2s ease-out infinite;
}

.status-pill.done {
  color: rgba(245, 240, 228, 0.6);
}

.hero-date {
  color: rgba(245, 240, 228, 0.4);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.07em;
}

.hero-clock-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  margin-top: 21px;
}

.hero-clock {
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 560;
  line-height: 0.95;
  letter-spacing: -0.065em;
  font-variant-numeric: tabular-nums;
}

.hero-seconds {
  padding-bottom: 4px;
  color: rgba(245, 240, 228, 0.35);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hero-sub {
  margin-top: 9px;
  color: rgba(245, 240, 228, 0.47);
  font-size: 10.5px;
  letter-spacing: 0.015em;
}

.hero-sub strong {
  color: var(--lime);
  font-weight: 600;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  padding: 14px 0 16px;
  border-top: 1px solid rgba(245, 240, 228, 0.1);
}

.hero-metric {
  min-width: 0;
  padding: 0 12px;
  border-left: 1px solid rgba(245, 240, 228, 0.09);
}

.hero-metric:first-child {
  padding-left: 1px;
  border-left: 0;
}

.hero-metric:last-child {
  padding-right: 0;
}

.metric-label {
  display: block;
  color: rgba(245, 240, 228, 0.44);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.metric-value {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.metric-value .metric-unit {
  margin-left: 1px;
  color: rgba(245, 240, 228, 0.45);
  font-size: 10px;
  font-weight: 500;
}

.metric-value.is-lime {
  color: var(--lime);
}

.punch-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 57px;
  padding: 0 11px 0 13px;
  color: var(--forest-deep);
  background: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.13);
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, background 180ms ease, box-shadow 180ms ease;
}

.punch-button:hover {
  background: #fffdf7;
  box-shadow: 0 13px 26px rgba(0, 0, 0, 0.17);
}

.punch-button:active {
  transform: scale(0.992);
}

.punch-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 11px;
  border-radius: 11px;
  background: rgba(14, 44, 35, 0.075);
}

.punch-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  color: var(--lime);
  background: var(--forest);
  border-radius: 50%;
}

.punch-button.is-working {
  background: var(--lime);
  border-color: var(--lime-strong);
}

.punch-button.is-working:hover {
  background: #e5f7b1;
}

.punch-button.is-working .punch-icon {
  background: rgba(14, 44, 35, 0.1);
}

.punch-button.is-working .punch-arrow {
  color: var(--lime);
  background: var(--forest-deep);
}

.hero-hint {
  margin-top: 10px;
  color: rgba(245, 240, 228, 0.34);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
  letter-spacing: 0.02em;
}

.hero-correction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  margin: 12px auto 0;
  padding: 13px 16px;
  color: var(--cream);
  background: rgba(245, 240, 228, 0.14);
  border: 1px solid rgba(245, 240, 228, 0.28);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-correction:hover {
  color: var(--forest-deep);
  background: var(--lime);
  border-color: var(--lime);
}

.punch-paused-banner {
  margin-bottom: 14px;
}

.punch-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.correction-notices {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.correction-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}

.correction-alert.is-warning {
  background: #fff8ea;
  border-left-color: #d58b2c;
}

.correction-alert.is-muted {
  background: var(--paper);
  border-left-color: var(--muted-2);
}

.correction-alert-main {
  flex: 1;
  min-width: 0;
}

.correction-alert-main strong {
  display: block;
  font-size: 11px;
  font-weight: 680;
}

.correction-alert-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.correction-alert .text-button {
  flex-shrink: 0;
  white-space: nowrap;
}

/* =========================================================
   Home · sections
   ========================================================= */
.section-block {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 3px 9px;
}

.section-heading h2 {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.section-action-button {
  padding: 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  font-weight: 680;
}

.section-heading .section-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  transition: color 160ms ease;
}

.section-heading .section-link:hover {
  color: var(--ink);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.today-panel {
  padding: 6px 17px 0;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 1px 18px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  color: var(--forest);
  background: #f0f3e6;
  border: 1px dashed rgba(20, 63, 49, 0.2);
  border-radius: 15px;
}

.empty-inline strong {
  display: block;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
}

.empty-inline p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.timeline {
  position: relative;
  padding: 13px 0 3px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 27px;
  bottom: 26px;
  left: 8px;
  border-left: 1px dashed rgba(20, 35, 28, 0.17);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 6px 0;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid rgba(20, 63, 49, 0.18);
  border-radius: 50%;
}

.timeline-marker::after {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--forest);
  border-radius: 50%;
}

.timeline-marker.is-out::after {
  background: var(--coral);
}

.timeline-marker.is-pending {
  border-style: dashed;
}

.timeline-marker.is-pending::after {
  width: 5px;
  height: 5px;
  background: transparent;
  border: 1.5px solid var(--coral);
}

.timeline-content {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.timeline-label {
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 550;
}

.timeline-label small {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 400;
}

.timeline-time {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.timeline-time.is-pending {
  color: var(--coral);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
}

.today-payline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  padding: 13px 0 15px;
  border-top: 1px solid var(--line);
}

.today-payline-label {
  color: var(--muted);
  font-size: 10px;
}

.today-payline-label em {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9px;
  font-style: normal;
}

.today-payline strong {
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.month-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 22px;
  padding: 19px 19px 16px;
  color: var(--forest-deep);
  background:
    radial-gradient(circle at 86% 10%, rgba(255, 255, 255, 0.42), transparent 31%),
    linear-gradient(145deg, #e8f4c1 0%, #d9ec9f 100%);
  border: 1px solid rgba(20, 63, 49, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 34px rgba(62, 91, 34, 0.11);
}

.month-card::after {
  content: "¥";
  position: absolute;
  z-index: -1;
  right: -7px;
  bottom: -78px;
  color: rgba(20, 63, 49, 0.055);
  font-family: var(--font-display);
  font-size: 205px;
  font-weight: 700;
  line-height: 1;
}

.month-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.month-kicker {
  color: rgba(11, 42, 32, 0.55);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.month-amount {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.month-amount .currency {
  margin-right: 3px;
  font-size: 16px;
  font-weight: 550;
  vertical-align: 3px;
}

.month-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--forest-deep);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  transition: background 160ms ease, transform 160ms ease;
}

.month-arrow:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(1px);
}

.month-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(11, 42, 32, 0.13);
}

.month-stat {
  padding-left: 13px;
  border-left: 1px solid rgba(11, 42, 32, 0.1);
}

.month-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.month-stat > span {
  display: block;
  color: rgba(11, 42, 32, 0.49);
  font-size: 8.5px;
  font-weight: 500;
}

.month-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--forest-deep);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.month-stat strong .unit {
  margin-left: 1px;
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 500;
  color: rgba(11, 42, 32, 0.54);
}

.month-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: rgba(11, 42, 32, 0.46);
  font-size: 8.5px;
}

.month-foot .live-note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.month-foot .live-note::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--forest);
  opacity: 0.38;
}

.month-foot a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--forest-deep);
  font-size: 9.5px;
  font-weight: 650;
}

/* =========================================================
   Month navigator + records
   ========================================================= */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding: 7px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.month-nav-button {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  color: var(--ink-2);
  background: #f2eee5;
  border: 0;
  border-radius: 10px;
  transition: background 160ms ease, opacity 160ms ease;
}

.month-nav-button:hover:not(:disabled) {
  background: #eae5da;
}

.month-nav-button:disabled {
  opacity: 0.24;
}

.month-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.month-nav-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.month-nav-label .month-year {
  margin-right: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
}

.current-month-tag {
  padding: 2px 6px;
  color: var(--forest);
  background: #e9f2ca;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.summary-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
  padding: 16px 8px;
}

.summary-cell {
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

.summary-cell:first-child {
  padding-left: 11px;
  border-left: 0;
}

.summary-cell > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.summary-cell strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.summary-cell strong .unit {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 500;
}

.records-section {
  margin-top: 21px;
}

.record-list {
  overflow: hidden;
}

.record-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 13px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

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

.record-row:hover {
  background: rgba(241, 238, 230, 0.52);
}

.date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 50px;
  flex-shrink: 0;
  background: #f2eee5;
  border: 1px solid rgba(20, 35, 28, 0.04);
  border-radius: 13px;
}

.date-tile.is-today {
  background: #e9f2c9;
  border-color: rgba(20, 63, 49, 0.08);
}

.date-tile strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.date-tile span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
}

.record-main {
  flex: 1;
  min-width: 0;
}

.record-times {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.record-times .dash {
  color: var(--muted-2);
  font-weight: 400;
}

.record-times .segment-count {
  margin-left: 1px;
  padding: 1px 4px;
  color: var(--muted);
  background: #f2eee5;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 7.5px;
  font-weight: 500;
}

.record-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.record-meta .meta-separator {
  width: 2px;
  height: 2px;
  background: var(--muted-2);
  border-radius: 50%;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  color: #8a3e28;
  background: #f8e4d9;
  border-radius: 4px;
  font-size: 7.5px;
  font-weight: 600;
}

.live-badge::before {
  content: "";
  width: 3px;
  height: 3px;
  background: var(--coral);
  border-radius: 50%;
}

.record-pay {
  flex-shrink: 0;
  text-align: right;
}

.record-pay strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.record-pay span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.record-chevron {
  margin-left: -2px;
  color: var(--muted-2);
}

.empty-state {
  padding: 45px 22px 47px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 13px;
  color: var(--forest);
  background: #eef2e3;
  border: 1px dashed rgba(20, 63, 49, 0.18);
  border-radius: 19px;
}

.empty-state h3 {
  font-size: 13px;
  font-weight: 650;
}

.empty-state p {
  max-width: 230px;
  margin: 5px auto 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.page-note {
  margin: 10px 4px 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.6;
}

/* =========================================================
   Salary
   ========================================================= */
.salary-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 2px;
  padding: 20px 20px 17px;
  color: var(--cream);
  background:
    radial-gradient(circle at 87% 12%, rgba(221, 242, 154, 0.16), transparent 28%),
    linear-gradient(150deg, #184b39 0%, #0b2a20 75%);
  border-radius: var(--radius-xl);
  box-shadow: 0 19px 40px rgba(11, 42, 32, 0.22);
}

.salary-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -92px;
  bottom: -160px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(221, 242, 154, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgba(221, 242, 154, 0.035),
    0 0 0 58px rgba(221, 242, 154, 0.02);
}

.salary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.salary-kicker {
  color: rgba(245, 240, 228, 0.44);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.salary-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  color: var(--lime);
  background: rgba(221, 242, 154, 0.1);
  border: 1px solid rgba(221, 242, 154, 0.14);
  border-radius: 7px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.salary-amount {
  margin-top: 23px;
  font-family: var(--font-display);
  font-size: 43px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.salary-amount .currency {
  margin-right: 4px;
  color: rgba(245, 240, 228, 0.6);
  font-size: 20px;
  font-weight: 500;
  vertical-align: 7px;
}

.salary-caption {
  margin-top: 9px;
  color: rgba(245, 240, 228, 0.38);
  font-size: 9px;
  letter-spacing: 0.015em;
}

.salary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 23px;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 240, 228, 0.1);
}

.salary-stat {
  padding-left: 13px;
  border-left: 1px solid rgba(245, 240, 228, 0.09);
}

.salary-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.salary-stat > span {
  display: block;
  color: rgba(245, 240, 228, 0.37);
  font-size: 8.5px;
}

.salary-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.salary-stat strong .unit {
  margin-left: 2px;
  color: rgba(245, 240, 228, 0.42);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 400;
}

.salary-section {
  margin-top: 22px;
}

.breakdown-card {
  padding: 4px 17px 2px;
}

.breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--line);
}

.breakdown-head h2 {
  font-size: 12px;
  font-weight: 680;
}

.breakdown-head span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.money-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

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

.money-label {
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 550;
}

.money-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 400;
}

.money-value {
  flex-shrink: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.money-row.total {
  margin: 2px -2px 0;
  padding: 14px 2px 15px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 0;
}

.money-row.total .money-label {
  font-size: 12px;
  font-weight: 680;
}

.money-row.total .money-value {
  color: var(--forest);
  font-size: 19px;
  font-weight: 680;
}

.salary-days {
  overflow: hidden;
}

.salary-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

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

.salary-day-date {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.salary-day-date strong {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.salary-day-date span {
  color: var(--muted);
  font-size: 8.5px;
}

.salary-day-right {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.salary-day-hours {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.salary-day-amount {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.rules-card {
  padding: 18px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.55), transparent 45%),
    #ebe6d9;
  border: 1px solid rgba(20, 35, 28, 0.08);
  border-radius: var(--radius-lg);
}

.rules-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rules-card h2 {
  font-size: 13px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.rules-card .rule-tag {
  padding: 3px 7px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.56);
  border-radius: 5px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.rule-step {
  display: flex;
  gap: 11px;
  margin-top: 15px;
}

.rule-step-index {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  color: var(--forest);
  border: 1px solid rgba(20, 63, 49, 0.19);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
}

.rule-step strong {
  display: block;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
}

.rule-step p {
  margin-top: 2px;
  color: rgba(20, 35, 28, 0.53);
  font-size: 9px;
  line-height: 1.65;
}

.salary-disclaimer {
  margin: 14px 4px 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.7;
}

/* =========================================================
   Profile
   ========================================================= */
.profile-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px;
  color: var(--cream);
  background:
    radial-gradient(circle at 100% 0%, rgba(221, 242, 154, 0.14), transparent 32%),
    linear-gradient(145deg, #184a38, #0b2a20);
  border-radius: var(--radius-xl);
  box-shadow: 0 19px 40px rgba(11, 42, 32, 0.22);
}

.profile-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -68px;
  bottom: -135px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(245, 240, 228, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(245, 240, 228, 0.025);
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  color: var(--forest-deep);
  background: var(--lime);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}

.profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-name-row h2 {
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.role-badge {
  padding: 2px 6px;
  color: var(--lime);
  background: rgba(221, 242, 154, 0.1);
  border: 1px solid rgba(221, 242, 154, 0.13);
  border-radius: 5px;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.profile-code {
  margin-top: 4px;
  color: rgba(245, 240, 228, 0.4);
  font-family: var(--font-display);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.profile-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(245, 240, 228, 0.1);
}

.profile-mini-stat {
  padding-left: 14px;
  border-left: 1px solid rgba(245, 240, 228, 0.09);
}

.profile-mini-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.profile-mini-stat > span {
  color: rgba(245, 240, 228, 0.37);
  font-size: 8.5px;
}

.profile-mini-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 560;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.profile-mini-stat strong .unit {
  margin-left: 2px;
  color: rgba(245, 240, 228, 0.4);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
}

.profile-card {
  margin-top: 20px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}

.profile-card-head h2 {
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.profile-card-head span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.profile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}

.profile-info-row:first-of-type {
  border-top: 0;
}

.profile-info-label {
  color: var(--muted);
  font-size: 10px;
}

.profile-info-value {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.profile-info-value .unit {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 400;
}

.profile-menu {
  margin-top: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.menu-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 11px;
  padding: 14px 15px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

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

.menu-row:hover {
  background: rgba(241, 238, 230, 0.5);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--forest);
  background: #eef2e3;
  border-radius: 9px;
}

.menu-content {
  flex: 1;
  min-width: 0;
}

.menu-content strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
}

.menu-content span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.menu-chevron {
  color: var(--muted-2);
}

.logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 46px;
  margin-top: 20px;
  color: var(--danger);
  background: transparent;
  border: 1px solid rgba(168, 71, 52, 0.16);
  border-radius: 14px;
  font-size: 10.5px;
  font-weight: 600;
  transition: background 160ms ease;
}

.logout-button:hover {
  background: rgba(247, 232, 226, 0.6);
}

.profile-footer {
  margin-top: 22px;
  padding-bottom: 6px;
  color: var(--muted-2);
  font-size: 8px;
  text-align: center;
  line-height: 1.8;
}

.profile-quote {
  margin-top: 22px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* =========================================================
   Admin
   ========================================================= */
.admin-shell .page {
  padding-bottom: 30px;
}

.admin-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 2px;
  padding: 20px;
  color: var(--cream);
  background:
    radial-gradient(circle at 91% 8%, rgba(221, 242, 154, 0.15), transparent 30%),
    linear-gradient(145deg, #194b39, #0b2a20);
  border-radius: var(--radius-xl);
  box-shadow: 0 19px 40px rgba(11, 42, 32, 0.22);
}

.admin-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -105px;
  top: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(245, 240, 228, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(245, 240, 228, 0.022);
}

.admin-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-hero-label {
  color: rgba(245, 240, 228, 0.42);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.admin-hero-badge {
  padding: 3px 7px;
  color: var(--lime);
  background: rgba(221, 242, 154, 0.1);
  border: 1px solid rgba(221, 242, 154, 0.13);
  border-radius: 6px;
  font-size: 8px;
  font-weight: 600;
}

.admin-amount {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.admin-amount .currency {
  margin-right: 4px;
  color: rgba(245, 240, 228, 0.5);
  font-size: 18px;
  font-weight: 500;
  vertical-align: 6px;
}

.admin-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 21px;
  padding-top: 13px;
  border-top: 1px solid rgba(245, 240, 228, 0.1);
}

.admin-hero-stat {
  padding-left: 13px;
  border-left: 1px solid rgba(245, 240, 228, 0.09);
}

.admin-hero-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.admin-hero-stat > span {
  display: block;
  color: rgba(245, 240, 228, 0.36);
  font-size: 8.5px;
}

.admin-hero-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.admin-hero-stat strong .unit {
  margin-left: 2px;
  color: rgba(245, 240, 228, 0.4);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 400;
}

.admin-section {
  margin-top: 22px;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 3px 9px;
}

.admin-section-head h2 {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.button-compact {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 29px;
  padding: 0 10px;
  color: var(--cream);
  background: var(--forest);
  border: 0;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  transition: background 160ms ease;
}

.button-compact:hover {
  background: var(--forest-deep);
}

.button-compact.button-outline {
  color: var(--forest);
  background: transparent;
  border: 1px solid var(--line-strong);
}

.button-compact.button-outline:hover {
  background: rgba(20, 63, 49, 0.06);
}

.working-panel {
  padding: 15px 16px;
}

.working-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.working-kicker {
  margin-bottom: 3px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.working-panel-head h2 {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.working-panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9.5px;
}

.working-list {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.working-list.is-window {
  margin-top: 0;
  max-height: 55vh;
  overflow-y: auto;
}

.working-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

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

.working-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: #7aa54a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(122, 165, 74, 0.13);
}

.working-person {
  flex: 1;
  min-width: 120px;
}

.working-person strong {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.working-person span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.working-elapsed {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.working-row .button-mini {
  flex-shrink: 0;
}

.working-empty {
  margin-top: 12px;
  padding: 17px 12px;
  color: var(--muted);
  background: var(--paper);
  border-radius: 12px;
  font-size: 10px;
  text-align: center;
}

.working-empty.is-window {
  margin: 0;
}

.working-more {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 8.5px;
}

.punch-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-color: var(--line);
}

.punch-control.is-paused {
  background: #fff8ea;
  border-color: rgba(213, 139, 44, 0.25);
}

.punch-control-main {
  flex: 1;
  min-width: 0;
}

.punch-control-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.punch-control-title h2 {
  font-size: 12.5px;
  font-weight: 680;
}

.punch-control-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.punch-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 8.5px;
  font-weight: 650;
}

.punch-status span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.punch-status.is-on {
  color: #52713c;
  background: #edf5df;
}

.punch-status.is-off {
  color: var(--danger);
  background: var(--danger-soft);
}

.admin-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  padding: 0 5px;
  color: var(--forest-deep);
  background: var(--lime);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
  vertical-align: 1px;
}

.approval-list {
  overflow: hidden;
}

.approval-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

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

.approval-main {
  flex: 1;
  min-width: 0;
}

.approval-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.approval-title strong {
  font-size: 12px;
  font-weight: 680;
}

.approval-date {
  color: var(--muted-2);
  font-size: 8.5px;
}

.approval-times {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.approval-reason {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.approval-actions {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
}

.button-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.button-mini.is-ghost {
  color: var(--muted);
  background: transparent;
}

.button-mini.is-ghost:hover {
  color: var(--danger);
  border-color: rgba(168, 71, 52, 0.35);
  background: var(--danger-soft);
}

.button-mini.is-primary {
  color: var(--cream);
  background: var(--forest);
  border-color: var(--forest);
}

.button-mini.is-primary:hover {
  background: var(--forest-deep);
}

.button-mini:disabled {
  opacity: 0.62;
}

.exception-list {
  overflow: hidden;
}

.exception-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

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

.exception-person {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 84px;
}

.exception-person strong {
  font-size: 11px;
  font-weight: 650;
}

.exception-time {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
}

.exception-badge {
  flex-shrink: 0;
  padding: 3px 7px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 6px;
  font-size: 8px;
  font-weight: 650;
}

.exception-badge.is-live {
  color: #52713c;
  background: #edf5df;
}

.exception-row .button-mini {
  margin-left: auto;
}

.admin-list {
  overflow: hidden;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 13px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

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

.admin-row:hover {
  background: rgba(241, 238, 230, 0.5);
}

.admin-row.is-inactive {
  opacity: 0.56;
}

.admin-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: var(--forest-deep);
  background: var(--lime);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
}

.admin-row-main {
  flex: 1;
  min-width: 0;
}

.admin-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.admin-name-line strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.admin-code {
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.03em;
}

.admin-inactive-tag {
  padding: 1px 4px;
  color: var(--muted);
  background: #f0ece3;
  border-radius: 4px;
  font-size: 7px;
}

.admin-status {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
}

.admin-status::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
}

.admin-status.is-working {
  color: #52713c;
}

.admin-status.is-working::before {
  background: #7aa54a;
  box-shadow: 0 0 0 3px rgba(122, 165, 74, 0.1);
}

.admin-status.is-done::before {
  background: var(--muted-2);
}

.admin-row-pay {
  flex-shrink: 0;
  text-align: right;
}

.admin-row-pay strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.admin-row-pay span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

.wage-list {
  display: grid;
  gap: 8px;
}

.wage-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px;
  text-align: left;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: background 160ms ease, border-color 160ms ease;
}

.wage-row:hover {
  background: #f0ece3;
  border-color: var(--line-strong);
}

.wage-row-main {
  flex: 1;
  min-width: 0;
}

.wage-row-main strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wage-row-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.wage-row-value {
  flex-shrink: 0;
  text-align: right;
}

.wage-row-value strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.wage-row-value span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

.wage-current {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.wage-current > div {
  flex: 1;
  min-width: 120px;
}

.wage-current span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.wage-current strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.admin-rules {
  padding: 17px;
}

.admin-rules-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-rules-head h2 {
  font-size: 12.5px;
  font-weight: 680;
}

.admin-rules-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.text-button {
  padding: 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  font-size: 9px;
  font-weight: 600;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-rule-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.rule-chip {
  padding: 5px 8px;
  color: var(--ink-2);
  background: #f3efe6;
  border-radius: 6px;
  font-size: 8.5px;
}

.admin-footer {
  margin-top: 22px;
  padding-bottom: 5px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.8;
  text-align: center;
}

/* =========================================================
   Sheets, forms, toasts
   ========================================================= */
body.modal-open {
  overflow: hidden;
}

.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 23, 17, 0.56);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 240ms ease both;
}

.sheet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(500px, 100%);
  max-height: 89dvh;
  overflow: hidden;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-float);
  animation: sheetUp 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sheet-grab {
  width: 37px;
  height: 4px;
  margin: 9px auto 0;
  flex-shrink: 0;
  background: #ddd8cc;
  border-radius: 99px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 21px 12px;
  flex-shrink: 0;
}

.sheet-head-copy {
  min-width: 0;
}

.sheet-title {
  font-size: 18px;
  font-weight: 680;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.sheet-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.sheet-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex-shrink: 0;
  padding: 0;
  color: var(--muted);
  background: #f2eee5;
  border: 0;
  border-radius: 10px;
}

.sheet-close:hover {
  color: var(--ink);
  background: #eae5db;
}

.sheet-body {
  overflow-y: auto;
  padding: 2px 21px 22px;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar {
  display: none;
}

.sheet-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
  padding: 11px 21px calc(17px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 1px solid var(--line);
}

.sheet-actions .btn {
  flex: 1;
}

.btn {
  height: 48px;
  padding: 0 16px;
  font-size: 12.5px;
}

.btn-primary {
  color: var(--cream);
  background: var(--forest);
}

.btn-primary:hover {
  background: var(--forest-deep);
}

.btn-lime {
  color: var(--forest-deep);
  background: var(--lime);
}

.btn-lime:hover {
  background: #e4f6ae;
}

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: #f4f0e7;
}

.btn-danger {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(168, 71, 52, 0.1);
}

.btn-danger:hover {
  background: #f4ddd5;
}

.btn-block {
  width: 100%;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.62;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

.form-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.sheet-form .field:last-of-type {
  margin-bottom: 4px;
}

.field-label .optional {
  color: var(--muted-2);
  font-weight: 400;
}

.field-hint {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.55;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.form-note {
  margin-top: 4px;
  padding: 10px 11px;
  color: #6d6457;
  background: #f4efe4;
  border: 1px solid rgba(20, 35, 28, 0.06);
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.65;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 0 14px;
}

.switch-copy strong {
  display: block;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
}

.switch-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 43px;
  height: 25px;
  flex-shrink: 0;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: #ddd8cd;
  border-radius: 99px;
  transition: background 180ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  background: #fffdf8;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(20, 35, 28, 0.15);
  transition: transform 180ms ease;
}

.switch input:checked + .switch-track {
  background: var(--forest);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid #7da36c;
  outline-offset: 3px;
}

/* Punch sheet */
.punch-confirm {
  padding: 2px 0 8px;
  text-align: center;
}

.punch-confirm-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 1px auto 14px;
  color: var(--forest);
  background: #eef3df;
  border: 1px solid rgba(20, 63, 49, 0.08);
  border-radius: 18px;
}

.punch-confirm-icon.is-out {
  color: #9a4d34;
  background: #faeade;
  border-color: rgba(239, 139, 104, 0.12);
}

.punch-confirm-time {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 580;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.punch-confirm-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.punch-confirm-copy {
  margin: 21px auto 0;
  max-width: 280px;
  padding: 11px 13px;
  color: var(--muted);
  background: #f5f1e8;
  border-radius: 10px;
  font-size: 9.5px;
  line-height: 1.7;
}

.punch-confirm-copy strong {
  color: var(--ink-2);
  font-weight: 650;
}

.sheet-error {
  margin-top: 10px;
}

/* Day detail */
.detail-date-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 0 15px;
  border-bottom: 1px solid var(--line);
}

.detail-date {
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.04em;
}

.detail-weekday {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.detail-pay {
  text-align: right;
}

.detail-pay span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.detail-pay strong {
  display: block;
  margin-top: 3px;
  color: var(--forest);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.detail-shift-list {
  padding: 11px 0 2px;
}

.detail-shift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
}

.detail-shift-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 10px;
}

.detail-shift-label::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--forest);
  border-radius: 50%;
}

.detail-shift-label.is-pending::before {
  background: transparent;
  border: 1px solid var(--coral);
}

.detail-shift-time {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.detail-shift-time .muted {
  color: var(--muted-2);
}

.breakdown-box {
  margin-top: 12px;
  padding: 4px 14px;
  background: #f7f3ea;
  border: 1px solid rgba(20, 35, 28, 0.055);
  border-radius: 14px;
}

.breakdown-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(20, 35, 28, 0.11);
  color: var(--ink-2);
  font-size: 10px;
}

.breakdown-line:last-child {
  border-bottom: 0;
}

.breakdown-line span:last-child {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.breakdown-line.is-total {
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.breakdown-line.is-total span:last-child {
  color: var(--forest);
  font-size: 14px;
  font-weight: 680;
}

.breakdown-line.is-deduction span:last-child {
  color: #9b6046;
}

.detail-note {
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.7;
}

/* Rule sheet */
.rule-sheet-intro {
  padding: 13px 14px;
  color: rgba(20, 35, 28, 0.62);
  background: #f4f0e6;
  border-radius: 11px;
  font-size: 9.5px;
  line-height: 1.75;
}

.rule-sheet-list {
  margin-top: 13px;
}

.rule-sheet-item {
  display: flex;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.rule-sheet-item:last-child {
  border-bottom: 0;
}

.rule-sheet-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--forest);
  background: #edf2dd;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 600;
}

.rule-sheet-item strong {
  display: block;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
}

.rule-sheet-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.rule-sheet-foot {
  margin-top: 13px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.7;
}

.account-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 0 17px;
  border-bottom: 1px solid var(--line);
}

.account-sheet-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--forest-deep);
  background: var(--lime);
  border-radius: 15px;
  font-size: 16px;
  font-weight: 700;
}

.account-sheet-name {
  font-size: 15px;
  font-weight: 680;
}

.account-sheet-meta {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.account-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
}

.account-meta-row span {
  color: var(--muted);
}

.account-meta-row strong {
  color: var(--ink-2);
  font-weight: 600;
}

/* Toast */
.toast-root {
  position: fixed;
  right: 0;
  bottom: calc(94px + env(safe-area-inset-bottom));
  left: 0;
  z-index: 220;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0 20px;
  pointer-events: none;
}

body.auth-body .toast-root {
  bottom: 24px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(420px, 100%);
  padding: 10px 14px;
  color: var(--cream);
  background: rgba(11, 42, 32, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(7, 24, 18, 0.24);
  font-size: 10.5px;
  line-height: 1.45;
  animation: toastIn 240ms ease both;
}

.toast.is-out {
  animation: toastOut 220ms ease both;
}

.toast.error {
  background: rgba(109, 43, 32, 0.95);
}

.toast.success {
  color: var(--forest-deep);
  background: var(--lime);
  border-color: rgba(20, 63, 49, 0.1);
}

/* Punch success */
.punch-success {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 42%, rgba(76, 123, 84, 0.33), transparent 40%),
    linear-gradient(150deg, #154a37, #09251c);
  animation: fadeIn 240ms ease both;
}

.punch-success.is-leaving {
  animation: fadeOut 240ms ease both;
}

.punch-success::before,
.punch-success::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(221, 242, 154, 0.12);
  border-radius: 50%;
}

.punch-success::before {
  width: 380px;
  height: 380px;
}

.punch-success::after {
  width: 540px;
  height: 540px;
  border-color: rgba(245, 240, 228, 0.05);
}

.success-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: successRise 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: var(--forest-deep);
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 12px rgba(221, 242, 154, 0.07);
  animation: successPop 520ms cubic-bezier(0.2, 1.5, 0.35, 1) both;
}

.success-title {
  margin-top: 27px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.success-time {
  margin-top: 7px;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.success-caption {
  margin-top: 15px;
  color: rgba(245, 240, 228, 0.42);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

/* Fatal/loading */
.fatal-state {
  padding: 100px 30px;
  text-align: center;
}

.fatal-mark {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  margin: 0 auto 15px;
  color: var(--forest);
  background: #eaf0dd;
  border-radius: 18px;
}

.fatal-state h2 {
  font-size: 16px;
  font-weight: 680;
}

.fatal-state p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.fatal-state .btn {
  margin-top: 18px;
  height: 40px;
  font-size: 10.5px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #e6e2d8;
  border-radius: 14px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 253, 249, 0.58), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

.skeleton-topline {
  width: 42%;
  height: 10px;
  margin: 0 0 13px 3px;
  border-radius: 5px;
}

.skeleton-title {
  width: 58%;
  height: 25px;
  margin: 0 0 22px 3px;
  border-radius: 8px;
}

.skeleton-hero {
  height: 296px;
  border-radius: var(--radius-xl);
}

.skeleton-row {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 17px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.skeleton-block {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
}

.skeleton-lines {
  flex: 1;
}

.skeleton-line {
  width: 74%;
  height: 10px;
  margin-top: 3px;
  border-radius: 5px;
}

.skeleton-line.short {
  width: 46%;
  margin-top: 9px;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--cream);
  background: var(--forest-deep);
  text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 899px) {
  .login-page {
    align-items: flex-start;
    padding: max(24px, env(safe-area-inset-top)) 16px 32px;
  }

  .login-layout {
    display: flex;
    flex-direction: column;
    width: min(430px, 100%);
    gap: 22px;
  }

  .login-copy {
    display: none;
  }

  .mobile-brand {
    display: flex;
    width: 100%;
  }

  .login-card {
    padding: 28px 24px 23px;
    border-radius: 26px;
  }

  .login-card h2 {
    font-size: 27px;
  }

  .login-card::after {
    display: none;
  }

  .login-page .orbit-a {
    width: 120vw;
    left: -68vw;
    top: -52vw;
  }

  .login-page .orbit-b {
    width: 92vw;
    right: -42vw;
    bottom: -36vw;
  }

  .login-page .orbit-c {
    right: 11%;
    top: 12%;
  }
}

@media (max-width: 620px) {
  body.app-body {
    background: var(--bg);
  }

  .app-shell {
    width: 100%;
    max-width: none;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .page {
    padding-bottom: calc(106px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding: calc(21px + env(safe-area-inset-top)) 18px 12px;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .avatar-button {
    width: 43px;
    height: 43px;
    border-radius: 14px;
  }

  .page-content {
    padding: 0 16px;
  }

  .hero,
  .salary-hero,
  .profile-hero,
  .admin-hero {
    border-radius: 26px;
  }

  .hero {
    padding: 17px 16px 13px;
  }

  .hero-clock {
    font-size: 51px;
  }

  .hero-metrics {
    margin-top: 18px;
    padding-top: 13px;
  }

  .hero-metric {
    padding: 0 9px;
  }

  .metric-value {
    font-size: 15px;
  }

  .bottom-nav {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
  }

  .nav-item {
    height: 48px;
  }

  .sheet-layer {
    padding: 0;
  }

  .sheet-panel {
    width: 100%;
    border-radius: 27px 27px 0 0;
  }

  .toast-root {
    bottom: calc(89px + env(safe-area-inset-bottom));
  }

  .salary-amount {
    font-size: 39px;
  }

  .admin-amount {
    font-size: 37px;
  }

  .month-amount {
    font-size: 30px;
  }
}

@media (min-width: 700px) {
  .sheet-layer {
    align-items: center;
    padding: 22px;
  }

  .sheet-panel {
    border-radius: 27px;
    max-height: min(790px, 90dvh);
  }

  .sheet-actions {
    padding-bottom: 17px;
  }
}

@media (max-width: 380px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .page-content {
    padding: 0 14px;
  }

  .topbar h1 {
    font-size: 21px;
  }

  .hero-clock {
    font-size: 46px;
  }

  .hero-metrics {
    padding-bottom: 14px;
  }

  .hero-metric {
    padding: 0 8px;
  }

  .metric-label {
    font-size: 8px;
  }

  .metric-value {
    font-size: 14px;
  }

  .hero-hint {
    font-size: 8px;
  }

  .punch-button {
    font-size: 14px;
  }

  .month-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .month-amount {
    font-size: 27px;
  }

  .month-stat {
    padding-left: 10px;
  }

  .summary-cell {
    padding: 0 8px;
  }

  .summary-cell strong {
    font-size: 16px;
  }

  .date-tile {
    width: 43px;
    height: 48px;
  }

  .record-row {
    gap: 9px;
    padding: 12px 11px;
  }

  .record-chevron {
    display: none;
  }

  .record-pay strong {
    font-size: 12px;
  }

  .login-card {
    padding: 25px 19px 21px;
  }

  .login-card h2 {
    font-size: 25px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sheet-body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .sheet-head,
  .sheet-actions {
    padding-right: 17px;
    padding-left: 17px;
  }

  .punch-confirm-time {
    font-size: 42px;
  }

  .salary-day-row {
    padding-right: 13px;
    padding-left: 13px;
  }

  .salary-day-right {
    gap: 8px;
  }
}

@media (max-height: 780px) and (min-width: 900px) {
  .login-headline {
    margin-top: 38px;
    font-size: 49px;
  }

  .login-features {
    margin-top: 35px;
  }

  .login-quote {
    margin-top: 42px;
  }

  .login-card {
    padding-top: 27px;
    padding-bottom: 23px;
  }

  .login-form {
    margin-top: 21px;
  }

  .demo-block {
    margin-top: 17px;
    padding-top: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Animations
   ========================================================= */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(5px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@keyframes bootDots {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

@keyframes bootFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(221, 242, 154, 0.2); }
  70% { box-shadow: 0 0 0 5px rgba(221, 242, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(221, 242, 154, 0); }
}

@keyframes successPop {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes successRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
