.attendance-monthly-page {
  --monthly-accent: #2563eb;
  --monthly-accent-strong: #1d4ed8;
  --monthly-accent-soft: #eff6ff;
  --monthly-amber: #f59e0b;
  --monthly-amber-soft: #fffbeb;
  --monthly-bg: #f4f6f8;
  --monthly-border: #d9e2ec;
  --monthly-border-strong: #9db2ce;
  --monthly-project-boundary: #cbd5e1;
  --monthly-cyan: #0891b2;
  --monthly-cyan-soft: #ecfeff;
  --monthly-disabled-bg: #f1f5f9;
  --monthly-disabled-border: #d8e1eb;
  --monthly-disabled-text: #94a3b8;
  --monthly-error: #be123c;
  --monthly-error-soft: #fff1f2;
  --monthly-green: #15803d;
  --monthly-green-soft: #f0fdf4;
  --monthly-ink: #111827;
  --monthly-muted: #667085;
  --monthly-panel: rgba(255, 255, 255, 0.9);
  --monthly-row-unavailable: #f1f5f9;
  --monthly-weekend: #fff7ed;
  --monthly-warn: #a16207;
  --monthly-warn-soft: #fefce8;
  --monthly-page-accent: #218777;
  --monthly-grid-cell-padding-x: 4px;
  --monthly-grid-cell-padding-y: 2px;
  --monthly-grid-editor-control-height: 28px;
  --monthly-grid-inline-summary-height: 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 246, 248, 0.88)),
    var(--monthly-bg);
  color: var(--monthly-ink);
  letter-spacing: 0;
}

/* Page frame */
.attendance-monthly-main {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100vh;
  max-width: 100%;
  min-height: 0;
  padding: 14px 18px 16px;
  width: 100%;
}

.attendance-monthly-loading {
  align-items: center;
  backdrop-filter: blur(1px);
  background: rgba(15, 23, 42, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 2000;
}

.attendance-monthly-loading[hidden] {
  display: none;
}

.attendance-monthly-loading-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--monthly-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  color: var(--monthly-ink);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 12px;
  padding: 16px 20px;
}

.attendance-monthly-loading-spinner {
  animation: attendance-monthly-loading-spin 0.8s linear infinite;
  border: 3px solid rgba(33, 135, 119, 0.2);
  border-radius: 50%;
  border-top-color: var(--monthly-page-accent);
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

@keyframes attendance-monthly-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .attendance-monthly-loading-spinner {
    animation: none;
  }
}

/* Header controls */
.attendance-monthly-bar {
  --work-entry-header-accent: var(--monthly-page-accent);
  --work-entry-header-border: var(--monthly-border);
  align-items: center;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) auto;
  margin: 0;
  padding: 10px 16px 10px 28px;
}

.attendance-monthly-title-block {
  min-width: 0;
}

.attendance-monthly-title-user {
  font-size: 14px;
  min-height: 30px;
  padding: 4px 11px;
}

.attendance-monthly-title-user strong {
  font-size: inherit;
}

.attendance-monthly-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.attendance-monthly-period-controls {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 38px 140px 38px 38px;
  order: 4;
}

.attendance-monthly-command-controls {
  align-items: center;
  display: flex;
  gap: 8px;
  order: 0;
}

.attendance-monthly-actions #monthProjectSettingsButton {
  order: 0;
}

.attendance-monthly-actions #submitPageButton {
  order: 1;
}

.attendance-monthly-actions #reviseAttendanceButton {
  order: 2;
}

.attendance-monthly-actions #saveChangesButton {
  order: 3;
}

.attendance-monthly-actions .icon-button {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 7px;
  color: #334155;
  height: 34px;
  min-width: 36px;
}

.attendance-monthly-actions .icon-button:hover,
.attendance-monthly-actions .icon-button:focus {
  background: var(--monthly-accent-soft);
  border-color: #bfdbfe;
  color: var(--monthly-accent-strong);
  outline: none;
}

.attendance-monthly-actions .icon-button[aria-pressed="true"] {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}

.attendance-monthly-actions .icon-button:disabled {
  background: var(--monthly-disabled-bg);
  border-color: var(--monthly-disabled-border);
  color: var(--monthly-disabled-text);
  cursor: not-allowed;
  opacity: 1;
}

.attendance-monthly-actions .icon-button svg,
.attendance-monthly-toggle svg,
.attendance-monthly-primary-button svg,
.attendance-monthly-secondary-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.attendance-monthly-primary-button,
.attendance-monthly-secondary-button {
  align-items: center;
  border-radius: 7px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  gap: 6px;
  height: 38px;
  justify-content: center;
  padding: 0 12px;
  white-space: nowrap;
}

.attendance-monthly-primary-button {
  background: #0f766e;
  border: 1px solid #0f766e;
  color: #ffffff;
}

.attendance-monthly-secondary-button {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  color: #1f2937;
}

.attendance-monthly-project-settings-button,
.attendance-monthly-submit-page-button,
.attendance-monthly-revision-button,
.attendance-monthly-save-header-button {
  flex: 0 0 78px;
  height: 32px;
  min-width: 78px;
  width: 78px;
}

.attendance-monthly-project-settings-button,
.attendance-monthly-submit-page-button,
.attendance-monthly-revision-button,
.attendance-monthly-save-header-button,
#reloadButton:not(:disabled) {
  background: #475467;
  border-color: #475467;
  color: #ffffff;
}

.attendance-monthly-project-settings-button:hover,
.attendance-monthly-project-settings-button:focus,
.attendance-monthly-submit-page-button:hover,
.attendance-monthly-submit-page-button:focus,
.attendance-monthly-revision-button:hover,
.attendance-monthly-revision-button:focus,
.attendance-monthly-save-header-button:hover,
.attendance-monthly-save-header-button:focus,
#reloadButton:not(:disabled):hover,
#reloadButton:not(:disabled):focus {
  background: #344054;
  border-color: #344054;
  color: #ffffff;
  outline: none;
}

.attendance-monthly-primary-button:disabled,
.attendance-monthly-secondary-button:disabled {
  background: #eef2f6;
  border-color: #d7e0ea;
  color: #98a2b3;
  cursor: not-allowed;
}

.attendance-monthly-actions button:focus:not(:focus-visible),
.attendance-monthly-actions button:disabled:focus {
  box-shadow: none;
  outline: none;
}

.attendance-monthly-actions button:not(:disabled):focus-visible {
  box-shadow: none;
  outline: 1px solid #667085;
  outline-offset: 2px;
}

.attendance-monthly-month {
  background: #ffffff;
  border: 1px solid #d7e0ea;
  border-radius: 7px;
  box-sizing: border-box;
  color: var(--monthly-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  height: 34px;
  padding: 4px 10px;
  width: 140px;
}

.attendance-monthly-list-header {
  align-items: center;
  border-bottom: 1px solid var(--monthly-border);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 6px 14px;
  position: relative;
}

.attendance-monthly-list-title {
  align-items: center;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

.attendance-monthly-summary {
  align-items: center;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 0;
}

.attendance-monthly-summary span {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--monthly-border);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--monthly-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 5px;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  padding: 3px 9px;
  text-align: center;
  white-space: nowrap;
}

.attendance-monthly-summary .is-prescribed {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.attendance-monthly-summary .is-actual {
  background: var(--monthly-cyan-soft);
  border-color: #a5f3fc;
  color: var(--monthly-cyan);
}

.attendance-monthly-summary .is-paid-leave {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #be185d;
}

.attendance-monthly-summary .is-overtime {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.attendance-monthly-summary .is-deduction {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.attendance-monthly-summary .is-late-night {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.attendance-monthly-toolbar {
  align-items: center;
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 2px;
}

.attendance-monthly-filter-group,
.attendance-monthly-view-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attendance-monthly-view-group {
  justify-content: flex-end;
}

.attendance-monthly-check {
  align-items: center;
  color: var(--monthly-muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 7px;
  min-height: 38px;
}

.attendance-monthly-check input {
  accent-color: var(--monthly-accent);
  box-sizing: border-box;
  flex: 0 0 16px;
  height: 16px;
  margin: 0;
  min-height: 16px;
  width: 16px;
}

.attendance-monthly-check input:focus {
  box-shadow: none;
  outline: none;
}

.attendance-monthly-check input:focus-visible {
  box-shadow: none;
  outline: 1px solid #667085;
  outline-offset: 2px;
}

.attendance-monthly-toggle,
.attendance-monthly-command {
  align-items: center;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
}

.attendance-monthly-toggle {
  background: #ffffff;
  color: #334155;
}

.attendance-monthly-toggle.is-icon-only {
  min-width: 38px;
  padding: 0;
  width: 38px;
}

.attendance-monthly-toggle svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.attendance-monthly-toggle.active {
  background: var(--monthly-accent-soft);
  border-color: #bfdbfe;
  color: var(--monthly-accent-strong);
}

.attendance-monthly-toggle:disabled,
.attendance-monthly-toggle.is-disabled {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #98a2b3;
  cursor: not-allowed;
}

.attendance-monthly-command {
  background: #ffffff;
  color: #334155;
}

.attendance-monthly-command:disabled {
  background: var(--monthly-disabled-bg);
  border-color: var(--monthly-disabled-border);
  color: var(--monthly-disabled-text);
  cursor: not-allowed;
  opacity: 1;
}

.attendance-monthly-toggle:not(:disabled):not(.is-disabled):hover,
.attendance-monthly-toggle:not(:disabled):not(.is-disabled):focus-visible,
.attendance-monthly-command:not(:disabled):hover,
.attendance-monthly-command:not(:disabled):focus {
  background: var(--monthly-accent-soft);
  border-color: #bfdbfe;
  color: var(--monthly-accent-strong);
  outline: none;
}

.attendance-monthly-month:focus,
.attendance-monthly-command:focus,
.attendance-monthly-actions .icon-button:focus {
  box-shadow: none;
  outline: 1px solid transparent;
}

.attendance-monthly-toggle:focus {
  box-shadow: none;
  outline: none;
}

.attendance-monthly-toggle:not(:disabled):not(.is-disabled):focus-visible {
  box-shadow: none;
  outline: 1px solid #667085;
  outline-offset: 2px;
}

/* Page-wide focus policy: use outlines, never shadows. */
.attendance-monthly-page :where(a, button, input, select, textarea, [tabindex], [contenteditable="true"]):focus,
.attendance-monthly-page :where(a, button, input, select, textarea, [tabindex], [contenteditable="true"]):focus-visible {
  box-shadow: none !important;
}

.attendance-monthly-page :where(a, button, input, select, textarea, [tabindex], [contenteditable="true"]):focus-visible {
  outline: 1px solid #667085;
  outline-offset: 2px;
  outline-style: solid !important;
  outline-width: 1px !important;
}

.attendance-monthly-page .monthly-grid-inline-editor:focus,
.attendance-monthly-page .monthly-grid-inline-editor:focus-visible {
  outline: none !important;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable.tabulator-editing::after {
  box-shadow: none !important;
}

/* Grid shell */
.attendance-monthly-surface {
  background: #ffffff;
  border: 1px solid var(--monthly-border);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.attendance-monthly-page.is-attendance-print-view .attendance-monthly-surface {
  display: none;
}

.attendance-monthly-print-preview {
  --monthly-print-preview-padding: 14px;
  background: #ffffff;
  border: 1px solid var(--monthly-border);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
  box-sizing: border-box;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: var(--monthly-print-preview-padding);
}

.attendance-monthly-print-preview[hidden] {
  display: none;
}

.attendance-monthly-print-toolbar-anchor {
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
  left: 0;
  margin: 0 0 10px;
  pointer-events: none;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 5;
}

.attendance-monthly-print-zoom-toolbar {
  align-items: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 6px;
  pointer-events: auto;
  width: max-content;
}

.attendance-monthly-print-zoom-toolbar button {
  align-items: center;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 6px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  min-width: 34px;
  padding: 0 9px;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.attendance-monthly-print-zoom-toolbar button:hover,
.attendance-monthly-print-zoom-toolbar button:focus-visible {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}

.attendance-monthly-print-zoom-toolbar button:disabled {
  background: rgba(55, 65, 81, 0.42);
  border-color: rgba(75, 85, 99, 0.25);
  color: rgba(255, 255, 255, 0.64);
  cursor: not-allowed;
}

.attendance-monthly-print-zoom-value {
  font-variant-numeric: tabular-nums;
  min-width: 58px !important;
}

.attendance-monthly-print-zoom-toolbar #attendancePrintZoomOutButton,
.attendance-monthly-print-zoom-toolbar #attendancePrintZoomInButton {
  border-radius: 50%;
  height: 32px;
  min-height: 32px;
  min-width: 32px;
  padding: 0;
  width: 32px;
}

.attendance-monthly-print-zoom-fit,
.attendance-monthly-print-toolbar-print {
  min-width: 34px !important;
  padding: 0 !important;
  width: 34px;
}

.attendance-monthly-print-zoom-fit svg,
.attendance-monthly-print-toolbar-print svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.attendance-monthly-print-preview .print-page {
  background: #ffffff;
  color: #1d2b36;
  font-family: "Yu Gothic", "Meiryo", sans-serif;
  margin: 0;
  min-height: 210mm;
  min-width: 297mm;
  padding: 8mm;
  width: 297mm;
  zoom: var(--attendance-print-preview-zoom, 1);
}

.attendance-monthly-print-preview .print-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4mm;
}

.attendance-monthly-print-preview .print-header h1 {
  display: none;
}

.attendance-monthly-print-preview .print-header p {
  color: #1d2b36;
  font-size: 17pt;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.attendance-monthly-print-preview .print-meta {
  display: grid;
  font-size: 8pt;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  min-width: 166mm;
}

.attendance-monthly-print-preview .print-meta div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin-left: -0.6pt;
  min-width: 0;
}

.attendance-monthly-print-preview .print-meta dt,
.attendance-monthly-print-preview .print-meta dd {
  border: 0.6pt solid #111111;
  margin: 0;
  padding: 1mm 2mm;
}

.attendance-monthly-print-preview .print-meta dt {
  background: #e5edf1;
  color: #1d2b34;
  font-weight: 900;
  text-align: center;
}

.attendance-monthly-print-preview .print-meta dd {
  color: var(--monthly-ink);
  font-weight: 700;
  white-space: nowrap;
}

.attendance-monthly-print-preview .print-reconciliation-hash {
  align-items: baseline;
  color: #53616b;
  display: flex;
  font-size: 6.5pt;
  justify-content: flex-end;
  margin: 2mm 0 0;
  white-space: nowrap;
}

.attendance-monthly-print-preview .print-reconciliation-hash code {
  color: #17222b;
  font-family: Consolas, "Courier New", monospace;
  font-size: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.attendance-monthly-print-preview .print-summary,
.attendance-monthly-print-preview .print-adjustment-summary,
.attendance-monthly-print-preview .print-daily-total-summary {
  display: none;
}

.attendance-monthly-print-preview .print-wage-summary {
  display: flex;
  flex-wrap: nowrap;
  gap: 1mm;
  margin: 1.5mm 0 3mm;
}

.attendance-monthly-print-preview .print-wage-summary [hidden] {
  display: none !important;
}

.attendance-monthly-print-preview .print-wage-summary div {
  align-items: baseline;
  background: #f7f2e8;
  border: 1px solid #9faeb8;
  display: flex;
  flex: 1 1 0;
  justify-content: space-between;
  min-width: 0;
  padding: 4px 7px;
}

.attendance-monthly-print-preview .print-wage-summary span {
  color: #526472;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.attendance-monthly-print-preview .print-wage-summary strong {
  font-size: 12px;
  white-space: nowrap;
}

.attendance-monthly-print-preview .submission-issue-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.attendance-monthly-print-preview .submission-issue-header {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.attendance-monthly-print-preview .submission-issue-header strong {
  color: #9a3412;
  font-size: 13px;
  font-weight: 900;
}

.attendance-monthly-print-preview .submission-issue-header span,
.attendance-monthly-print-preview .submission-issue-header a {
  font-size: 12px;
  font-weight: 800;
}

.attendance-monthly-print-preview .submission-issue-list {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.attendance-monthly-print-preview .submission-issue-list li {
  color: #7c2d12;
  font-size: 12px;
  font-weight: 700;
}

.attendance-monthly-print-preview .print-table {
  border-collapse: collapse;
  font-size: 10px;
  max-width: 100%;
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

.attendance-monthly-print-preview .print-table-block {
  margin-bottom: 12px;
}

.attendance-monthly-print-preview .print-table-block caption {
  display: none;
}

.attendance-monthly-print-preview .print-table th,
.attendance-monthly-print-preview .print-table td {
  border-bottom: 1px solid #111111;
  border-left: 1px solid #111111;
  border-right: 0;
  border-top: 1px solid #111111;
  height: 18px;
  line-height: 1;
  overflow: hidden;
  padding: 1px 2px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.attendance-monthly-print-preview .print-table tbody tr,
.attendance-monthly-print-preview .print-table tbody tr > td {
  height: 18px;
}

.attendance-monthly-print-preview .print-table th {
  background: #dfe9ee;
  font-weight: 900;
  height: 30px;
  line-height: 1.05;
  position: static;
  text-align: center;
  top: auto;
  z-index: auto;
}

.attendance-monthly-print-preview .print-table tfoot th,
.attendance-monthly-print-preview .print-table tfoot td {
  bottom: auto;
  box-shadow: none;
  position: static;
  z-index: auto;
}

.attendance-monthly-print-preview .print-table th:last-child,
.attendance-monthly-print-preview .print-table td:last-child {
  border-right: 2px solid #111111;
}

.attendance-monthly-print-preview .print-table .date-column,
.attendance-monthly-print-preview .print-table .type-column,
.attendance-monthly-print-preview .print-table .start-time-column,
.attendance-monthly-print-preview .print-table .actual-column,
.attendance-monthly-print-preview .print-table .project-total-column,
.attendance-monthly-print-preview .print-table .project-start-column,
.attendance-monthly-print-preview .print-table .note-column {
  border-left-width: 2px;
}

.attendance-monthly-print-preview .print-table .late-night-column,
.attendance-monthly-print-preview .print-table .time-leave-column,
.attendance-monthly-print-preview .print-table .non-project-column,
.attendance-monthly-print-preview .print-table .note-column {
  border-left: 3px double #111111;
}

.attendance-monthly-print-preview .print-table .week-start-row td {
  border-top: 2px solid #111111;
}

.attendance-monthly-print-preview .print-table .validation-invalid-row td {
  background: #ffe2de;
}

.attendance-monthly-print-preview .print-table .validation-warning-row td {
  background: #fff2d2;
}

.attendance-monthly-print-preview .print-table .date-column {
  text-align: center;
  width: 15mm;
}

.attendance-monthly-print-preview .print-table .type-column {
  text-align: center;
  width: 8mm;
}

.attendance-monthly-print-preview .print-table .time-column,
.attendance-monthly-print-preview .print-table .duration-column,
.attendance-monthly-print-preview .print-table .project-total-column,
.attendance-monthly-print-preview .print-table .project-column {
  width: 10mm;
}

.attendance-monthly-print-preview .print-table td.note-column {
  text-align: left;
  width: auto;
}

.attendance-monthly-print-preview .print-table .project-code,
.attendance-monthly-print-preview .print-table .project-name {
  display: block;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.attendance-monthly-print-preview .print-table .project-code {
  font-size: 9px;
}

.attendance-monthly-print-preview .print-table .project-name {
  color: #526472;
  font-size: 8px;
  font-weight: 700;
  transform: scaleX(0.86);
  transform-origin: center center;
}

.attendance-monthly-print-preview .print-status {
  color: #5a6c78;
  display: none;
  font-size: 12px;
  font-weight: 800;
  margin: 10px 0 0;
}

.attendance-monthly-print-preview .error {
  color: #b42318;
}

.attendance-monthly-print-preview .print-title-text,
.attendance-monthly-print-preview .print-continuation-title {
  display: none;
}

.attendance-monthly-print-preview .screen-title-text {
  display: inline;
}

.attendance-monthly-print-preview .print-continuation-page {
  break-before: page;
  margin-top: 0;
}

#attendanceMonthlyGrid {
  box-sizing: border-box;
  flex: 1 1 auto;
  height: 100% !important;
  max-width: 100%;
  min-height: 0;
}

.attendance-monthly-mobile-list {
  display: none;
}

.attendance-monthly-page .tabulator .tabulator-tableholder {
  scroll-padding-bottom: calc(var(--monthly-grid-inline-summary-height) + 16px);
}

#attendanceMonthlyGrid:not(.monthly-grid-needs-horizontal-scroll) .tabulator-tableholder {
  overflow-x: hidden !important;
}

.attendance-monthly-page .tabulator {
  background: #ffffff;
  border: 0;
  color: var(--monthly-ink);
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 13px;
}

.attendance-monthly-page .tabulator .tabulator-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--monthly-border);
  color: #101828;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-col {
  background: #f8fafc;
  border-right: 1px solid #e6edf5;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-col.tabulator-col-group {
  border-bottom: 1px solid #e6edf5;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-col.monthly-grid-col-left-fixed {
  background: #f8fafc;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-col.monthly-grid-col-right-fixed {
  background: #f8fafc;
}

/* Sticky inline header and summary */
.monthly-grid-inline-header {
  background: #f8fafc;
  border-bottom: 1px solid var(--monthly-border);
  display: block;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 55;
}

.monthly-grid-inline-summary {
  background: #f8fafc;
  border-top: 1px solid var(--monthly-border);
  bottom: 0;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  display: block;
  position: sticky;
  white-space: nowrap;
  z-index: 55;
}

.monthly-grid-inline-header-cell,
.monthly-grid-inline-summary-cell {
  align-items: center;
  background: #f8fafc;
  border-right: 1px solid #e6edf5;
  box-sizing: border-box;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-align: center;
  vertical-align: bottom;
  white-space: nowrap;
}

.monthly-grid-inline-header-cell {
  color: #101828;
  height: 36px;
  line-height: 1.2;
  padding: 6px 4px;
}

.monthly-grid-inline-summary-cell {
  color: #0f172a;
  height: var(--monthly-grid-inline-summary-height);
  line-height: 1.12;
  padding: 5px 4px;
}

.monthly-grid-inline-header-cell.monthly-grid-col-left-fixed,
.monthly-grid-inline-summary-cell.monthly-grid-col-left-fixed {
  background: #f8fafc;
}

.monthly-grid-inline-header-cell.monthly-grid-col-right-fixed,
.monthly-grid-inline-summary-cell.monthly-grid-col-right-fixed {
  background: #f8fafc;
  left: auto !important;
}

.monthly-grid-inline-header-cell.tabulator-frozen,
.monthly-grid-inline-summary-cell.tabulator-frozen {
  box-shadow: none;
  z-index: 65;
}

.monthly-grid-inline-header-cell.monthly-grid-col-date {
  justify-content: center;
  text-align: center;
}

.monthly-grid-inline-header-cell.tabulator-frozen.tabulator-frozen-right {
  box-shadow: none;
}

.monthly-grid-inline-header-cell.monthly-grid-col-actual-night,
.monthly-grid-inline-header-cell.monthly-grid-col-time,
.monthly-grid-inline-header-cell.monthly-grid-col-project {
  font-size: 11px;
}

.monthly-grid-inline-header-content {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  width: 100%;
}

.monthly-grid-inline-header-cell.is-sortable {
  cursor: pointer;
  padding-right: 18px;
}

.monthly-grid-inline-header-cell.is-sortable::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  content: "";
  opacity: 0.55;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.monthly-grid-inline-header-cell.is-sortable[aria-sort="ascending"]::after,
.monthly-grid-inline-header-cell.is-sortable[aria-sort="none"]::after {
  border-bottom: 6px solid #94a3b8;
}

.monthly-grid-inline-header-cell.is-sortable[aria-sort="descending"]::after {
  border-top: 6px solid #94a3b8;
}

.monthly-grid-inline-header-cell.tabulator-frozen.monthly-grid-col-note,
.monthly-grid-inline-header-cell.monthly-grid-col-note,
.monthly-grid-inline-summary-cell.monthly-grid-col-project-start,
.monthly-grid-inline-summary-cell.monthly-grid-col-note {
  box-shadow: -1px 0 0 var(--monthly-project-boundary);
}

.monthly-grid-inline-header-cell.monthly-grid-col-left-boundary,
.monthly-grid-inline-summary-cell.monthly-grid-col-left-boundary {
  border-right: 0;
  box-shadow: 1px 0 0 var(--monthly-project-boundary);
}

.monthly-grid-inline-summary-cell.monthly-grid-col-project-end {
  border-right: 0;
}

.monthly-grid-inline-summary-content {
  align-items: center;
  display: grid;
  height: 100%;
  justify-items: center;
  min-width: 0;
  overflow: hidden;
  place-content: center;
  text-align: center;
  text-overflow: ellipsis;
  width: 100%;
}

.monthly-grid-inline-summary-label {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.monthly-grid-inline-summary-duration,
.monthly-grid-inline-summary-stack {
  align-items: center;
  display: grid;
  gap: 1px;
  justify-items: center;
  line-height: 1.08;
}

.monthly-grid-inline-summary-duration.is-empty {
  min-height: 1em;
}

.monthly-grid-inline-summary-duration {
  color: #101828;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1;
  min-height: 28px;
}

.monthly-grid-inline-summary-stack strong {
  font-size: 12px;
  font-weight: 900;
}

.monthly-grid-inline-summary-stack small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
  padding: 6px 4px;
}

.attendance-monthly-page .tabulator .tabulator-col-title {
  color: #101828;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.attendance-monthly-page .tabulator .tabulator-col.monthly-grid-col-actual-night .tabulator-col-title,
.attendance-monthly-page .tabulator .tabulator-col.monthly-grid-col-time .tabulator-col-title,
.attendance-monthly-page .tabulator .tabulator-col.monthly-grid-col-project .tabulator-col-title {
  font-size: 11px;
}

.monthly-grid-project-summary-header,
.monthly-grid-late-night-request-header {
  display: grid;
  gap: 1px;
  line-height: 1.05;
  text-align: center;
}

.monthly-grid-project-summary-header small,
.monthly-grid-late-night-request-header small {
  color: #667085;
  font-size: 9px;
  font-weight: 800;
}

/* Project headers */
.attendance-monthly-project-title {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: center;
}

.attendance-monthly-project-title strong,
.attendance-monthly-project-title small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-monthly-project-title strong {
  color: #064e3b;
  font-size: 10px;
}

.attendance-monthly-project-title small {
  color: #667085;
  font-size: 9px;
}

/* Rows and cells */
.attendance-monthly-page .tabulator-row {
  --monthly-grid-row-background: #ffffff;
  --monthly-grid-row-focus: var(--monthly-page-accent);
  --monthly-grid-row-focus-soft: rgba(33, 135, 119, 0.22);
  --monthly-grid-row-hover-background: rgba(33, 135, 119, 0.05);
  --monthly-grid-row-hover-border: rgba(33, 135, 119, 0.14);
  background: var(--monthly-grid-row-background);
  min-height: 32px;
}

.attendance-monthly-page .tabulator-row.monthly-grid-background-unavailable {
  --monthly-grid-row-background: var(--monthly-row-unavailable);
  --monthly-grid-row-focus: #64748b;
  --monthly-grid-row-focus-soft: rgba(100, 116, 139, 0.24);
  --monthly-grid-row-hover-background: rgba(100, 116, 139, 0.06);
  --monthly-grid-row-hover-border: rgba(100, 116, 139, 0.16);
}

.attendance-monthly-page .tabulator-row.monthly-grid-background-holiday {
  --monthly-grid-row-background: var(--monthly-weekend);
  --monthly-grid-row-focus: #c2410c;
  --monthly-grid-row-focus-soft: rgba(194, 65, 12, 0.22);
  --monthly-grid-row-hover-background: rgba(194, 65, 12, 0.05);
  --monthly-grid-row-hover-border: rgba(194, 65, 12, 0.14);
}

.attendance-monthly-page .tabulator-row.monthly-grid-background-invalid {
  --monthly-grid-row-background: var(--monthly-error-soft);
  --monthly-grid-row-focus: var(--monthly-error);
  --monthly-grid-row-focus-soft: rgba(190, 18, 60, 0.22);
  --monthly-grid-row-hover-background: rgba(190, 18, 60, 0.05);
  --monthly-grid-row-hover-border: rgba(190, 18, 60, 0.14);
}

.attendance-monthly-page .tabulator-row.monthly-grid-background-warning {
  --monthly-grid-row-background: #fff8e8;
  --monthly-grid-row-focus: #a16207;
  --monthly-grid-row-focus-soft: rgba(161, 98, 7, 0.22);
  --monthly-grid-row-hover-background: rgba(161, 98, 7, 0.05);
  --monthly-grid-row-hover-border: rgba(161, 98, 7, 0.14);
}

.attendance-monthly-page .tabulator-row.monthly-grid-outside-employment {
  color: #98a2b3;
}

@media (hover: hover) and (pointer: fine) {
  .attendance-monthly-page .tabulator-row.tabulator-selectable:hover {
    background: var(--monthly-grid-row-background);
  }
}

.attendance-monthly-page .tabulator-row .tabulator-cell {
  background: var(--monthly-grid-row-background) !important;
  background-image: none !important;
  border-right: 1px solid #edf2f7;
  line-height: 1.1;
  outline: none;
  padding: var(--monthly-grid-cell-padding-y) var(--monthly-grid-cell-padding-x);
}

.attendance-monthly-page .tabulator-row .tabulator-cell:focus,
.attendance-monthly-page .tabulator-row .tabulator-cell:focus-within {
  box-shadow: none;
  outline: 1px solid var(--monthly-grid-row-focus);
  outline-offset: -2px;
  z-index: 35;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen:focus,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen:focus-within {
  z-index: 50;
}

.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="dateLabel"],
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="attendanceType"],
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="note"] {
  align-items: center;
  display: inline-flex;
}

.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="dateLabel"],
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="attendanceType"] {
  justify-content: center;
}

.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="note"] {
  justify-content: flex-start;
}

.monthly-grid-project-summary-value,
.monthly-grid-late-night-request-value {
  align-items: center;
  display: grid;
  gap: 1px;
  height: 100%;
  justify-items: center;
  line-height: 1.12;
  min-height: 28px;
  place-content: center;
  width: 100%;
}

.monthly-grid-project-summary-value strong,
.monthly-grid-late-night-request-value strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.monthly-grid-project-summary-value small,
.monthly-grid-late-night-request-value small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.monthly-grid-project-summary-value.is-project-only,
.monthly-grid-late-night-request-value.is-actual-only {
  grid-template-rows: 1fr;
}

.monthly-grid-project-summary-value.is-project-only strong,
.monthly-grid-late-night-request-value.is-actual-only strong {
  font-size: 15px;
  font-weight: 400;
}

.monthly-grid-project-summary-value.has-non-project,
.monthly-grid-late-night-request-value.has-request {
  grid-template-rows: auto auto;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.monthly-grid-col-right-fixed {
  background: var(--monthly-grid-row-background) !important;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen,
.attendance-monthly-page .tabulator .tabulator-header .tabulator-frozen {
  z-index: 20;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-frozen {
  background: #f8fafc;
  box-shadow: 1px 0 0 #d9e2ec;
  z-index: 30;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen {
  background: var(--monthly-grid-row-background) !important;
  box-shadow: none;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-frozen.monthly-grid-col-right-fixed,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.monthly-grid-col-right-fixed {
  left: auto !important;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-left,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left {
  border-right: 0;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-frozen.tabulator-frozen-right,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right {
  border-left: 0;
  box-shadow: none;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action:focus,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action:focus-within {
  outline: none;
}

.attendance-monthly-page .tabulator .tabulator-header .tabulator-frozen.monthly-grid-col-note,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.monthly-grid-col-note {
  box-shadow: none;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.monthly-grid-col-project-start,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.monthly-grid-col-note {
  box-shadow: -1px 0 0 var(--monthly-project-boundary);
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.monthly-grid-col-left-boundary {
  box-shadow: 1px 0 0 var(--monthly-project-boundary);
}

.attendance-monthly-page .tabulator-row .tabulator-cell.monthly-grid-col-project-end {
  border-right: 0;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable {
  cursor: text;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action {
  position: relative;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable::after,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action::after {
  border: 1px solid var(--monthly-grid-row-focus-soft);
  border-radius: 5px;
  content: "";
  inset: 3px;
  opacity: 0.52;
  pointer-events: none;
  position: absolute;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable:hover::after,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable:focus::after,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable:focus-within::after {
  border-color: var(--monthly-grid-row-focus);
  opacity: 1;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action:hover::after,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action:focus-within::after {
  border-color: var(--monthly-grid-row-hover-border);
  opacity: 1;
}

.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="attendanceType"].is-grid-cell-action {
  cursor: pointer;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-readonly {
  color: #475467;
  cursor: default;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-calculated {
  color: #334155;
  cursor: default;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-locked {
  color: #98a2b3;
  cursor: not-allowed;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-locked .monthly-grid-duration,
.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-locked .monthly-grid-time-value {
  color: #a7b0bd;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-action {
  cursor: default;
}

.monthly-grid-time-leave-button,
.monthly-grid-late-night-request-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  height: 100%;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: background-color 120ms ease, box-shadow 120ms ease;
  width: 100%;
}

.monthly-grid-status-button.is-action:hover,
.monthly-grid-time-leave-button:hover,
.monthly-grid-late-night-request-button:hover {
  background: var(--monthly-grid-row-hover-background);
  box-shadow: inset 0 0 0 1px var(--monthly-grid-row-hover-border);
}

.monthly-grid-status-button.is-action:focus-visible,
.monthly-grid-time-leave-button:focus-visible,
.monthly-grid-late-night-request-button:focus-visible {
  box-shadow: none;
  outline: 1px solid var(--monthly-grid-row-focus);
  outline-offset: -2px;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.is-grid-cell-editable.tabulator-editing::after {
  border-color: var(--monthly-grid-row-focus);
  box-shadow: 0 0 0 1px var(--monthly-grid-row-focus-soft);
  opacity: 1;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-editing {
  border: 0 !important;
  box-shadow: none;
  outline: none;
  overflow: hidden;
  padding: var(--monthly-grid-cell-padding-y) var(--monthly-grid-cell-padding-x) !important;
  z-index: 15;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-editing:focus,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-editing:focus-within {
  outline: none;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-editing {
  box-shadow: none;
  z-index: 45;
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-editing.monthly-grid-col-left-boundary {
  box-shadow: 1px 0 0 var(--monthly-project-boundary);
}

.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-frozen.tabulator-editing.monthly-grid-col-note {
  box-shadow: -1px 0 0 var(--monthly-project-boundary);
}

/* Editors */
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-editing input,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-editing select,
.attendance-monthly-page .tabulator-row .tabulator-cell.tabulator-editing textarea {
  box-shadow: none;
  height: 100% !important;
  line-height: 1.1;
  margin: 0;
  width: 100% !important;
}

.monthly-grid-inline-editor {
  align-items: center;
  background: var(--monthly-grid-row-background);
  border: 0;
  box-shadow: none;
  box-sizing: border-box;
  color: var(--monthly-ink);
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  height: 100%;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-height: 0;
  outline: none;
  overflow: hidden;
  padding: 0;
  text-align: inherit;
  white-space: nowrap;
  width: 100%;
}

.monthly-grid-inline-editor:focus,
.monthly-grid-inline-editor:focus-visible {
  outline: none;
}

.monthly-grid-inline-editor.is-time,
.monthly-grid-inline-editor.is-duration {
  display: block;
  font-size: 15px;
  line-height: var(--monthly-grid-editor-control-height);
  padding: 3px 0;
  text-align: center;
}

.monthly-grid-inline-editor.is-note {
  display: block;
  justify-content: flex-start;
  line-height: var(--monthly-grid-editor-control-height);
  padding: 0 6px;
  text-align: left;
}

.attendance-monthly-page .tabulator-row .tabulator-cell input,
.attendance-monthly-page .tabulator-row .tabulator-cell textarea {
  appearance: none;
}

.attendance-monthly-page .tabulator-row .tabulator-cell input,
.attendance-monthly-page .tabulator-row .tabulator-cell select,
.attendance-monthly-page .tabulator-row .tabulator-cell textarea {
  background: var(--monthly-grid-row-background);
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  color: var(--monthly-ink);
  display: block;
  font: inherit;
  font-size: 14px;
  height: var(--monthly-grid-editor-control-height) !important;
  line-height: 1.08;
  margin: var(--monthly-grid-cell-padding-y) var(--monthly-grid-cell-padding-x);
  min-height: 0;
  outline: none;
  padding: 0 !important;
  resize: none;
  text-align: inherit;
  width: calc(100% - var(--monthly-grid-cell-padding-x) - var(--monthly-grid-cell-padding-x)) !important;
}

.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="note"] input,
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="note"] textarea {
  text-align: left;
}

.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="start"] input,
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="end"] input,
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="absence"] input,
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="lateNightRest"] input,
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field="timeLeave"] input,
.attendance-monthly-page .tabulator-row .tabulator-cell[tabulator-field^="project_"] input {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.1;
  text-align: center;
}

/* Cell content */
.monthly-grid-date {
  align-items: center;
  display: flex;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  text-align: center;
  width: 100%;
}

.monthly-grid-date-label {
  align-items: center;
  color: inherit;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  padding: 3px 2px;
  width: 100%;
}

.monthly-grid-date strong,
.monthly-grid-date-label strong {
  color: #111827;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.attendance-monthly-page .tabulator-row.monthly-grid-sunday .monthly-grid-date strong,
.attendance-monthly-page .tabulator-row.monthly-grid-holiday .monthly-grid-date strong,
.attendance-monthly-page .tabulator-row.monthly-grid-sunday .monthly-grid-date-label strong,
.attendance-monthly-page .tabulator-row.monthly-grid-holiday .monthly-grid-date-label strong {
  color: #dc2626;
}

.attendance-monthly-page .tabulator-row.monthly-grid-saturday .monthly-grid-date strong,
.attendance-monthly-page .tabulator-row.monthly-grid-saturday .monthly-grid-date-label strong {
  color: #2563eb;
}

.monthly-grid-status-button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: default;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background-color 120ms ease, box-shadow 120ms ease;
  width: 100%;
}

.monthly-grid-status-button.is-action {
  cursor: pointer;
}

.monthly-grid-type,
.monthly-grid-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  justify-content: center;
  line-height: 1;
  min-width: 48px;
  padding: 5px 8px;
}

.monthly-grid-type-text {
  color: #334155;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  padding: 0 4px;
}

.monthly-grid-type-text.is-work {
  color: #3730a3;
}

.monthly-grid-type-text.is-leave {
  color: #be185d;
}

.monthly-grid-type-text.is-muted {
  color: #667085;
}

.monthly-grid-type.is-work {
  background: #eef2ff;
  color: #3730a3;
}

.monthly-grid-type.is-leave {
  background: #fdf2f8;
  color: #be185d;
}

.monthly-grid-type.is-muted {
  background: #f2f4f7;
  color: #667085;
}

.monthly-grid-status.is-ok {
  background: var(--monthly-green-soft);
  color: var(--monthly-green);
}

.monthly-grid-status.is-warn {
  background: var(--monthly-warn-soft);
  color: var(--monthly-warn);
}

.monthly-grid-status.is-error {
  background: var(--monthly-error-soft);
  color: var(--monthly-error);
}

.monthly-grid-duration,
.monthly-grid-time-value {
  align-items: center;
  color: #101828;
  display: inline-flex;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  height: 100%;
  justify-content: center;
  line-height: 1;
  min-height: 28px;
  vertical-align: middle;
  width: 100%;
}

.monthly-grid-duration.is-empty,
.monthly-grid-time-value.is-empty {
  color: #a7b0bd;
  font-size: 14px;
  font-weight: 400;
}

.monthly-grid-duration.is-zero {
  color: #475467;
  font-weight: 400;
}

@media (max-width: 1080px) {
  .attendance-monthly-bar,
  .attendance-monthly-list-header {
    grid-template-columns: 1fr;
  }

  .attendance-monthly-actions,
  .attendance-monthly-filter-group,
  .attendance-monthly-toolbar,
  .attendance-monthly-view-group {
    justify-content: flex-start;
  }

}

@media print {
  @page {
    margin: 8mm;
    size: A4 landscape;
  }

  body.attendance-monthly-page {
    background: #ffffff;
  }

  body.attendance-monthly-page * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.attendance-monthly-page .app-sidebar,
  body.attendance-monthly-page .attendance-monthly-bar,
  body.attendance-monthly-page .attendance-monthly-surface,
  body.attendance-monthly-page .attendance-monthly-mobile-list,
  body.attendance-monthly-page .app-footer,
  body.attendance-monthly-page .dialog-backdrop,
  body.attendance-monthly-page .attendance-monthly-print-toolbar-anchor,
  body.attendance-monthly-page .attendance-monthly-print-zoom-toolbar {
    display: none !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-main {
    display: block;
    height: auto;
    max-width: none;
    min-height: auto;
    padding: 0;
    width: auto;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview {
    border: 0;
    box-shadow: none;
    display: block;
    overflow: visible;
    padding: 0;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-page {
    margin: 0;
    min-height: auto;
    min-width: 0;
    padding: 0;
    width: auto;
    zoom: 1 !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .screen-title-text {
    display: none;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-title-text {
    display: inline;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-continuation-title {
    display: block;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table {
    border-collapse: collapse !important;
    display: table !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    width: 100% !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table thead {
    display: table-row-group !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table tbody {
    display: table-row-group !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table tfoot {
    display: table-row-group !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table tr {
    display: table-row !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table tbody tr,
  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table tbody tr > td {
    height: 4.7mm !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table th,
  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table td {
    border-radius: 0 !important;
    box-shadow: none !important;
    display: table-cell !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table th::before,
  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table th::after,
  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table td::before,
  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table td::after {
    content: none !important;
    display: none !important;
  }

  body.attendance-monthly-page.is-attendance-print-view .attendance-monthly-print-preview .print-table th {
    position: static;
  }
}

@media (max-width: 760px) {
  .attendance-monthly-main {
    height: auto;
    min-height: 100vh;
    max-width: 100%;
    padding: 12px 10px;
  }

  .attendance-monthly-bar {
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 10px 10px 10px 24px;
  }

  .attendance-monthly-bar::before {
    bottom: 10px;
    left: 10px;
    top: 10px;
  }

  .attendance-monthly-bar h1 {
    font-size: 22px;
  }

  .attendance-monthly-title-user {
    display: none;
  }

  .attendance-monthly-actions {
    display: contents;
  }

  .attendance-monthly-period-controls {
    flex: 1 0 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: 38px minmax(0, 1fr) 38px 38px;
    width: 100%;
  }

  .attendance-monthly-command-controls {
    flex-wrap: nowrap;
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    min-width: 0;
    width: auto;
  }

  .attendance-monthly-command-controls button:disabled {
    display: none;
  }

  .attendance-monthly-page.is-attendance-print-view .attendance-monthly-actions {
    display: contents;
  }

  .attendance-monthly-page.is-attendance-print-view .attendance-monthly-actions .attendance-monthly-month {
    flex: 1 1 150px;
  }

  .attendance-monthly-print-preview {
    --monthly-print-preview-padding: 10px;
  }

  .attendance-monthly-month {
    min-width: 0;
    width: 100%;
  }

  .attendance-monthly-actions,
  .attendance-monthly-toolbar {
    align-items: stretch;
  }

  .attendance-monthly-list-header {
    gap: 10px;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
  }

  .attendance-monthly-list-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .attendance-monthly-summary {
    gap: 5px;
    padding-top: 0;
  }

  .attendance-monthly-summary span {
    min-height: 24px;
    padding-inline: 9px;
  }

  .attendance-monthly-toolbar {
    display: none;
  }

  #toggleOptionalColumnsButton {
    display: none;
  }

  .attendance-monthly-view-group {
    display: none;
  }

  .attendance-monthly-filter-group,
  .attendance-monthly-view-group {
    justify-content: flex-start;
  }

  #attendanceMonthlyGrid {
    display: none;
  }

  .attendance-monthly-mobile-list {
    background: #eef3f6;
    display: block;
    padding: 10px;
  }

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

  .attendance-monthly-mobile-day {
    align-items: center;
    appearance: none;
    background: #ffffff;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    box-sizing: border-box;
    color: #102033;
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    justify-content: center;
    min-height: 56px;
    padding: 4px;
    text-align: center;
    width: 100%;
  }

  button.attendance-monthly-mobile-day {
    cursor: pointer;
  }

  button.attendance-monthly-mobile-day:hover,
  button.attendance-monthly-mobile-day:focus {
    background: #f8fafc;
    border-color: #8bbcc6;
    box-shadow: 0 0 0 3px rgba(33, 135, 119, 0.12);
    outline: 0;
  }

  button.attendance-monthly-mobile-day.is-holiday:hover,
  button.attendance-monthly-mobile-day.is-holiday:focus {
    background: var(--monthly-weekend);
  }

  button.attendance-monthly-mobile-day.is-selected:hover,
  button.attendance-monthly-mobile-day.is-selected:focus {
    background: #eefafa;
  }

  .attendance-monthly-mobile-day.is-placeholder {
    background: #f0f5f6;
    color: #9aa8b3;
    pointer-events: none;
  }

  .attendance-monthly-mobile-day.is-holiday {
    background: var(--monthly-weekend);
  }

  .attendance-monthly-mobile-day.is-selected {
    background: #eefafa;
    border-color: #75b6c1;
    box-shadow: inset 0 0 0 1px #75b6c1;
  }

  .attendance-monthly-mobile-day.is-dirty {
    border-color: #facc15;
  }

  .attendance-monthly-mobile-day.is-invalid {
    border-color: #fca5a5;
  }

  .attendance-monthly-mobile-empty {
    background: #ffffff;
    border: 1px dashed var(--monthly-border);
    border-radius: 8px;
    color: var(--monthly-muted);
    font-size: 13px;
    font-weight: 800;
    margin: 0;
    padding: 18px;
    text-align: center;
  }

  .attendance-monthly-mobile-card {
    background: #ffffff;
    border: 1px solid var(--monthly-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    margin: 3px 0;
    padding: 10px;
  }

  .attendance-monthly-mobile-card.is-holiday {
    background: var(--monthly-weekend);
  }

  .attendance-monthly-mobile-card.is-outside-employment {
    background: #f1f5f9;
    color: #667085;
  }

  .attendance-monthly-mobile-card.is-dirty {
    border-color: #facc15;
  }

  .attendance-monthly-mobile-card.is-invalid {
    border-color: #fca5a5;
  }

  .attendance-monthly-mobile-card-header {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 38px;
    min-width: 0;
  }

  .attendance-monthly-mobile-date-block {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .attendance-monthly-mobile-date-heading {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 34px;
    min-width: 0;
  }

  .attendance-monthly-mobile-date-block strong {
    color: #102033;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
  }

  .attendance-monthly-mobile-metrics {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 4px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .attendance-monthly-mobile-metric {
    align-items: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #dce6f0;
    border-radius: 999px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    min-height: 24px;
    min-width: 0;
    padding: 2px 8px;
    text-align: center;
  }

  .attendance-monthly-mobile-metric span,
  .attendance-monthly-mobile-field span,
  .attendance-monthly-mobile-note span,
  .attendance-monthly-mobile-project-field span {
    color: #667085;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
  }

  .attendance-monthly-mobile-metric strong {
    color: #101828;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .attendance-monthly-mobile-metric small {
    flex-basis: 100%;
    color: #52637a;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .attendance-monthly-mobile-project-list {
    display: grid;
    gap: 7px 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-monthly-mobile-fields {
    align-items: center;
    display: grid;
    gap: 7px 5px;
    grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr) max-content minmax(0, 1fr);
    min-width: 0;
  }

  .attendance-monthly-mobile-field,
  .attendance-monthly-mobile-request-field {
    display: contents;
  }

  .attendance-monthly-mobile-field-label {
    color: #667085;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    min-width: 0;
    white-space: nowrap;
  }

  .attendance-monthly-mobile-field-label.is-stacked {
    display: grid;
    gap: 0;
    justify-items: center;
    text-align: center;
  }

  .attendance-monthly-mobile-status-value,
  .attendance-monthly-mobile-type-button {
    appearance: none;
    background: #f1f5f9;
    border: 1px solid #d7e0ea;
    border-radius: 7px;
    color: #98a2b3;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
    min-height: 42px;
    min-width: 0;
    padding: 5px 8px;
    white-space: nowrap;
    width: 100%;
  }

  .attendance-monthly-mobile-status-value.is-actionable:hover,
  .attendance-monthly-mobile-status-value.is-actionable:focus-visible,
  .attendance-monthly-mobile-type-button.is-actionable:hover,
  .attendance-monthly-mobile-type-button.is-actionable:focus-visible {
    background: #e8eef3;
    border-color: #b8c4d0;
    color: #475467;
  }

  .attendance-monthly-mobile-type-button {
    align-items: center;
    display: inline-flex;
    font-size: 14px;
    justify-content: center;
    line-height: 1.2;
    min-height: 34px;
    padding: 5px 12px;
    width: auto;
  }

  .attendance-monthly-mobile-status-value.is-actionable {
    background: #ffffff;
    border-color: #d7e0ea;
    color: var(--monthly-ink);
  }

  .attendance-monthly-mobile-status-value.is-muted {
    background: #f1f5f9;
    border-color: #d7e0ea;
    color: #98a2b3;
  }

  .attendance-monthly-mobile-type-button.is-actionable {
    background: #ffffff;
    border-color: #b9c7d6;
    color: #344054;
    cursor: pointer;
  }

  .attendance-monthly-mobile-type-button.is-muted {
    background: var(--monthly-disabled-bg);
    border-color: var(--monthly-disabled-border);
    color: var(--monthly-disabled-text);
    cursor: not-allowed;
  }

  .attendance-monthly-mobile-note,
  .attendance-monthly-mobile-project-field {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: minmax(44px, max-content) minmax(0, 1fr);
    min-width: 0;
  }

  .attendance-monthly-mobile-note {
    align-items: start;
    grid-template-columns: minmax(44px, max-content) minmax(0, 1fr);
  }

  .attendance-monthly-mobile-project-field {
    grid-template-columns: minmax(72px, 42%) minmax(0, 1fr);
  }

  .attendance-monthly-mobile-field > span,
  .attendance-monthly-mobile-note > span,
  .attendance-monthly-mobile-project-field > span {
    min-width: 0;
  }

  .attendance-monthly-mobile-field input,
  .attendance-monthly-mobile-note textarea,
  .attendance-monthly-mobile-project-field input {
    appearance: none;
    background: #ffffff;
    border: 1px solid #d7e0ea;
    border-radius: 7px;
    box-sizing: border-box;
    color: var(--monthly-ink);
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    min-height: 42px;
    padding: 7px 8px;
    text-align: center;
    width: 100%;
  }

  .attendance-monthly-mobile-field input:focus,
  .attendance-monthly-mobile-note textarea:focus,
  .attendance-monthly-mobile-project-field input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    outline: 0;
  }

  .attendance-monthly-mobile-field input:disabled,
  .attendance-monthly-mobile-note textarea:disabled,
  .attendance-monthly-mobile-project-field input:disabled {
    background: #f1f5f9;
    color: #98a2b3;
  }

  .attendance-monthly-mobile-field input {
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
  }

  .attendance-monthly-mobile-field input::placeholder {
    color: #98a2b3;
    font: inherit;
    opacity: 1;
  }

  .attendance-monthly-mobile-projects {
    display: grid;
    gap: 6px;
  }

  .attendance-monthly-mobile-project-field > span {
    align-content: center;
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .attendance-monthly-mobile-project-code,
  .attendance-monthly-mobile-project-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .attendance-monthly-mobile-project-empty {
    color: var(--monthly-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .attendance-monthly-mobile-note textarea {
    min-height: 58px;
    resize: vertical;
  }

  .attendance-monthly-mobile-save-button {
    align-items: center;
    appearance: none;
    background: #ffffff;
    border: 1px solid #d7e0ea;
    border-radius: 7px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    flex-basis: 34px;
    grid-column: 2;
    grid-row: 1;
    height: 34px;
    justify-content: center;
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    width: 34px;
  }

  .attendance-monthly-mobile-save-button svg {
    fill: none;
    height: 16px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 16px;
  }

  .attendance-monthly-mobile-save-button.is-ready:hover,
  .attendance-monthly-mobile-save-button.is-ready:focus-visible {
    background: var(--monthly-accent-soft);
    border-color: #bfdbfe;
    color: var(--monthly-accent-strong);
    outline: 1px solid var(--monthly-accent-strong);
    outline-offset: 1px;
  }

  .attendance-monthly-mobile-save-button.is-muted,
  .attendance-monthly-mobile-save-button:disabled {
    background: var(--monthly-disabled-bg);
    border-color: var(--monthly-disabled-border);
    color: var(--monthly-disabled-text);
    cursor: not-allowed;
  }
}

@media (max-width: 520px) {
  .attendance-monthly-mobile-card-header {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .attendance-monthly-mobile-project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-monthly-mobile-field,
  .attendance-monthly-mobile-note {
    grid-template-columns: minmax(42px, max-content) minmax(0, 1fr);
  }

  .attendance-monthly-mobile-calendar {
    gap: 6px;
  }

  .attendance-monthly-mobile-day {
    font-size: 13px;
    min-height: 50px;
  }
}

@media (max-width: 360px) {
  .attendance-monthly-mobile-fields,
  .attendance-monthly-mobile-project-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
