:root {
  --app-header-height: 3.5rem;
  color-scheme: light;
  --color-body-bg: #f5f7fa;
  --color-body-text: #1f2933;
  --color-surface: #ffffff;
  --color-surface-strong: #f0f3f7;
  --color-surface-muted: #edf1f5;
  --color-border: #ccd5e0;
  --color-border-strong: #b3bdc9;
  --color-control-bg: #f5f5f5;
  --color-control-border: #bdbdbd;
  --color-control-hover-bg: #e7e7e7;
  --color-control-hover-border: #9e9e9e;
  --color-control-active-bg: #e0e0e0;
  --color-control-active-border: #9c9c9c;
  --color-control-text: #1c1c1c;
  --color-disabled-bg: #cfd8dc;
  --color-disabled-text: #607d8b;
  --color-link: #0f4a73;
  --color-muted-text: #616161;
  --color-success: #2e7d32;
  --color-danger: #d32f2f;
  --color-toast-bg: rgba(19, 28, 38, 0.92);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-body-bg: #101418;
  --color-body-text: #e5e9f0;
  --color-surface: #1b2027;
  --color-surface-strong: #232a35;
  --color-surface-muted: #232832;
  --color-border: #343a45;
  --color-border-strong: #4a5260;
  --color-control-bg: #2b303a;
  --color-control-border: #444b58;
  --color-control-hover-bg: #353b47;
  --color-control-hover-border: #596273;
  --color-control-active-bg: #2f3540;
  --color-control-active-border: #596273;
  --color-control-text: #f5f7fa;
  --color-disabled-bg: #2d333d;
  --color-disabled-text: #7f8aa0;
  --color-link: #8cc9ff;
  --color-muted-text: #9ba7ba;
  --color-success: #81c995;
  --color-danger: #ef9a9a;
  --color-toast-bg: rgba(16, 21, 29, 0.92);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --color-body-bg: #101418;
    --color-body-text: #e5e9f0;
    --color-surface: #1b2027;
    --color-surface-strong: #232a35;
    --color-surface-muted: #232832;
    --color-border: #343a45;
    --color-border-strong: #4a5260;
    --color-control-bg: #2b303a;
    --color-control-border: #444b58;
    --color-control-hover-bg: #353b47;
    --color-control-hover-border: #596273;
    --color-control-active-bg: #2f3540;
    --color-control-active-border: #596273;
    --color-control-text: #f5f7fa;
    --color-disabled-bg: #2d333d;
    --color-disabled-text: #7f8aa0;
    --color-link: #8cc9ff;
    --color-muted-text: #9ba7ba;
    --color-success: #81c995;
    --color-danger: #ef9a9a;
    --color-toast-bg: rgba(16, 21, 29, 0.92);
  }
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--color-body-bg);
  color: var(--color-body-text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.page-title {
  text-align: center;
  margin: 1.25rem 0 0.75rem;
  font-size: 2rem;
  letter-spacing: 0.01em;
}

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

a {
  color: var(--color-link);
}
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--color-surface-muted);
  gap: 0.5rem;
  color: var(--color-body-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

.header-status {
  text-align: center;
  min-height: 1.5rem;
}

.network-status {
  opacity: 0;
  transition: opacity 0.4s ease;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.network-status.is-visible,
.network-status.has-clock {
  opacity: 1;
}

.network-status--offline {
  color: var(--color-danger);
}

.network-status--online {
  color: var(--color-success);
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"],
select {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--color-control-bg);
  border: 1px solid var(--color-control-border);
  color: var(--color-control-text);
  box-shadow: none;
  border-radius: 0.5rem;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    box-shadow 0.18s ease, transform 0.1s ease, color 0.18s ease;
}

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

@media (hover: hover) {
  button:hover,
  input[type="button"]:hover,
  input[type="submit"]:hover,
  input[type="reset"]:hover {
    background-color: var(--color-control-hover-bg);
    border-color: var(--color-control-hover-border);
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.12);
    outline: none;
  }
}

button:focus-visible,
input[type="button"]:focus-visible,
input[type="submit"]:focus-visible,
input[type="reset"]:focus-visible {
  background-color: var(--color-control-hover-bg);
  border-color: var(--color-control-hover-border);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.12);
  outline: 0.15rem solid rgba(33, 150, 243, 0.35);
  outline-offset: 0.1rem;
}

button:active,
button[data-pressed="true"],
input[type="button"]:active,
input[type="button"][data-pressed="true"],
input[type="submit"]:active,
input[type="submit"][data-pressed="true"],
input[type="reset"]:active,
input[type="reset"][data-pressed="true"] {
  background-color: var(--color-control-active-bg);
  border-color: var(--color-control-active-border);
  transform: translateY(1px);
  box-shadow: none;
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

input:not([type="button"]):not([type="submit"]):not([type="reset"]),
textarea {
  background-color: var(--color-surface);
  color: var(--color-body-text);
  border: 1px solid var(--color-border);
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

input:not([type="button"]):not([type="submit"]):not([type="reset"]):focus,
textarea:focus {
  border-color: var(--color-control-hover-border);
}

#store-list button, #sheet-list button, #today-store-list button {
  display: block;
  width: 90%;
  margin: 0.5rem auto;
}

.attendance-store-selector {
  margin: 1rem auto;
  text-align: center;
}

.attendance-store-selector__title {
  margin-bottom: 0.25rem;
}

.attendance-store-selector__description {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-muted-text);
}

#multi-store-mode-button {
  background: #e3f2fd;
  border-color: #64b5f6;
  color: #0d47a1;
  font-weight: 600;
}

#multi-store-mode-button:hover,
#multi-store-mode-button:focus-visible {
  background: #bbdefb;
  border-color: #5aa4e6;
  color: #0c3d7f;
  box-shadow: 0 0.35rem 1rem rgba(13, 71, 161, 0.22);
}

#multi-store-mode-button:active {
  background: #9fcaf0;
  border-color: #4c8ecf;
  color: #072c5c;
}

#multi-month-mode-button {
  background: #fff6de;
  border-color: #f0c36b;
  color: #7a5600;
  font-weight: 600;
}

#multi-month-mode-button:hover,
#multi-month-mode-button:focus-visible {
  background: #ffe9b3;
  border-color: #e4a93f;
  color: #684700;
  box-shadow: 0 0.35rem 1rem rgba(122, 86, 0, 0.2);
}

#multi-month-mode-button:active {
  background: #ffd889;
  border-color: #cf8d1f;
  color: #4a3400;
}

#multi-month-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
  z-index: 960;
}

#multi-month-popup {
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: min(30rem, 100%);
  max-height: min(90vh, 34rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

#multi-month-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  text-align: center;
}

#multi-month-description {
  margin: 0 0 1rem;
  text-align: center;
}

#multi-month-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  padding: 0 0.25rem;
  margin: 0 0 1.25rem;
}

.multi-month-option {
  width: 100%;
  margin: 0;
}

.multi-month-option.is-selected {
  background: #0f4a73;
  color: #fff;
  border-color: #0f4a73;
}

.multi-month-option:hover,
.multi-month-option:focus-visible {
  background: #0d3f62;
  border-color: #0d3f62;
  color: #fff;
  box-shadow: 0 0.35rem 1rem rgba(7, 34, 52, 0.25);
}

.multi-month-option:active {
  background: #0b344f;
  border-color: #0b344f;
  color: #fff;
}

#multi-month-select-all {
  align-self: flex-end;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.8rem;
}

#multi-month-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  width: 100%;
}

#multi-month-close,
#multi-month-start {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
}

#multi-month-start {
  background: #0f4a73;
  border-color: #0f4a73;
  color: #fff;
}

#multi-month-start:disabled {
  background: var(--color-disabled-bg);
  border-color: var(--color-disabled-bg);
  color: var(--color-disabled-text);
}

#multi-store-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
  z-index: 970;
}

#multi-store-popup {
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: min(30rem, 100%);
  max-height: min(90vh, 34rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
}

#multi-store-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  text-align: center;
}

#multi-store-description {
  margin: 0 0 1rem;
  text-align: center;
}

#multi-store-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  padding: 0 0.25rem;
  margin: 0 0 1.25rem;
}

.multi-store-option {
  width: 100%;
  margin: 0;
}

.multi-store-option.is-selected {
  background: #0f4a73;
  color: #fff;
  border-color: #0f4a73;
}

#multi-store-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  width: 100%;
}

#multi-store-close,
#multi-store-start {
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
}

#multi-store-start {
  background: #0f4a73;
  border-color: #0f4a73;
  color: #fff;
}

#multi-store-start:disabled {
  background: var(--color-disabled-bg);
  border-color: var(--color-disabled-bg);
  color: var(--color-disabled-text);
}

.store-section {
  width: 90%;
  margin: 1.5rem auto 0;
}

.store-section-title {
  text-align: center;
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.store-sheet-buttons {
  display: flex;
  flex-direction: column;
}

.store-section-empty {
  text-align: center;
  color: var(--color-muted-text);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}

#offline-controls {
  width: 90%;
  margin: 0.5rem auto 1rem;
  text-align: center;
}

#offline-controls button {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0.25rem;
}

.offline-indicator {
  min-height: 1.25rem;
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

.offline-indicator.is-success {
  color: var(--color-success);
}

.offline-indicator.is-error {
  color: var(--color-danger);
}
#base-wage-control {
  margin: 0.5rem 0;
}
#transport-control {
  margin: 0.5rem 0 0.75rem;
}
#base-wage-control input,
#transport-control input {
  width: 4rem;
}
.employees-table-container {
  position: relative;
  margin: 0.75rem 0;
}

.employees-table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
  min-height: 2.25rem;
}

.employees-table-container table {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}
th,
td {
  border: 1px solid var(--color-border);
  padding: 0.25rem;
  text-align: center;
}
#employees thead th {
  padding: 0;
}
#employees thead th .sort-button {
  width: 100%;
  height: 100%;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.4rem 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
#employees thead th .sort-button::after {
  content: '';
  font-size: 0.75rem;
  line-height: 1;
}
#employees thead th .sort-button[data-sort-direction="asc"]::after {
  content: '▲';
}
#employees thead th .sort-button[data-sort-direction="desc"]::after {
  content: '▼';
}

#employees th:nth-child(2),
#employees td:nth-child(2),
#employees th:nth-child(6),
#employees td:nth-child(6) {
  width: 6rem;
}
#employees thead th .sort-button:focus-visible {
  outline: 0.15rem solid rgba(33, 150, 243, 0.45);
  outline-offset: 0.15rem;
}
#employees thead th .sort-button:hover {
  background-color: rgba(15, 74, 115, 0.08);
}
:root[data-theme="dark"] #employees thead th .sort-button:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
#employees th:nth-child(5),
#employees td:nth-child(5) {
  width: 6rem;
}
#actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
#actions button {
  margin: 0;
}
#recalc {
  margin: 1rem;
}

.wage-input,
.transport-input {
  width: 4rem;
}

.copyable-input {
  cursor: pointer;
  background-color: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-body-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.copyable-input:focus {
  outline: none;
  border-color: var(--color-control-hover-border);
  box-shadow: 0 0 0 0.15rem rgba(100, 181, 246, 0.35);
}

#toast-container {
  position: fixed;
  inset: auto 0 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  z-index: 20000;
}

.toast {
  pointer-events: auto;
  background: var(--color-toast-bg);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100% - 2rem);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}


.info-box {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-body-text);
  padding: 0.75rem;
  width: 90%;
  margin: 1rem auto;
  box-shadow: 0 0.75rem 2.5rem rgba(15, 23, 42, 0.08);
}

.quick-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 1rem 1rem;
}

.control-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-body-text);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.control-btn:hover {
  background: var(--color-control-hover-bg);
  border-color: var(--color-control-hover-border);
}

.control-btn:active {
  background: var(--color-control-active-bg);
  border-color: var(--color-control-active-border);
  transform: translateY(1px);
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.loading-message,
.loading-note {
  text-align: center;
  color: var(--color-body-text);
}

.loading-message {
  font-size: 0.95rem;
}

.loading-note {
  font-size: 0.85rem;
}

.loader {
  width: 50px;
  aspect-ratio: 1;
  display: grid;
  border-radius: 50%;
  --loader-arc-strong: rgba(31, 41, 51, 0.9);
  --loader-arc-soft: rgba(31, 41, 51, 0.5);
  --loader-cross-strong: rgba(31, 41, 51, 0.75);
  --loader-cross-soft: rgba(31, 41, 51, 0.3);
  background:
    linear-gradient(0deg, var(--loader-arc-soft) 30%, #0000 0 70%, var(--loader-arc-strong) 0) 50%/8% 100%,
    linear-gradient(90deg, var(--loader-cross-soft) 30%, #0000 0 70%, var(--loader-cross-strong) 0) 50%/100% 8%;
  background-repeat: no-repeat;
  animation: l23 1s infinite steps(12);
}

:root[data-theme="dark"] .loader {
  --loader-arc-strong: rgba(229, 233, 240, 0.92);
  --loader-arc-soft: rgba(229, 233, 240, 0.55);
  --loader-cross-strong: rgba(140, 201, 255, 0.78);
  --loader-cross-soft: rgba(140, 201, 255, 0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .loader {
    --loader-arc-strong: rgba(229, 233, 240, 0.92);
    --loader-arc-soft: rgba(229, 233, 240, 0.55);
    --loader-cross-strong: rgba(140, 201, 255, 0.78);
    --loader-cross-soft: rgba(140, 201, 255, 0.42);
  }
}

.loader::before,
.loader::after {
  content: "";
  grid-area: 1/1;
  border-radius: 50%;
  background: inherit;
  opacity: 0.915;
  transform: rotate(30deg);
}

.loader::after {
  opacity: 0.83;
  transform: rotate(60deg);
}

@keyframes l23 {
  100% {
    transform: rotate(1turn);
  }
}

#pw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#pw-overlay .pw-container {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
}

#pw-overlay .pw-message {
  margin-bottom: 0.5rem;
  position: relative;
}

#pw-overlay .pw-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

#pw-overlay .pw-display {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  position: relative;
}

#pw-overlay .pw-slot {
  display: inline-block;
  width: 1em;
  height: 1em;
  line-height: 1em;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  font-family: monospace;
}

#pw-overlay .pw-keypad {
  display: grid;
  grid-template-columns: repeat(3, 4rem);
  gap: 0.5rem;
  justify-content: center;
}

#pw-overlay .pw-keypad button {
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  padding: 0;
  touch-action: manipulation;
}

#pw-overlay .pw-keypad .pw-empty {
  visibility: hidden;
}

#pw-overlay .pw-note {
  color: var(--color-danger);
  margin-top: 1rem;
}

:root[data-theme="dark"] #pw-overlay .pw-loading {
  background: rgba(16, 20, 24, 0.82);
  color: var(--color-body-text);
}
#help-button {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 900;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: none;
  background: #0f4a73;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.today-button {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 0.75rem 1.5rem;
  min-width: 8.5rem;
  border-radius: 9999px;
  border: 2px solid #0f4a73;
  background: linear-gradient(135deg, #1a679c, #0f4a73);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.22);
  cursor: pointer;
  z-index: 1500;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.today-button:hover,
.today-button:focus-visible {
  transform: translate(-50%, -1px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.26);
  filter: brightness(1.03);
}

.today-button:active {
  transform: translate(-50%, 0) scale(0.98);
}

.theme-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  padding: 0.75rem 1.25rem;
  min-width: 3rem;
  border-radius: 9999px;
  border: 2px solid #111;
  background: #fff;
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  z-index: 1500;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.2);
  outline: none;
}

.theme-toggle:active {
  transform: translateY(1px);
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.15);
}

.theme-toggle:focus-visible {
  outline: 0.15rem solid rgba(33, 150, 243, 0.45);
  outline-offset: 0.15rem;
}

:root[data-theme="dark"] .theme-toggle {
  background: #111;
  color: #fff;
  border-color: #f0f0f0;
  box-shadow: 0 0.65rem 1.85rem rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .theme-toggle:focus-visible {
  box-shadow: 0 0.85rem 2.1rem rgba(0, 0, 0, 0.5);
}

#sort-reset-button {
  padding: 0.35rem 0.85rem;
  min-width: 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-body-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0.35rem 0.85rem rgba(0, 0, 0, 0.12);
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease,
    opacity 0.2s ease;
}

#sort-reset-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  background: var(--color-disabled-bg);
  color: var(--color-disabled-text);
  border-color: var(--color-border);
}

@media (hover: hover) {
  #sort-reset-button:not(:disabled):hover,
  #sort-reset-button:not(:disabled):focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 0.55rem 1.1rem rgba(0, 0, 0, 0.2);
  }
}

#sort-reset-button:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

#sort-reset-button:not(:disabled):focus-visible {
  outline: 0.15rem solid rgba(33, 150, 243, 0.45);
  outline-offset: 0.15rem;
}

:root[data-theme="dark"] #sort-reset-button {
  background: var(--color-surface-muted);
  color: var(--color-body-text);
  border-color: var(--color-border-strong);
  box-shadow: 0 0.45rem 1.25rem rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] #sort-reset-button:disabled {
  background: var(--color-disabled-bg);
  color: var(--color-disabled-text);
  border-color: var(--color-border);
}

#help-button:focus {
  outline: 2px solid #89c2ff;
  outline-offset: 2px;
}

#tutorial-exit-button {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 10001;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: none;
  background: #7d8b9c;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

#tutorial-exit-button:focus {
  outline: 2px solid #89c2ff;
  outline-offset: 2px;
}

#tutorial-overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
  pointer-events: none;
}

#tutorial-overlay.is-visible {
  display: block;
}

#tutorial-overlay-blocker {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

#tutorial-overlay.tutorial-overlay--dimmed #tutorial-overlay-blocker {
  background: rgba(0, 0, 0, 0.55);
}

#tutorial-highlight {
  position: fixed;
  border: 2px solid #68b6ff;
  border-radius: 0.75rem;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
  pointer-events: none;
  z-index: 10001;
}

.tutorial-highlight-target {
  position: relative;
  z-index: auto;
}

.tutorial-highlight-proxy {
  position: absolute;
  pointer-events: none;
  opacity: 0;
}

#tutorial-bubble {
  position: fixed;
  max-width: 24rem;
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: auto;
  line-height: 1.6;
  z-index: 10002;
  transition: top 0.2s ease, left 0.2s ease;
}

#tutorial-bubble::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  transition: left 0.2s ease, top 0.2s ease;
}

#tutorial-bubble.tutorial-bubble--below::before {
  top: -13px;
  border-bottom: 13px solid var(--color-surface);
  left: var(--arrow-left, 1.5rem);
}

#tutorial-bubble.tutorial-bubble--above::before {
  bottom: -13px;
  border-top: 13px solid var(--color-surface);
  left: var(--arrow-left, 1.5rem);
}

.debug-popover {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 1rem;
  z-index: 1010;
}

.debug-popover[hidden] {
  display: none;
}

.debug-popover__inner {
  background: var(--color-surface);
  color: var(--color-body-text);
  border-radius: 0.75rem;
  border: 1px solid var(--color-border-strong);
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.25);
  padding: 0.75rem 1rem 1rem;
  width: min(90vw, 28rem);
  max-height: min(70vh, 28rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.debug-popover__arrow {
  position: absolute;
  top: -0.6rem;
  right: clamp(1.5rem, 35%, 8rem);
  width: 1.1rem;
  height: 1.1rem;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border-strong);
  border-top: 1px solid var(--color-border-strong);
  transform: rotate(45deg);
  box-shadow: -0.35rem -0.35rem 0.6rem rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.debug-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.debug-popover__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.debug-popover__title {
  font-size: 1.05rem;
  font-weight: 700;
}

.debug-popover__close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .debug-popover__close:hover,
  .debug-popover__close:focus-visible {
    background: var(--color-control-hover-bg);
    color: var(--color-control-text);
  }
}

.debug-popover__close:focus-visible {
  outline: 0.15rem solid rgba(33, 150, 243, 0.45);
  outline-offset: 0.15rem;
}

.debug-popover__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.25rem 0.25rem 0;
}

.debug-popover__action-button {
  padding: 0.45rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid var(--color-border-strong);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-strong) 100%);
  color: var(--color-body-text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.debug-popover__action-button:hover,
.debug-popover__action-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 74, 115, 0.16);
}

.debug-popover__action-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.debug-popover__content {
  overflow-y: auto;
  padding-right: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.debug-popover__section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.debug-popover__section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-muted-text);
}

.debug-popover__rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  align-items: start;
}

.debug-popover__label {
  font-size: 0.85rem;
  color: var(--color-muted-text);
  white-space: nowrap;
}

.debug-popover__value {
  font-size: 0.87rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

:root[data-theme="dark"] .debug-popover__inner {
  box-shadow: 0 1.05rem 2.8rem rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .debug-popover__arrow {
  box-shadow: -0.35rem -0.35rem 0.6rem rgba(0, 0, 0, 0.35);
}

#tutorial-bubble.tutorial-bubble--center::before {
  display: none;
}

#tutorial-bubble.tutorial-bubble--no-transition,
#tutorial-bubble.tutorial-bubble--no-transition::before {
  transition: none;
}

#tutorial-bubble-text {
  font-size: 0.95rem;
  color: var(--color-body-text);
}

#tutorial-controls {
  display: flex;
  gap: 0.75rem;
}

#tutorial-prev,
#tutorial-next {
  flex: 1 1 auto;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  color: #fff;
}

#tutorial-prev {
  background: #7d8b9c;
}

#tutorial-prev[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

#tutorial-next {
  background: #0f4a73;
}

.tutorial-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  z-index: 990;
}

.tutorial-modal {
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  width: 100%;
  max-width: 24rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--color-body-text);
}

.tutorial-modal--bubble {
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.25);
}

.tutorial-modal-message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.tutorial-modal-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.tutorial-modal-checkbox input {
  width: 1.1rem;
  height: 1.1rem;
}

.tutorial-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.tutorial-modal-actions--center {
  justify-content: center;
}

.tutorial-modal-button {
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  background: #0f4a73;
  color: #fff;
}

.tutorial-modal-button:focus {
  outline: 2px solid #0f4a73;
  outline-offset: 2px;
}

.tutorial-modal-button--primary {
  background: #0f4a73;
  color: #fff;
}

#ios-pwa-overlay {
  position: fixed;
  inset: 0;
  padding: 1.5rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1700;
}

.ios-pwa-dialog {
  background: var(--color-surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 26rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--color-body-text);
}

.ios-pwa-title {
  margin: 0;
  font-size: 1.25rem;
  text-align: center;
}

.ios-pwa-description {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-body-text);
}

.ios-pwa-steps {
  margin: 0;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.ios-pwa-steps li {
  line-height: 1.6;
}

.ios-pwa-step-icon {
  width: 1.75rem;
  height: 1.75rem;
  margin: 0 0.35rem;
  vertical-align: middle;
  object-fit: contain;
}

.ios-pwa-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ios-pwa-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.ios-pwa-checkbox input {
  width: 1rem;
  height: 1rem;
}

.ios-pwa-actions {
  display: flex;
  justify-content: flex-end;
}

.ios-pwa-close {
  min-width: 6rem;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  background: #0f4a73;
  color: #fff;
  border-color: #0f4a73;
}

.ios-pwa-close:hover,
.ios-pwa-close:focus {
  background: #0c3a59;
  border-color: #0c3a59;
}

#update-overlay {
  position: fixed;
  inset: 0;
  padding: 1.5rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 960;
}

#update-popup {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 22rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
  text-align: center;
  color: var(--color-body-text);
}

#update-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
}

#update-message,
#update-version,
#update-status {
  white-space: pre-line;
  margin: 0 0 0.75rem;
}

#update-version {
  font-weight: bold;
}

#update-status {
  min-height: 1.2em;
  color: var(--color-muted-text);
}

#update-confirm {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

#update-continue {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #d33;
  background: var(--color-surface);
  color: #d33;
}

#update-continue:hover,
#update-continue:focus {
  background: #ffecec;
}

:root[data-theme="dark"] #update-continue:hover,
:root[data-theme="dark"] #update-continue:focus {
  background: rgba(221, 51, 51, 0.2);
}

#update-dismiss-option {
  margin: 1rem 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

#update-dismiss {
  width: 1rem;
  height: 1rem;
}

#update-close {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

#download-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 980;
}

#download-popup {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 90%;
  width: min(18rem, 90%);
  color: var(--color-body-text);
}

#download-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#download-options button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#download-close {
  display: block;
  margin: 1rem auto 0;
}

#download-include-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

#download-include-detail input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
}

#employee-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
  z-index: 970;
}

#employee-detail-popup {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  max-width: 32rem;
  width: min(32rem, 100%);
  max-height: min(90vh, 40rem);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
  text-align: center;
  color: var(--color-body-text);
}

#employee-detail-title {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
}

#employee-detail-summary {
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.employee-detail-summary-line {
  display: block;
  line-height: 1.4;
}

#employee-detail-table-wrapper {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0 0 1.5rem;
}

#employee-detail-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--color-border);
}

#employee-detail-table th,
#employee-detail-table td {
  text-align: left;
  padding: 0.4rem 0.25rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

#employee-detail-table .month-row th {
  background: var(--color-surface-muted);
  font-weight: bold;
  font-size: 1rem;
  border-top: 1px solid var(--color-border);
}

#employee-detail-table .date-cell {
  width: 5rem;
  white-space: nowrap;
}

#employee-detail-table .time-cell {
  white-space: normal;
}

#employee-detail-table .store-cell {
  white-space: normal;
  width: 8rem;
}

#employee-detail-download {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

#employee-detail-close {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#employee-detail-download-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 980;
}

#employee-detail-download-popup {
  background: var(--color-surface);
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 90%;
  width: min(18rem, 90%);
  color: var(--color-body-text);
}

#employee-detail-download-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#employee-detail-download-close {
  display: block;
  margin: 1rem auto 0;
}

.today-page {
  min-height: calc(100vh - var(--app-header-height));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.today-sticky-header {
  position: sticky;
  top: var(--app-header-height);
  z-index: 30;
  padding: 0.75rem 1rem 0.25rem;
  background: transparent;
  box-shadow: none;
}

.today-title {
  margin: 0.25rem 0;
  text-align: center;
}

.today-status {
  text-align: center;
}

.today-summary {
  text-align: center;
  margin: 0.5rem 0 0.2rem;
  color: var(--color-body-text);
}

.today-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.today-summary__text {
  min-width: 0;
}

.today-nav__button {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-body-text);
  font-weight: 700;
  min-width: 4.5rem;
  cursor: pointer;
  box-shadow: 0 0.65rem 1.2rem rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.today-nav__button:hover,
.today-nav__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.75rem 1.3rem rgba(0, 0, 0, 0.12);
}

.today-nav__button:active {
  transform: translateY(1px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.today-nav__button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.today-summary__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.today-summary__subtitle {
  font-size: 0.95rem;
  color: var(--color-muted-text);
}

.today-summary__actions {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.today-today-button {
  padding: 0.35rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border-strong);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-strong) 100%);
  color: var(--color-body-text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 0.6rem 1.2rem rgba(0, 0, 0, 0.08);
}

.today-today-button:hover,
.today-today-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.12);
}

.today-today-button:active {
  transform: translateY(1px);
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.08);
}

.today-today-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.today-scroll-area {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scrollbar-gutter: stable;
  touch-action: pan-y;
}

.today-table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 0.9rem;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-strong) 70%);
  box-shadow: 0 1.4rem 3rem rgba(15, 23, 42, 0.15);
  position: relative;
  scrollbar-gutter: stable both-edges;
}

.today-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
}

.today-table thead th {
  position: sticky;
  top: 0;
  background: var(--color-surface-strong);
  color: var(--color-body-text);
  font-weight: 700;
  text-align: left;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--color-border-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 7;
}

.today-store-header {
  min-width: 11rem;
  background: linear-gradient(180deg, var(--color-surface-strong) 0%, var(--color-surface) 100%);
  box-shadow: inset 0 -1px 0 var(--color-border-strong);
}

.today-store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.today-header-note {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted-text);
  margin-top: 0.15rem;
}

.today-table tbody td,
.today-table tbody th {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.today-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.today-overlay__block {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.55rem;
  border-radius: 1.25rem;
  background: #4a4a4a;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: normal;
  word-break: break-word;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  box-sizing: border-box;
}

.today-overlay__block--active {
  background: #0f4a73;
  box-shadow: 0 8px 18px rgba(15, 74, 115, 0.24);
}

.today-warning-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  z-index: 12000;
  overflow-y: auto;
}

.today-warning-overlay__content {
  width: min(960px, 100%);
  background: #ff1f2d;
  border: 2px solid #ffffff;
  border-radius: 1.25rem;
  padding: clamp(1rem, 3vw, 2.25rem);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.today-warning-overlay__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.today-warning-overlay__list {
  margin: 0 0 0.75rem;
  padding-left: 1rem;
  list-style: none;
}

.today-warning-overlay__list li {
  margin: 0.35rem 0;
  font-weight: 700;
}

.today-warning-overlay__note {
  margin: 0.5rem 0;
  line-height: 1.7;
  font-size: 1rem;
}

.today-warning-overlay__actions {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.today-warning-overlay__button {
  background: #ffffff;
  color: #b00020;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.4rem;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.today-warning-overlay__button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.today-table tbody tr:last-child td,
.today-table tbody tr:last-child th {
  border-bottom: none;
}

.today-table .today-time-cell {
  position: sticky;
  left: 0;
  background: var(--color-surface);
  font-weight: 700;
  min-width: 4.25rem;
  z-index: 10;
  color: var(--color-body-text);
  box-shadow: 6px 0 14px rgba(0, 0, 0, 0.05);
}

.today-time-header {
  top: 0;
  z-index: 12;
  background: var(--color-surface-strong);
  box-shadow: 6px 0 14px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

.today-current-hour-row {
  background: linear-gradient(90deg, rgba(33, 150, 243, 0.18), rgba(33, 150, 243, 0));
}

.today-current-hour-cell {
  background: rgba(33, 150, 243, 0.24);
  color: #0f4a73;
  box-shadow: 6px 0 14px rgba(15, 74, 115, 0.24);
  border-right: 1px solid rgba(15, 74, 115, 0.2);
}

.today-current-hour-row .today-time-cell {
  background: rgba(33, 150, 243, 0.24);
  color: #0f4a73;
  box-shadow: 6px 0 14px rgba(15, 74, 115, 0.24);
}

:root[data-theme="dark"] .today-current-hour-row {
  background: linear-gradient(90deg, rgba(61, 143, 206, 0.28), rgba(61, 143, 206, 0));
}

:root[data-theme="dark"] .today-current-hour-cell {
  background: rgba(61, 143, 206, 0.32);
  color: #e7f3ff;
  box-shadow: 6px 0 14px rgba(15, 74, 115, 0.28);
}

:root[data-theme="dark"] .today-current-hour-row .today-time-cell {
  background: rgba(61, 143, 206, 0.32);
  color: #e7f3ff;
  box-shadow: 6px 0 14px rgba(15, 74, 115, 0.28);
}

.today-current-hour-slot {
  background: rgba(33, 150, 243, 0.06);
}

:root[data-theme="dark"] .today-current-hour-slot {
  background: rgba(61, 143, 206, 0.12);
}

.today-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.today-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 74, 115, 0.12);
  color: var(--color-body-text);
  font-weight: 700;
  border: 1px solid var(--color-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

:root[data-theme="dark"] .today-badge {
  background: rgba(61, 143, 206, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.today-empty {
  color: var(--color-muted-text);
  font-style: italic;
}

.today-beta-alert {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid #f4b4b4;
  background: #fff0f0;
  color: #8a0000;
  font-weight: 700;
  line-height: 1.5;
}

:root[data-theme="dark"] .today-beta-alert {
  border-color: rgba(255, 170, 170, 0.5);
  background: rgba(255, 127, 127, 0.15);
  color: #ffc2c2;
}

.today-warning-list {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border);
  background: rgba(255, 193, 112, 0.15);
  color: #7a4b02;
}

:root[data-theme="dark"] .today-warning-list {
  background: rgba(255, 193, 112, 0.18);
  color: #f3dcb6;
}

.attendance-page {
  max-width: 1180px;
  margin: 0 auto 2rem;
  padding: 0 1rem 2rem;
}

.attendance-controls {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  margin: 0.5rem 0 1rem;
  scroll-margin-top: calc(var(--app-header-height) + 0.5rem);
}

.attendance-date-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.attendance-date-label {
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  min-width: 11ch;
}

.attendance-today-row {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.attendance-status {
  text-align: center;
  color: var(--color-muted-text);
  margin: 0.25rem 0 0.75rem;
}

.attendance-status--error {
  color: var(--color-danger);
}

.timeline-wrapper {
  overflow-x: auto;
  padding-bottom: 1rem;
}

.attendance-grid {
  --hour-height: 48px;
  --timeline-height: calc(var(--hour-height) * 24);
  display: grid;
  grid-template-columns: 64px repeat(var(--store-count, 1), minmax(var(--store-min-width, 120px), 1fr));
  width: max-content;
  min-width: 100%;
  gap: 0.75rem;
  position: relative;
  min-width: 430px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.5rem;
  background: var(--color-surface);
  box-shadow: 0 1rem 2.5rem rgba(10, 20, 40, 0.06);
}

.time-column,
.store-column {
  display: flex;
  flex-direction: column;
}

.store-column {
  position: relative;
}

.time-column {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--color-surface);
  box-shadow: 6px 0 12px rgba(0, 0, 0, 0.06);
  border-radius: 10px;
}

.time-column__header,
.store-column__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  color: var(--color-body-text);
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.time-column__header {
  left: 0;
  z-index: 4;
}

.time-column__spacer {
  min-height: 0;
}

.store-column__header h2 {
  margin: 0;
  font-size: 1rem;
}

.store-column__unparsed {
  padding: var(--unparsed-section-padding, 8px);
  min-height: 0;
}

.store-column__unparsed-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-muted-text);
  margin-bottom: 0.25rem;
}

.store-column__unparsed-line {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-body-text);
  word-break: break-all;
}

.store-column__link {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}

.store-column__link:hover,
.store-column__link:focus-visible {
  text-decoration: underline;
}

.store-column__link--button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.store-column__link--button:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}

.date-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 10500;
  box-sizing: border-box;
}

.date-picker-overlay.is-visible {
  display: flex;
}

.date-picker-modal {
  width: min(440px, 100%);
  background: var(--color-surface);
  color: var(--color-body-text);
  border-radius: 12px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
  border: 1px solid var(--color-border);
}

.date-picker-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.date-picker-description {
  margin: 0 0 0.85rem;
  color: var(--color-muted-text);
}

.date-picker-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.date-picker-label {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.35rem;
}

.date-picker-input {
  width: 100%;
  padding: 0.6rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-body-text);
  font-size: 1rem;
  box-sizing: border-box;
}

.date-picker-input:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
}

.date-picker-error {
  margin: -0.25rem 0 0;
  min-height: 1.2em;
  color: var(--color-danger);
  font-size: 0.9rem;
}

.date-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.date-picker-button {
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-body-text);
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.date-picker-button:hover {
  background: var(--color-control-hover-bg);
  border-color: var(--color-control-hover-border);
}

.date-picker-button:active {
  background: var(--color-control-active-bg);
  border-color: var(--color-control-active-border);
  transform: translateY(1px);
}

.date-picker-button--primary {
  background: var(--color-link);
  color: #ffffff;
  border-color: var(--color-link);
}

.date-picker-button--primary:hover {
  background: var(--color-link-hover);
}

.date-picker-button--primary:active {
  background: var(--color-link-active);
}

.store-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  z-index: 11000;
  box-sizing: border-box;
}

.store-sheet-overlay.is-visible {
  display: flex;
}

.store-sheet-modal {
  background: var(--color-surface);
  color: var(--color-body-text);
  width: min(1100px, 100%);
  height: min(850px, 90vh);
  border-radius: 1rem;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.store-sheet-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.store-sheet-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  flex: 1 1 auto;
}

.store-sheet-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.store-sheet-button {
  background: var(--color-link);
  color: #ffffff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  box-shadow: 0 6px 14px rgba(15, 74, 115, 0.24);
}

.store-sheet-button:hover {
  background: #0c3e62;
}

.store-sheet-button:active {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.store-sheet-button--ghost {
  background: transparent;
  color: var(--color-link);
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.store-sheet-button--ghost:hover {
  background: rgba(15, 74, 115, 0.08);
}

.store-sheet-frame-wrapper {
  position: relative;
  flex: 1 1 auto;
  background: #f3f6fb;
}

.store-sheet-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #ffffff;
}

.store-sheet-note {
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  color: var(--color-muted-text);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.time-column__body,
.store-column__body {
  position: relative;
  height: var(--timeline-height);
}

.time-column__body {
  overflow: visible;
}

.store-column__body {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(2, 136, 209, 0.02);
  box-shadow: inset 0 0 0 1px rgba(99, 115, 129, 0.1);
}

:root[data-theme="dark"] .store-column__body {
  background: rgba(2, 136, 209, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.time-label {
  position: absolute;
  left: 12px;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--color-muted-text);
  font-weight: 700;
}

.time-row-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  pointer-events: none;
  z-index: 0;
}

.time-row-line--major {
  background: rgba(99, 115, 129, 0.22);
}

.time-row-line--minor {
  background: rgba(99, 115, 129, 0.12);
}

.time-row-line--now {
  background: #d32f2f;
  height: 2px;
  opacity: 0.95;
  box-shadow: 0 0 0 1px rgba(211, 47, 47, 0.15);
  z-index: 2;
}

.store-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-muted-text);
  font-style: italic;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  text-align: center;
}

:root[data-theme="dark"] .store-empty {
  background: rgba(255, 255, 255, 0.05);
}

.shift-block {
  position: absolute;
  left: calc(4px + (var(--lane-index, 0) * (var(--shift-lane-width, 43px) + var(--shift-lane-gap, 0px))));
  border-radius: 10px;
  background-color: var(--color-link);
  color: #fff;
  padding: 0.18rem 0.4rem;
  box-shadow: 0 6px 16px rgba(15, 74, 115, 0.22);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
  min-height: 18px;
  min-width: 4.5ch;
  max-width: 6.5ch;
  width: fit-content;
  z-index: 1;
  pointer-events: none;
}

:root[data-theme="dark"] .shift-block {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.shift-block--active {
  background-color: var(--color-success);
  box-shadow: 0 10px 24px rgba(46, 125, 50, 0.3);
}

.shift-block__name {
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-content {
  width: 90%;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem 1rem;
}

.report-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.report-label {
  font-weight: 600;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.report-status {
  margin: 0;
  color: var(--color-muted-text);
}

.report-section-title {
  margin: 0;
}

.report-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.report-hint {
  margin: 0;
  color: var(--color-muted-text);
  font-size: 0.95rem;
}

.report-period {
  margin: 0;
  color: var(--color-muted-text);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.summary-item {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.75rem 0.9rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.06);
}

.summary-label {
  color: var(--color-muted-text);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.summary-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.chart-wrapper {
  position: relative;
  min-height: 260px;
}

#report-chart,
#store-trend-chart,
#employee-trend-chart {
  width: 100%;
  height: 100%;
}

.table-wrapper {
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 0.6rem;
  background: var(--color-surface);
  box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.06);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.report-table th,
.report-table td {
  padding: 0.65rem 0.85rem;
  text-align: right;
  border-bottom: 1px solid var(--color-border);
}

.report-table th:first-child,
.report-table td:first-child {
  text-align: left;
}

.report-table thead {
  background: var(--color-muted-background);
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-table tbody tr:nth-child(odd) {
  background: var(--color-muted-background);
}
