@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --navy: #101b3f;
  --navy-2: #172554;
  --yellow: #f7c928;
  --yellow-soft: #fff7cf;
  --ink: #111318;
  --muted: #667085;
  --line: #dfe3e8;
  --bg: #f6f6f4;
  --white: #fff;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --red: #b42318;
  --red-soft: #fff1f0;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(16, 27, 63, 0.08);
  --blue: var(--yellow);
  --blue-soft: var(--yellow-soft);
  --amber: #a76b00;
  --amber-soft: #fff4cc;
}

@keyframes uiFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes uiFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes uiDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-heading,
.settings-panel.active,
.planner-card:not(.hidden),
.calendar-section,
.attendance-receipt,
.permission-card,
.profile-section.active {
  animation: uiFadeUp 0.28s ease-out both;
}
.stats-grid > *,
.settings-list > *,
.team-directory > *,
.attendance-settings-grid > *,
.weekly-planner > * {
  animation: uiFadeUp 0.24s ease-out both;
}
.stats-grid > *:nth-child(2),
.settings-list > *:nth-child(2),
.team-directory > *:nth-child(2) {
  animation-delay: 0.035s;
}
.stats-grid > *:nth-child(3),
.settings-list > *:nth-child(3),
.team-directory > *:nth-child(3) {
  animation-delay: 0.07s;
}
.ui-select-menu:not(.hidden),
.branch-map-results:not(.hidden),
.custom-datetime.is-open .datetime-panel {
  transform-origin: top center;
  animation: uiDropdownIn 0.18s ease-out both;
}
.burger-shell:not(.hidden) .burger-backdrop,
.confirm-modal:not(.hidden),
.photo-proof-modal:not(.hidden),
.calendar-edit-modal:not(.hidden) {
  animation: uiFadeIn 0.2s ease-out both;
}
.burger-shell:not(.hidden) .burger-drawer,
.photo-proof-modal:not(.hidden) .photo-proof-dialog,
.calendar-edit-modal:not(.hidden) .calendar-edit-dialog {
  animation: uiFadeUp 0.24s ease-out both;
}
.calendar-event,
.team-card,
.settings-item,
.stat-card,
.btn {
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
}
img {
  max-width: 100%;
}
.hidden {
  display: none !important;
}
.muted {
  margin: 0.25rem 0;
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
}
h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}
.container {
  width: min(1380px, calc(100% - 40px));
  margin-inline: auto;
}
.page {
  padding: 32px 0 54px;
}
.eyebrow {
  margin: 0 0 6px;
  color: #8a6800;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.field-help,
.security-note {
  color: var(--muted);
  font-size: 0.72rem;
}
.label-note {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

/* Header dan navigasi */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 max(20px, calc((100% - 1380px) / 2));
  border-bottom: 1px solid #26345d;
  background: var(--navy);
  color: #fff;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  box-shadow: var(--shadow);
}
.brand-mark.small {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--yellow);
  color: #080808;
  font-size: 0.75rem;
}
.admin-nav {
  display: flex;
  align-self: stretch;
  gap: 6px;
  margin-right: auto;
}
.admin-nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: #cbd1e1;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}
.admin-nav a:hover,
.admin-nav a.active {
  border-color: var(--yellow);
  color: var(--yellow);
}
.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.user-pill,
.member {
  display: flex;
  align-items: center;
  gap: 8px;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 900;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topbar .btn-ghost {
  color: #fff;
}
.topbar .legacy-nav-hidden,
.topbar .admin-nav {
  display: none !important;
}
.burger-button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
}
.burger-button span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--yellow);
}
.burger-shell {
  position: fixed;
  inset: 0;
  z-index: 400;
}
.burger-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(5, 10, 29, 0.6);
  backdrop-filter: blur(2px);
}
.burger-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(340px, 88vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #fff;
  box-shadow: -12px 0 36px rgba(5, 10, 29, 0.2);
  animation: drawer-in 0.2s ease;
}
.burger-drawer header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.burger-drawer header > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.burger-drawer header small {
  color: var(--muted);
  text-transform: capitalize;
}
.drawer-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: #f1f2f4;
  font-size: 1.35rem;
  cursor: pointer;
}
.burger-drawer nav {
  display: grid;
  gap: 6px;
  padding: 16px 0;
}
.burger-drawer nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.burger-drawer nav a:hover {
  background: var(--yellow-soft);
}
.burger-drawer nav a > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--navy);
  color: var(--yellow);
}
.burger-drawer footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}
.drawer-logout {
  width: 100%;
  min-height: 48px;
  border: 1px solid #efc8c5;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 900;
  cursor: pointer;
}
.menu-open {
  overflow: hidden;
}
@keyframes drawer-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: none;
  }
}
@media (max-width: 900px) {
  .burger-shell:not(.hidden) .burger-drawer {
    animation: drawer-in 0.28s cubic-bezier(0.22, 0.8, 0.25, 1) both;
  }
  .burger-shell:not(.hidden) .burger-backdrop {
    animation: uiFadeIn 0.22s ease-out both;
  }
}

/* Struktur umum */
.page-heading,
.section-heading,
.toolbar,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.page-heading {
  margin-bottom: 24px;
}
.section-heading {
  margin-bottom: 18px;
}
.card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 27, 63, 0.025);
}
.card {
  padding: 22px;
  margin-bottom: 20px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.schedule-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stat-card {
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px;
}
.stat-card > div {
  display: flex;
  flex-direction: column;
}
.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
}
.stat-card strong {
  font-size: 1.35rem;
}
.employee-attendance-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.employee-attendance-tools select {
  min-width: 170px;
}
.attendance-status-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.attendance-status-filters button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
.attendance-status-filters button.active {
  color: var(--primary);
  border-color: var(--primary);
  background: #f2f5ff;
}
.attendance-status-filters strong {
  margin-left: 5px;
}
.account-state.attendance-alpha {
  background: #fff0f0;
  color: #b42318;
}
.account-state.attendance-belum {
  background: #f3f4f6;
  color: #667085;
}
.schedule-export-sheet {
  position: fixed;
  top: 0;
  left: -10000px;
  z-index: -1;
  width: 1400px;
  padding: 72px 80px 56px;
  background: #fff;
  color: #101b3f;
  font-family: Arial, sans-serif;
}
.schedule-export-sheet header {
  margin-bottom: 34px;
}
.schedule-export-sheet header p {
  margin: 0 0 10px;
  color: #9b7400;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.schedule-export-sheet header h1 {
  margin: 0 0 12px;
  font-size: 54px;
  line-height: 1.05;
}
.schedule-export-sheet header h2 {
  margin: 0;
  color: #475467;
  font-size: 27px;
  font-weight: 600;
}
.schedule-export-sheet header span {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff3b8;
  font-size: 21px;
  font-weight: 800;
}
.schedule-export-sheet table {
  width: 100%;
  border: 3px solid #101b3f;
  border-collapse: collapse;
  table-layout: fixed;
}
.schedule-export-sheet th {
  padding: 18px 22px;
  border: 2px solid #101b3f;
  background: #101b3f;
  color: #fff;
  font-size: 25px;
  text-align: left;
}
.schedule-export-sheet th:first-child {
  width: 48%;
}
.schedule-export-sheet td {
  padding: 15px 22px;
  border: 2px solid #aeb5c4;
  font-size: 23px;
  font-weight: 700;
  vertical-align: middle;
}
.schedule-export-sheet .export-date td {
  padding-block: 14px;
  border-color: #101b3f;
  background: #ffd027;
  color: #101b3f;
  font-size: 24px;
  font-weight: 900;
  text-transform: capitalize;
}
.schedule-export-sheet .export-branch td {
  padding-block: 10px;
  background: #eef1f7;
  color: #344054;
  font-size: 20px;
  font-weight: 900;
}
.schedule-export-sheet .export-empty td {
  color: #98a2b3;
  font-style: italic;
  font-weight: 500;
  text-align: center;
}
.schedule-export-sheet footer {
  margin-top: 18px;
  color: #667085;
  font-size: 18px;
  text-align: right;
}
.schedule-export-sheet.weekly-export {
  padding: 56px 30px 44px;
}
.schedule-export-sheet.weekly-export header {
  margin-bottom: 30px;
  text-align: center;
}
.schedule-export-sheet.weekly-export header h1 {
  margin: 0 0 12px;
  font-size: 48px;
  line-height: 1.05;
}
.schedule-export-sheet.weekly-export header h2 {
  margin: 0;
  color: #344054;
  font-size: 25px;
  font-weight: 500;
}
.schedule-export-sheet.weekly-export table {
  width: 100%;
  border: 2px solid #d5dae3;
  border-collapse: collapse;
  table-layout: fixed;
}
.schedule-export-sheet.weekly-export th {
  padding: 17px 8px;
  border: 2px solid #d5dae3;
  background: #f6f7f9;
  color: #101828;
  font-size: 21px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.schedule-export-sheet.weekly-export thead th:first-child {
  width: 140px;
  text-align: left;
}
.schedule-export-sheet.weekly-export td {
  height: 88px;
  padding: 9px;
  border: 2px solid #d5dae3;
  vertical-align: top;
}
.schedule-export-sheet.weekly-export .export-branch-name {
  padding: 14px 10px;
  font-size: 22px;
  text-align: left;
  text-transform: none;
  vertical-align: middle;
}
.schedule-export-sheet.weekly-export .export-card {
  margin-bottom: 8px;
  padding: 11px 10px;
  border-left: 6px solid #101b3f;
  border-radius: 4px;
  background: #ffd027;
  color: #111827;
}
.schedule-export-sheet.weekly-export .export-card:last-child {
  margin-bottom: 0;
}
.schedule-export-sheet.weekly-export .export-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.1;
}
.schedule-export-sheet.weekly-export .export-card span {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}
.schedule-export-sheet.weekly-export .export-card.malam {
  border-left-color: #ffd027;
  background: #101b3f;
  color: #fff;
}
.schedule-export-sheet.weekly-export .export-card.reguler {
  border-left-color: #9b7400;
  background: #fff0a6;
}
.schedule-export-sheet.weekly-export .export-card.libur {
  border-left-color: #98a2b3;
  background: #eef0f3;
  color: #667085;
}
.schedule-export-sheet.weekly-export .export-card.izin {
  border-left-color: #b42318;
  background: #fff1f0;
  color: #7a271a;
}
.stat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  font-weight: 900;
}
.stat-icon.blue,
.stat-icon.amber {
  background: var(--yellow-soft);
  color: #765900;
}
.stat-icon.green {
  background: var(--green-soft);
  color: var(--green);
}
.content-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}
.live-badge,
.date-chip {
  padding: 7px 11px;
  border: 1px solid #ccebd8;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 800;
}
.empty-state {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 15px;
  color: var(--muted);
  text-align: center;
}
.empty-cell {
  display: block;
  padding: 18px 4px;
  color: #bbc3cf;
  text-align: center;
}

/* Tombol dan form */
.btn {
  min-height: 42px;
  padding: 9px 15px;
  border: 0;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn:focus-visible,
.icon-btn:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(247, 201, 40, 0.34);
  outline-offset: 1px;
}
.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}
.btn-primary {
  border: 1px solid #d3a900;
  background: var(--yellow);
  color: #111;
}
.btn-secondary {
  border: 1px solid #cfd4dc;
  background: #fff;
  color: var(--ink);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-full {
  width: 100%;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: #f1f2f4;
  font-size: 1.25rem;
  cursor: pointer;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label,
.toolbar-actions label {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
}
input,
select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #cfd5de;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:disabled,
select:disabled {
  background: #f1f2f4;
  color: #7b8492;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.span-2 {
  grid-column: span 2;
}
.form-actions {
  justify-content: flex-end;
  margin-top: 18px;
}
.switch-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.switch-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--navy);
}
.input-suffix {
  position: relative;
}
.input-suffix input {
  padding-right: 60px;
}
.input-suffix span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  transform: translateY(-50%);
}

/* Dashboard */
.attendance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.attendance-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.shift-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shift-title > div {
  display: flex;
  flex-direction: column;
}
.shift-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}
.shift-dot.night {
  background: var(--navy);
}
.status {
  display: inline-flex;
  width: max-content;
  margin: 14px 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.status.pending {
  background: #f1f2f4;
  color: var(--muted);
}
.status.success {
  background: var(--green-soft);
  color: var(--green);
}
.schedule-list {
  display: grid;
  gap: 9px;
}
.schedule-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-radius: 11px;
  background: #f8f9fa;
}
.schedule-row > div {
  display: flex;
  flex-direction: column;
}
.schedule-row span {
  color: var(--muted);
  font-size: 0.8rem;
}
.shift-badge {
  min-width: 62px;
  padding: 7px 8px !important;
  border-radius: 8px;
  background: var(--yellow-soft);
  color: #765900 !important;
  font-weight: 800;
  text-align: center;
}
.shift-badge.off {
  background: #eee;
  color: #555 !important;
}
.attendance-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.attendance-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafa;
}
.attendance-stage-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8e8e8;
  color: var(--muted);
  font-weight: 900;
}
.attendance-stage > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.attendance-stage small,
.attendance-stage span:last-child {
  color: var(--muted);
  font-size: 0.68rem;
}
.attendance-stage strong {
  color: var(--navy);
  font-size: 0.9rem;
}
.attendance-stage.available {
  border-color: #dfbd2e;
  background: var(--yellow-soft);
}
.attendance-stage.available .attendance-stage-icon {
  background: var(--yellow);
  color: #111;
}
.attendance-stage.done {
  border-color: #9bd6ae;
  background: var(--green-soft);
}
.attendance-stage.done .attendance-stage-icon {
  background: var(--green);
  color: #fff;
}
.attendance-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.attendance-card-footer > span {
  color: var(--muted);
  font-size: 0.74rem;
}
.attendance-card-footer .btn {
  text-decoration: none;
  white-space: nowrap;
}

/* Tabel dan kalender */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.data-table,
.calendar-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table {
  min-width: 700px;
}
.data-table th,
.data-table td,
.calendar-table th,
.calendar-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.data-table th,
.calendar-table th {
  background: #f8f9fa;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.calendar-section {
  padding-bottom: 18px;
}
.calendar-table.person-calendar {
  width: 100%;
  min-width: 940px;
  table-layout: fixed;
}
.person-calendar th {
  height: 68px;
  background: var(--navy);
  color: #fff;
  text-align: center;
}
.person-calendar th small {
  display: block;
  color: var(--yellow);
  font-size: 0.95rem;
}
.person-calendar th:first-child {
  width: 110px;
  text-align: left;
}
.person-calendar th:nth-child(2),
.person-calendar td:has(> .calendar-person) {
  display: none;
}
.person-calendar td {
  height: 82px;
  padding: 7px;
  vertical-align: top;
}
.calendar-branch-cell {
  width: 110px;
  background: #fafafa !important;
  vertical-align: top !important;
}
.branch-label {
  display: flex;
  align-items: center;
  gap: 7px;
}
.branch-label > span,
.branch-number,
.attendance-date {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  background: var(--yellow);
  color: #111;
  font-size: 0.68rem;
  font-weight: 900;
}
.person-calendar .branch-label > span {
  display: none;
}
.person-calendar .branch-label strong {
  max-width: 100%;
  font-size: 0.78rem;
  white-space: normal;
}
.calendar-person {
  display: flex;
  align-items: center;
  gap: 7px;
}
.calendar-event {
  position: relative;
  width: 100%;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 5px;
  padding: 7px;
  border: 1px solid #dfb600;
  border-radius: 8px;
  background: var(--yellow-soft);
  text-align: left;
}
.event-person {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(16, 27, 63, 0.14);
}
.event-person > span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
  color: #111;
  font-size: 0.52rem;
  font-weight: 900;
}
.event-person > span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-person strong {
  overflow: hidden;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event > b {
  font-size: 0.67rem;
  line-height: 1.2;
}
.calendar-event > span {
  color: #6f5900;
  font-size: 0.54rem;
}
.calendar-event > small {
  margin-top: auto;
  color: #9a2319;
  font-size: 0.5rem;
  font-weight: 800;
}
.calendar-event > small.started {
  color: #765900;
}
.calendar-event > small.complete {
  color: var(--green);
}
.calendar-event.malam {
  border-color: #050a1d;
  background: var(--navy);
  color: #fff;
}
.calendar-event.malam .event-person {
  border-color: rgba(255, 255, 255, 0.18);
}
.calendar-event.malam > span {
  color: #d9deea;
}
.calendar-event.malam > small {
  color: #ffd94f;
}
.calendar-event.reguler {
  overflow: hidden;
  padding: 0;
  border-color: #dfb600;
  background: var(--yellow-soft);
}
.calendar-event.reguler .event-person {
  min-height: 30px;
  padding: 5px 7px;
  border: 0;
  background: var(--navy);
  color: #fff;
}
.calendar-event.reguler > b,
.calendar-event.reguler > span,
.calendar-event.reguler > small {
  margin-inline: 7px;
}
.calendar-event.reguler > b {
  margin-top: 4px;
}
.calendar-event.reguler > small {
  margin-bottom: 6px;
}
.calendar-event.off {
  justify-content: center;
  border-color: #bbb;
  background: #f1f1f1;
  color: #555;
}
.calendar-edit-trigger {
  font: inherit;
  cursor: pointer;
}
.calendar-edit-trigger:hover {
  outline: 2px solid var(--yellow);
  transform: translateY(-1px);
}
.calendar-attendance {
  width: 100%;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(16, 27, 63, 0.14);
  font-size: 0.55rem;
  font-weight: 800;
}
.calendar-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  cursor: pointer;
}
.calendar-event:hover .calendar-delete,
.calendar-delete:focus {
  opacity: 1;
}
.calendar-edit-trigger[draggable="true"] {
  cursor: grab;
}
.calendar-edit-trigger.dragging {
  opacity: 0.35;
}
.calendar-drop-cell.drag-over {
  background: var(--yellow-soft) !important;
  box-shadow: inset 0 0 0 2px #dfb600;
}
.calendar-drag-handle {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.calendar-event:hover .calendar-drag-handle,
.calendar-drag-handle:focus {
  opacity: 1;
}
.calendar-drag-ghost {
  position: fixed !important;
  z-index: 10000;
  width: 150px;
  max-width: 42vw;
  opacity: 0.9 !important;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(2deg);
  box-shadow: 0 18px 45px rgba(16, 27, 63, 0.3) !important;
}
body.calendar-touch-dragging {
  user-select: none;
}
@media (pointer: coarse) {
  .calendar-drag-handle {
    opacity: 1;
  }
  .calendar-edit-trigger {
    padding-bottom: 35px;
  }
}
.calendar-event.leave-event {
  border-color: #f0a9a5;
  background: #fff1f0;
  color: #7a271a;
}
.calendar-event.leave-event .event-person span {
  background: #fee4e2;
  color: var(--red);
}
.calendar-event.leave-event.uncovered {
  box-shadow: inset 4px 0 0 var(--red);
}
.calendar-event.leave-event.covered {
  border-color: #a6d7b5;
  background: #f0fdf4;
  color: #166534;
  box-shadow: inset 4px 0 0 var(--green);
}
.calendar-event.replacement-event {
  border-color: #8aa4dd;
  background: #eef4ff;
}
.calendar-event.pending-leave-event {
  border-color: #e5b700;
  box-shadow: inset 4px 0 0 var(--yellow);
}
.calendar-event em.pending-leave {
  color: #8a6200;
}
.calendar-event em {
  color: #34518d;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 850;
}
.employee-options label.employee-on-leave {
  opacity: 0.68;
}
.employee-options label.employee-on-leave span {
  border-style: dashed;
  background: #f3f4f6;
  color: #7a271a;
}

/* Toolbar dan dropdown custom */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.toolbar-actions > .ui-select {
  width: auto;
  min-width: 190px;
}
.week-nav .btn {
  min-width: 44px;
}
.ui-select {
  position: relative;
  width: 100%;
  min-width: 0;
}
.ui-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ui-select-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid #cfd5de;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.ui-select-trigger i {
  width: 0;
  height: 0;
  flex: none;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid var(--navy);
  transition: transform 0.15s;
}
.ui-select.open .ui-select-trigger {
  border-color: #d7ad00;
  box-shadow: 0 0 0 3px rgba(247, 201, 40, 0.2);
}
.ui-select.open .ui-select-trigger i {
  transform: rotate(180deg);
}
.ui-select-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f3f5f8;
}
.ui-select-trigger:focus-visible {
  outline: 3px solid rgba(247, 201, 40, 0.32);
  outline-offset: 2px;
}
.ui-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 450;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(16, 27, 63, 0.18);
}
.ui-select-menu button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.ui-select-menu button:hover {
  background: var(--yellow-soft);
}
.ui-select-menu button:focus-visible {
  outline: 2px solid #d7ad00;
  outline-offset: -2px;
}
.ui-select-menu button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ui-select-menu button.selected {
  background: var(--navy);
  color: #fff;
}
.ui-select-menu button.selected b {
  color: var(--yellow);
}
.week-nav .ui-select {
  min-width: 190px;
}

/* Penyusun jadwal */
.planner-card {
  border-top: 4px solid var(--yellow);
}
.planner-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
  padding: 14px;
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.planner-help {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.weekly-planner {
  display: grid;
  gap: 12px;
}
.planner-day {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.planner-day-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.planner-day-head::-webkit-details-marker {
  display: none;
}
.planner-day-head > span:first-child {
  display: flex;
  flex-direction: column;
}
.planner-day-head small {
  color: #cbd1e1;
  font-size: 0.68rem;
}
.day-summary-date {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--yellow);
  font-weight: 900;
}
.day-summary-date i {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid var(--yellow);
}
.planner-day[open] .day-summary-date i {
  transform: rotate(180deg);
}
.planner-shifts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 11px;
}
.shift-selector {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.shift-selector legend {
  padding: 0 5px;
  font-weight: 900;
}
.selection-count {
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.65rem;
}
.selector-note {
  margin: 3px 0 9px;
  color: var(--muted);
  font-size: 0.7rem;
}
.employee-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.employee-options label {
  cursor: pointer;
}
.employee-options input {
  position: absolute;
  opacity: 0;
}
.employee-options span {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  border: 1px solid #d5dae1;
  border-radius: 8px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}
.planner-empty-members {
  display: block;
  width: 100%;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.75rem;
}
.employee-options input:checked + span {
  border-color: #d2aa00;
  background: var(--yellow);
}
.shift-selector.libur input:checked + span {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

/* Modal kalender */
.calendar-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 10, 29, 0.64);
  backdrop-filter: blur(3px);
}
.calendar-edit-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
}
.calendar-edit-dialog .form-group {
  margin-bottom: 12px;
}
.calendar-task-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.calendar-task-options label {
  cursor: pointer;
}
.calendar-task-options input {
  position: absolute;
  opacity: 0;
}
.calendar-task-options span {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fafafa;
  font-size: 0.76rem;
  font-weight: 900;
}
.calendar-task-options input:checked + span {
  border-color: #d2aa00;
  background: var(--yellow);
}
.calendar-task-options label:last-child input:checked + span {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}
.calendar-task-options input:disabled + span {
  opacity: 0.45;
}

/* Admin settings */
.settings-page {
  max-width: 1200px;
}
.settings-tabs {
  position: sticky;
  top: 68px;
  z-index: 25;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 18px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 16px rgba(16, 27, 63, 0.05);
  scrollbar-width: none;
}
.settings-tabs::-webkit-scrollbar {
  display: none;
}
.settings-tabs button {
  min-width: max-content;
  min-height: 40px;
  padding: 8px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}
.settings-tabs button.active {
  background: var(--navy);
  color: var(--yellow);
}
.settings-panel {
  display: none;
}
.settings-panel.active {
  display: block;
  /* Jangan mempertahankan transform setelah animasi; fixed picker mobile
     harus tetap mengacu pada viewport, bukan panel pengaturan. */
  animation-fill-mode: backwards;
}
.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
  align-items: start;
}
.settings-form-card {
  position: sticky;
  top: 132px;
}
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.list-search {
  width: min(250px, 48%);
  min-height: 40px;
}
.settings-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--yellow-soft);
  color: #5f4b00;
  font-size: 0.76rem;
}
.settings-list {
  display: grid;
  gap: 8px;
}
.settings-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.item-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.item-main strong,
.item-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-main small {
  color: var(--muted);
  font-size: 0.7rem;
}
.item-actions {
  display: flex;
  gap: 5px;
}
.item-actions button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #cfd4dc;
  border-radius: 7px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}
.item-actions button.danger {
  border-color: #efc8c5;
  color: var(--red);
}
.role-badge,
.account-state {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eee;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}
.account-state.active {
  background: var(--green-soft);
  color: var(--green);
}
.account-state.review {
  background: #fff3cd;
  color: #8a6500;
}
.role-badge.admin {
  background: var(--navy);
  color: var(--yellow);
}
.position-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--navy);
  color: var(--yellow);
  font-weight: 900;
}
.team-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 9px;
}
.team-card {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.team-card > .account-state {
  position: absolute;
  top: 9px;
  right: 9px;
}
.team-photo,
.profile-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
  color: #111;
  font-weight: 900;
}
.team-photo {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
}
.team-photo.small {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}
.team-photo img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 42px;
}
.team-info strong {
  overflow: hidden;
  color: var(--navy);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-info span {
  color: #6d5300;
  font-size: 0.75rem;
  font-weight: 800;
}
.team-info small {
  color: var(--muted);
  font-size: 0.68rem;
}
.branch-sort-item {
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 12px;
}
.branch-drag-handle {
  position: relative;
  width: 28px;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}
.branch-sort-item .item-main strong {
  font-size: 0.94rem;
}
.branch-sort-item .item-main small {
  margin-top: 2px;
}
.branch-sort-item .item-actions {
  margin-left: 4px;
}
.branch-location-editor {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f9fb;
}
.branch-location-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.branch-location-head > div {
  display: flex;
  flex-direction: column;
}
.branch-location-head small,
.branch-location-info > span {
  color: var(--muted);
  font-size: 0.7rem;
}
.branch-location-head .btn {
  min-height: 38px;
  padding: 7px 10px;
  font-size: 0.7rem;
}
.branch-map-search {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 9px;
}
.branch-map-search input {
  min-height: 42px;
}
.branch-map-search .btn {
  min-height: 42px;
  padding-inline: 15px;
}
.branch-map-results {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 650;
  overflow: auto;
  max-height: 250px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(16, 27, 63, 0.2);
}
.branch-map-results button {
  width: 100%;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.branch-map-results button:hover {
  background: var(--yellow-soft);
}
.branch-map-results strong {
  color: var(--navy);
  font-size: 0.76rem;
}
.branch-map-results small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}
.branch-map-no-result {
  padding: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}
#branchLocationMap {
  position: relative;
  z-index: 0;
  isolation: isolate;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #e9edf3;
}
#branchLocationMap .leaflet-pane,
#branchLocationMap .leaflet-top,
#branchLocationMap .leaflet-bottom {
  z-index: auto;
}
#branchLocationMap .leaflet-map-pane {
  z-index: 1;
}
#branchLocationMap .leaflet-tile-pane {
  z-index: 2;
}
#branchLocationMap .leaflet-overlay-pane {
  z-index: 3;
}
#branchLocationMap .leaflet-shadow-pane {
  z-index: 4;
}
#branchLocationMap .leaflet-marker-pane {
  z-index: 5;
}
#branchLocationMap .leaflet-tooltip-pane,
#branchLocationMap .leaflet-popup-pane {
  z-index: 6;
}
#branchLocationMap .leaflet-control {
  position: relative;
  z-index: 7;
}
.branch-location-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}
.branch-location-info > span {
  align-self: center;
  overflow-wrap: anywhere;
}
.branch-location-info label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}
.branch-location-info input {
  min-height: 42px;
  padding-right: 54px;
}
@media (max-width: 600px) {
  .branch-location-head {
    align-items: stretch;
    flex-direction: column;
  }
  .branch-location-head .btn {
    width: 100%;
  }
  .branch-location-info {
    grid-template-columns: 1fr;
  }
  .branch-map-search {
    grid-template-columns: 1fr;
  }
  .branch-map-search .btn {
    width: 100%;
  }
  .branch-map-results {
    top: 48px;
  }
  #branchLocationMap {
    height: 230px;
  }
  .branch-location-editor {
    overflow: visible;
  }
  .settings-form-card {
    overflow: visible;
  }
}
.branch-drag-handle:before {
  content: "";
  position: absolute;
  top: 9px;
  left: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow:
    8px 0 #98a2b3,
    0 8px #98a2b3,
    8px 8px #98a2b3,
    0 16px #98a2b3,
    8px 16px #98a2b3;
}
.branch-sort-item.branch-dragging {
  outline: 2px solid var(--yellow);
  background: var(--yellow-soft);
}
.position-time-fields {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafa;
}
.position-time-fields.disabled-fields {
  opacity: 0.5;
}
.attendance-position-toggle {
  margin-top: 8px;
  padding: 8px 11px;
  border: 1px solid #e2cf80;
  border-radius: 10px;
  background: var(--yellow-soft);
}
#positionList .item-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
#positionList .item-actions button:first-child {
  border-color: #d6ae00;
  background: var(--yellow-soft);
  color: var(--navy);
}
.attendance-settings-grid {
  display: grid;
  gap: 9px;
}
.attendance-setting-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr));
  align-items: end;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafafa;
}
.attendance-setting-card > div {
  display: flex;
  flex-direction: column;
  align-self: center;
}
.attendance-setting-card label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}
.position-advanced-fields {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f8fa;
}
.advanced-heading {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
.advanced-heading small {
  color: var(--muted);
  font-size: 0.7rem;
}
.position-advanced-fields .attendance-setting-card {
  grid-template-columns: 1fr 1fr;
  background: #fff;
}
.position-advanced-fields .attendance-setting-card > div,
.position-advanced-fields .attendance-setting-card > label:last-child {
  grid-column: 1/-1;
}
@media (max-width: 600px) {
  .position-advanced-fields .attendance-setting-card {
    grid-template-columns: 1fr;
  }
  .position-advanced-fields .attendance-setting-card > div,
  .position-advanced-fields .attendance-setting-card > label:last-child {
    grid-column: auto;
  }
}
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 550;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(5, 10, 29, 0.58);
  backdrop-filter: blur(3px);
}
.confirm-modal > div {
  width: min(390px, 100%);
  padding: 21px;
  border-radius: 14px;
  background: #fff;
}
.confirm-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.confirm-modal footer .btn {
  min-width: 100px;
}

/* Absensi karyawan */
.employee-bottom-nav {
  display: none !important;
}
.checkin-layout {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 17px;
  align-items: start;
}
.camera-frame {
  position: relative;
  max-height: 620px;
  overflow: hidden;
  aspect-ratio: 3/4;
  border-radius: 14px;
  background: #090f25;
}
.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera-frame video {
  transform: none;
}
#cameraPlaceholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
}
#cameraPlaceholder > span {
  color: var(--yellow);
  font-size: 3rem;
}
#cameraPlaceholder small {
  color: #cbd1e1;
}
.camera-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.camera-actions .btn {
  flex: 1;
}
.camera-fallback {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}
.camera-fallback span {
  color: #765900;
  font-weight: 900;
}
.camera-fallback input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.step-state {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eee;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
}
.step-state.ready {
  background: var(--green-soft);
  color: var(--green);
}
.attendance-window {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 15px;
  padding: 12px;
  border: 1px solid #e2c85d;
  border-radius: 11px;
  background: var(--yellow-soft);
  color: var(--navy);
}
.attendance-window small {
  color: #6d5a12;
}
.location-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.location-box.ready {
  border-color: #9bd6ae;
  background: var(--green-soft);
}
.location-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--yellow);
  font-size: 1.2rem;
}
.location-box > div {
  display: flex;
  flex-direction: column;
}
.location-box small {
  color: var(--muted);
  font-size: 0.68rem;
}
.checkin-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 15px 0;
}
.checkin-summary > div {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 9px;
  background: #f5f5f5;
}
.checkin-summary span {
  color: var(--muted);
  font-size: 0.66rem;
}
.submit-checkin {
  min-height: 50px;
}
.attendance-receipt {
  width: min(520px, 100%);
  margin: 18px auto;
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--yellow);
  border-radius: 18px;
  background: #fff;
  text-align: center;
}
.receipt-check {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.9rem;
  font-weight: 900;
}
.receipt-check.waiting {
  background: var(--yellow-soft);
  color: #735900;
}
.receipt-photo {
  position: relative;
  width: min(250px, 76%);
  overflow: hidden;
  margin: 20px auto 15px;
  aspect-ratio: 3/4;
  border-radius: 14px;
  background: #eee;
}
.receipt-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.receipt-photo span {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(16, 27, 63, 0.86);
  color: #fff;
  font-size: 0.64rem;
}
.receipt-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.receipt-details > div {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: 9px;
  background: #f5f5f5;
}
.receipt-details span {
  color: var(--muted);
  font-size: 0.66rem;
}
.receipt-location,
.receipt-home {
  width: 100%;
  display: flex;
  margin-top: 8px;
  text-decoration: none;
}
.proof-actions {
  display: flex;
  gap: 6px;
}
.proof-actions a,
.proof-actions button {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
}
.photo-proof-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 18px;
}
.photo-proof-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(5, 10, 29, 0.72);
  backdrop-filter: blur(4px);
}
.photo-proof-dialog {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.photo-proof-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.photo-proof-dialog h3 {
  margin: 0;
}
.photo-proof-dialog header small {
  color: var(--muted);
}
.photo-proof-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  max-height: 72vh;
  border-radius: 13px;
  background: #0b1024;
}
.photo-proof-frame img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}
@media (max-width: 600px) {
  .photo-proof-modal {
    padding: 10px;
  }
  .photo-proof-dialog {
    padding: 14px;
    border-radius: 16px;
  }
  .photo-proof-frame,
  .photo-proof-frame img {
    max-height: 76vh;
  }
}

/* Profil */
.profile-avatar {
  width: 42px;
  height: 42px;
}
.profile-avatar.large {
  width: 74px;
  height: 74px;
  font-size: 1.5rem;
}
.profile-avatar.xlarge {
  width: 106px;
  height: 106px;
  font-size: 2rem;
}
.profile-page {
  max-width: 900px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 15px;
}
.profile-tabs {
  position: static;
}
.profile-panel {
  display: none;
}
.profile-panel.active {
  display: block;
}
.profile-form {
  width: min(560px, 100%);
  margin-inline: auto;
}
.profile-form h2 {
  margin-bottom: 17px;
}
.profile-form .form-group {
  margin-bottom: 13px;
}
.profile-photo-editor {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.profile-photo-editor label {
  position: relative;
}
.profile-photo-editor input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.profile-photo-editor small {
  width: 100%;
  color: var(--muted);
}
.logout-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: #efc8c5;
}
.logout-zone > div {
  display: flex;
  flex-direction: column;
}
.logout-zone small {
  color: var(--muted);
}

/* Login, reset, permission */
.auth-page {
  min-height: 100vh;
  background: var(--navy);
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.auth-intro {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(40px, 8vw, 105px);
  background:
    radial-gradient(circle at 20% 10%, #294681, transparent 36%),
    linear-gradient(145deg, #101b3f, #172554);
  color: #fff;
}
.auth-intro .eyebrow {
  color: var(--yellow);
}
.auth-intro h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}
.auth-intro > p:not(.eyebrow) {
  max-width: 590px;
  color: #cbd5e1;
  font-size: 1.05rem;
}
.feature-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
  color: #dbe2f0;
  font-size: 0.88rem;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 28px;
  background: #f8f9fa;
}
.auth-card {
  width: min(440px, 100%);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
  box-shadow: var(--shadow);
}
.auth-card h2 {
  margin-bottom: 7px;
  font-size: 1.65rem;
}
.login-form {
  margin-top: 26px;
}
.login-form .form-group {
  margin-bottom: 16px;
}
.mobile-brand {
  display: none;
}
.forgot-link,
.back-login {
  border: 0;
  background: transparent;
  color: #6e5600;
  font-weight: 900;
  cursor: pointer;
}
.forgot-link {
  width: 100%;
  padding: 12px;
}
.permission-page {
  min-height: 100vh;
  background: var(--navy);
}
.permission-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.permission-card {
  width: min(520px, 100%);
  padding: 32px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
}
.permission-card > .brand-mark {
  margin: 0 auto 20px;
  background: var(--yellow);
}
.permission-list {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  text-align: left;
}
.permission-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.permission-list > div > div {
  display: flex;
  flex-direction: column;
}
.permission-list small {
  color: var(--muted);
}
.permission-list b {
  font-size: 0.7rem;
}
.permission-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--yellow-soft);
}
.permission-list .ready {
  border-color: #9bd6ae;
  background: var(--green-soft);
}
.permission-button {
  min-height: 50px;
}

/* Toast dan loader */
#toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 700;
  display: grid;
  gap: 8px;
}
.toast {
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.toast-success {
  background: var(--green);
}
.toast-error {
  background: var(--red);
}
#global-loader {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(2px);
}
.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #dbe0e6;
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Desktop: sidebar selalu terbuka */
@media (min-width: 901px) {
  body:has(.burger-shell) {
    padding-left: 260px;
  }
  .burger-button {
    display: none;
  }
  .burger-shell.hidden {
    display: block !important;
  }
  .burger-shell {
    inset: 0 auto 0 0;
    width: 260px;
    pointer-events: none;
  }
  .burger-backdrop {
    display: none;
  }
  .burger-drawer {
    right: auto;
    left: 0;
    width: 260px;
    padding: 22px 16px;
    background: var(--navy);
    color: #fff;
    box-shadow: 8px 0 28px rgba(5, 10, 29, 0.12);
    animation: none;
    pointer-events: auto;
  }
  .burger-drawer header {
    grid-template-columns: auto minmax(0, 1fr);
    border-color: #2c385e;
  }
  .burger-drawer header small,
  .burger-drawer footer {
    color: #aeb8d2;
  }
  .burger-drawer .drawer-close {
    display: none;
  }
  .burger-drawer nav a {
    color: #d9dfed;
  }
  .burger-drawer nav a:hover {
    background: #1b2a56;
    color: #fff;
  }
  .burger-drawer footer {
    border-color: #2c385e;
  }
  .topbar {
    padding-inline: 24px;
  }
  .container {
    width: min(1380px, calc(100% - 48px));
  }
  .week-nav .btn,
  .week-nav .ui-select-trigger {
    height: 46px;
  }
  .week-nav #prevWeek,
  .week-nav #nextWeek {
    width: 46px;
    padding: 0;
  }
  .week-nav #thisWeek {
    min-width: 88px;
    white-space: nowrap;
  }
  .page-heading > #togglePlanner {
    min-width: 150px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    display: none;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    font-weight: 800;
  }
  .content-grid,
  .checkin-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-form-card {
    position: static;
  }
  .planner-shifts {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .attendance-setting-card {
    grid-template-columns: 1fr 1fr;
  }
  .attendance-setting-card > div {
    grid-column: 1/3;
  }
}

/* Mobile */
@media (max-width: 760px) {
  html {
    font-size: 15px;
    scroll-padding-top: 68px;
  }
  .container {
    width: calc(100% - 24px);
  }
  .page {
    padding: 18px 0 34px;
  }
  .topbar {
    height: 60px;
    padding: 0 12px;
  }
  .brand-mark.small {
    width: 36px;
    height: 36px;
  }
  .app-brand span:last-child {
    max-width: 180px;
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .burger-button {
    width: 44px;
    height: 44px;
  }
  .page-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
  }
  .page-heading > .btn {
    width: 100%;
    min-height: 48px;
  }
  h1 {
    font-size: 1.65rem;
  }
  .card {
    padding: 15px;
    margin-bottom: 14px;
    border-radius: 14px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 14px;
  }
  .stat-card {
    min-height: 84px;
    padding: 12px;
  }
  .stat-card strong {
    font-size: 1.1rem;
  }
  .content-grid {
    gap: 14px;
  }
  .btn,
  input,
  select,
  .ui-select-trigger {
    min-height: 48px;
  }
  .form-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .form-actions .btn {
    width: 100%;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar-actions {
    width: 100%;
  }
  .toolbar-actions > .ui-select {
    width: 100%;
    min-width: 0;
  }
  .settings-tabs {
    top: 60px;
    gap: 4px;
    margin-inline: -8px;
    padding: 6px;
    scroll-padding-inline: 6px;
    scroll-snap-type: x proximity;
  }
  .settings-tabs button {
    min-height: 42px;
    padding-inline: 12px;
    scroll-snap-align: start;
  }
  .list-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .list-search {
    width: 100%;
  }
  .settings-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .item-actions {
    grid-column: 2/4;
    width: 100%;
  }
  .item-actions button {
    flex: 1;
    min-height: 40px;
  }
  .team-directory {
    grid-template-columns: 1fr;
  }
  #accountList > .settings-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 8px;
  }
  #accountList > .settings-item > .role-badge {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  #accountList > .settings-item > .item-actions {
    grid-column: 2/4;
  }
  #branchList > .branch-sort-item {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    padding-block: 15px;
  }
  #branchList > .branch-sort-item > .branch-drag-handle {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  #branchList > .branch-sort-item > .item-main {
    grid-column: 2;
    grid-row: 1;
  }
  #branchList > .branch-sort-item > .account-state {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }
  #branchList > .branch-sort-item > .item-actions {
    grid-column: 2/4;
    grid-row: 2;
    margin: 2px 0 0;
  }
  .attendance-setting-card {
    grid-template-columns: 1fr;
  }
  .attendance-setting-card > div {
    grid-column: auto;
  }
  .position-time-fields {
    padding: 11px;
  }
  .attendance-pair {
    grid-template-columns: 1fr;
  }
  .attendance-card-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .attendance-card-footer .btn {
    width: 100%;
    text-align: center;
  }
  .camera-frame {
    max-height: none;
  }
  .camera-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .checkin-summary {
    grid-template-columns: 1fr 1fr;
  }
  .location-box {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .location-box .btn {
    grid-column: 1/3;
  }
  .attendance-receipt {
    padding: 18px;
  }
  .receipt-details {
    grid-template-columns: 1fr 1fr;
  }
  .receipt-details > div:last-child {
    grid-column: 1/3;
  }
  .profile-avatar.large {
    width: 60px;
    height: 60px;
  }
  .profile-avatar.xlarge {
    width: 88px;
    height: 88px;
  }
  .profile-tabs {
    top: 60px;
  }
  .logout-zone {
    align-items: stretch;
    flex-direction: column;
  }
  .logout-zone .btn {
    width: 100%;
  }
  .confirm-modal {
    align-items: end;
    padding: 0;
  }
  .confirm-modal > div {
    width: 100%;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
  .confirm-modal footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .calendar-edit-modal {
    align-items: end;
    padding: 0;
  }
  .calendar-edit-dialog {
    width: 100%;
    max-height: 90vh;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
  }
  #toast-container {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
  .toast {
    text-align: center;
  }
}

/* Kalender mobile dibuat terbaca, bukan dipaksa mengecil */
@media (max-width: 650px) {
  .calendar-section {
    margin-inline: -12px;
    padding: 14px 0;
  }
  .calendar-section > .section-heading {
    padding-inline: 14px;
  }
  .calendar-section > .section-heading::after {
    content: "Geser tabel ke samping untuk melihat hari lainnya →";
    width: 100%;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
  }
  .week-nav {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 7px;
  }
  .week-nav .ui-select,
  .week-nav #btnExportImage {
    grid-column: 1/4;
  }
  .week-nav .btn {
    width: 100%;
    padding: 8px;
  }
  .week-calendar-wrapper {
    overflow-x: auto;
    margin: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scrollbar-color: var(--yellow) #eef0f4;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .week-calendar-wrapper::-webkit-scrollbar {
    height: 7px;
  }
  .week-calendar-wrapper::-webkit-scrollbar-track {
    background: #eef0f4;
  }
  .week-calendar-wrapper::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--yellow);
  }
  .calendar-table.person-calendar {
    width: max-content;
    min-width: 832px;
    table-layout: fixed;
  }
  .person-calendar th:first-child,
  .person-calendar td.calendar-branch-cell {
    position: sticky;
    left: 0;
    z-index: 6;
    width: 76px;
    min-width: 76px;
    max-width: 76px;
    background: #fff !important;
    box-shadow: 5px 0 10px rgba(16, 27, 63, 0.08);
  }
  .person-calendar th:first-child {
    z-index: 8;
    background: var(--navy) !important;
  }
  .person-calendar th:not(:first-child),
  .person-calendar td:not(.calendar-branch-cell) {
    width: 108px;
    min-width: 108px;
    padding: 5px;
  }
  .person-calendar th {
    height: 58px;
    font-size: 0.64rem;
  }
  .person-calendar th small {
    font-size: 0.82rem;
  }
  .person-calendar .branch-label strong {
    font-size: 0.68rem;
    overflow-wrap: anywhere;
  }
  .calendar-event {
    min-height: 68px;
    padding: 6px;
  }
  .event-person strong {
    font-size: 0.62rem;
  }
  .calendar-event > b {
    font-size: 0.64rem;
  }
  .calendar-event > span,
  .calendar-event > small {
    line-height: 1.25;
  }
  .calendar-delete {
    width: 22px;
    height: 22px;
    opacity: 1;
  }
  .ui-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 600;
    max-height: 240px;
  }
  .ui-select.open {
    z-index: 600;
  }
  .planner-card {
    margin-inline: -6px;
    padding: 14px 10px 88px;
  }
  .planner-settings {
    grid-template-columns: 1fr;
  }
  .planner-settings .form-group {
    position: relative;
  }
  .planner-settings .form-group:has(.ui-select.open) {
    z-index: 610;
  }
  .planner-settings .ui-select.open {
    z-index: 610;
  }
  .planner-settings .ui-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 620;
    max-height: 240px;
  }
  .planner-card .form-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -6px 20px rgba(16, 27, 63, 0.1);
  }
  .planner-card.hidden .form-actions {
    display: none;
  }
  .planner-card #weeklyForm {
    padding-bottom: 82px;
  }
  .employee-options span {
    min-height: 42px;
  }
}

@media (max-width: 390px) {
  .container {
    width: calc(100% - 18px);
  }
  .card {
    padding: 13px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .form-actions {
    grid-template-columns: 1fr;
  }
  .checkin-summary,
  .receipt-details {
    grid-template-columns: 1fr;
  }
  .receipt-details > div:last-child {
    grid-column: auto;
  }
  .app-brand span:last-child {
    max-width: 145px;
  }
  .position-time-fields .form-row {
    grid-template-columns: 1fr;
  }
}
.today-col {
  background: #24325d !important;
}
.person-assignment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 8px;
  border: 1px solid #dfb600;
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  background: var(--yellow-soft);
}
.assignment-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.assignment-main strong {
  font-size: 0.72rem;
}
.assignment-main span {
  color: #6f5900;
  font-size: 0.62rem;
}
.person-assignment > small {
  height: max-content;
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--yellow);
  font-size: 0.56rem;
  font-weight: 900;
}
.person-assignment.shift-malam {
  border-color: #050a1d;
  background: var(--navy);
  color: #fff;
}
.person-assignment.shift-malam .assignment-main span {
  color: #d9deea;
}
.person-assignment.shift-malam > small {
  background: #fff;
  color: var(--navy);
}
.person-assignment.shift-libur {
  border-color: #bbb;
  background: #f1f1f1;
  color: #555;
}
.account-state.late {
  background: #fee4e2;
  color: var(--red);
}
.attendance-report-item {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}
.pin-state {
  margin-top: 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Custom picker waktu 24 jam dan tanggal */
.custom-datetime {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.custom-datetime-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  inset: auto !important;
}
.datetime-trigger {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.datetime-trigger:hover,
.datetime-trigger:focus-visible,
.custom-datetime.is-open .datetime-trigger {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
  outline: 0;
}
.datetime-trigger:disabled {
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}
.datetime-value.is-placeholder {
  color: var(--muted);
  font-weight: 500;
}
.datetime-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--navy);
  font-size: 17px;
}
.datetime-panel {
  display: none;
  position: absolute;
  z-index: 1500;
  top: calc(100% + 8px);
  left: 0;
  width: min(340px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
.custom-datetime.is-open .datetime-panel {
  display: block;
}
.datetime-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.datetime-panel-head strong {
  font-size: 15px;
}
.datetime-panel-head span {
  font-size: 11px;
  color: var(--muted);
}
.time-picker-fields {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}
.time-picker-fields label {
  display: grid !important;
  grid-template-rows: auto 220px !important;
  gap: 6px !important;
  margin: 0 !important;
  font-size: 12px !important;
}
.time-picker-fields b {
  padding-bottom: 14px;
  font-size: 20px;
}
.time-wheel {
  position: relative;
  width: 100%;
  height: 220px;
  overflow-y: auto;
  padding-block: 88px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(
    to bottom,
    #f8f9fb 0 39%,
    #fff7cf 39% 61%,
    #f8f9fb 61% 100%
  );
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.time-wheel::-webkit-scrollbar {
  display: none;
}
.time-wheel button {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  scroll-snap-align: center;
}
.time-wheel button.is-selected {
  color: var(--navy);
  font-size: 21px;
}
.datetime-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.datetime-actions .btn {
  min-height: 40px;
  padding: 0 14px;
}
.date-picker-nav {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  text-align: center;
}
.date-picker-nav strong {
  text-transform: capitalize;
}
.date-picker-nav button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}
.date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.calendar-weekday {
  padding: 4px 0;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.calendar-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.calendar-day:hover {
  background: var(--yellow-soft);
}
.calendar-day.today {
  box-shadow: inset 0 0 0 1px var(--yellow);
}
.calendar-day.selected {
  background: var(--navy);
  color: #fff;
  box-shadow: none;
}
.calendar-day.outside-month {
  color: #a5adbb;
  font-weight: 600;
}
.calendar-day.outside-month:hover {
  color: var(--navy);
}
.calendar-day.outside-month.selected {
  color: #fff;
}
.employee-attendance-tools .custom-date {
  min-width: 165px;
}

/* Presisi kartu pengaturan jam */
.attendance-setting-card {
  grid-template-columns: minmax(150px, 0.85fr) repeat(3, minmax(150px, 1fr));
  align-items: end;
}
.attendance-setting-card > div {
  align-self: center;
}
.attendance-setting-card > label {
  display: grid;
  grid-template-rows: 18px 48px 18px;
  align-items: center;
  gap: 6px;
  margin: 0;
  min-width: 0;
}
.attendance-setting-card > label > input {
  height: 48px;
  margin: 0;
}
.attendance-setting-card > label:not(:last-child)::after {
  content: "";
  display: block;
  height: 18px;
}
.attendance-setting-card > label > span {
  display: block;
  height: 18px;
  line-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.attendance-setting-card .custom-datetime {
  height: 48px;
}
.position-time-fields .form-row {
  align-items: start;
}
.position-time-fields .form-group {
  min-width: 0;
}
@media (max-width: 900px) {
  .attendance-setting-card {
    grid-template-columns: 1fr 1fr;
  }
  .attendance-setting-card > div {
    grid-column: 1/-1;
  }
  .attendance-setting-card > label:last-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 600px) {
  .datetime-panel {
    position: fixed !important;
    z-index: 5000;
    left: 12px !important;
    right: 12px !important;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: auto !important;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 -12px 50px rgba(15, 23, 42, 0.24);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .custom-datetime.is-open {
    z-index: 5000;
  }
  .time-wheel {
    touch-action: manipulation;
  }
  .attendance-setting-card {
    grid-template-columns: 1fr;
  }
  .attendance-setting-card > label:last-child {
    grid-column: auto;
  }
  .datetime-actions .btn {
    flex: 1;
  }
  .date-picker-grid {
    gap: 6px;
  }
  .calendar-day {
    font-size: 13px;
  }
  .position-time-fields .form-row {
    grid-template-columns: 1fr;
  }
}

/* Hak akses jabatan dan tabel admin yang konsisten */
.access-fieldset {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
}
.access-fieldset legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 900;
}
.access-fieldset .switch-row {
  align-items: flex-start;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.access-fieldset .switch-row:has(input:checked) {
  border-color: #dfb600;
  background: var(--yellow-soft);
}
.access-fieldset .switch-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.access-fieldset .switch-row strong {
  font-size: 0.78rem;
}
.access-fieldset .switch-row small {
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}
.access-fieldset .access-master {
  border-color: #b8c0d5;
  background: #f5f7fc;
}
.settings-list-card {
  overflow: hidden;
}
.settings-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  gap: 0;
}
.settings-list > .settings-item {
  min-height: 64px;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.settings-list > .settings-item:last-child {
  border-bottom: 0;
}
.settings-list > .settings-item:nth-child(even) {
  background: #fbfbfc;
}
.settings-list > .empty-state {
  border: 0;
  border-radius: 0;
}
.settings-table-row .account-state {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .settings-list {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .settings-list-card {
    padding-inline: 0;
  }
  .settings-list-card > .list-head,
  .settings-list-card > form {
    padding-inline: 15px;
  }
  .settings-list > .settings-item {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px 15px;
  }
  .settings-list > .settings-item > .account-state {
    grid-column: 2;
    justify-self: start;
  }
  .settings-list > .settings-item > .item-actions {
    grid-column: 2;
    width: 100%;
  }
  .settings-table-row .account-state {
    max-width: 100%;
  }
}
.workday-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  margin: 12px 0;
}
.workday-range .form-group {
  margin: 0;
}
.range-separator {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}
.workday-range select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}
@media (max-width: 480px) {
  .workday-range {
    grid-template-columns: 1fr 26px 1fr;
    gap: 6px;
  }
  .range-separator {
    font-size: 0;
  }
  .range-separator::after {
    content: "–";
    font-size: 16px;
  }
}

/* Final precision pass: ritme, alignment, dan kontrol yang konsisten */
body {
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.page-heading,
.section-heading,
.list-head {
  min-width: 0;
}
.page-heading > div,
.section-heading > div,
.list-head > div {
  min-width: 0;
}
.page-heading h1 {
  margin-bottom: 4px;
  line-height: 1.15;
}
.section-heading h2,
.list-head h2 {
  margin-bottom: 3px;
  line-height: 1.2;
}
.eyebrow {
  margin-bottom: 6px;
  letter-spacing: 0.13em;
}
.muted {
  line-height: 1.55;
}
.card,
.stat-card {
  border-color: #dfe3ea;
  box-shadow: 0 5px 18px rgba(16, 27, 63, 0.045);
}
.card {
  border-radius: 15px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-radius: 10px;
  font-weight: 850;
  line-height: 1.15;
}
.btn:hover {
  box-shadow: 0 5px 14px rgba(16, 27, 63, 0.1);
  transform: translateY(-1px);
}
.btn:active {
  box-shadow: none;
  transform: translateY(0);
}
button:disabled,
.btn:disabled {
  cursor: not-allowed;
  transform: none;
}
.form-group {
  min-width: 0;
  margin-bottom: 13px;
}
.form-group > label,
.branch-location-info label {
  display: block;
  margin-bottom: 6px;
  color: #26334f;
  font-size: 0.75rem;
  font-weight: 850;
}
input,
select,
textarea,
.ui-select-trigger {
  border-color: #cbd3df;
  border-radius: 11px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #d2aa00;
  outline: 3px solid rgba(247, 201, 40, 0.18);
}
.ui-select-trigger {
  padding-inline: 13px;
}
.ui-select-menu {
  padding: 7px;
  border-color: #d7dce5;
  box-shadow: 0 16px 40px rgba(16, 27, 63, 0.17);
}
.ui-select-menu button {
  padding-inline: 11px;
}
.settings-tabs {
  align-items: center;
}
.settings-tabs button {
  line-height: 1;
}
.settings-form-card > h2 {
  margin-bottom: 14px;
}
.switch-row {
  gap: 10px;
}
.switch-row input {
  margin-top: 1px;
}
.settings-list > .settings-item {
  column-gap: 11px;
}
.item-main strong {
  line-height: 1.25;
}
.item-main small {
  line-height: 1.45;
}
.item-actions button {
  padding-inline: 11px;
}
.account-state,
.role-badge {
  line-height: 1.25;
  white-space: nowrap;
}
.attendance-status-filters button {
  min-height: 40px;
}
.attendance-report-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: min(100%, 390px);
}
.attendance-report-tools > * {
  flex: 1;
  min-width: 0;
}
.team-card {
  border-color: #dfe3ea;
  box-shadow: 0 2px 8px rgba(16, 27, 63, 0.03);
}
.planner-settings,
.position-time-fields,
.position-advanced-fields,
.access-fieldset,
.branch-location-editor {
  border-color: #dce1e9;
}
.calendar-section .toolbar-actions {
  align-items: center;
}
.week-calendar-wrapper {
  scrollbar-gutter: stable;
}
.confirm-modal > div,
.calendar-edit-dialog,
.photo-proof-dialog {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 20px);
  }
  .page {
    padding-top: 16px;
  }
  .topbar {
    padding-inline: 10px;
  }
  .page-heading {
    gap: 10px;
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: 1.6rem;
  }
  .card {
    padding: 14px;
  }
  .settings-page > .page-heading {
    padding-inline: 4px;
  }
  .settings-tabs {
    margin-inline: -10px;
    margin-bottom: 14px;
    border-radius: 0 0 12px 12px;
  }
  .settings-tabs button {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 0.72rem;
  }
  .settings-form-card {
    padding: 15px;
  }
  .settings-list-card > .list-head {
    padding: 1px 14px 12px;
  }
  .settings-list > .settings-item {
    padding: 13px 14px;
  }
  .item-actions {
    gap: 7px;
  }
  .item-actions button {
    min-height: 42px;
  }
  .employee-attendance-tools {
    width: 100%;
  }
  .employee-attendance-tools > * {
    width: 100%;
  }
  .attendance-status-filters {
    gap: 7px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 1px 5px;
    scrollbar-width: none;
  }
  .attendance-status-filters::-webkit-scrollbar {
    display: none;
  }
  .attendance-status-filters button {
    flex: none;
  }
  .attendance-report-tools {
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
  }
  .team-card {
    padding: 12px;
    border-radius: 13px;
  }
  .branch-location-editor {
    margin-inline: -2px;
    padding: 11px;
  }
  .planner-card {
    border-radius: 14px;
  }
  .planner-day {
    border-radius: 12px;
  }
  .calendar-section > .section-heading {
    gap: 10px;
  }
  .week-nav {
    align-items: stretch;
  }
  .photo-proof-dialog > header {
    margin-bottom: 11px;
  }
}

@media (max-width: 390px) {
  .container {
    width: calc(100% - 14px);
  }
  .card {
    padding: 12px;
  }
  .form-actions {
    gap: 7px;
  }
  .btn {
    min-height: 44px;
  }
}

/* Suite operasional: ringkasan, izin, audit, rekap, dan backup */
.operations-toolbar,
.backup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.operations-toolbar > div:last-child {
  display: flex;
  gap: 9px;
  min-width: 330px;
}
.operations-toolbar .custom-date,
.operations-toolbar input[type="month"] {
  flex: 1;
  min-width: 0;
}
.operations-toolbar input[type="month"] {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #fff;
}
.ops-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.ops-stats .stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 105px;
}
.ops-stats .stat-card span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}
.ops-stats .stat-card strong {
  font-size: 1.8rem;
}
.ops-stats .risk {
  border-color: #f2b8b5;
  background: var(--red-soft);
}
.operations-grid,
.employee-ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.ops-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}
.ops-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.ops-item > div:first-child {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.ops-item strong {
  font-size: 0.8rem;
}
.ops-item span,
.ops-item small {
  color: var(--muted);
  font-size: 0.7rem;
}
.ops-actions,
.replacement-form {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ops-actions button,
.replacement-form button {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.ops-actions .danger {
  color: var(--red);
  border-color: #f2b8b5;
}
.replacement-form .ui-select {
  min-width: 140px;
}
.replacement-form .ui-select-trigger {
  min-height: 36px;
}
.ops-table {
  width: 100%;
  border-collapse: collapse;
}
.ops-table th,
.ops-table td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.76rem;
}
.ops-table th {
  background: #f7f8fa;
  color: var(--navy);
}
.backup-card {
  margin-top: 14px;
}
.backup-card .form-actions {
  margin: 0;
}
.notification-item.unread {
  border-color: #dfb600;
  background: var(--yellow-soft);
}
.notification-item.unread:before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--yellow);
}
.leave-history {
  margin-top: 16px;
}
.leave-history h3 {
  margin: 0 0 4px;
  font-size: 0.9rem;
}
textarea#leaveReason {
  min-height: 90px;
  padding: 11px;
  resize: vertical;
}
.attendance-leave-page {
  padding-top: 0;
  padding-bottom: 100px;
}
.attendance-leave-page > .card {
  max-width: 900px;
  margin-inline: auto;
}
@media (max-width: 760px) {
  .operations-toolbar,
  .backup-card {
    align-items: stretch;
    flex-direction: column;
  }
  .operations-toolbar > div:last-child {
    width: 100%;
    min-width: 0;
  }
  .ops-stats {
    grid-template-columns: 1fr 1fr;
  }
  .operations-grid,
  .employee-ops-grid {
    grid-template-columns: 1fr;
  }
  .ops-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .ops-actions,
  .replacement-form {
    width: 100%;
  }
  .replacement-form .ui-select {
    flex: 1;
  }
  .backup-card .form-actions {
    width: 100%;
  }
  .backup-card .form-actions > * {
    flex: 1;
  }
  .employee-ops-grid .form-row {
    grid-template-columns: 1fr;
  }
}

/* Halaman admin khusus persetujuan dan keamanan */
.admin-feature-page {
  display: grid;
  gap: 16px;
}
.admin-feature-page .page-heading {
  margin-bottom: 0;
}
.approval-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.approval-filters {
  display: flex;
  gap: 9px;
  min-width: min(100%, 360px);
}
.approval-filters > * {
  flex: 1;
  min-width: 0;
}
.approval-list {
  max-height: none;
}
.approval-item {
  min-height: 82px;
}
.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}
.security-grid .card {
  min-width: 0;
}
.risk-item {
  border-color: #f2b8b5;
  background: #fffafa;
}
.audit-item strong {
  text-transform: capitalize;
}
.audit-delete {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #f2b8b5;
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.audit-delete:hover {
  background: var(--red-soft);
}
.audit-delete:disabled {
  cursor: wait;
  opacity: 0.55;
}
.salary-page {
  padding-bottom: 100px;
}
.salary-hero {
  padding: 25px;
  border-radius: 18px;
  background: linear-gradient(135deg, #101b3f, #21366f);
  color: #fff;
  box-shadow: 0 18px 45px rgba(16, 27, 63, 0.18);
}
.salary-hero > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.salary-hero span,
.salary-hero small {
  color: #dce4ff;
  font-size: 0.78rem;
}
.salary-hero strong {
  color: var(--yellow);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.05;
}
.salary-breakdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.salary-breakdown .stat-card {
  min-height: 105px;
}
.salary-breakdown small {
  color: var(--muted);
}
.salary-content {
  align-items: start;
}
.salary-content textarea {
  min-height: 100px;
  padding: 12px;
  resize: vertical;
}
.cash-history-item,
.cash-admin-item {
  align-items: flex-start;
}
.cash-offer,
.cash-admin-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  width: 100%;
}
.cash-offer button,
.cash-admin-actions button {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}
.cash-offer .danger,
.cash-admin-actions .danger {
  color: var(--red);
  border-color: #f2b8b5;
}
.cash-admin-actions > div {
  display: flex;
  flex: 1;
  min-width: 240px;
  gap: 6px;
}
.cash-admin-actions input {
  min-height: 36px;
  flex: 1;
  min-width: 130px;
}
.salary-dashboard-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 17px 20px;
  border: 1px solid #e3c13e;
  border-radius: 15px;
  background: var(--yellow-soft);
}
.salary-dashboard-strip > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.salary-dashboard-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}
.salary-dashboard-strip strong {
  color: var(--navy);
  font-size: 1.35rem;
}
@media (max-width: 760px) {
  .salary-breakdown {
    grid-template-columns: 1fr;
  }
  .salary-hero {
    padding: 20px;
  }
  .salary-content {
    grid-template-columns: 1fr;
  }
  .cash-admin-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .cash-admin-actions > div {
    min-width: 0;
  }
  .salary-dashboard-strip {
    align-items: stretch;
    flex-direction: column;
  }
  .salary-dashboard-strip .btn {
    width: 100%;
  }
  .employee-bottom-nav a {
    min-width: 0;
  }
}
@media (max-width: 760px) {
  .admin-feature-page {
    gap: 12px;
  }
  .approval-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .approval-stats .stat-card {
    min-height: 88px;
    padding: 12px;
  }
  .approval-filters {
    width: 100%;
    min-width: 0;
    flex-direction: column;
  }
  .security-grid {
    grid-template-columns: 1fr;
  }
  .admin-feature-page > .page-heading > input {
    width: 100%;
  }
  .approval-item .account-state {
    order: 2;
  }
  .approval-item .ops-actions,
  .approval-item .replacement-form {
    order: 3;
  }
}

/* Presisi halaman gaji dan kasbon */
.salary-page,
.payroll-page {
  max-width: 1180px;
}
.salary-page {
  display: grid;
  gap: 16px;
}
.salary-page .page-heading {
  margin-bottom: 0;
  align-items: flex-end;
}
.salary-month-filter {
  display: flex;
  min-width: 190px;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}
.salary-month-filter input {
  min-height: 46px;
  background: #fff;
}
.salary-hero {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  display: flex;
  align-items: center;
}
.salary-hero:after {
  content: "Rp";
  position: absolute;
  right: 22px;
  bottom: -30px;
  color: rgba(255, 255, 255, 0.055);
  font-size: 8rem;
  font-weight: 950;
  line-height: 1;
}
.salary-hero > div {
  position: relative;
  z-index: 1;
}
.salary-breakdown .stat-card {
  justify-content: center;
  padding: 18px 20px;
  border-color: #dfe4ed;
}
.salary-breakdown .stat-card > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}
.salary-breakdown .stat-card > strong {
  margin: 3px 0;
  color: var(--navy);
  font-size: 1.35rem;
}
.salary-breakdown .deduction > strong {
  color: #b42318;
}
.salary-content {
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
}
.salary-form-card,
.salary-history-card,
.payroll-list-card {
  border-color: #dce2eb;
  box-shadow: 0 8px 28px rgba(16, 27, 63, 0.055);
}
.salary-form-card > h2 {
  margin-bottom: 4px;
}
.salary-form-card > p.muted {
  margin-bottom: 18px;
}
.salary-form-card form {
  display: grid;
  gap: 3px;
}
.salary-form-card .input-prefix {
  background: #fff;
}
.salary-history-card .ops-list {
  max-height: none;
}
.cash-history-item {
  position: relative;
  padding: 14px;
  border-radius: 13px;
}
.cash-history-item > div:first-child {
  gap: 4px;
}
.cash-history-item > div:first-child > strong {
  color: var(--navy);
  font-size: 0.92rem;
}
.cash-history-item .account-state {
  margin-left: auto;
}
.cash-offer {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.cash-offer small {
  flex: 1;
  min-width: 180px;
  color: var(--text);
}
.cash-offer button {
  min-width: 82px;
}
.payroll-page {
  gap: 15px;
}
.payroll-stats .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  justify-content: center;
  padding: 17px 19px;
}
.payroll-stats .stat-card:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #cbd3df;
}
.payroll-stats .pending:before {
  background: var(--yellow);
}
.payroll-stats .offered:before {
  background: #4f6fae;
}
.payroll-stats .approved:before {
  background: #22a35a;
}
.payroll-stats span,
.payroll-stats small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}
.payroll-stats strong {
  margin: 2px 0;
  color: var(--navy);
  font-size: 1.8rem;
}
.payroll-list-card > .list-head {
  align-items: flex-end;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.payroll-list-card > .approval-list {
  padding-top: 13px;
}
.cash-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 15px;
  border-radius: 13px;
}
.cash-admin-item > div:first-child {
  gap: 4px;
}
.cash-admin-item > div:first-child > strong {
  color: var(--navy);
  font-size: 0.9rem;
}
.cash-admin-item > .account-state {
  align-self: start;
}
.cash-admin-actions {
  grid-column: 1/-1;
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.cash-admin-actions > button:first-child {
  border-color: #b7dfc6;
  background: #edfff3;
  color: #15733a;
}
.cash-admin-actions > div {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f8fa;
}
.cash-admin-actions > div input {
  border: 0;
  background: transparent;
  outline: 0;
}
.cash-admin-actions > div button {
  flex: none;
  background: var(--navy);
  color: #fff;
}
@media (max-width: 760px) {
  .salary-page,
  .payroll-page {
    gap: 12px;
  }
  .salary-page .page-heading {
    align-items: stretch;
  }
  .salary-month-filter {
    width: 100%;
    min-width: 0;
  }
  .salary-hero {
    min-height: 138px;
    border-radius: 16px;
  }
  .salary-hero:after {
    right: 8px;
    font-size: 6.2rem;
  }
  .salary-breakdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .salary-breakdown .stat-card {
    min-height: 105px;
    padding: 12px;
  }
  .salary-breakdown .stat-card > strong {
    font-size: 0.96rem;
    overflow-wrap: anywhere;
  }
  .salary-breakdown small {
    font-size: 0.62rem;
  }
  .salary-content {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .salary-history-card {
    order: 1;
  }
  .salary-form-card {
    order: 2;
  }
  .payroll-stats {
    overflow-x: auto;
    grid-template-columns: repeat(3, minmax(132px, 1fr));
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  .payroll-stats::-webkit-scrollbar {
    display: none;
  }
  .payroll-list-card {
    padding: 14px;
  }
  .payroll-list-card > .list-head {
    align-items: stretch;
  }
  .cash-admin-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .cash-admin-actions > div {
    flex-direction: column;
  }
  .cash-admin-actions > div button {
    width: 100%;
  }
  .cash-history-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .cash-offer {
    grid-column: 1/-1;
  }
  .cash-offer button {
    flex: 1;
  }
  .approval-filters {
    gap: 7px;
  }
}
@media (max-width: 390px) {
  .salary-breakdown {
    grid-template-columns: 1fr;
  }
  .salary-breakdown .stat-card {
    min-height: 88px;
  }
  .salary-breakdown .stat-card > strong {
    font-size: 1.15rem;
  }
  .cash-admin-item,
  .cash-history-item {
    grid-template-columns: 1fr;
  }
  .cash-admin-item > .account-state,
  .cash-history-item > .account-state {
    margin: 0;
    justify-self: start;
  }
}

/* Penyempurnaan mobile fitur keuangan */
.notification-new {
  flex: none;
  align-self: flex-start;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy) !important;
  font-size: 0.61rem !important;
  font-weight: 900;
}
.notification-removing {
  animation: notification-out 0.18s ease-in forwards !important;
  pointer-events: none;
}
@keyframes notification-out {
  to {
    opacity: 0;
    transform: translateX(16px);
  }
}
@media (max-width: 760px) {
  .salary-page,
  .payroll-page {
    width: calc(100% - 16px);
    padding-top: 12px;
  }
  .salary-page .page-heading,
  .payroll-page .page-heading {
    padding-inline: 4px;
  }
  .salary-page .page-heading h1,
  .payroll-page .page-heading h1 {
    font-size: 1.55rem;
  }
  .salary-month-filter input {
    width: 100%;
    min-height: 48px;
  }
  .salary-hero {
    min-height: 126px;
    padding: 18px;
  }
  .salary-hero strong {
    font-size: 2rem;
  }
  .salary-breakdown {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .salary-breakdown .stat-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 78px;
    padding: 13px 15px;
  }
  .salary-breakdown .stat-card > strong {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 1.08rem;
    text-align: right;
  }
  .salary-breakdown .stat-card > small {
    grid-column: 1;
  }
  .salary-form-card,
  .salary-history-card {
    padding: 14px;
    border-radius: 14px;
  }
  .salary-form-card .btn {
    min-height: 48px;
  }
  .cash-history-item {
    padding: 13px;
  }
  .cash-history-item > div:first-child > span,
  .cash-history-item > div:first-child > small {
    line-height: 1.45;
  }
  .cash-offer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .cash-offer small {
    grid-column: 1/-1;
    min-width: 0;
  }
  .payroll-stats {
    margin-inline: -8px;
    padding: 0 8px 5px;
    scroll-snap-type: x mandatory;
  }
  .payroll-stats .stat-card {
    min-width: 142px;
    scroll-snap-align: start;
  }
  .payroll-list-card {
    margin-inline: -1px;
    border-radius: 14px;
  }
  .payroll-list-card > .list-head {
    gap: 13px;
  }
  .cash-admin-item {
    padding: 13px;
  }
  .cash-admin-actions {
    gap: 8px;
  }
  .cash-admin-actions > button,
  .cash-admin-actions > div button {
    min-height: 44px;
  }
  .cash-admin-actions > div {
    padding: 6px;
  }
  .cash-admin-actions > div input {
    min-height: 42px;
    padding-inline: 9px;
  }
  #employeeNotifications .notification-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 13px;
  }
  #employeeNotifications .notification-item > div {
    gap: 4px;
  }
  #employeeNotifications .notification-item span {
    line-height: 1.4;
  }
  #markNotifications {
    min-height: 40px;
    padding-inline: 11px;
  }
}

/* Komponen gaji dan slip */
.account-salary-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f9fb;
}
.account-salary-fields .form-group {
  margin: 0;
}
.slip-publisher {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-top: 3px solid var(--yellow);
}
.slip-publisher > div {
  max-width: 420px;
}
.slip-publisher form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 9px;
  min-width: min(100%, 620px);
}
.slip-publisher .form-group {
  margin: 0;
}
.slip-publisher .btn {
  min-height: 48px;
}
.salary-slip-card {
  border-color: #d9e0eb;
}
.salary-slip-list {
  display: grid;
  gap: 8px;
}
.salary-slip-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: 0.18s ease;
}
.salary-slip-item:hover {
  border-color: #d4ad0c;
  background: var(--yellow-soft);
  transform: translateY(-1px);
}
.salary-slip-item > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.salary-slip-item strong {
  font-size: 0.82rem;
}
.salary-slip-item small {
  color: var(--muted);
  font-size: 0.68rem;
}
.salary-slip-item > b {
  color: var(--navy);
  font-size: 0.84rem;
}
.salary-slip-item > em {
  color: #8b6f00;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 850;
}
.slip-page {
  min-height: 100vh;
  background: #edf0f5;
}
.salary-slip-shell {
  width: min(780px, calc(100% - 24px));
  margin: 24px auto;
}
.slip-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.salary-slip-document {
  overflow: hidden;
  border: 1px solid #d7dce5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(16, 27, 63, 0.12);
}
.salary-slip-document > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: var(--navy);
  color: #fff;
}
.salary-slip-document > header > div {
  display: flex;
  align-items: center;
  gap: 11px;
}
.salary-slip-document > header > div > div,
.salary-slip-document > header > div:last-child {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 2px;
}
.salary-slip-document > header small,
.salary-slip-document > header span {
  color: #dbe3ff;
  font-size: 0.7rem;
}
.slip-employee {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: #f8f9fb;
}
.slip-employee > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.slip-employee small {
  color: var(--muted);
  font-size: 0.68rem;
}
.salary-slip-document table {
  width: calc(100% - 56px);
  margin: 18px 28px;
  border-collapse: collapse;
}
.salary-slip-document th,
.salary-slip-document td {
  padding: 13px 5px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.salary-slip-document th {
  font-size: 0.78rem;
}
.salary-slip-document td {
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: right;
}
.salary-slip-document th small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}
.salary-slip-document .deduction td {
  color: #b42318;
}
.salary-slip-document tfoot th,
.salary-slip-document tfoot td {
  padding-top: 18px;
  border: 0;
  color: var(--navy);
  font-size: 1rem;
}
.salary-slip-document > footer {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  padding: 18px 28px 24px;
  color: var(--muted);
  font-size: 0.68rem;
}
.salary-slip-document > footer strong {
  margin: 3px 0 8px;
  color: var(--navy);
  font-size: 0.8rem;
}
@media (max-width: 760px) {
  .account-salary-fields {
    grid-template-columns: 1fr;
  }
  .slip-publisher {
    align-items: stretch;
    flex-direction: column;
  }
  .slip-publisher form {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .salary-slip-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .salary-slip-item > em {
    grid-column: 1/-1;
  }
  .salary-slip-shell {
    margin: 12px auto 28px;
  }
  .salary-slip-document > header {
    align-items: flex-start;
    padding: 18px;
    flex-direction: column;
  }
  .slip-employee {
    grid-template-columns: 1fr;
    padding: 16px 18px;
  }
  .salary-slip-document table {
    width: calc(100% - 36px);
    margin: 14px 18px;
  }
  .salary-slip-document > footer {
    padding: 16px 18px 20px;
  }
  .slip-toolbar .btn {
    flex: 1;
  }
}
@media print {
  body.slip-page {
    background: #fff;
  }
  .salary-slip-shell {
    width: 100%;
    margin: 0;
  }
  .slip-toolbar,
  #global-loader,
  .burger-button,
  .burger-shell {
    display: none !important;
  }
  .salary-slip-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  @page {
    size: A4;
    margin: 14mm;
  }
}

/* Pusat persetujuan dan lembur */
.approval-filters {
  flex-wrap: wrap;
  min-width: min(100%, 620px);
}
.approval-kind {
  display: inline-flex;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--navy);
  font-size: 0.62rem;
  font-weight: 850;
}
.unified-approval > div:first-child {
  gap: 4px;
}
.overtime-approval-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  grid-column: 1/-1;
}
.overtime-approval-actions label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}
.overtime-approval-actions input {
  min-height: 39px;
}
.overtime-form {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.8fr 1.2fr;
  align-items: end;
  gap: 10px;
}
.overtime-form .form-group {
  margin: 0;
}
.overtime-reason {
  grid-column: 1/-2;
}
.overtime-history {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.overtime-date-only {
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.5fr) auto;
}
.overtime-date-only .overtime-reason {
  grid-column: auto;
}
.salary-breakdown .income {
  border-color: #b7e4c7;
  background: #f2fff6;
}
.salary-breakdown .income strong {
  color: #16733b;
}
@media (max-width: 760px) {
  .approval-filters {
    min-width: 0;
  }
  .overtime-form {
    grid-template-columns: 1fr 1fr;
  }
  .overtime-reason {
    grid-column: 1/-1;
  }
  .overtime-form > button {
    grid-column: 1/-1;
  }
  .overtime-approval-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .overtime-approval-actions button {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .overtime-date-only {
    grid-template-columns: 1fr;
  }
  .overtime-date-only .overtime-reason,
  .overtime-date-only > button {
    grid-column: auto;
  }
}
.overtime-setting-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-top: 3px solid var(--yellow);
}
.overtime-setting-card > div {
  max-width: 520px;
}
.overtime-setting-card form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  min-width: min(100%, 430px);
}
.overtime-setting-card .form-group {
  flex: 1;
  margin: 0;
}
.compact-salary-details {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
}
.compact-salary-details .stat-card {
  min-height: 82px;
  padding: 11px 12px;
}
.compact-salary-details .stat-card strong {
  font-size: 1rem;
}
.compact-salary-details .allowance-detail {
  grid-row: span 2;
}
.allowance-detail small {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.62rem;
}
.allowance-detail small b {
  color: var(--navy);
}
.adjustment-admin-card {
  display: grid;
  gap: 16px;
}
.adjustment-form {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 1fr;
  gap: 9px;
  align-items: end;
}
.adjustment-form .form-group {
  margin: 0;
}
.adjustment-note {
  grid-column: 1/-2;
}
.adjustment-admin-list {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  .compact-salary-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compact-salary-details .allowance-detail {
    grid-column: 1/-1;
    grid-row: auto;
  }
  .adjustment-form {
    grid-template-columns: 1fr 1fr;
  }
  .adjustment-note {
    grid-column: 1/-1;
  }
  .adjustment-form > button {
    grid-column: 1/-1;
  }
}
.payroll-cycle-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}
.payroll-cycle-card > div {
  max-width: 560px;
}
.payroll-cycle-card form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.payroll-cycle-card .form-group {
  margin: 0;
  max-width: 150px;
}
@media (max-width: 760px) {
  .payroll-cycle-card,
  .payroll-cycle-card form {
    align-items: stretch;
    flex-direction: column;
  }
  .payroll-cycle-card .form-group {
    max-width: none;
  }
}
.employee-detail-fields {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f9fb;
}
.employee-detail-fields legend {
  padding: 0 7px;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 850;
}
.profile-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.profile-readonly-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f9fb;
}
.profile-readonly-card h3 {
  grid-column: 1/-1;
  margin: 0 0 4px;
  font-size: 0.82rem;
}
.profile-readonly-card div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-readonly-card span {
  color: var(--muted);
  font-size: 0.65rem;
}
.profile-readonly-card strong {
  font-size: 0.75rem;
}
.archived-account {
  opacity: 0.65;
  background: #f2f4f7;
}
@media (max-width: 760px) {
  .profile-detail-grid,
  .profile-readonly-card {
    grid-template-columns: 1fr;
  }
  .employee-detail-fields .form-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .overtime-setting-card,
  .overtime-setting-card form {
    align-items: stretch;
    flex-direction: column;
  }
  .overtime-setting-card form {
    min-width: 0;
  }
  .overtime-setting-card button {
    width: 100%;
  }
}
.settings-tabs .broadcast-tab-link {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-radius: 9px;
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 850;
  text-decoration: none;
}
.settings-tabs .broadcast-tab-link:hover {
  background: #fff5c2;
}
.compact-filter {
  display: grid;
  gap: 4px;
  min-width: 142px;
}
.compact-filter span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.compact-filter input {
  width: 100%;
  min-height: 43px;
}
.date-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.employee-ops-grid:first-of-type {
  margin-top: 16px;
}
.employee-ops-grid:first-of-type .card {
  border-top: 3px solid var(--yellow);
}
@media (max-width: 760px) {
  .page.container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .page-heading h1 {
    line-height: 1.12;
  }
  .card {
    border-radius: 14px;
  }
  .list-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .approval-filters,
  .date-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 8px;
  }
  .approval-filters > select,
  .approval-filters > .list-search {
    grid-column: span 1;
    width: 100%;
    min-width: 0;
  }
  .approval-filters > .list-search {
    grid-column: 1/-1;
  }
  .compact-filter {
    min-width: 0;
  }
  .broadcast-composer {
    padding: 16px;
  }
  .broadcast-item {
    padding: 13px;
  }
  .settings-tabs .broadcast-tab-link {
    white-space: nowrap;
  }
  .employee-ops-grid:first-of-type {
    margin-top: 10px;
  }
}
@media (min-width: 761px) {
  .admin-feature-page > .card,
  .admin-feature-page > .security-grid,
  .admin-feature-page > .stats-grid,
  .admin-feature-page > .ops-stats {
    margin-top: 18px;
  }
  .approval-filters {
    align-items: flex-end;
  }
  .broadcast-page .list-head {
    align-items: flex-end;
  }
}

/* Grid ringkasan gaji: nominal tidak bertabrakan pada desktop maupun mobile */
.salary-page .compact-salary-details {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.salary-page .compact-salary-details .stat-card {
  min-width: 0;
  min-height: 108px;
  padding: 16px 18px;
  justify-content: center;
  overflow: hidden;
}
.salary-page .compact-salary-details .stat-card > span {
  line-height: 1.35;
}
.salary-page .compact-salary-details .stat-card > strong {
  max-width: 100%;
  font-size: clamp(1rem, 1.55vw, 1.32rem);
  line-height: 1.2;
  white-space: nowrap;
}
.salary-page .compact-salary-details .allowance-detail {
  grid-row: span 2;
  justify-content: flex-start;
  gap: 7px;
}
.salary-page .compact-salary-details .allowance-detail > strong {
  margin-bottom: 5px;
}
.salary-page .allowance-detail small {
  width: 100%;
  align-items: center;
  padding-top: 5px;
  border-top: 1px dashed #dce2eb;
  line-height: 1.35;
}
.salary-page .allowance-detail small b {
  flex: none;
  white-space: nowrap;
}
.salary-page .adjustment-history-card .empty-state {
  min-height: 100px;
}
@media (max-width: 760px) {
  .salary-page .compact-salary-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .salary-page .compact-salary-details .stat-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 82px;
    padding: 14px;
    align-content: center;
  }
  .salary-page .compact-salary-details .stat-card:first-child,
  .salary-page .compact-salary-details .allowance-detail {
    grid-column: 1/-1;
  }
  .salary-page .compact-salary-details .allowance-detail {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-row: auto;
    gap: 6px;
    min-height: 120px;
  }
  .salary-page .compact-salary-details .allowance-detail > strong {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }
  .salary-page .compact-salary-details .allowance-detail > small {
    grid-column: 1/-1;
  }
  .salary-page .compact-salary-details .stat-card > strong {
    font-size: 1.03rem;
  }
  .salary-page .salary-slip-card,
  .salary-page .adjustment-history-card,
  .salary-page .overtime-card {
    padding: 16px;
  }
  .salary-slip-item {
    gap: 8px 12px;
  }
}
@media (max-width: 390px) {
  .salary-page .compact-salary-details {
    grid-template-columns: 1fr;
  }
  .salary-page .compact-salary-details .stat-card,
  .salary-page .compact-salary-details .allowance-detail {
    grid-column: auto;
  }
}
.brand-mark {
  overflow: hidden;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-mark.small {
  background: transparent;
}
.attendance-correction-dialog {
  max-width: 540px;
}
.attendance-correction-dialog form {
  display: grid;
  gap: 12px;
  padding: 18px;
}
.attendance-correction-dialog .form-group {
  margin: 0;
}
.attendance-correction-dialog .form-group > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}
.attendance-correction-dialog .modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 3px;
}
.proof-actions .danger {
  border-color: #ffc4c0;
  color: #b42318;
}
@media (max-width: 560px) {
  .attendance-correction-dialog {
    width: calc(100% - 20px);
  }
  .attendance-correction-dialog form {
    padding: 14px;
  }
  .attendance-correction-dialog .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .attendance-report-item .proof-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .attendance-report-item .proof-actions > * {
    justify-content: center;
    text-align: center;
  }
}
.broadcast-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px}.broadcast-delete{padding:8px 12px;border:1px solid #efb7b2;border-radius:9px;background:#fff;color:#b42318;font-weight:800}
.notification-alert-shell{position:fixed;inset:0;z-index:900;display:grid;place-items:center;padding:18px;animation:fade-in .18s ease-out}.notification-alert-shell.closing{animation:fade-out .18s ease-in forwards}.notification-alert-backdrop{position:absolute;inset:0;background:rgba(7,15,38,.72);backdrop-filter:blur(5px)}.notification-alert-dialog{position:relative;width:min(100%,560px);max-height:min(82vh,720px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,208,39,.55);border-radius:20px;background:#fff;box-shadow:0 28px 80px rgba(3,10,31,.35);animation:alert-rise .24s ease-out}.notification-alert-dialog>header{display:grid;grid-template-columns:auto 1fr;gap:13px;padding:20px;background:linear-gradient(135deg,#101b3f,#21366f);color:#fff}.notification-alert-dialog h2{margin:2px 0 3px;font-size:1.2rem}.notification-alert-dialog header small{color:#dce4ff}.notification-alert-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:var(--yellow);color:var(--navy);font-size:1.2rem;font-weight:950}.notification-alert-list{display:grid;gap:8px;padding:14px;overflow-y:auto}.notification-alert-list button{display:grid;gap:4px;width:100%;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#f8f9fb;text-align:left;cursor:pointer;transition:.16s ease}.notification-alert-list button:hover{border-color:#e0b800;background:#fff9dc;transform:translateY(-1px)}.notification-alert-list strong{color:var(--navy)}.notification-alert-list span{color:var(--text);line-height:1.45}.notification-alert-list small{color:var(--muted)}.notification-alert-dialog>footer{padding:13px 14px;border-top:1px solid var(--line);background:#fff}.notification-alert-dialog>footer .btn{width:100%}@keyframes alert-rise{from{opacity:0;transform:translateY(18px) scale(.98)}}@keyframes fade-out{to{opacity:0}}@media(max-width:560px){.notification-alert-shell{align-items:end;padding:0}.notification-alert-dialog{width:100%;max-height:88vh;border-radius:20px 20px 0 0}.notification-alert-dialog>header{padding:17px}.notification-alert-list{padding:10px}.broadcast-item{grid-template-columns:1fr}.broadcast-delete{width:100%}}
.slip-publish-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1/-1;
}
.slip-publish-actions .btn {
  flex: 1;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .slip-publish-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .slip-publish-actions .btn {
    width: 100%;
  }
}
.broadcast-composer {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: start;
  border-top: 3px solid var(--yellow);
}
.broadcast-composer form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.broadcast-composer .form-group {
  margin: 0;
}
.broadcast-message {
  grid-column: 1/-1;
}
.broadcast-message textarea {
  width: 100%;
  resize: vertical;
}
.broadcast-message small {
  display: block;
  text-align: right;
  color: var(--muted);
}
.broadcast-composer button {
  grid-column: 1/-1;
}
.broadcast-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.broadcast-item > div {
  display: grid;
  gap: 6px;
}
.broadcast-item strong {
  font-size: 0.95rem;
}
.broadcast-item p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}
.broadcast-item small {
  color: var(--muted);
}
@media (max-width: 760px) {
  .broadcast-composer {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .broadcast-composer form {
    grid-template-columns: 1fr;
  }
  .broadcast-message,
  .broadcast-composer button {
    grid-column: auto;
  }
}

/* Pengaturan nominal akun */
.account-salary-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: 15px;
  background: linear-gradient(180deg, #fafbfc, #f5f7fa);
}
.salary-fields-heading,
.salary-group-label,
.allowance-total-row {
  grid-column: 1/-1;
}
.salary-fields-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.salary-fields-heading > div {
  display: grid;
  gap: 2px;
}
.salary-fields-heading strong {
  color: var(--navy);
  font-size: 0.9rem;
}
.salary-fields-heading small {
  color: var(--muted);
  font-size: 0.66rem;
}
.salary-fields-heading > span {
  flex: none;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--yellow);
  font-size: 0.68rem;
  font-weight: 900;
}
.salary-group-label {
  margin: 2px 0 -3px;
  color: #856a00;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.account-salary-fields .salary-base-field,
.account-salary-fields .deduction-field {
  grid-column: 1/-1;
}
.account-salary-fields .input-prefix {
  min-height: 48px;
  border: 1px solid #ccd5e2;
  border-radius: 11px;
  background: #fff;
}
.account-salary-fields .input-prefix > span {
  padding-left: 12px;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 900;
}
.account-salary-fields .input-prefix input {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 0.94rem;
  font-weight: 850;
}
.allowance-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  padding: 10px 12px;
  border: 1px solid #bfe1ca;
  border-radius: 11px;
  background: #effbf3;
  color: #176b38;
  font-size: 0.75rem;
}
.allowance-total-row strong {
  white-space: nowrap;
}
.deduction-label {
  margin-top: 5px;
  color: #a72d24;
}
.account-salary-fields .deduction-field .input-prefix {
  border-color: #efc4c0;
}
.salary-page .compact-salary-details .allowance-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
}
.salary-page .compact-salary-details .allowance-detail > strong {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}
.salary-page .compact-salary-details .allowance-detail > small {
  grid-column: 1/-1;
}
@media (max-width: 560px) {
  .account-salary-fields {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .salary-fields-heading,
  .salary-group-label,
  .account-salary-fields .form-group,
  .allowance-total-row {
    grid-column: 1;
  }
  .salary-fields-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .salary-fields-heading > span {
    width: max-content;
  }
}
