:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-accent: #eef1f4;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --surface-ink: #111111;
  --surface-muted: #6e6e73;
  --border: rgba(17, 17, 17, 0.08);
  --border-strong: rgba(17, 17, 17, 0.14);
  --brand: #111111;
  --brand-soft: rgba(17, 17, 17, 0.06);
  --accent: #2f6fed;
  --accent-soft: rgba(47, 111, 237, 0.12);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.1);
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-display: "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
  --nav-offset-bottom: 8px;
  --nav-shell-height: 72px;
  --nav-screen-gap: 12px;
  --screen-bottom-reserve: calc(var(--nav-shell-height) + var(--nav-screen-gap) + var(--nav-offset-bottom) + env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background: #ffffff;
  color: var(--surface-ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.me-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.me-boot,
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 18px var(--screen-bottom-reserve);
}

.me-boot {
  display: grid;
  place-items: center;
}

.me-boot__panel,
.auth-card,
.dashboard-shell,
.sheet__panel,
.toast {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.me-boot__panel,
.auth-card,
.dashboard-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.me-boot__panel {
  width: min(100%, 420px);
  padding: 26px 24px;
}

.me-boot__logo {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.me-boot h1,
.auth-reset__title,
.section-title h2,
.hero-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.me-boot__copy,
.muted,
.detail-row__meta,
.section-copy,
.empty-copy {
  color: var(--surface-muted);
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #ffffff;
}

.auth-reset {
  width: min(100%, 392px);
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.auth-reset__brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-logo--auth {
  width: 44px;
  height: 44px;
}

.auth-reset__header {
  margin-top: 40px;
  text-align: center;
}

.auth-reset__eyebrow {
  margin: 0;
  color: #8e8e93;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-reset__title {
  margin-top: 0;
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.auth-reset__copy {
  margin: 12px 0 0;
  color: #6e6e73;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 30ch;
  margin-inline: auto;
}

.auth-reset__message {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.auth-reset__actions {
  display: grid;
  gap: 10px;
}

.auth-reset__form {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}

.auth-reset__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: -0.01em;
}

.auth-reset__input {
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #d2d2d7;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.auth-reset__input:hover  { border-color: #c7c7cc; }
.auth-reset__input:focus  { border-color: #636366; }

.auth-reset__input--code {
  text-align: center;
  letter-spacing: 0.3em;
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.auth-reset__error {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.08);
  color: #d70015;
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-reset__cancel {
  min-height: 50px;
  border-radius: 12px;
  background: #f2f2f7;
  border: 0;
  color: #3a3a3c;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.12s;
}

.auth-reset__cancel:hover  { background: #e5e5ea; }
.auth-reset__cancel:active { background: #d8d8de; }

.auth-reset__submit {
  width: 100%;
  margin-top: 6px;
  min-height: 56px;
  padding: 0 24px;
  border: none;
  border-radius: 14px;
  background: #111111;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.12s;
}

.auth-reset__submit:hover    { background: #2a2a2a; }
.auth-reset__submit:active   { background: #000000; }
.auth-reset__submit:disabled { opacity: 0.45; cursor: default; }

.auth-reset__footnote {
  margin: 18px 0 0;
  color: #8e8e93;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.primary-button--block,
.secondary-button--block {
  width: 100%;
  justify-content: center;
}

.dashboard-shell > * {
  position: relative;
  z-index: 1;
}

.form-stack {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.field-label {
  display: grid;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #6e6e73;
  letter-spacing: -0.01em;
}

.field-label input {
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid #d2d2d7;
  border-radius: 14px;
  background: #ffffff;
  color: #111111;
  font-size: 1rem;
  box-shadow: none;
}

.field-label input:hover {
  border-color: #c7c7cc;
}

.field-label input::placeholder {
  color: #a1a1a6;
}

.auth-reset__message input[name="auth_code"] {
  text-align: center;
  letter-spacing: 0.28em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.field-label input:focus-visible,
.chip:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.icon-button:focus-visible,
.nav-button:focus-visible,
.sheet-option:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.12);
  outline-offset: 2px;
}

.actions-row,
.chip-row,
.hero-card__chips,
.nav-shell {
  display: flex;
  gap: 10px;
}

.actions-row {
  margin-top: 18px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.icon-button,
.chip,
.sheet-option,
.nav-button {
  min-height: 48px;
  border: none;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.primary-button,
.secondary-button,
.sheet-option,
.nav-button {
  padding: 0 18px;
}

.primary-button {
  background: #111111;
  color: #ffffff;
  font-weight: 700;
  box-shadow: none;
}

.secondary-button,
.chip,
.icon-button,
.nav-button {
  background: #ffffff;
  color: var(--surface-ink);
  border: 1px solid #d9d9df;
}

.secondary-button {
  font-weight: 600;
}

.chip-row {
  flex-wrap: wrap;
}

.chip,
.icon-button {
  padding: 0 14px;
  font-size: 0.94rem;
  font-weight: 700;
}

.chip.is-active,
.sheet-option.is-active,
.nav-button.is-active {
  background: #111111;
  color: #ffffff;
  border-color: transparent;
}

.chip--accent {
  background: #ffffff;
  color: #111111;
  border: 1px solid #d9d9df;
}

.dashboard-screen {
  background: #ffffff;
}

.dashboard-shell {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 0 18px;
  overflow: visible;
}

.dashboard-version {
  margin: 14px 4px 0;
  color: #8f8f96;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.section-title,
.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-title__side {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.section-status-row {
  margin-top: 12px;
}

.dashboard-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0 20px;
  border-bottom: 1px solid #ececf1;
}

.dashboard-topbar__brand {
  display: inline-flex;
  align-items: center;
}

.brand-logo--topbar {
  width: 28px;
  height: 28px;
}

.dashboard-topbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-header {
  padding: 26px 0 0;
}

.dashboard-header--subpage {
  padding-bottom: 0;
}

.dashboard-header__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.dashboard-header__meta {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  color: #6e6e73;
  font-size: 0.96rem;
  line-height: 1.5;
}

.dashboard-header__meta span {
  display: block;
}

.barcode-hero {
  margin-top: 22px;
}

.barcode-hero__graphic {
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid #ececf1;
  background: #ffffff;
}

.barcode-hero__graphic svg {
  width: 100%;
  height: auto;
  display: block;
  color: #111111;
}

.barcode-hero__graphic--empty {
  min-height: 128px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(17, 17, 17, 0.14) 0 2px,
      transparent 2px 6px
    ),
    #ffffff;
}

.barcode-hero__fcid {
  margin: 12px 0 0;
  color: #111111;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dashboard-filterbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.dashboard-filterbar--tight {
  margin-top: 0;
}

.attendance-toolbar {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.period-nav {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.period-nav__label {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #ececf1;
  background: #fafafb;
  text-align: center;
}

.period-nav__label span {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.period-nav__label small {
  margin-top: 2px;
  color: #8e8e93;
  font-size: 0.78rem;
}

.icon-button--nav {
  padding: 0;
  font-size: 1.6rem;
  font-weight: 500;
}

.icon-button:disabled,
.secondary-button:disabled,
.primary-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.section-stack {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.section-stack--single {
  grid-template-columns: minmax(0, 1fr);
}

.section-card {
  padding: 18px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #ececf1;
}

.section-card--highlight {
  background: #ffffff;
}

.section-title h2 {
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.info-list {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.info-list--profile {
  margin-top: 16px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid #ececf1;
}

.info-row:first-child {
  padding-top: 0;
  border-top: none;
}

.info-row__label {
  color: #6e6e73;
  font-size: 0.92rem;
}

.info-row__value {
  color: #111111;
  font-weight: 600;
  text-align: right;
  max-width: 62%;
  overflow-wrap: anywhere;
}

.barcode-block {
  padding: 14px 0;
  border-top: 1px solid #ececf1;
}

.barcode-block__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.barcode-block__value {
  color: #111111;
  font-weight: 600;
  text-align: right;
  max-width: 62%;
  overflow-wrap: anywhere;
  letter-spacing: 0.06em;
}

.barcode-block__graphic {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #ececf1;
  background: #fafafb;
}

.barcode-block__graphic svg {
  width: 100%;
  height: auto;
  display: block;
  color: #111111;
}

.barcode-block__empty {
  margin: 12px 0 0;
  color: #8e8e93;
  font-size: 0.9rem;
  line-height: 1.45;
}

.stat-grid,
.detail-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-tile {
  padding: 16px 14px;
  border-radius: 16px;
  background: #fafafb;
  border: 1px solid #ececf1;
}

.stat-tile__label {
  display: block;
  color: #6e6e73;
  font-size: 0.82rem;
}

.stat-tile__value {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-tile__hint {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: #8e8e93;
}

.detail-list {
  margin-top: 18px;
}

.dashboard-performance-rank {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.attendance-inline-stats {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.attendance-inline-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid #ececf1;
}

.attendance-inline-stat:first-child {
  padding-top: 0;
  border-top: none;
}

.attendance-inline-stat__label {
  color: #6e6e73;
  font-size: 0.95rem;
}

.attendance-inline-stat__value {
  color: #111111;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f3f3f5;
}

.view-tab {
  min-height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6e6e73;
  font-size: 0.84rem;
  font-weight: 700;
}

.view-tab.is-active {
  background: #111111;
  color: #ffffff;
}

.efficiency-view-switch {
  margin-top: 18px;
}

.efficiency-graph-shell {
  margin-top: 12px;
}

.efficiency-graph-wrap {
  overflow: hidden;
}

.efficiency-line-chart {
  display: block;
  width: 100%;
  height: auto;
}

.efficiency-line-chart__guide line {
  stroke: #e4e8ee;
  stroke-width: 1;
}

.efficiency-line-chart__guide line.is-threshold,
.efficiency-line-chart__threshold {
  stroke: #97a1b2;
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
}

.efficiency-line-chart__guide text {
  fill: #737b88;
  font-size: 8px;
}

.efficiency-line-chart__axis {
  stroke: #d3d8e0;
  stroke-width: 1;
}

.efficiency-line-chart__series-line {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.efficiency-line-chart__series-line.is-comparison {
  stroke-width: 2;
  opacity: 0.58;
}

.efficiency-line-chart__series-line.is-gap {
  stroke-dasharray: 4 3;
  opacity: 0.72;
}

.efficiency-line-chart__point circle {
  stroke: #ffffff;
  stroke-width: 1.2;
}

.efficiency-line-chart__point-label,
.efficiency-line-chart__summary-label {
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
  fill: #111111;
  stroke: #ffffff;
  stroke-width: 2.4px;
  paint-order: stroke fill;
}

.efficiency-line-chart__summary rect {
  fill: #e7edf8;
  stroke: #c8d3e3;
  stroke-width: 1;
}

.efficiency-line-chart__summary.is-critical rect {
  fill: #d95353;
  stroke: #d95353;
}

.efficiency-line-chart__summary.is-low rect {
  fill: #f4d3d3;
  stroke: #e8c0c0;
}

.efficiency-line-chart__summary.is-good rect {
  fill: #d8efd9;
  stroke: #c7dfc8;
}

.efficiency-line-chart__summary.is-strong rect {
  fill: #45a45f;
  stroke: #45a45f;
}

.efficiency-line-chart__xlabel,
.efficiency-line-chart__xsub {
  fill: #5e6674;
  font-size: 8px;
  text-anchor: middle;
}

.efficiency-line-chart__xlabel {
  font-weight: 700;
}

.efficiency-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
}

.efficiency-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4a4f58;
  font-size: 0.72rem;
}

.efficiency-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.efficiency-table-wrap {
  margin-top: 12px;
  overflow: hidden;
}

.efficiency-sector-stack {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.efficiency-source-group {
  display: grid;
  gap: 14px;
}

.efficiency-source-group + .efficiency-source-group {
  padding-top: 2px;
  border-top: 1px solid #ececf1;
}

.efficiency-sector-section + .efficiency-sector-section {
  padding-top: 2px;
  border-top: 1px solid #ececf1;
}

.efficiency-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.efficiency-table th,
.efficiency-table td {
  padding: 0;
  border: 1px solid #e7e7ec;
  vertical-align: middle;
}

.efficiency-table__label-head,
.efficiency-table__summary-head {
  padding: 6px 4px;
  color: #6e6e73;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  background: #fafafb;
}

.efficiency-table__label-head {
  width: 84px;
}

.efficiency-table__day-head {
  width: 34px;
}

.efficiency-table__summary-head {
  width: 34px;
}

.efficiency-table__head-button {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  min-height: 40px;
  padding: 4px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #111111;
}

.efficiency-table__head-weekday {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6e6e73;
}

.efficiency-table__head-date {
  font-size: 0.72rem;
  font-weight: 700;
}

.efficiency-table__row-head {
  width: 84px;
}

.efficiency-table__row-label {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 6px 6px 5px;
  background: #ffffff;
  text-align: left;
}

.efficiency-table__row-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.2;
  word-break: break-word;
}

.efficiency-table__row-meta {
  color: #6e6e73;
  font-size: 0.62rem;
  line-height: 1.2;
}

.efficiency-table__summary-cell,
.efficiency-table__metric-cell {
  width: 34px;
}

.efficiency-table__cell-button,
.efficiency-table__cell-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  padding: 4px 2px;
  border: none;
  border-radius: 0;
  background: #ffffff;
  color: #111111;
  text-align: center;
}

.efficiency-table__cell-button.is-critical,
.efficiency-table__cell-value.is-critical {
  background: #d95353;
  color: #ffffff;
}

.efficiency-table__cell-button.is-low,
.efficiency-table__cell-value.is-low {
  background: #f4d3d3;
}

.efficiency-table__cell-button.is-neutral,
.efficiency-table__cell-value.is-neutral {
  background: #e7edf8;
}

.efficiency-table__cell-button.is-good,
.efficiency-table__cell-value.is-good {
  background: #d8efd9;
}

.efficiency-table__cell-button.is-strong,
.efficiency-table__cell-value.is-strong {
  background: #45a45f;
  color: #ffffff;
}

.efficiency-table__cell-button.is-empty,
.efficiency-table__cell-value.is-empty {
  background: #ffffff;
  color: #8e8e93;
}

.efficiency-metric-card__perf {
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.efficiency-metric-card__mistakes {
  margin-top: 2px;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.1;
  color: inherit;
  opacity: 0.86;
}

.efficiency-detail-sheet {
  max-height: min(82vh, 760px);
  overflow-y: auto;
}

.efficiency-detail-card {
  padding: 2px 0 0;
}

.efficiency-detail-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.efficiency-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.efficiency-detail-table th,
.efficiency-detail-table td {
  padding: 12px 0;
  border-top: 1px solid #ececf1;
  text-align: left;
  font-size: 0.9rem;
}

.efficiency-detail-table th {
  color: #6e6e73;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.efficiency-detail-table tbody tr:first-child td {
  border-top: 1px solid #ececf1;
}

.efficiency-detail-table__meta {
  margin-top: 4px;
  color: #6e6e73;
  font-size: 0.78rem;
  line-height: 1.4;
}

.efficiency-mistake-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.efficiency-mistake-item {
  padding: 14px;
  border: 1px solid #ececf1;
  border-radius: 16px;
  background: #fafafb;
}

.efficiency-mistake-item.is-reviewed {
  opacity: 0.74;
}

.efficiency-mistake-item h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
}

.efficiency-mistake-item__meta,
.efficiency-mistake-item__body,
.efficiency-mistake-item__feedback {
  margin: 8px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #5f6673;
}

.efficiency-mistake-item__feedback {
  color: #111111;
}

.attendance-matrix {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.attendance-matrix--labeled .attendance-matrix__row {
  grid-template-columns: 3rem repeat(7, minmax(0, 1fr));
}

.attendance-matrix__row--header {
  margin-bottom: 2px;
}

.attendance-matrix__day-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #6e6e73;
  text-align: center;
  padding: 2px 0;
}

.attendance-matrix__week-label {
  font-size: 0.7rem;
  color: #6e6e73;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.attendance-matrix__cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  min-height: 28px;
  background: #f3f3f5;
}

.attendance-matrix__cell--none {
  background: #f3f3f5;
}

.attendance-matrix__cell--worked {
  background: #c8e6c9;
  color: #2e7d32;
}

.attendance-matrix__cell--planned {
  background: #e8f5e9;
  color: #388e3c;
}

.attendance-matrix__cell--today {
  box-shadow: inset 0 0 0 2px #1565c0;
}

.attendance-matrix__cell--sick {
  background: #fce4ec;
  color: #ad1457;
}

.attendance-matrix__cell--noshow {
  background: #ffcdd2;
  color: #c62828;
}

.attendance-matrix__cell--vacation {
  background: #e3f2fd;
  color: #1565c0;
}

.attendance-matrix__cell--off {
  background: #e3f2fd;
  color: #1565c0;
}

.attendance-matrix__cell--out {
  background: transparent;
  visibility: hidden;
}

.attendance-matrix__cell--clickable {
  cursor: pointer;
}

.attendance-matrix__cell--clickable:hover {
  filter: brightness(0.92);
}

.attendance-matrix__cell--tapped {
  animation: cell-outline-flash 0.4s ease forwards;
}

@keyframes cell-outline-flash {
  0%   { outline: 2.5px solid rgba(17, 17, 17, 0);    outline-offset: 0;   }
  25%  { outline: 2.5px solid rgba(17, 17, 17, 0.55); outline-offset: 2px; }
  100% { outline: 2.5px solid rgba(17, 17, 17, 0);    outline-offset: 5px; }
}

.attendance-row--highlight {
  animation: attendance-row-highlight 1.4s ease forwards;
}

@keyframes attendance-row-highlight {
  0%   { border-color: #111111; }
  60%  { border-color: #111111; }
  100% { border-color: #ececf1; }
}

.attendance-day-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.attendance-row {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #ececf1;
  background: #fafafb;
}

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

.attendance-row__head-side {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.attendance-row__title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.attendance-row__subtitle {
  margin: 6px 0 0;
  color: #8e8e93;
  font-size: 0.86rem;
  line-height: 1.45;
}

.attendance-row__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  column-gap: 12px;
  row-gap: 10px;
  margin-top: 14px;
}

.attendance-row__grid-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.attendance-row__cells {
  display: grid;
  gap: 10px;
}

.attendance-shift-cell {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #ececf1;
  border-radius: 14px;
  background: #ffffff;
}

.attendance-shift-cell__eyebrow {
  color: #8e8e93;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.attendance-row__line {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.attendance-row__line-main {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.attendance-row__label {
  color: #8e8e93;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.attendance-row__value {
  font-size: 0.96rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.attendance-row__value-end--alert {
  color: #c62828;
  font-weight: 700;
}

.attendance-row__value-start--alert {
  color: #c62828;
  font-weight: 700;
}

.attendance-row__value--crossed {
  text-decoration: line-through;
  color: #8e8e93;
}

.attendance-row__info-button {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border: none;
  background: transparent !important;
  color: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  align-self: center;
  justify-self: end;
  box-shadow: none;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
}

.attendance-row__info-icon {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  background: transparent;
}

.attendance-row__info-button:focus-visible {
  outline: 3px solid rgba(17, 17, 17, 0.12);
  outline-offset: 2px;
}

.attendance-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.attendance-row__meta--cell {
  margin-top: 0;
}

.attendance-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e2e2e7;
  background: #ffffff;
  color: #6e6e73;
  font-size: 0.78rem;
  font-weight: 600;
}

.attendance-meta-pill--danger {
  border-color: #f1cccc;
  background: #fff4f4;
  color: #c62828;
}

.attendance-meta-pill--warning {
  border-color: #f0ddb0;
  background: #fff8e8;
  color: #a56b00;
}

.detail-row {
  padding: 14px 0;
  border-top: 1px solid #ececf1;
}

.detail-row:first-child {
  padding-top: 0;
  border-top: none;
}

.detail-row__title {
  margin: 0;
  font-weight: 700;
}

.detail-row__meta {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge--brand {
  background: rgba(17, 17, 17, 0.06);
  color: #111111;
}

.badge--accent {
  background: rgba(17, 17, 17, 0.06);
  color: #111111;
}

.badge--danger {
  background: rgba(17, 17, 17, 0.1);
  color: #111111;
}

.badge--muted {
  background: #f3f3f5;
  color: #6e6e73;
}

.empty-copy {
  margin: 18px 0 0;
  line-height: 1.45;
}

.loading-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 144px;
  place-content: center;
  color: #6e6e73;
  text-align: center;
}

.loading-panel p {
  margin: 0;
}

.loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #ececf1;
  background: #fafafb;
  color: #6e6e73;
  font-size: 0.78rem;
  font-weight: 600;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d9dce3;
  border-top-color: #111111;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #ececf1;
  background: #fafafb;
  color: #111111;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-shell {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(var(--nav-offset-bottom) + env(safe-area-inset-bottom));
  z-index: 1;
  padding: 10px;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e5e5ea;
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
}

.nav-button {
  flex: 1 1 0;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  align-items: end;
  padding: 12px;
  background: rgba(22, 26, 33, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sheet__panel {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 28px 28px 20px 20px;
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  border: 1px solid #e5e5ea;
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.08);
  transform: translateY(12px);
  transition: transform 180ms ease;
}

.sheet.is-open .sheet__panel {
  transform: translateY(0);
}

.sheet__grabber {
  width: 44px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(29, 36, 48, 0.14);
}

.sheet__header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.sheet__header p {
  margin: 6px 0 0;
  color: var(--surface-muted);
  line-height: 1.45;
}

.sheet__stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.sheet-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  color: var(--surface-ink);
  font-weight: 700;
}

.sheet-option__meta {
  display: block;
  margin-top: 4px;
  color: var(--surface-muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.toast-wrap {
  position: fixed;
  left: 16px;
  right: 16px;
  top: calc(14px + env(safe-area-inset-top));
  z-index: 20;
}

.toast {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(31, 36, 47, 0.92);
  color: #fff9f2;
  box-shadow: 0 18px 30px rgba(29, 36, 48, 0.18);
}

.toast--success {
  background: rgba(17, 17, 17, 0.94);
}

.toast--warn {
  background: rgba(44, 44, 46, 0.94);
}

.toast--error {
  background: rgba(28, 28, 30, 0.94);
}

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

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

@media (min-width: 720px) {
  .auth-screen {
    padding: 32px;
  }

  .auth-reset {
    padding: 34px 32px 26px;
  }

  .screen {
    padding-top: 28px;
  }

  .dashboard-shell {
    padding: 0 0 24px;
  }

  .section-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .section-card--full {
    grid-column: 1 / -1;
  }

  .nav-shell {
    left: 50%;
    right: auto;
    width: min(520px, calc(100vw - 48px));
    bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }
}

@media (max-width: 719px) {
  :root {
    --nav-offset-bottom: 6px;
    --nav-shell-height: 64px;
    --nav-screen-gap: 10px;
  }

  .screen {
    padding: 18px 14px var(--screen-bottom-reserve);
  }

  .auth-screen {
    padding: 18px;
  }

  .auth-reset {
    width: 100%;
    padding: 24px 20px 20px;
  }

  .dashboard-shell {
    padding: 0 0 8px;
  }

  .nav-shell {
    left: 12px;
    right: 12px;
    padding: 8px;
  }

  .nav-button {
    min-height: 48px;
    font-size: 0.78rem;
  }

  .period-nav {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .period-nav__label {
    min-height: 44px;
  }

  .efficiency-table__label-head,
  .efficiency-table__row-head {
    width: 76px;
  }

  .efficiency-table__day-head,
  .efficiency-table__summary-cell,
  .efficiency-table__metric-cell {
    width: 34px;
  }

  .efficiency-table__cell-button,
  .efficiency-table__cell-value,
  .efficiency-table__head-button {
    min-height: 50px;
    padding: 3px 2px;
  }

  .efficiency-table__row-title {
    font-size: 0.68rem;
  }

  .efficiency-table__row-meta {
    font-size: 0.58rem;
  }

  .efficiency-metric-card__perf {
    font-size: 0.66rem;
  }

  .efficiency-metric-card__mistakes {
    font-size: 0.54rem;
  }

  .attendance-weekday-bar-track {
    height: 96px;
    padding: 4px;
  }

  .attendance-row__head {
    flex-direction: column;
  }

  .barcode-block__header {
    flex-direction: column;
    gap: 6px;
  }

  .barcode-block__value {
    max-width: 100%;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ── Shift Detail Sheet ──────────────────────────────────────────────────── */

.shift-detail-backdrop {
  z-index: 200;
}

.shift-detail-sheet {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.shift-detail-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px;
}

.shift-detail-sheet__title h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.2;
}

.shift-detail-sheet__title p,
.shift-detail-sheet__hint {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--surface-muted);
}

.shift-detail-sheet__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0,0,0,0.06);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--surface-ink);
  cursor: pointer;
  line-height: 1;
  margin-top: 2px;
}

/* Tabs */
.shift-detail-tabs {
  display: flex;
  gap: 6px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--ios-separator-opaque, #e5e5ea);
  margin-bottom: 14px;
}

.shift-detail-tab {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  background: #f2f2f7;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--surface-muted);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}

.shift-detail-tab.is-active {
  background: var(--surface-ink, #1d2430);
  border-color: transparent;
  color: #ffffff;
}

/* Scrollable body */
.shift-detail-sheet__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: grid;
  gap: 12px;
  align-content: start;
}

/* Cards inside sheet */
.shift-detail-card {
  border: 1px solid var(--ios-separator-opaque, #e5e5ea);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.shift-detail-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .shift-detail-pair-grid {
    grid-template-columns: 1fr;
  }
}

.shift-detail-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ios-divider, #e5e5ea);
}

.shift-detail-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ios-label-secondary, #3c3c43);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shift-detail-card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ios-label-tertiary, #8e8e93);
  background: var(--ios-fill-secondary, #e5e5ea);
  padding: 1px 8px;
  border-radius: 999px;
}

.shift-detail-card > .section-title,
.shift-detail-card > .shift-detail-saving,
.shift-detail-card > .shift-detail-error,
.shift-detail-card > .empty-copy {
  padding: 12px 14px 0;
}

/* Shift/keytime list rows */
.shift-detail-list {
  display: flex;
  flex-direction: column;
}

.shift-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--ios-divider, #e5e5ea);
  font-size: 0.82rem;
}

.shift-detail-row:last-child {
  border-bottom: none;
}

.shift-detail-row--overridden {
  background: #fff8ec;
}

.shift-detail-row--open {
  background: #f0f6ff;
}

.shift-detail-row__index {
  min-width: 18px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ios-label-tertiary, #8e8e93);
}

.shift-detail-row__main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shift-detail-row__window {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ios-label-primary, #1c1c1e);
}

.shift-detail-row__break-note {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  color: #c17a09;
}

.shift-detail-row__dur {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  color: var(--ios-label-tertiary, #8e8e93);
  margin-left: auto;
  white-space: nowrap;
}

.shift-detail-row__link {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.72rem;
  color: #507ab4;
  font-weight: 700;
  white-space: nowrap;
}

.shift-detail-row__open {
  font-size: 0.72rem;
  color: #507ab4;
  font-style: italic;
  margin-left: 4px;
}

.shift-detail-row__badge {
  font-size: 0.72rem;
  white-space: nowrap;
}

/* Saving state */
.shift-detail-saving {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--surface-muted);
  padding: 4px 0;
}

.shift-detail-error {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff0f0;
  color: #b44444;
  font-size: 0.85rem;
}

/* Edit tables */
.shift-detail-edit-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.shift-detail-edit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.shift-detail-edit-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--surface-muted);
  padding: 4px 8px 6px;
  white-space: nowrap;
}

.shift-detail-edit-table td {
  padding: 5px 6px;
  vertical-align: middle;
}

.shift-detail-edit-table tr.is-overridden td {
  background: #fff8ec;
}

.shift-detail-edit-table tr + tr td {
  border-top: 1px solid #f0f0f5;
}

.shift-detail-edit-table__idx {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-weight: 700;
  color: var(--surface-muted);
  width: 28px;
}

.shift-detail-edit-table__link {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-weight: 700;
  color: #507ab4;
  white-space: nowrap;
}

.shift-detail-edit-table__actions {
  white-space: nowrap;
}

.shift-detail-time-input {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.88rem;
  padding: 4px 6px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  width: 90px;
  background: #fff;
  color: var(--surface-ink);
}

.shift-detail-time-input:focus {
  outline: none;
  border-color: #507ab4;
  box-shadow: 0 0 0 2px rgba(80, 122, 180, 0.18);
}

.shift-detail-time-input:disabled {
  background: #f5f5f7;
  color: var(--surface-muted);
}

/* Action buttons */
.shift-detail-action-btn {
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 100ms;
}

.shift-detail-action-btn + .shift-detail-action-btn {
  margin-left: 5px;
}

.shift-detail-action-btn--save {
  background: var(--surface-ink, #1d2430);
  color: #fff;
}

.shift-detail-action-btn--save:hover:not(:disabled) {
  background: #2d3a4a;
}

.shift-detail-action-btn--reset {
  background: #fff;
  color: #b44444;
  border-color: #f0c0c0;
}

.shift-detail-action-btn--reset:hover:not(:disabled) {
  background: #fff0f0;
}

.shift-detail-action-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Timeline graph (ported from 2.1) */
.day-detail-compare-axis {
  position: relative;
  min-height: 240px;
  border: 1px solid var(--ios-separator-opaque, #d3dde8);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
  padding: 14px 16px 20px;
}

.day-detail-pv-chart {
  position: relative;
  height: 240px;
  --dd-axis-y: 65%;
}

.day-detail-pv-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--dd-axis-y);
  height: 4px;
  transform: translateY(-50%);
  background: #101010;
  border-radius: 2px;
}

.day-detail-pv-plan-marker {
  position: absolute;
  top: calc(var(--dd-axis-y) - 15px);
  height: 30px;
  width: 4px;
  transform: translateX(-50%);
  background: #101010;
  border-radius: 2px;
}

.day-detail-pv-plan-time {
  position: absolute;
  top: calc(var(--dd-axis-y) + 18px);
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  transform-origin: center center;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 11px;
  color: #202a35;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.day-detail-pv-plan-time.crowded-start { margin-left: -8px; }
.day-detail-pv-plan-time.crowded-end   { margin-left:  8px; }

.day-detail-pv-plan-duration {
  position: absolute;
  top: calc(var(--dd-axis-y) + 60px);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  color: #202a35;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-detail-pv-plan-duration.no-plan {
  left: 0;
  width: 100%;
  color: #657789;
}

.day-detail-pv-ts-marker {
  position: absolute;
  top: calc(var(--dd-axis-y) - 80px);
  height: 80px;
  width: 2px;
  transform: translateX(-50%);
  background: #5d6e80;
}

.day-detail-pv-ts-label {
  position: absolute;
  top: calc(var(--dd-axis-y) - 114px);
  transform: translateX(calc(-50% + var(--shift, 0px))) rotate(180deg);
  writing-mode: vertical-rl;
  transform-origin: center center;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  color: #2d3f52;
  white-space: nowrap;
}

.day-detail-pv-work-box {
  position: absolute;
  bottom: calc(100% - var(--dd-axis-y));
  height: 44px;
  min-width: 10px;
  border: 1px solid #7eb891;
  background: rgba(188, 230, 200, 0.72);
  color: #1e5f3d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 4px;
}

.day-detail-pv-work-box.open {
  border-color: #7aa5d2;
  background: rgba(187, 215, 244, 0.72);
  color: #214f81;
}

.day-detail-pv-work-label {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.day-detail-pv-work-box.compact .day-detail-pv-work-label { display: none; }

.day-detail-pv-break-box {
  position: absolute;
  top: calc(var(--dd-axis-y) + 12px);
  height: 18px;
  min-width: 8px;
  border: 1px solid #b9802c;
  background: rgba(248, 220, 174, 0.78);
  z-index: 3;
}

.day-detail-pv-break-box.inferred {
  border-color: #8e7b61;
  background: rgba(218, 206, 188, 0.72);
  border-style: dashed;
}

.day-detail-pv-break-out-label {
  position: absolute;
  top: calc(var(--dd-axis-y) + 34px);
  transform: translateX(-50%);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.25;
  color: #6e4a19;
  background: rgba(255, 246, 226, 0.92);
  border: 1px solid rgba(191, 142, 55, 0.45);
  border-radius: 2px;
  padding: 0 3px;
  z-index: 4;
  pointer-events: none;
}

.day-detail-pv-break-out-label.inferred {
  color: #4f4436;
  background: rgba(238, 231, 219, 0.92);
  border-color: rgba(142, 123, 97, 0.45);
}

.day-detail-pv-break-out-label.compact { font-size: 9px; padding: 0 2px; }

.day-detail-empty {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f2f6fb;
  color: #5d6d7c;
  font-size: 12px;
}

/* Badge variants used in shift detail */
.badge--warn {
  background: rgba(255, 196, 10, 0.18);
  color: #7a5c00;
}
