.attendance-page { min-height: 100%; }

body.apu-attendance-theme .apu-app-header { background: #a51c1c !important; }
body.apu-attendance-theme .apu-header-brand-icon,
body.apu-attendance-theme #apuHeaderDateRow { color: #fbe4e4 !important; }
body.apu-attendance-theme .apu-header-logout-btn { background: rgba(88, 12, 12, .55) !important; }
body.apu-attendance-theme .apu-desktop-module-nav-btn:hover { background: rgba(88, 12, 12, .42) !important; }

#attendanceBottomNav { display: none; }
@media (max-width: 640px) {
  body.apu-attendance-nav-visible #attendanceBottomNav { display: grid !important; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
  body.apu-attendance-nav-visible #attendancePage { padding-bottom: 78px !important; }
  body.apu-ios-pwa.apu-attendance-nav-visible #attendanceBottomNav { height: 82px !important; min-height: 82px !important; padding-bottom: 18px !important; }
  body:not(.apu-pwa-standalone).apu-attendance-nav-visible #attendanceBottomNav { height: 58px; min-height: 58px; padding-bottom: 0; }
  body:not(.apu-pwa-standalone).apu-attendance-nav-visible #attendanceBottomNav .apu-pwa-nav-item { min-height: 58px; }
}
@media (min-width: 641px) { #attendanceBottomNav { display: none !important; } }
#attendanceBottomNav .apu-pwa-nav-item.active { color: #a51c1c !important; }

.att-hero {
  border-radius: 26px; padding: 18px 18px 16px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(155deg, #b52020 0%, #a51c1c 45%, #7f1414 100%); box-shadow: 0 14px 30px -14px rgba(127, 20, 20, .65);
}
.att-hero::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 41, 41, .38), rgba(242, 41, 41, 0) 68%); pointer-events: none;
}
.att-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.att-hero-date { font-size: 16px; font-weight: 800; opacity: .95; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-greeting { font-size: 18px; font-weight: 800; color: #1e293b; padding: 2px 4px 0; }
.att-status-chip { padding: 5px 11px; border-radius: 999px; background: #fff; color: #a51c1c; font-size: 11px; font-weight: 800; white-space: nowrap; }
.att-status-chip.ok { color: #166534; }
.att-status-chip.late { color: #92400e; }
.att-status-chip.muted { color: #475569; }
.att-clock { margin: 22px 0 6px; text-align: center; font-size: 38px; line-height: 1.05; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.att-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; position: relative; z-index: 1; }
.att-time-box { padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .14); }
.att-time-box .l { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.att-time-box .v { margin-top: 3px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.att-time-box .s { margin-top: 2px; font-size: 10px; font-weight: 700; opacity: .85; }
.att-notice { margin-top: 12px; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, .16); font-size: 12px; font-weight: 700; line-height: 1.45; position: relative; z-index: 1; }
.att-trip-banner { margin-top: 12px; padding: 9px 12px; border-radius: 14px; background: #fff; color: #5b21b6; font-size: 12px; font-weight: 800; position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }

.att-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.att-action-btn {
  min-height: 56px; border-radius: 18px; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform .1s ease, opacity .15s ease, background-color .15s ease;
}
.att-action-btn:active:not(:disabled):not(.is-disabled) { transform: scale(.97); }
.att-action-btn:disabled, .att-action-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.att-action-in { background: #1c71a6; color: #fff; box-shadow: 0 8px 18px -10px rgba(28, 113, 166, .8); }
.att-action-in:hover:not(:disabled):not(.is-disabled) { background: #175f8b; }
.att-action-out { background: #fff; color: #a51c1c; border: 2px solid #a51c1c; }
.att-action-out:hover:not(:disabled):not(.is-disabled) { background: #fdf1f1; }
.att-action-btn svg { flex: 0 0 auto; }

.att-day-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 16px; background: #f9fafc; border: 1px solid #e2e8f0; text-align: left; transition: border-color .15s ease, transform .1s ease; }
.att-day-row + .att-day-row { margin-top: 8px; }
.att-day-row:hover { border-color: #cbd5e1; }
.att-day-row:active { transform: scale(.992); }
.att-day-date { width: 44px; flex: 0 0 auto; text-align: center; padding: 5px 0; border-radius: 12px; background: #fef3c7; color: #b45309; }
.att-day-date .d { font-size: 17px; font-weight: 800; line-height: 1.1; }
.att-day-date .w { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.att-day-date.off { background: #f1f5f9; color: #64748b; }
.att-day-main { min-width: 0; flex: 1; }
.att-day-times { font-size: 13px; font-weight: 800; color: #1e293b; font-variant-numeric: tabular-nums; }
.att-day-sub { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }

.att-rating-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(135deg, #fdf1f1, #fff); border: 1px solid #f3d0d0; }
.att-rating-level { font-size: 22px; font-weight: 800; color: #a51c1c; }
.att-rating-card[data-level="Sempurna"] { background: linear-gradient(135deg, #eefaf2, #fff); border-color: #cdebd6; }
.att-rating-card[data-level="Baik"] { background: linear-gradient(135deg, #eff4fd, #fff); border-color: #d3dff5; }
.att-rating-card[data-level="Cukup"] { background: linear-gradient(135deg, #fdf7ea, #fff); border-color: #f1e1bb; }
.att-rating-card[data-level="Sempurna"] .att-rating-level { color: #166534; }
.att-rating-card[data-level="Baik"] .att-rating-level { color: #1e40af; }
.att-rating-card[data-level="Cukup"] .att-rating-level { color: #b45309; }
.att-rating-card[data-level="Tidak Disiplin"] .att-rating-level { color: #be123c; }
.att-rating-percent { font-size: 30px; font-weight: 800; color: #1e293b; font-variant-numeric: tabular-nums; }
.att-rating-note { margin-top: 2px; font-size: 11px; font-weight: 600; color: #64748b; line-height: 1.45; }

.att-period-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.att-period-nav button { width: 38px; height: 38px; border-radius: 12px; background: #f1f5f9; color: #334155; display: flex; align-items: center; justify-content: center; }
.att-period-nav button:disabled { opacity: .4; }
.att-period-label { flex: 1; text-align: center; font-size: 13px; font-weight: 800; color: #1e293b; }

.att-flow-block.att-flow-overtime { background: #ecfeff; border-color: #a5f3fc; }
.att-flow-block { padding: 14px; border-radius: 18px; background: #fff; border: 1px solid #e2e8f0; }
.att-flow-head { display: flex; align-items: center; gap: 10px; }
.att-flow-icon { width: 38px; height: 38px; border-radius: 12px; background: #fbe4e4; color: #a51c1c; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.att-flow-icon.ok { background: #dcfce7; color: #166534; }
.att-flow-icon.bad { background: #ffe4e6; color: #be123c; }
.att-flow-title { font-size: 13px; font-weight: 800; color: #1e293b; }
.att-flow-sub { margin-top: 2px; font-size: 11px; font-weight: 600; color: #64748b; line-height: 1.45; }
.att-flow-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: flex-end;}
.att-flow-actions.att-flow-actions-end { justify-content: flex-end; }
.att-camera-box { position: relative; border-radius: 16px; overflow: hidden; background: #0f172a; aspect-ratio: 4 / 3; margin-top: 10px; display: flex; align-items: center; justify-content: center; }
.att-camera-box video, .att-camera-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-camera-box .ph { color: #94a3b8; font-size: 12px; font-weight: 700; text-align: center; padding: 16px; line-height: 1.5; }
.att-capture-btn { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); width: 62px; height: 62px; border-radius: 50%; background: #fff; border: 5px solid rgba(255, 255, 255, .55); box-shadow: 0 6px 16px rgba(2, 6, 23, .45); }
.att-capture-btn:active { transform: translateX(-50%) scale(.94); }
.att-flip-btn { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%; background: rgba(15, 23, 42, .6); color: #fff; display: flex; align-items: center; justify-content: center; }
.att-flip-btn:active { transform: scale(.94); }
.att-guide { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: 11px; font-weight: 700; line-height: 1.55; }

.att-request-card { padding: 12px; border-radius: 16px; background: #f9fafc; border: 1px solid #e2e8f0; }
.att-request-card + .att-request-card { margin-top: 8px; }
.att-request-card.is-clickable { cursor: pointer; transition: border-color .15s ease, transform .1s ease; }
.att-request-card.is-clickable:hover { border-color: #cbd5e1; }
.att-request-card.is-clickable:active { transform: scale(.992); }
.att-pdf-chip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; font-size: 13px; font-weight: 800; color: #1e293b; word-break: break-all; }
.att-pdf-chip i { color: #a51c1c; font-size: 20px; flex: 0 0 auto; }

.att-skel { border-radius: 22px; background: linear-gradient(100deg, #e8edf3 30%, #f4f7fa 50%, #e8edf3 70%); background-size: 200% 100%; animation: attShimmer 1.2s linear infinite; }
.att-skel-hero { height: 250px; }
.att-skel-actions { height: 56px; }
.att-skel-card { height: 150px; }
@keyframes attShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.att-map { position: relative; height: 190px; margin-top: 10px; border-radius: 16px; overflow: hidden; background: #e8edf3; border: 1px solid #e2e8f0; z-index: 0; pointer-events: none; }
.att-map.att-map-pick { height: 240px; pointer-events: auto; touch-action: none; }
.att-map-credit { margin-top: 4px; font-size: 10px; font-weight: 600; color: #94a3b8; }
.att-map-credit a { color: #64748b; text-decoration: underline; }
.att-pin-icon { background: transparent; border: 0; }
.att-request-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.att-request-title { font-size: 13px; font-weight: 800; color: #1e293b; }
.att-request-meta { margin-top: 4px; font-size: 11px; font-weight: 600; color: #64748b; line-height: 1.5; overflow-wrap: anywhere; }
.att-request-actions { display: flex; gap: 8px; margin-top: 10px; }
.att-request-actions button { flex: 1; }

.att-sched-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.att-sched-row:last-child { border-bottom: 0; }
.att-sched-day { flex: 1 1 auto; font-size: 13px; font-weight: 800; color: #1e293b; }
.att-sched-fields { display: contents; }
.att-sched-fields > span[id^="schTimes"] { flex: 1 0 100%; display: flex; align-items: center; gap: 4px; }
@media (min-width: 640px) { .att-sched-fields > span[id^="schTimes"] { flex: 0 0 auto; } }
.att-time-pair { display: inline-flex; align-items: center; gap: 4px; }
.att-sched-fields select, .att-time-pair select { border: 1px solid #cbd5e1; border-radius: 10px; padding: 7px 2px 7px 6px; font-size: 16px; font-weight: 700; background: #fff; color: #1e293b; }
.att-sched-fields label.off { font-size: 11px; font-weight: 700; color: #64748b; display: inline-flex; align-items: center; gap: 4px; }
.att-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: #475569; }
.att-sched-pattern { flex: 1 0 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.att-sched-pattern .fx-select { padding: 11px 12px; border-radius: 12px; }
.att-sched-dates { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 8px; }
.att-sched-date-times { display: flex; align-items: center; gap: 4px; }
.att-switch input { width: 18px; height: 18px; accent-color: #a51c1c; }

.att-menu-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 8px; }
@media (min-width: 640px) { .att-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.att-menu-grid .fx-row-btn { margin-top: 0; min-height: 66px; background: #fff !important; }
.att-menu-grid .fx-row-title .fx-chip { margin-left: 4px; vertical-align: 1px; }
.att-switch-row { display: flex; font-size: 13px; color: #1e293b; }
.att-switch-row input { flex: 0 0 auto; }
.att-reminder { margin-top: 12px; padding: 11px 14px; border-radius: 14px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 12px; font-weight: 800; line-height: 1.45; }
.att-reminder.hidden { display: none; }
.att-nav-dot { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #f22929; color: #fff; font-size: 9px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.att-nav-dot.hidden { display: none; }
.btn-upload { background-color: #cbd5e1 !important; }
.att-request-card.is-admin { background: #fff; }
.att-textarea-compact { min-height: 64px; }

.att-outside-card { background: #fef2f2; border: 1.5px solid #fca5a5; }
.att-outside-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #b91c1c; }
.att-outside-text { margin-top: 6px; font-size: 13px; line-height: 1.45; color: #7f1d1d; }
.att-outside-agree { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.4; color: #7f1d1d; }
.att-outside-agree input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: #dc2626; }
#attFlowExtra { display: flex; flex-direction: column; gap: 12px; }
.att-outside-note { padding: 10px 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13px; line-height: 1.45; color: #9a3412; }
.att-emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.att-emp-card { display: block; width: 100%; text-align: left; padding: 14px 16px; border-radius: 18px; background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.att-emp-card:active { transform: scale(.99); }
.att-emp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.att-emp-score { flex: 0 0 auto; text-align: right; }
.att-emp-name { min-width: 0; overflow-wrap: anywhere; font-size: 18px; font-weight: 800; color: #0f172a; }
.att-emp-percent { font-size: 23px; line-height: 1.1; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.att-emp-level { margin-top: 2px; font-size: 16px; font-weight: 800; }
.att-history-name { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f1f5f9; font-size: 16px; font-weight: 800; color: #0f172a; overflow-wrap: anywhere; }
.att-emp-card[data-level="Sempurna"] :is(.att-emp-level, .att-emp-percent) { color: #166534; }
.att-emp-card[data-level="Baik"] :is(.att-emp-level, .att-emp-percent) { color: #1e40af; }
.att-emp-card[data-level="Cukup"] :is(.att-emp-level, .att-emp-percent) { color: #b45309; }
.att-emp-card[data-level="Tidak Disiplin"] :is(.att-emp-level, .att-emp-percent) { color: #be123c; }
#attendancePage .fx-wrap.att-wrap-wide { max-width: 65rem; }
.att-emp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.att-emp-stats span { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; }
.att-emp-stats small { font-size: 11px; line-height: 1.25; font-weight: 600; color: #64748b; }
.att-emp-stats b { font-size: 14px; line-height: 1.2; font-weight: 800; color: #0f172a; font-variant-numeric: tabular-nums; }
.fx-chip.att-c-present { background: #ccfbf1; color: #0f766e; }
.fx-chip.att-c-early { background: #ecfccb; color: #3f6212; }
.fx-chip.att-c-outside { background: #ffedd5; color: #c2410c; }
.fx-chip.att-c-remote { background: #e0f2fe; color: #0369a1; }
.fx-chip.att-c-sick { background: #fce7f3; color: #be185d; }
.fx-chip.att-c-leave { background: #fef9c3; color: #854d0e; }
.fx-chip.att-c-check { background: #fee2e2; color: #b91c1c; }
.fx-chip.att-c-reviewed { background: #e7e5e4; color: #44403c; }
.fx-chip.att-c-device { background: #334155; color: #fff; }
.att-detail-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-top: 6px; }
.att-detail-status .v { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.fx-modal-footer.att-detail-footer { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr) 52px; }
.att-more-wrap { position: relative; }
.att-more-btn { width: 100%; padding-left: 0; padding-right: 0; }
.att-more-menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 200px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 18px 36px -12px rgba(15, 23, 42, .3); overflow: hidden; z-index: 30; }
.att-more-menu.hidden { display: none; }
.att-more-item { width: 100%; display: block; padding: 13px 16px; font-size: 14px; font-weight: 800; color: #334155; text-align: left; background: #fff; }
.att-more-item + .att-more-item { border-top: 1px solid #f1f5f9; }
.att-more-item:hover { background: #f8fafc; }
.att-more-item.danger { color: #be123c; }
.att-more-item.is-disabled { opacity: .45; cursor: not-allowed; }
.fx-textarea.att-reason-input { background: #f8fafc; }
.att-photo-info { width: 100%; max-width: 420px; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.5; color: #334155; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.att-geo-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.att-geo-row .fx-btn { padding-left: 0; padding-right: 0; }
.att-geo-results { margin-top: 8px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; }
.att-geo-results.hidden { display: none; }
.att-geo-item { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; text-align: left; font-size: 13px; font-weight: 700; color: #334155; line-height: 1.4; }
.att-geo-item + .att-geo-item { border-top: 1px solid #f1f5f9; }
.att-geo-item i { margin-top: 2px; color: #a51c1c; flex: 0 0 auto; }
.att-geo-item span { min-width: 0; overflow-wrap: anywhere; }
.att-office-delete { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 6px; }
.att-office-delete .fx-btn { width: 100%; }
.att-hol-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 14px 0 8px; }
.att-hol-list { display: flex; flex-direction: column; gap: 8px; }
.att-hol-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; }
.att-hol-main { flex: 1; min-width: 0; }
.att-hol-date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #1e293b; }
.att-hol-days { padding: 1px 8px; border-radius: 999px; background: #fee2e2; color: #b91c1c; font-size: 11px; font-weight: 800; }
.att-hol-name { margin-top: 2px; font-size: 13px; font-weight: 600; color: #475569; overflow-wrap: anywhere; }
.att-hol-del { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: #fee2e2; color: #b91c1c; display: flex; align-items: center; justify-content: center; }
.att-hol-del:active { background: #fecaca; }
.att-sched-save { background: var(--fx-soft, #fbe4e4); color: var(--fx, #a51c1c); }
.att-sched-save:not(.is-disabled):hover { background: #f6cfcf; }
.att-request-more { display: flex; justify-content: center; padding-top: 10px; }
.att-request-all-list { padding: 14px; }
.att-request-hint { margin-top: auto; padding-top: 4px; text-align: center; font-size: 11px; font-weight: 600; line-height: 1.5; color: #94a3b8; }
.att-hol-del.is-disabled { opacity: .45; cursor: not-allowed; }
.att-readonly .fx-input:disabled, .att-readonly .fx-select:disabled, #attEmpOffice:disabled { background: #f1f5f9; color: #64748b; cursor: not-allowed; }
.att-loc2-card:not(.hidden) { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding: 12px 14px; border: 1px solid #bfd7ea; border-radius: 14px; background: #f3f8fc; }
.att-loc2-card .fx-field { margin: 0; }
