#attendance .attendance-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

#attendance .attendance-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
}

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

#attendance .attendance-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

#attendance .attendance-header-divider {
  height: 1px;
  background: rgba(15, 23, 42, .055);
}

#attendance .section-header .add-btn,
#attendance .add-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #DEDCD7;
  border-radius: 8px;
  background: #fff;
  color: #3E4650;
  font-size: 13px;
  font-weight: 540;
  line-height: 34px;
  box-shadow: 0 1px 0 rgba(17, 21, 28, .025);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

#attendance .add-btn.subtle-action {
  color: #747C86;
  font-weight: 430;
  background: transparent;
  border-color: #E7E4DE;
}

#attendance .confirm {
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--red-deep, #b91c1c);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 36px;
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

#attendance .attendance-kpi-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin-left: 1px;
  border-left: 0;
}

#attendance .attendance-refresh-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #8A929C;
  cursor: pointer;
  padding: 0;
}

#attendance .attendance-refresh-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#attendance .attendance-refresh-icon:hover {
  background: #FAFAF8;
  border-color: transparent;
  color: #606A76;
}

#attendance .attendance-refresh-icon:active {
  background: #F5F3F0;
  color: #9f1239;
}

#attendance .attendance-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  min-width: 0;
}

#attendance .attendance-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

#attendance .attendance-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: #0f172a;
  font-weight: 620;
}

#attendance .attendance-card p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

#attendance .attendance-tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  border-bottom: 1px solid rgba(15, 23, 42, .065);
  margin-bottom: 0;
}

#attendance .attendance-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  border-bottom: 0;
  margin-bottom: 0;
}

#attendance .attendance-tab-filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 0;
}

#attendance .attendance-tab {
  position: relative;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #858D98;
  font: inherit;
  font-size: 14px;
  font-weight: 480;
  cursor: pointer;
  white-space: nowrap;
}

#attendance .attendance-tab.active {
  color: var(--red-deep, #b91c1c);
  font-weight: 650;
}

#attendance .attendance-tab.active::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: -1px;
  height: 1px;
  border-radius: 999px;
  background: var(--red-deep, #b91c1c);
}

#attendance .attendance-workbench-surface {
  border: 1px solid rgba(15, 23, 42, .065);
  border-radius: 10px;
  background: #fff;
  padding: 12px 16px;
  min-width: 0;
}

#attendance .attendance-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  min-width: 0;
}

#attendance .attendance-filter-left,
#attendance .attendance-filter-right {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

#attendance .attendance-filter-left {
  flex: 1 1 auto;
}

#attendance .attendance-filter-right {
  justify-content: flex-end;
  flex: 0 1 auto;
}

#attendance .attendance-filter-left h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 620;
}

#attendance .attendance-filter-left p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

#attendance .attendance-surface-divider {
  height: 1px;
  margin: 8px -16px 0;
  background: rgba(15, 23, 42, .055);
}

#attendance .attendance-surface-divider + .history-surface,
#attendance .attendance-surface-divider + .attendance-table-wrap,
#attendance .attendance-surface-divider + .attendance-settings-body {
  margin-top: 0;
}

#attendance .attendance-search {
  width: min(320px, 34vw);
  height: 36px;
  display: flex;
  align-items: center;
  border: 1px solid #E3E6EB;
  border-radius: 8px;
  background: #fff;
  padding: 0 11px;
}

#attendance .attendance-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #404852;
  font: inherit;
  font-size: 13px;
}

#attendance .attendance-filter-select {
  width: 132px;
}

#attendance .attendance-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  align-items: end;
}

#attendance .attendance-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#attendance .attendance-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#attendance .attendance-field > span {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

#attendance .form-input,
#attendance .form-select {
  height: 36px !important;
  width: 100% !important;
  border: 1px solid #E3E6EB !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #404852 !important;
  font-size: 13px !important;
  font-family: inherit !important;
  box-shadow: none !important;
}

#attendance .form-input:focus,
#attendance .form-select:focus {
  outline: none !important;
  border-color: #D4D0C8 !important;
  box-shadow: 0 0 0 3px rgba(190, 18, 60, .08) !important;
}

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

#attendance .attendance-inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

#attendance .attendance-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #9f1239;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

#attendance .attendance-link:hover,
#attendance .attendance-link:focus {
  text-decoration: underline;
}

#attendance .attendance-table-wrap {
  overflow-x: visible;
  width: 100%;
  min-width: 0;
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

#attendance .attendance-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#attendance .attendance-table.compact {
  min-width: 0;
}

#attendance .attendance-table th,
#attendance .attendance-table td {
  padding-left: 10px;
  padding-right: 10px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

#attendance .attendance-table th {
  background: #FAFAF8;
  color: #7A838E;
  font-weight: 560;
}

#attendance .attendance-table td {
  color: #303640;
  vertical-align: middle;
}

#attendance .attendance-month-table th,
#attendance .attendance-month-table td {
  padding-left: 6px;
  padding-right: 6px;
}

#attendance .attendance-month-table th {
  font-size: 10px;
  line-height: 1.15;
}

#attendance .attendance-ledger-card {
  width: 100%;
}

#attendance .pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 420;
}

#attendance .pagination .page-stat {
  margin-right: auto;
  color: #9299A2;
}

#attendance .pagination .page-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#attendance .pagination .page-icon,
#attendance .pagination .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  min-height: 30px;
  max-height: 30px;
  min-width: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #66707C;
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
  font-variant-numeric: tabular-nums;
}

#attendance .pagination .page-icon {
  font-size: 17px;
  font-weight: 430;
  color: #7A838E;
}

#attendance .pagination .page-number.active {
  background: #F5F3F0;
  border-color: #E7E3DD;
  color: #303640;
  font-weight: 560;
}

#attendance .pagination .page-icon:hover:not(:disabled),
#attendance .pagination .page-number:hover:not(:disabled) {
  background: #F8F8F6;
  border-color: #ECE8E1;
  color: #303640;
}

#attendance .pagination .page-icon:disabled {
  color: #CDD2D8;
  background: transparent;
  border-color: transparent;
  opacity: 1;
}

#attendance .attendance-date-field {
  width: 148px;
  gap: 4px;
  flex-shrink: 0;
}

#attendance .attendance-date-filter span {
  color: #8F98A3;
  font-weight: 540;
}

#attendance .attendance-date-filter .form-input {
  height: 34px !important;
  border-color: rgba(15, 23, 42, .12) !important;
}

#attendance .attendance-table .text-center.muted {
  padding-top: 16px;
  padding-bottom: 16px;
  color: #A0A7B1;
  font-weight: 420;
}

#attendance .attendance-table .text-center.muted::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  margin: 0 auto 7px;
  background: rgba(15, 23, 42, .12);
}

#attendance .attendance-table-wrap .table-pagination-footer {
  margin: 0;
  padding: 7px 10px 0;
  min-height: 38px;
  border-top: 1px solid rgba(15, 23, 42, .055);
}

#attendance .attendance-table-wrap .pagination .page-stat {
  color: #9AA2AC;
}

#attendance .attendance-table-wrap .pagination .page-controls {
  gap: 3px;
}

#attendance .attendance-table-wrap .pagination .page-icon,
#attendance .attendance-table-wrap .pagination .page-number {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  max-height: 26px;
  border-radius: 6px;
  color: #747D89;
  font-size: 12px;
}

#attendance .attendance-table-wrap .pagination .page-icon {
  font-size: 15px;
  color: #8A929C;
}

#attendance .attendance-table-wrap .pagination .page-number.active {
  background: #F6F3F0;
  border-color: #E6E0D8;
  color: #404852;
}

#attendance .attendance-settings {
  display: grid;
  gap: 0;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  background: #fff;
  padding: 16px 18px;
}

#attendance .attendance-settings-intro h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 620;
}

#attendance .attendance-settings-intro p {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

#attendance .attendance-settings-body {
  display: grid;
  gap: 0;
}

#attendance .attendance-setting-section {
  padding: 12px 0;
  border-top: 1px solid rgba(15, 23, 42, .07);
}

#attendance .attendance-setting-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

#attendance .attendance-setting-section:last-child {
  padding-bottom: 0;
}

#attendance .status.rest {
  background: #f1f5f9;
  color: #475569;
}

#attendance .status.late {
  background: #fff1f2;
  color: #be123c;
}

#attendance .status.present,
#attendance .status.checked_out {
  background: #ecfdf5;
  color: #047857;
}

#attendance .status.missing {
  background: #fef3c7;
  color: #92400e;
}

#attendance .attendance-summary-line {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
}

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

.attendance-detail-summary > div {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.attendance-detail-summary b,
.attendance-detail-summary span {
  display: block;
}

.attendance-detail-summary b {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.attendance-detail-summary span {
  color: #0f172a;
  font-weight: 750;
}

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

.attendance-timeline-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 0;
  border-bottom: 1px solid rgba(15, 23, 42, .07);
}

.attendance-timeline-item:last-child {
  border-bottom: 0;
}

.attendance-timeline-time {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  padding-top: 2px;
}

.attendance-timeline-main strong {
  color: #0f172a;
  font-size: 13px;
}

body.erp-ui2 #attendance .attendance-record-toolbar-filters .attendance-select-field {
  width: 136px !important;
  flex: 0 0 136px !important;
}

body.erp-ui2 #attendance .attendance-record-toolbar-filters .attendance-select-field > span {
  display: none !important;
}

body.erp-ui2 #attendance .attendance-record-date-range {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

body.erp-ui2 #attendance .attendance-record-date-range .attendance-date-field {
  width: 136px !important;
  flex: 0 0 136px !important;
}

body.erp-ui2 #attendance .attendance-record-date-range .attendance-date-field > span {
  display: none !important;
}

body.erp-ui2 #attendance .attendance-table .status {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #4f5b6d !important;
  font-size: 12.5px !important;
  font-weight: 540 !important;
  white-space: nowrap !important;
}

body.erp-ui2 #attendance .attendance-table .status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: 0 0 0 2px rgba(203, 213, 225, .22);
}

body.erp-ui2 #attendance .attendance-table .status.present::before,
body.erp-ui2 #attendance .attendance-table .status.checked_out::before {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .13);
}

body.erp-ui2 #attendance .attendance-table .status.late::before {
  background: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, .14);
}

body.erp-ui2 #attendance .attendance-table .status.missing::before {
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, .16);
}

body.erp-ui2 #attendance .attendance-table .status.rest::before {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .14);
}

body.erp-ui2 #globalModal .attendance-correction-master {
  gap: 12px !important;
}

body.erp-ui2 #globalModal:has(.attendance-correction-master) {
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

body.erp-ui2 #globalModal:has(.attendance-correction-master) .modal-panel {
  width: min(520px, calc(100vw - 48px)) !important;
  max-width: 520px !important;
  height: auto !important;
  max-height: min(680px, calc(100dvh - 48px)) !important;
  margin: 0 !important;
  padding: 22px 22px 0 !important;
  border: 1px solid var(--lh-border, #e5e7eb) !important;
  border-radius: 14px !important;
  transform: none !important;
}

body.erp-ui2 #globalModal .attendance-correction-master .attendance-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

body.erp-ui2 #globalModal .attendance-correction-master .attendance-field > span,
body.erp-ui2 #globalModal .attendance-correction-master .form-group > label {
  color: #6f7b8d !important;
  font-size: 12px !important;
  font-weight: 520 !important;
}


@media (max-width: 1180px) {
  #attendance .attendance-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#attendance .attendance-rest-request-table {
  width: 100%;
  table-layout: fixed;
}

#attendance .attendance-rest-request-table td {
  overflow-wrap: anywhere;
}
