/* ===========================
   CSS VARIABLES & RESET
=========================== */
:root {
  --navy: #1E2A4A;
  --navy-light: #263354;
  --navy-dark: #141d34;
  --blue: #3B82F6;
  --blue-hover: #2563EB;
  --blue-light: #EFF6FF;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --green: #10B981;
  --green-light: #ECFDF5;
  --red: #EF4444;
  --red-light: #FEF2F2;
  --yellow: #F59E0B;
  --yellow-light: #FFFBEB;
  --sidebar-width: 240px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,.10);
  --transition: .2s ease;
  --font: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ===========================
   SCROLLBAR
=========================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }

/* ===========================
   SIDEBAR
=========================== */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition), width var(--transition);
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-icon-fallback {
  width: 36px;
  height: 36px;
  background: var(--blue);
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -.3px;
}

.brand-sub {
  font-size: 10px;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.sidebar-toggle {
  color: rgba(255,255,255,.5);
  font-size: 14px;
  padding: 6px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,.1); color: white; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
}

.nav-item.active {
  background: var(--blue);
  color: white;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

/* ===========================
   MAIN CONTENT
=========================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
  min-width: 0;
  overflow-x: hidden;
}

/* ===========================
   TOPBAR
=========================== */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-btn {
  display: none;
  font-size: 16px;
  color: var(--gray-600);
  padding: 6px;
  border-radius: 6px;
}
.menu-btn:hover { background: var(--gray-100); }

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

.topbar-date {
  font-size: 12.5px;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

/* ===========================
   PAGES
=========================== */
.page {
  display: none;
  padding: 28px;
  flex: 1;
}

.page.active {
  display: block;
  animation: fadeIn .25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.4px;
}

.page-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ===========================
   STAT CARDS
=========================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 0; /* fix: cegah grid/flex item overflow karena konten teks */
}

.stat-body {
  min-width: 0;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.accent {
  background: var(--navy);
  border-color: var(--navy);
}

.stat-card.accent .stat-icon {
  background: rgba(255,255,255,.15);
  color: white;
}

.stat-card.accent .stat-value { color: white; }
.stat-card.accent .stat-label { color: rgba(255,255,255,.6); }

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===========================
   DASHBOARD BOTTOM
=========================== */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-700);
}

.card-header i { margin-right: 6px; color: var(--blue); }

.link-all {
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
}
.link-all:hover { text-decoration: underline; }

/* Recent List */
.recent-list { padding: 8px 0; }

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  transition: background var(--transition);
  gap: 12px;
}

.recent-item:hover { background: var(--gray-50); }

.recent-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.recent-dot.hari-kerja { background: var(--blue); }
.recent-dot.hari-libur { background: var(--yellow); }

.recent-info .date {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.recent-info .dur {
  font-size: 11.5px;
  color: var(--gray-400);
  font-family: var(--font-mono);
}

.recent-upah {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  font-family: var(--font-mono);
}

/* Info list */
.info-list { padding: 12px 0; }

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 20px;
}

.info-item i {
  color: var(--blue);
  font-size: 14px;
  margin-top: 2px;
  width: 16px;
  text-align: center;
}

.info-item strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
}

.info-item span {
  font-size: 11.5px;
  color: var(--gray-500);
}

/* ===========================
   EMPTY STATE
=========================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  color: var(--gray-400);
  gap: 8px;
}

.empty-state i { font-size: 28px; }
.empty-state p { font-size: 13px; }

.empty-cell {
  text-align: center;
  padding: 36px !important;
  color: var(--gray-400);
  font-size: 13px;
}

.empty-cell i { margin-right: 6px; }

/* ===========================
   FORM
=========================== */
.form-wrapper { max-width: 640px; }

.form-card { padding: 28px; }

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gray-500);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-section-title i { color: var(--blue); font-size: 13px; }
.form-section-title.mt { margin-top: 28px; }

.required-badge {
  font-size: 10px;
  background: var(--red-light);
  color: var(--red);
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.optional-badge {
  font-size: 10px;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.form-row { margin-bottom: 16px; }

.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.req { color: var(--red); }

.form-control {
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.form-control.textarea { resize: vertical; min-height: 80px; }

.field-hint {
  font-size: 11.5px;
  color: var(--gray-500);
}

.field-hint.day {
  font-weight: 600;
  color: var(--blue);
  font-size: 12.5px;
}

.field-hint.libur { color: var(--yellow); }

/* Input prefix */
.input-prefix {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-prefix:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.input-prefix span {
  padding: 10px 12px;
  background: var(--gray-50);
  border-right: 1.5px solid var(--gray-200);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}

.input-prefix .form-control {
  border: none;
  box-shadow: none;
  border-radius: 0;
  flex: 1;
}

.input-prefix .form-control:focus { box-shadow: none; }

/* Duration preview */
.duration-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  color: var(--blue-hover);
  font-size: 13.5px;
  font-weight: 600;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}

.radio-option input[type="radio"] { display: none; }

.radio-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-600);
  width: 100%;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.radio-box i { color: var(--blue); width: 14px; text-align: center; }

.radio-option input[type="radio"]:checked + .radio-box {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue-hover);
  font-weight: 600;
}

/* Upah otomatis preview */
.upah-otomatis-preview {
  background: var(--green-light);
  border: 1.5px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.preview-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.preview-label i { color: var(--green); }

.preview-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  font-family: var(--font-mono);
}

.preview-detail {
  font-size: 11.5px;
  color: var(--gray-500);
  margin-top: 4px;
  line-height: 1.6;
}

/* Setting preview */
.setting-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--blue-hover);
  margin-bottom: 20px;
}

.setting-preview i { color: var(--blue); }
.setting-preview strong { font-family: var(--font-mono); }

/* Form actions */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Alert success */
.alert-success {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--green-light);
  border: 1.5px solid #A7F3D0;
  border-radius: var(--radius-sm);
  color: #065F46;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn .2s ease;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--blue);
  color: white;
}
.btn-primary:hover { background: var(--blue-hover); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover { background: #DC2626; }

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red);
}
.btn-danger-outline:hover { background: var(--red-light); }

.btn-sm {
  padding: 7px 13px;
  font-size: 12.5px;
}

.btn-icon {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--gray-100);
  color: var(--gray-600);
}
.btn-icon:hover { background: var(--gray-200); }

.btn-icon.del { background: var(--red-light); color: var(--red); }
.btn-icon.del:hover { background: #FECACA; }

/* ===========================
   FILTER BAR
=========================== */
/* filter-bar removed — replaced by periode-card */

/* ===========================
   TABLE
=========================== */
.table-card { overflow: hidden; }

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prevent table from blowing out the page width on mobile */
@media (max-width: 768px) {
  .table-card { overflow: visible; }
  .table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    /* contain scroll within wrapper only */
    overscroll-behavior-x: contain;
  }
  #page-riwayat {
    overflow-x: hidden;
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  background: var(--gray-50);
  padding: 11px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover td { background: var(--gray-50); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge-blue { background: var(--blue-light); color: var(--blue-hover); }
.badge-yellow { background: var(--yellow-light); color: #92400E; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-green { background: var(--green-light); color: #047857; }
.badge-red { background: var(--red-light); color: #B91C1C; }

.td-upah {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
}

.td-num { font-family: var(--font-mono); }

.td-catatan {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray-500);
  font-size: 12.5px;
}

.td-action { display: flex; gap: 6px; }

/* ===========================
   MODAL
=========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  animation: fadeIn .2s ease;
  /* display controlled by JS inline style */
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: slideUp .2s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-icon {
  font-size: 32px;
  color: var(--yellow);
  margin-bottom: 12px;
}

.modal h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.modal p {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ===========================
   TOAST
=========================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  z-index: 300;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }


/* ===========================
   INPUT RUPIAH WITH EYE TOGGLE
=========================== */
.input-rupiah {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}

.input-rupiah:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.input-rp-prefix {
  padding: 10px 12px;
  background: var(--gray-50);
  border-right: 1.5px solid var(--gray-200);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  flex-shrink: 0;
}

.input-rupiah .form-control {
  border: none;
  box-shadow: none !important;
  border-radius: 0;
  flex: 1;
  min-width: 0;
  background: transparent;
  /* hidden state via -webkit-text-security */
  transition: letter-spacing .15s;
}

.input-rupiah .form-control.value-hidden {
  -webkit-text-security: disc;
  letter-spacing: 3px;
}

/* Eye button inside field */
.btn-field-eye {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 100%;
  min-height: 40px;
  background: transparent;
  border: none;
  border-left: 1.5px solid var(--gray-100);
  color: var(--gray-400);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition);
  padding: 0;
}

.btn-field-eye:hover {
  color: var(--blue);
  background: var(--blue-light);
}

.btn-field-eye.is-hidden {
  color: var(--navy);
  background: var(--gray-100);
}
/* Eye button on stat cards & preview boxes */
.stat-value-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-stat-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.55);
  color: var(--gray-400);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-stat-eye:hover {
  background: var(--blue-light);
  color: var(--blue);
  border-color: #BFDBFE;
}
.btn-stat-eye.is-hidden {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* Smaller variant for inside preview boxes */
.btn-stat-eye-sm {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

/* accent card (navy bg) override */
.stat-card.accent .btn-stat-eye {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.2);
}
.stat-card.accent .btn-stat-eye:hover {
  background: rgba(255,255,255,.3);
  color: white;
}
.stat-card.accent .btn-stat-eye.is-hidden {
  background: rgba(255,255,255,.35);
  color: white;
}

/* Preview label row — flex with space-between */
.upah-otomatis-preview .preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.setting-preview {
  justify-content: space-between;
}


/* ===========================
   RUPIAH DISPLAY — hide values
   (dashboard, preview, table)
=========================== */
.rupiah-display {
  transition: filter .2s, opacity .2s;
}

.rupiah-display.is-hidden {
  filter: blur(6px);
  opacity: .5;
  user-select: none;
}

/* Table upah & recent upah follow same rule via JS class */
.td-upah.is-hidden,
.recent-upah.is-hidden {
  filter: blur(6px);
  opacity: .5;
  user-select: none;
}

/* Topbar right alignment */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===========================
   BOTTOM NAV (mobile)
=========================== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  padding: 0 8px env(safe-area-inset-bottom, 8px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 24px rgba(30,42,74,.08);
  align-items: stretch;
  justify-content: space-around;
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px 8px;
  flex: 1;
  color: var(--gray-400);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1px;
  position: relative;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.bnav-icon {
  width: 38px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  font-size: 17px;
  transition: background var(--transition), transform .15s cubic-bezier(.34,1.56,.64,1);
}

.bnav-item span { transition: color var(--transition); line-height: 1; }

.bnav-item.active { color: var(--blue); }

.bnav-item.active .bnav-icon {
  background: var(--blue-light);
  transform: translateY(-3px) scale(1.08);
}

.bnav-item:not(.active):hover .bnav-icon { background: var(--gray-100); }

.bnav-item.active::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: var(--blue);
  border-radius: 99px;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .dashboard-bottom { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .menu-btn { display: none; }
  .bottom-nav { display: flex; }
  .page { padding: 16px 14px 96px; }
  .topbar { padding: 0 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 38px; height: 38px; font-size: 15px; }
  .stat-value { font-size: 16px; }
  .stat-label { font-size: 11px; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .toast { bottom: 80px; }
  .dashboard-bottom { gap: 12px; }
  .page-header h1 { font-size: 18px; }

  /* Periode row on mobile: stack nicely */
  .periode-row { gap: 8px; }
  .periode-sep { display: none; }
  .periode-row .form-group { min-width: 0; flex: 1 1 calc(50% - 4px); }
  .periode-apply { flex: 0 0 100%; }
  .periode-apply .btn { width: 100%; justify-content: center; }

  /* Form card padding */
  .form-card { padding: 18px 16px; }

  /* Recent item */
  .recent-item { padding: 10px 14px; }
  .recent-upah { font-size: 12px; }
  .card-header { padding: 13px 14px; }

  /* Info card */
  .info-item { padding: 8px 14px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .form-wrapper { max-width: 100%; }
  .bnav-item span { font-size: 10px; }
  .periode-header { padding: 12px 14px; }
  .periode-body { padding: 12px 14px 10px; }
  .filter-summary-row { flex-direction: column; align-items: flex-start; }
  .btn-danger-outline.btn-sm { width: 100%; justify-content: center; }
}

/* ===========================
   NUMBER INPUT — hide spinners
=========================== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* Periode tutup buku card */
.periode-card { margin-bottom: 16px; }

.periode-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.periode-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 6px;
}
.periode-title i { color: var(--blue); }

.periode-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  font-family: var(--font);
}
.btn-chip:hover { background: var(--blue-light); color: var(--blue); border-color: #BFDBFE; }
.btn-chip i { font-size: 11px; }

.periode-body { padding: 16px 20px 14px; }

.periode-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.periode-row .form-group {
  flex: 1;
  min-width: 130px;
  margin-bottom: 0;
}

.periode-sep {
  color: var(--gray-400);
  padding-bottom: 10px;
  font-size: 12px;
  flex-shrink: 0;
}

.periode-apply { flex-shrink: 0; padding-bottom: 0; }

.filter-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--gray-500);
  flex-wrap: wrap;
  gap: 8px;
}

.filter-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.filter-summary i { color: var(--blue); font-size: 11px; }

.form-control-sm { padding: 8px 12px; font-size: 13px; }

/* Periode hint in settings */
.periode-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  border: 1.5px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #065F46;
  font-weight: 500;
  margin-bottom: 16px;
}
.periode-hint i { color: var(--green); }

/* Table cells */
.td-hari { font-weight: 600; font-size: 13px; }
.td-tgl  { font-size: 12px; color: var(--gray-500); }

/* ===========================
   ISTIRAHAT NOTICE
=========================== */
.istirahat-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--yellow-light);
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.istirahat-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}

.istirahat-left > i {
  color: var(--yellow);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.istirahat-left strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
}

.istirahat-left span {
  font-size: 11.5px;
  color: #B45309;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input { display: none; }

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--gray-300);
  border-radius: 99px;
  position: relative;
  transition: background .2s;
}

.toggle-thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}

.toggle-switch input:checked ~ .toggle-track {
  background: var(--yellow);
}

.toggle-switch input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(20px);
}

/* Badge istirahat in table */
.badge-istirahat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow-light);
  color: var(--yellow);
  font-size: 9px;
  vertical-align: middle;
  margin-left: 3px;
  border: 1px solid #FDE68A;
  flex-shrink: 0;
}

/* ===========================
   PWA SECTION
=========================== */
.pwa-section {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pwa-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pwa-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.pwa-text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.pwa-text span {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.5;
}

.btn-pwa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--navy);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: background var(--transition), transform var(--transition);
  width: fit-content;
}
.btn-pwa:hover { background: var(--navy-dark); }
.btn-pwa:active { transform: scale(.97); }
.btn-pwa i { font-size: 14px; }

.pwa-installed {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}
.pwa-installed i { font-size: 16px; }

.pwa-manual {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-600);
  background: var(--blue-light);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.5;
}
.pwa-manual i { color: var(--blue); margin-top: 1px; flex-shrink: 0; }
/* ===========================
   WELCOME GUIDE POPUP
=========================== */
.guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,22,42,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: guideOverlayIn .3s ease;
}
.guide-overlay.hiding {
  animation: guideOverlayOut .25s ease forwards;
}
@keyframes guideOverlayIn { from { opacity:0; } to { opacity:1; } }
@keyframes guideOverlayOut { from { opacity:1; } to { opacity:0; } }

.guide-modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  animation: guideModalIn .35s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
@keyframes guideModalIn {
  from { opacity:0; transform: scale(.9) translateY(20px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}

/* Header */
.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  background: var(--navy);
  border-radius: 20px 20px 0 0;
  flex-shrink: 0;
}
.guide-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}
.guide-brand-text {
  display: flex;
  flex-direction: column;
}
.guide-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}
.guide-brand-ver {
  font-size: 11px;
  color: rgba(255,255,255,.55);
  font-family: var(--font-mono);
}
.guide-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.guide-close-btn:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

/* Step dots */
.guide-steps-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px 0;
  flex-shrink: 0;
}
.guide-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: all .3s ease;
  cursor: pointer;
}
.guide-step-dot.active {
  background: var(--blue);
  width: 24px;
  border-radius: 4px;
}

/* Content */
.guide-content-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 4px;
  position: relative;
}

.guide-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: slideIn .3s ease;
}
.guide-slide.active { display: flex; }
@keyframes slideIn {
  from { opacity:0; transform: translateX(18px); }
  to   { opacity:1; transform: translateX(0); }
}
.guide-slide.slide-back {
  animation: slideInBack .3s ease;
}
@keyframes slideInBack {
  from { opacity:0; transform: translateX(-18px); }
  to   { opacity:1; transform: translateX(0); }
}

.guide-slide-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.update-icon  { background: linear-gradient(135deg,#3B82F6,#6366F1); color: #fff; }
.warning-icon { background: linear-gradient(135deg,#F59E0B,#EF4444); color: #fff; }
.feature-icon { background: linear-gradient(135deg,#10B981,#06B6D4); color: #fff; }
.pwa-icon-guide { background: linear-gradient(135deg,#8B5CF6,#3B82F6); color: #fff; }
.start-icon   { background: linear-gradient(135deg,#F59E0B,#EF4444); color: #fff; }

.guide-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--blue-light);
  color: var(--blue);
  margin-bottom: 8px;
}
.warn-tag { background: var(--yellow-light); color: #B45309; }
.pwa-tag  { background: #EDE9FE; color: #6D28D9; }
.start-tag{ background: var(--yellow-light); color: #B45309; }

.guide-slide-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 6px;
  line-height: 1.25;
}
.guide-slide-desc {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 16px;
  line-height: 1.55;
  max-width: 400px;
}

/* Update cards (step 0) */
.guide-update-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.guide-update-item {
  display: flex;
  gap: 12px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  align-items: flex-start;
}
.guide-update-item.highlight {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.guide-update-icon {
  width: 32px;
  height: 32px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--blue);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.guide-update-item.highlight .guide-update-icon { color: var(--blue); }
.guide-update-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.guide-update-body strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}
.guide-update-body span {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
}

/* Warning box (step 1) */
.guide-warn-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 14px;
}
.guide-warn-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 12.5px;
  color: var(--gray-700);
  line-height: 1.5;
}
.guide-warn-row i {
  color: #D97706;
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}
.guide-warn-row.green {
  background: var(--green-light);
  border-color: #6EE7B7;
}
.guide-warn-row.green i { color: var(--green); }
.guide-action-hint {
  width: 100%;
  background: var(--blue-light);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--blue-hover);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-action-hint i { font-size: 13px; }

/* Features grid (step 2) */
.guide-features-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  text-align: left;
}
.guide-feature-item {
  display: flex;
  gap: 10px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  align-items: flex-start;
}
.guide-feat-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--blue),#6366F1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}
.guide-feature-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.guide-feature-item strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-800);
}
.guide-feature-item span {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.45;
}

/* PWA (step 3) */
.guide-pwa-benefits {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 14px;
}
.guide-pwa-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
}
.guide-pwa-item i {
  width: 22px;
  height: 22px;
  background: #EDE9FE;
  color: #7C3AED;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.guide-pwa-how {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.guide-pwa-step {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--gray-700);
}
.pwa-num {
  width: 20px;
  height: 20px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.guide-pwa-arrow { color: var(--gray-300); font-size: 12px; }
.guide-ios-note {
  width: 100%;
  background: #F8FAFC;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 12px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}
.guide-ios-note i { color: var(--gray-500); }

/* Start (step 4) */
.guide-start-steps {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 16px;
}
.guide-start-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.start-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.guide-start-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.guide-start-item strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
}
.guide-start-item span {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.45;
}
.guide-copyright {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--gray-400);
  padding: 10px 16px;
  border-top: 1px solid var(--gray-100);
  width: 100%;
  margin-top: 4px;
}
.guide-copyright i { font-size: 11px; }
.guide-copyright strong { color: var(--gray-600); }

/* Footer */
.guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  flex-shrink: 0;
  gap: 12px;
  background: var(--white);
  border-radius: 0 0 20px 20px;
}
.guide-dont-show { flex-shrink: 0; }
.guide-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.guide-checkbox-label input[type="checkbox"] { display: none; }
.guide-checkbox-box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: all .2s ease;
  flex-shrink: 0;
}
.guide-checkbox-label input:checked ~ .guide-checkbox-box {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.guide-checkbox-text {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1;
}
.guide-nav-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.guide-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font);
}
.guide-btn-primary {
  background: var(--blue);
  color: #fff;
}
.guide-btn-primary:hover { background: var(--blue-hover); }
.guide-btn-primary:active { transform: scale(.97); }
.guide-btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
.guide-btn-secondary:hover { background: var(--gray-200); }

/* Responsive */
@media(max-width: 480px) {
  .guide-modal { border-radius: 16px; max-height: 95vh; }
  .guide-content-wrap { padding: 16px 16px 4px; }
  .guide-features-grid { grid-template-columns: 1fr; }
  .guide-slide-title { font-size: 18px; }
  .guide-pwa-how { flex-direction: column; gap: 4px; }
  .guide-pwa-arrow { transform: rotate(90deg); }
  .guide-footer { padding: 12px 16px; }
  .guide-btn { padding: 8px 14px; font-size: 12px; }
}

/* ===========================
   EDIT MODAL
=========================== */
.edit-modal-overlay {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.edit-modal {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.edit-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--navy);
  flex-shrink: 0;
}
.edit-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.edit-modal-title i { font-size: 14px; opacity: .85; }
.edit-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 15px;
  transition: background var(--transition), color var(--transition);
}
.edit-modal-close:hover { background: rgba(255,255,255,.15); color: var(--white); }

.edit-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.edit-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--white);
  flex-shrink: 0;
}

/* Edit tombol di tabel */
.btn-icon.edit {
  color: var(--blue);
  background: var(--blue-light);
}
.btn-icon.edit:hover {
  background: #DBEAFE;
  color: var(--blue-hover);
}
.td-action {
  display: flex;
  gap: 6px;
  align-items: center;
}

@media(max-width: 600px) {
  .edit-modal { max-height: 96vh; border-radius: 16px; }
  .edit-modal-body { padding: 16px; }
  .edit-modal-footer { padding: 12px 16px; }
}

/* ===========================
   DURASI CELL — ISTIRAHAT INFO
=========================== */
.td-dur { vertical-align: middle; }
.td-dur-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.3;
}
.td-dur-kotor {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: line-through;
  text-decoration-color: var(--gray-400);
  font-family: var(--font-mono);
}
.td-dur-ist {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #D97706;
  font-weight: 600;
  background: #FEF3C7;
  border-radius: 4px;
  padding: 1px 5px;
  width: fit-content;
}
.td-dur-ist i { font-size: 9px; }
.td-dur-efektif {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  font-family: var(--font-mono);
}
/* ===========================
   TAMBAHAN — Loader & Logout (migrasi ke DB)
=========================== */
.app-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy);
}
.app-loader-spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: lk-spin 0.8s linear infinite;
}
@keyframes lk-spin { to { transform: rotate(360deg); } }

.user-card { position: relative; }
.btn-logout {
  margin-left: auto;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Auth pages (login/register) */
.auth-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy), #101a30);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px;
  background: #fff; border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; justify-content: center; }
.auth-brand img { width: 40px; height: 40px; border-radius: 10px; }
.auth-brand span { font-size: 20px; font-weight: 700; color: var(--navy); }
.auth-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; color: var(--navy); text-align:center; }
.auth-sub { font-size: 13px; color: #7a8296; margin-bottom: 24px; text-align: center; }
.auth-error {
  background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

.auth-announcement {
  display: flex; gap: 12px;
  background: #FFFBEB; border: 1.5px solid #FDE68A;
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px;
}
.auth-announcement-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--yellow); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.auth-announcement-title { font-size: 13.5px; font-weight: 800; color: #92400E; margin-bottom: 5px; }
.auth-announcement-body p { font-size: 12px; color: #92400E; line-height: 1.55; margin: 0 0 8px; }
.auth-announcement-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.auth-announcement-list li { font-size: 11.5px; color: #92400E; display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; }
.auth-announcement-list i { margin-top: 2px; flex-shrink: 0; font-size: 11px; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 13px; color: #7a8296; }
.auth-footer a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-footer-token {
  margin-top: 10px;
  background: var(--blue-light);
  color: var(--blue-hover);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
}
.auth-footer-token i { font-size: 12px; }
.auth-footer-token a { color: var(--blue-hover); text-decoration: underline; }

/* ===========================
   FASE 5 — Payment page
=========================== */
.payment-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy), #101a30);
  padding: 24px;
}
.payment-card {
  width: 100%; max-width: 460px;
  background: #fff; border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.payment-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 20px 0; }
.pricing-card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.pricing-card:hover { border-color: var(--blue); }
.pricing-card.selected {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(59,130,246,.18);
  background: var(--blue-light);
}
.pricing-featured-tag {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: var(--blue); color: white; font-size: 10px; font-weight: 700;
  padding: 3px 12px; border-radius: 0 0 8px 8px; letter-spacing: .3px;
}
.pricing-promo-badge {
  position: absolute; top: 12px; right: 12px;
  background: linear-gradient(135deg, #FBBF24, #D97706); color: white;
  font-size: 9.5px; font-weight: 800; padding: 3px 8px; border-radius: 99px;
}
.pricing-name { font-size: 12.5px; font-weight: 700; color: var(--gray-600); margin: 12px 0 8px; text-transform: uppercase; letter-spacing: .3px; }
.pricing-price-old { font-size: 12px; color: var(--gray-400); text-decoration: line-through; font-family: var(--font-mono); display: block; }
.pricing-price-now { font-size: 22px; font-weight: 800; color: var(--navy); font-family: var(--font-mono); }
.pricing-price-period { font-size: 11px; font-weight: 500; color: var(--gray-500); font-family: var(--font); }

.payment-summary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--gray-50); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 18px; font-size: 13px;
}
.payment-summary strong { font-family: var(--font-mono); color: var(--navy); font-size: 16px; }

.payment-status-box { text-align: center; padding: 12px 0; }
.payment-status-icon { font-size: 42px; margin-bottom: 12px; }
.payment-status-icon.paid { color: var(--green); }
.payment-status-icon.pending { color: var(--yellow); }
.payment-status-icon.failed { color: var(--red); }
.payment-token-box {
  margin-top: 16px; padding: 16px; background: var(--blue-light);
  border: 1.5px dashed var(--blue); border-radius: var(--radius-sm);
}
.payment-token-code {
  font-family: var(--font-mono); font-size: 24px; font-weight: 800;
  color: var(--navy); letter-spacing: 1px; margin: 6px 0;
}

/* ===========================
   Cek Transaksi — riwayat order & status token (dipakai payment-success.php)
=========================== */
.payment-trx-box {
  margin: 16px 0; padding: 14px 16px; background: var(--gray-50);
  border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 9px;
}
.payment-trx-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--gray-500); gap: 12px; }
.payment-trx-row strong { color: var(--navy); font-size: 13px; text-align: right; }
.payment-token-used-note {
  margin-top: 16px; padding: 14px 16px; background: var(--blue-light);
  border-radius: var(--radius-sm); display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--navy); line-height: 1.5;
}
.payment-token-used-note i { color: var(--blue); font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.payment-token-used-note.expired { background: #FFF4E5; }
.payment-token-used-note.expired i { color: var(--yellow); }

/* ===========================
   Referral & Tukar Coin (referral.php)
=========================== */
.referral-code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--blue-light); border: 1.5px dashed var(--blue);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 12px; flex-wrap: wrap;
}
.referral-code-text {
  font-family: var(--font-mono); font-size: 22px; font-weight: 800;
  color: var(--navy); letter-spacing: 1px; margin-top: 2px;
}
.referral-link-box { display: flex; gap: 8px; flex-wrap: wrap; }
.referral-link-box .form-control { flex: 1; min-width: 180px; font-size: 12.5px; color: var(--gray-500); background: var(--gray-50); }

.reward-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}
.reward-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; transition: box-shadow var(--transition), border-color var(--transition);
}
.reward-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.reward-card.locked { opacity: .6; }
.reward-card-icon {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 10px;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.reward-card-label { font-size: 13px; font-weight: 700; color: var(--gray-800); line-height: 1.35; min-height: 35px; }
.reward-card-coin { font-size: 13px; font-weight: 700; color: #B45309; margin-top: 8px; }
.reward-card-coin i { color: var(--yellow); }
.reward-card-type { font-size: 10.5px; color: var(--gray-500); margin-top: 4px; }

/* ===========================
   Tentang Aplikasi (about.php) — reuses .guide-* component styles
   from the old welcome popup (kept in this stylesheet on purpose)
=========================== */
.about-hero { text-align: center; }
.about-hero-icon { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 10px; }
.about-hero h1 { font-size: 22px; font-weight: 800; color: var(--gray-800); margin-bottom: 4px; }
.about-section { padding: 22px 24px; margin-bottom: 18px; }
.about-section h2 { font-size: 18px; font-weight: 800; color: var(--gray-800); margin-bottom: 6px; line-height: 1.25; }
.about-section-desc { font-size: 13px; color: var(--gray-500); margin-bottom: 16px; line-height: 1.55; }
.about-section-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
  background: var(--blue-light); color: var(--blue); margin-bottom: 8px;
}
.about-section-tag.warn { background: var(--yellow-light); color: #B45309; }
.about-section-tag.pwa { background: #EDE9FE; color: #6D28D9; }
.about-copyright {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11.5px; color: var(--gray-400); padding: 16px; margin-top: 4px;
}
.about-copyright i { font-size: 11px; }
.about-copyright strong { color: var(--gray-600); }

/* ===========================
   FASE 5 — Pembayaran manual via Admin (fallback WA)
=========================== */
.payment-fallback {
  text-align: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--gray-200);
}
.payment-fallback-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--gray-500);
  text-decoration: none;
}
.payment-fallback-link i { color: #25D366; }
.payment-fallback-link:hover { color: var(--gray-700); }

.payment-fallback-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
}
.payment-fallback-banner i { color: #059669; font-size: 20px; flex-shrink: 0; }
.payment-fallback-banner span { font-size: 12.5px; color: #047857; line-height: 1.5; }
.payment-fallback-banner a { color: #047857; font-weight: 700; text-decoration: underline; }

/* ===========================
   FASE 2 — Export buttons
=========================== */
.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue-light); }

.filter-actions-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .filter-summary-row { flex-direction: column; align-items: stretch; }
  .filter-actions-right { width: 100%; }
  .filter-actions-right .btn { flex: 1; justify-content: center; }
}

/* ===========================
   FASE 2 — Rekap page (tabs, month table)
=========================== */
.rekap-tabs {
  display: flex; gap: 6px; margin-bottom: 16px;
  background: var(--gray-100); padding: 4px; border-radius: 10px; width: fit-content;
  max-width: 100%; overflow-x: auto;
}
.rekap-tab {
  padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--gray-600); white-space: nowrap; cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.rekap-tab.active { background: var(--white); color: var(--navy); box-shadow: var(--shadow); }
.rekap-tab-panel { display: none; }
.rekap-tab-panel.active { display: block; }

.rekap-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; justify-content: space-between;
}
.rekap-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rekap-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }

.month-card {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.month-item {
  background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 14px 16px; transition: box-shadow var(--transition);
}
.month-item.has-data { border-color: #BFDBFE; background: var(--blue-light); }
.month-item:hover { box-shadow: var(--shadow); }
.month-name { font-size: 13px; font-weight: 700; color: var(--gray-700); margin-bottom: 8px; }
.month-stat { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-500); margin-bottom: 3px; }
.month-stat strong { color: var(--gray-800); font-weight: 600; }
.month-upah { font-family: var(--font-mono); color: var(--green); font-weight: 700; font-size: 14px; margin-top: 6px; }

@media (max-width: 768px) {
  .month-card { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rekap-toolbar { flex-direction: column; align-items: stretch; }
  .rekap-toolbar-right .btn { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
  .month-card { grid-template-columns: 1fr 1fr; }
}

/* ===========================
   FASE 2 — DITZ AI floating widget
=========================== */
.ditz-fab {
  position: fixed; right: 22px; bottom: 90px; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #2563EB);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: 0 6px 20px rgba(59,130,246,.45);
  cursor: pointer; transition: transform var(--transition);
}
.ditz-fab:hover { transform: scale(1.06); }
.ditz-fab .ditz-fab-badge {
  position: absolute; top: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--green); border: 2px solid white;
}
@media (max-width: 768px) { .ditz-fab { bottom: 96px; right: 16px; width: 50px; height: 50px; font-size: 19px; } }

.referral-fab {
  position: fixed; right: 22px; bottom: 158px; z-index: 150;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #F59E0B, #EC4899);
  color: white; display: flex; align-items: center; justify-content: center;
  font-size: 19px; box-shadow: 0 6px 20px rgba(236,72,153,.4);
  cursor: pointer; transition: transform var(--transition);
  text-decoration: none;
}
.referral-fab:hover { transform: scale(1.08); color: white; }
.referral-fab-close {
  position: absolute; top: -6px; left: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gray-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer; border: 2px solid #fff;
  transition: background var(--transition);
}
.referral-fab-close:hover { background: var(--red); }
@media (max-width: 768px) {
  .referral-fab { bottom: 154px; right: 16px; width: 44px; height: 44px; font-size: 17px; }
  .referral-fab-close { width: 18px; height: 18px; font-size: 9px; top: -5px; left: -5px; }
}

.ditz-panel {
  position: fixed; right: 22px; bottom: 156px; z-index: 150;
  width: 340px; max-width: calc(100vw - 32px);
  height: 460px; max-height: calc(100vh - 200px);
  background: var(--white); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: none; flex-direction: column; overflow: hidden;
  border: 1px solid var(--gray-200);
}
.ditz-panel.open { display: flex; }
@media (max-width: 768px) {
  .ditz-panel { right: 12px; left: 12px; width: auto; bottom: 152px; max-height: calc(100vh - 230px); }
}

.ditz-header {
  background: var(--navy); color: white; padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.ditz-header-icon {
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.ditz-header-text strong { font-size: 13.5px; display: block; }
.ditz-header-text span { font-size: 10.5px; color: rgba(255,255,255,.5); }
.ditz-close { margin-left: auto; color: rgba(255,255,255,.6); font-size: 16px; cursor: pointer; padding: 4px; }
.ditz-close:hover { color: white; }

.ditz-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--gray-50); }
.ditz-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; white-space: pre-line; }
.ditz-msg.bot { background: var(--white); border: 1px solid var(--gray-200); color: var(--gray-700); align-self: flex-start; border-bottom-left-radius: 4px; }
.ditz-msg.user { background: var(--blue); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

.ditz-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; background: var(--gray-50); }
.ditz-chip {
  font-size: 11.5px; padding: 6px 11px; border-radius: 99px; background: var(--white);
  border: 1.5px solid var(--gray-200); color: var(--gray-600); cursor: pointer; white-space: nowrap;
}
.ditz-chip:hover { background: var(--blue-light); color: var(--blue); border-color: #BFDBFE; }

.ditz-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--gray-200); background: var(--white); }
.ditz-input-row input {
  flex: 1; border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 9px 12px; font-size: 13px; font-family: var(--font);
}
.ditz-input-row input:focus { outline: none; border-color: var(--blue); }
.ditz-send { width: 38px; height: 38px; border-radius: 10px; background: var(--blue); color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ditz-send:hover { background: var(--blue-hover); }

/* ===========================
   FASE 2 — Reminder banner
=========================== */
.reminder-banner {
  display: none;
  align-items: center; gap: 12px;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border: 1px solid #FDE68A; border-radius: var(--radius-sm);
  padding: 12px 16px; margin-bottom: 16px;
}
.reminder-banner.show { display: flex; }
.reminder-banner i { color: #B45309; font-size: 18px; }
.reminder-banner-text { flex: 1; font-size: 13px; color: #92400E; font-weight: 600; }
.reminder-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.reminder-banner .btn { padding: 6px 12px; font-size: 12px; }
@media (max-width: 480px) {
  .reminder-banner { flex-wrap: wrap; }
  .reminder-banner-text { flex: 1 1 100%; }
  .reminder-banner-actions { flex: 1 1 100%; }
  .reminder-banner-actions .btn { flex: 1; justify-content: center; }
}

/* ===========================
   FASE 3 — "Lainnya" bottom sheet (mobile)
=========================== */
.more-sheet-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 199;
  opacity: 0; visibility: hidden; transition: opacity var(--transition);
}
.more-sheet-overlay.show { opacity: 1; visibility: visible; }

.more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--white); border-radius: 18px 18px 0 0;
  padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%); transition: transform .25s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,.15);
}
.more-sheet.open { transform: translateY(0); }
.more-sheet-handle { width: 40px; height: 4px; background: var(--gray-200); border-radius: 99px; margin: 4px auto 10px; }
.more-sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--gray-700);
}
.more-sheet-item i { width: 20px; text-align: center; color: var(--gray-500); }
.more-sheet-item:active { background: var(--gray-100); }
.more-sheet-item.danger { color: var(--red); }
.more-sheet-item.danger i { color: var(--red); }

@media (min-width: 769px) {
  .more-sheet, .more-sheet-overlay, #bnavMore { display: none !important; }
}

/* ===========================
   FASE 3 — Admin panel stat grid (3 kolom, responsive)
=========================== */
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 768px) { .stats-grid-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
@media (max-width: 480px) { .stats-grid-3 { grid-template-columns: 1fr 1fr; } .stats-grid-3 .stat-card:first-child { grid-column: 1 / -1; } }

/* ===========================
   FASE 4 — Import backup dari versi non-DB
=========================== */
/* Sembunyikan input file tapi tetap "hadir" di layout — beberapa browser
   mobile (terutama versi PWA/standalone) kurang reliable memicu file
   picker via JS pada elemen yang display:none. */
.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.import-preview-box {
  background: var(--blue-light);
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: -4px;
  margin-bottom: 20px;
}
.import-preview-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--navy);
  margin-bottom: 4px;
}
.import-preview-title i { color: var(--blue); margin-right: 6px; }
.import-preview-detail {
  font-size: 12.5px;
  color: var(--gray-600);
  margin-bottom: 12px;
}
.import-preview-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--gray-700);
  margin-bottom: 14px;
  cursor: pointer;
}
.import-preview-check input { width: 15px; height: 15px; }
.import-preview-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .import-preview-actions { flex-direction: column-reverse; }
  .import-preview-actions .btn { width: 100%; justify-content: center; }
}

/* ===========================
   GALERI ABSENSI (Fase 6)
=========================== */
.badge-purple { background: #F5F3FF; color: #6D28D9; }

.absensi-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 16px;
}
.absensi-toolbar .form-group { min-width: 140px; }
.absensi-toolbar .form-group.grow { flex: 1; min-width: 180px; }
.absensi-toolbar-actions { display: flex; gap: 8px; margin-left: auto; }

.absensi-list { padding: 6px 0; }

.absensi-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background var(--transition);
}
.absensi-item:last-child { border-bottom: none; }
.absensi-item:hover { background: var(--gray-50); }

.absensi-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}

.absensi-item-body { flex: 1; min-width: 0; }
.absensi-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.absensi-item-date { font-size: 13.5px; font-weight: 700; color: var(--gray-700); }
.absensi-item-day { font-size: 11.5px; color: var(--gray-400); }
.absensi-item-note {
  font-size: 12px;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.absensi-item-chevron { color: var(--gray-300); font-size: 13px; flex-shrink: 0; }

/* Upload FAB */
.absensi-fab {
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(59,130,246,.4);
  cursor: pointer;
  z-index: 60;
  border: none;
  transition: transform var(--transition), background var(--transition);
}
.absensi-fab:hover { background: var(--blue-hover); transform: scale(1.05); }
@media (min-width: 901px) {
  .absensi-fab { bottom: 32px; }
}

/* Upload form (di dalam edit-modal) */
.absensi-upload-drop {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 22px 14px;
  text-align: center;
  color: var(--gray-400);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.absensi-upload-drop:hover,
.absensi-upload-drop.dragover { border-color: var(--blue); background: var(--blue-light); color: var(--blue-hover); }
.absensi-upload-drop i { font-size: 24px; display: block; margin-bottom: 6px; }
.absensi-upload-drop span { font-size: 12.5px; }
.absensi-upload-preview {
  margin-top: 10px;
  max-width: 100%;
  max-height: 220px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  display: none;
  object-fit: contain;
}
.absensi-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.absensi-status-option {
  position: relative;
}
.absensi-status-option input { position: absolute; opacity: 0; }
.absensi-status-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.absensi-status-box i { font-size: 15px; }
.absensi-status-option input:checked + .absensi-status-box {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue-hover);
}

/* Detail modal */
.absensi-detail-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  margin-bottom: 14px;
  background: var(--gray-50);
}
.absensi-detail-img-wrap img { width: 100%; display: block; max-height: 60vh; object-fit: contain; background: var(--gray-800); }
.absensi-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}
.absensi-detail-row:last-of-type { border-bottom: none; }
.absensi-detail-row span:first-child { color: var(--gray-500); }
.absensi-detail-row span:last-child { font-weight: 600; color: var(--gray-700); text-align: right; }
.absensi-detail-note {
  font-size: 12.5px;
  color: var(--gray-600);
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 4px;
}

/* Badge kuota di atas FAB unggah absensi */
@media (min-width: 901px) {
  #uploadQuotaBadge { bottom: 92px !important; }
}

.absensi-fab.is-disabled {
  background: var(--gray-300);
  box-shadow: none;
  cursor: not-allowed;
}
.absensi-fab.is-disabled:hover { background: var(--gray-300); transform: none; }

/* Grid 3 slot foto (upload/edit) — Fase 6c */
.absensi-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.absensi-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
}
.absensi-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.absensi-slot-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  border: 2px dashed var(--gray-300);
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all var(--transition);
}
.absensi-slot-add:hover { border-color: var(--blue); color: var(--blue-hover); background: var(--blue-light); }
.absensi-slot-add i { font-size: 18px; }
.absensi-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
}
.absensi-slot-remove:hover { background: var(--red); }
.absensi-slot-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

/* Thumbnail strip di detail modal, kalau entri punya >1 foto */
.absensi-detail-thumbstrip {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.absensi-detail-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: .6;
  transition: all var(--transition);
}
.absensi-detail-thumb:hover { opacity: .85; }
.absensi-detail-thumb.active { border-color: var(--blue); opacity: 1; }

/* Badge "+N" di thumbnail list utama kalau foto lebih dari 1 */
.absensi-thumb-wrap { position: relative; flex-shrink: 0; }
.absensi-thumb-count {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: var(--navy);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  border: 1.5px solid #fff;
}

/* ===========================
   STAT CARD CLICKABLE + POPUP ESTIMASI UPAH (Fase 6d)
=========================== */
.stat-card-clickable {
  position: relative;
  cursor: pointer;
}
.stat-card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.09);
  border-color: var(--blue);
}
.stat-card-expand-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  color: var(--gray-300);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card-clickable:hover .stat-card-expand-hint { opacity: 1; }

.estimasi-modal {
  max-width: 380px;
  width: 100%;
  text-align: center;
  padding: 32px 26px 26px;
  position: relative;
}
.estimasi-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.estimasi-modal-close:hover { background: var(--gray-200); }

.estimasi-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}
.estimasi-modal-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 6px;
}
.estimasi-modal-value {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--gray-800);
  font-size: 34px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 4px;
}
.estimasi-modal-periode {
  font-size: 12.5px;
  color: var(--gray-400);
  margin-bottom: 20px;
}

.estimasi-modal-breakdown {
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 4px 14px;
  margin-bottom: 16px;
  text-align: left;
}
.estimasi-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
}
.estimasi-modal-row:last-child { border-bottom: none; }
.estimasi-modal-row span:first-child { color: var(--gray-500); display: flex; align-items: center; gap: 6px; }
.estimasi-modal-row span:first-child i { color: var(--gray-400); width: 14px; text-align: center; }
.estimasi-modal-row span:last-child { font-weight: 700; color: var(--gray-700); font-family: var(--font-mono); }

.estimasi-modal-note {
  font-size: 11.5px;
  color: var(--gray-400);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 480px) {
  .estimasi-modal { padding: 28px 20px 22px; }
  .estimasi-modal-value { font-size: 26px; }
}

/* ===========================
   DROPDOWN DAFTAR HARGA (halaman Registrasi)
=========================== */
.price-info-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.price-info-toggle:hover { border-color: var(--blue); color: var(--blue-hover); background: var(--blue-light); }
.price-info-toggle i:first-child { margin-right: 2px; }
.price-toggle-chevron { font-size: 10px; transition: transform var(--transition); }

.price-info-panel {
  margin-top: 8px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--white);
}
.price-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-100);
}
.price-info-row:last-of-type { border-bottom: none; }
.price-info-name { font-size: 13px; font-weight: 700; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }
.price-info-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--yellow-hover, #92400E);
  background: var(--yellow-light);
  padding: 1px 6px;
  border-radius: 999px;
}
.price-info-old { font-size: 11px; color: var(--gray-400); text-decoration: line-through; }
.price-info-amount { font-family: var(--font-mono); font-weight: 800; color: var(--green); font-size: 15px; }
.price-info-buy {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  font-size: 13px;
  padding: 10px;
}

/* ===========================
   TOP PROGRESS BAR (loader.js) — Fase 6e
=========================== */
#lkTopProgress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
}
#lkTopProgress.is-active { opacity: 1; }
.lk-top-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #60A5FA, var(--blue));
  background-size: 200% 100%;
  animation: lk-progress-shimmer 1.1s linear infinite;
  box-shadow: 0 0 8px rgba(59,130,246,.6);
  transition: width .2s ease, opacity .25s ease;
  border-radius: 0 2px 2px 0;
}
@keyframes lk-progress-shimmer {
  0% { background-position: 0% 0; }
  100% { background-position: -200% 0; }
}

/* ===========================
   TOMBOL LOADING (LK.btnLoading) — Fase 6e
=========================== */
.lk-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lk-spin .7s linear infinite;
  margin-right: 4px;
  vertical-align: -2px;
}
.btn-secondary .lk-btn-spinner,
.btn-outline .lk-btn-spinner {
  border-color: rgba(59,130,246,.25);
  border-top-color: var(--blue);
}
.lk-btn-loading { cursor: progress !important; opacity: .85; }

/* ===========================
   SPLASH LOADER (app-loader) — versi keren, Fase 6e
=========================== */
.app-loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 40%, #26355c 0%, var(--navy) 70%);
}
.app-loader-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: lk-loader-fade-in .5s ease .1s forwards;
}
.app-loader-brand img { width: 38px; height: 38px; border-radius: 9px; }
.app-loader-brand span { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: .3px; }

.app-loader-rings {
  position: relative;
  width: 64px;
  height: 64px;
}
.app-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
.app-loader-ring:nth-child(1) { border-top-color: #fff; animation: lk-spin 1s linear infinite; }
.app-loader-ring:nth-child(2) {
  inset: 9px;
  border-right-color: rgba(255,255,255,.55);
  animation: lk-spin 1.4s linear infinite reverse;
}
.app-loader-dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: lk-loader-pulse 1.2s ease-in-out infinite;
}
.app-loader-text {
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
  letter-spacing: .3px;
  opacity: 0;
  animation: lk-loader-fade-in .5s ease .2s forwards;
}
@keyframes lk-loader-fade-in { to { opacity: 1; } }
@keyframes lk-loader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: .4; }
}

/* Spinner list "Memuat data..." (absensi.php, rekap.php, dsb) — versi lebih halus */
.empty-state .fa-spinner {
  display: inline-block;
  width: 26px; height: 26px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: lk-spin .7s linear infinite;
  font-size: 0; /* sembunyikan glyph asli fa-spinner, pakai border-spin di atas */
}

/* ===========================
   KALENDER LEMBUR (Dashboard) — Fase 6f
=========================== */
.calendar-card { margin-bottom: 16px; padding-bottom: 16px; }
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-700);
}
.calendar-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all var(--transition);
}
.calendar-nav-btn:hover { background: var(--blue-light); color: var(--blue-hover); border-color: var(--blue); }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 10px 16px 2px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-400);
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 4px 12px 12px;
}

.calendar-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  position: relative;
  background: transparent;
  border: none;
  cursor: default;
  font-family: var(--font-main);
}
.calendar-cell.is-empty { visibility: hidden; }
.calendar-cell.is-weekend { background: #FEF2F2; color: #B91C1C; }
.calendar-cell.is-today { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue-hover); }
.calendar-cell.has-lembur { cursor: pointer; }
.calendar-cell.has-lembur:hover { background: var(--gray-100); }
.calendar-cell.is-weekend.has-lembur:hover { background: #FEE2E2; }
.calendar-cell.is-selected { background: var(--blue) !important; color: #fff !important; box-shadow: none; }

.calendar-cell-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 2px;
}
.calendar-cell-dot.dot-weekday { background: var(--blue); }
.calendar-cell-dot.dot-weekend { background: #DC2626; }
.calendar-cell.is-selected .calendar-cell-dot { background: #fff; }

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0 16px 4px;
  font-size: 11px;
  color: var(--gray-500);
}
.calendar-legend span { display: flex; align-items: center; gap: 5px; }
.calendar-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.calendar-dot.dot-weekday { background: var(--blue); }
.calendar-dot.dot-weekend { background: #DC2626; }
.calendar-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.calendar-swatch.swatch-weekend { background: #FEF2F2; border: 1px solid #FCA5A5; }

.calendar-day-detail {
  margin: 10px 16px 0;
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}
.calendar-day-detail-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calendar-day-detail-close {
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 13px;
}
.calendar-day-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 6px 0;
  border-top: 1px solid var(--gray-200);
}
.calendar-day-detail-item:first-of-type { border-top: none; }
.calendar-day-detail-item .waktu { color: var(--gray-500); }
.calendar-day-detail-item .upah { font-weight: 700; color: var(--green); font-family: var(--font-mono); }

@media (max-width: 480px) {
  .calendar-cell { font-size: 11px; }
  .calendar-legend { font-size: 10px; gap: 10px; }
}

/* ===========================
   LISENSI AKUN (Halaman Pengaturan) — Fase 6g
=========================== */
.license-card {
  padding: 20px 22px;
  margin-bottom: 16px;
  border-left: 4px solid var(--gray-300);
}
.license-card.status-unlimited { border-left-color: var(--blue); }
.license-card.status-active { border-left-color: var(--green); }
.license-card.status-expiring_soon { border-left-color: var(--yellow); }
.license-card.status-expired { border-left-color: var(--red); }

.license-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.license-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--gray-100);
  color: var(--gray-500);
}
.license-card.status-unlimited .license-icon { background: var(--blue-light); color: var(--blue-hover); }
.license-card.status-active .license-icon { background: var(--green-light); color: var(--green); }
.license-card.status-expiring_soon .license-icon { background: var(--yellow-light); color: #92400E; }
.license-card.status-expired .license-icon { background: var(--red-light); color: #B91C1C; }

.license-info { min-width: 0; }
.license-status { font-size: 15px; font-weight: 800; color: var(--gray-800); }
.license-sub { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

.license-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  padding: 9px 0;
  border-top: 1px solid var(--gray-100);
}
.license-detail-row span:first-child { color: var(--gray-500); display: flex; align-items: center; gap: 6px; }
.license-detail-row span:first-child i { width: 14px; text-align: center; color: var(--gray-400); }
.license-detail-row span:last-child { font-weight: 700; color: var(--gray-700); }

.license-renew-btn {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
  font-size: 13px;
  padding: 10px;
}

/* ===========================
   BANNER LISENSI KEDALUWARSA (Dashboard) — Fase 6h
=========================== */
.license-expired-banner {
  display: none;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.license-expired-banner.show { display: flex; }
.license-expired-banner > i.fa-lock {
  color: #B91C1C;
  font-size: 18px;
  flex-shrink: 0;
}
.license-expired-banner-text { flex: 1; min-width: 0; }
.license-expired-banner-text strong { display: block; font-size: 13px; color: #991B1B; }
.license-expired-banner-text span { display: block; font-size: 11.5px; color: #B91C1C; margin-top: 2px; line-height: 1.4; }
.license-expired-banner .btn { padding: 6px 14px; font-size: 12px; flex-shrink: 0; }
@media (max-width: 480px) {
  .license-expired-banner { flex-wrap: wrap; }
  .license-expired-banner-text { flex: 1 1 100%; }
  .license-expired-banner .btn { flex: 1 1 100%; text-align: center; }
}

/* Form token perpanjangan lisensi (halaman Pengaturan) — Fase 6i */
.license-token-form {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--gray-200);
}
.license-token-form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.license-token-form-row {
  display: flex;
  gap: 8px;
}
.license-token-form-row .form-control { flex: 1; }
.license-token-form-row .btn { flex-shrink: 0; padding: 0 16px; font-size: 13px; }
.license-token-form-hint {
  display: block;
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 6px;
}
.license-token-form-hint a { color: var(--blue); font-weight: 600; text-decoration: none; }
@media (max-width: 480px) {
  .license-token-form-row { flex-direction: column; }
  .license-token-form-row .btn { width: 100%; justify-content: center; }
}

/* ===========================
   FASE 8 — Payment Store (Midtrans, versi Marketplace/Card Store)
=========================== */
.store-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  background: linear-gradient(160deg, var(--navy), #101a30);
  padding: 32px 20px 60px;
}
.store-shell {
  width: 100%; max-width: 980px;
  background: #fff; border-radius: 20px;
  padding: 34px 30px 30px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
}
.store-header { text-align: center; margin-bottom: 26px; }
.store-header .auth-brand { justify-content: center; }
.store-header .store-title {
  font-size: 22px; font-weight: 800; color: var(--navy); margin: 14px 0 6px;
}
.store-header .store-sub { font-size: 13px; color: var(--gray-500); max-width: 520px; margin: 0 auto; }
.store-gw-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-light); color: var(--blue-hover);
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 99px;
  margin-top: 12px; letter-spacing: .2px;
}
.store-gw-badge i { font-size: 11px; }

.store-switch-link { text-align: center; margin: -10px 0 22px; }
.store-switch-link a {
  font-size: 12px; color: var(--gray-500); text-decoration: none;
  border-bottom: 1px dashed var(--gray-300);
}
.store-switch-link a:hover { color: var(--blue-hover); border-color: var(--blue-hover); }

.store-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}
@media (max-width: 900px) { .store-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .store-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (max-width: 420px) { .store-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

.store-item {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 14px 16px;
  text-align: center;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.store-item:hover { border-color: var(--blue); transform: translateY(-2px); }
.store-item.selected {
  border-color: var(--blue);
  box-shadow: 0 10px 28px rgba(59,130,246,.2);
  background: var(--blue-light);
}
.store-item-badge {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #FBBF24, #D97706); color: #fff;
  font-size: 9px; font-weight: 800; padding: 3px 10px; border-radius: 0 0 8px 8px;
  letter-spacing: .3px; white-space: nowrap;
}
.store-item-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin: 14px 0 10px;
}
.store-item.selected .store-item-icon { background: var(--blue); color: #fff; }
.store-item-name { font-size: 13.5px; font-weight: 800; color: var(--navy); margin-bottom: 2px; }
.store-item-period { font-size: 10.5px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 10px; }
.store-item-old { font-size: 11px; color: var(--gray-400); text-decoration: line-through; font-family: var(--font-mono); }
.store-item-now { font-size: 17px; font-weight: 800; color: var(--navy); font-family: var(--font-mono); }
.store-item-discount { font-size: 9.5px; font-weight: 800; color: #D97706; margin-top: 2px; }
.store-item-desc { font-size: 10.5px; color: var(--gray-500); line-height: 1.4; margin-top: 8px; min-height: 28px; }
.store-item-check {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--gray-300); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent;
}
.store-item.selected .store-item-check { background: var(--blue); border-color: var(--blue); color: #fff; }

@media (max-width: 640px) {
  .store-wrapper { padding: 0; align-items: stretch; }
  .store-shell { border-radius: 0; padding: 22px 14px 24px; box-shadow: none; min-height: 100vh; }
  .store-item { padding: 16px 10px 14px; border-radius: 12px; }
  .store-item-icon { width: 38px; height: 38px; font-size: 15px; margin: 10px 0 8px; }
  .store-item-name { font-size: 12.5px; }
  .store-item-period { font-size: 9.5px; margin-bottom: 8px; }
  .store-item-old { font-size: 10px; }
  .store-item-now { font-size: 15px; }
  .store-item-discount { font-size: 9px; }
  .store-item-desc { font-size: 9.5px; min-height: 24px; margin-top: 6px; }
  .store-item-badge { font-size: 8px; padding: 3px 8px; }
  .store-header .store-title { font-size: 19px; }
  .store-header .store-sub { font-size: 12px; }
}

.store-checkout {
  border-top: 1.5px dashed var(--gray-200);
  padding-top: 22px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}
@media (max-width: 720px) { .store-checkout { grid-template-columns: 1fr; } }

.store-summary-box {
  background: var(--gray-50); border-radius: var(--radius);
  padding: 18px; height: fit-content;
}
.store-summary-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--gray-600); margin-bottom: 8px; }
.store-summary-row.total { border-top: 1px dashed var(--gray-300); margin-top: 10px; padding-top: 10px; font-size: 14px; }
.store-summary-row.total strong { font-family: var(--font-mono); color: var(--navy); font-size: 18px; }
.store-summary-plan-name { font-weight: 700; color: var(--navy); }

.store-verify-note {
  display: flex; align-items: flex-start; gap: 10px;
  background: #ECFDF5; border: 1.5px solid #A7F3D0; border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: 18px; font-size: 11.5px; color: #047857; line-height: 1.5;
}
.store-verify-note i { font-size: 16px; color: #059669; flex-shrink: 0; margin-top: 1px; }
.store-verify-note strong { color: #065F46; }

.store-copyright {
  text-align: center; font-size: 10.5px; color: var(--gray-400);
  margin-top: 16px; line-height: 1.6;
}

/* ===========================
   FASE 8b — Halaman Fitur Premium
=========================== */
.fitur-wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex; align-items: flex-start; justify-content: center;
  background: linear-gradient(160deg, var(--navy), #101a30);
  padding: 32px 20px 60px;
}
.fitur-shell {
  width: 100%; max-width: 1040px;
  background: #fff; border-radius: 20px;
  padding: 38px 32px 34px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
}
.fitur-hero { text-align: center; margin-bottom: 30px; }
.fitur-hero .auth-brand { justify-content: center; }
.fitur-hero-title {
  font-size: 26px; font-weight: 800; color: var(--navy); margin: 16px 0 8px; line-height: 1.3;
}
.fitur-hero-title span { color: var(--blue); }
.fitur-hero-sub { font-size: 13.5px; color: var(--gray-500); max-width: 560px; margin: 0 auto 20px; line-height: 1.6; }
.fitur-hero-cta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.fitur-hero-cta .btn { padding: 11px 22px; font-size: 13px; }

.fitur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 30px 0 8px;
}
@media (max-width: 860px) { .fitur-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .fitur-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.fitur-card {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 18px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.fitur-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(59,130,246,.12); background: #fff; }
.fitur-card-icon {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 14px;
}
.fitur-card-title { font-size: 13.5px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.fitur-card-desc { font-size: 11.5px; color: var(--gray-600); line-height: 1.55; }

@media (max-width: 480px) {
  .fitur-card { padding: 16px 14px; border-radius: 12px; }
  .fitur-card-icon { width: 36px; height: 36px; font-size: 15px; margin-bottom: 10px; }
  .fitur-card-title { font-size: 12.5px; }
  .fitur-card-desc { font-size: 10.5px; }
}

.fitur-cta-box {
  margin-top: 34px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 16px;
  padding: 30px 26px;
  text-align: center;
  color: #fff;
}
.fitur-cta-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.fitur-cta-sub { font-size: 12.5px; color: #B8C2DA; margin-bottom: 18px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.fitur-cta-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.fitur-cta-actions .btn { padding: 11px 22px; font-size: 13px; }
.fitur-cta-actions .btn-outline { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.fitur-cta-actions .btn-outline:hover { background: rgba(255,255,255,.1); }

.fitur-footer-back { text-align: center; margin-top: 22px; }
.fitur-footer-back a { font-size: 12px; color: var(--gray-500); text-decoration: none; border-bottom: 1px dashed var(--gray-300); }
.fitur-footer-back a:hover { color: var(--blue-hover); border-color: var(--blue-hover); }

/* ===========================
   FASE 8c — Banner info "Lihat Fitur Premium" (login & register)
=========================== */
.auth-fitur-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blue-light);
  border: 1.5px dashed var(--blue);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 16px 0 4px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.auth-fitur-banner:hover { background: #E0EDFF; }
.auth-fitur-banner-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.auth-fitur-banner-text { flex: 1; }
.auth-fitur-banner-title { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.auth-fitur-banner-sub { font-size: 10.5px; color: var(--gray-500); margin-top: 1px; }

/* ===========================
   Banner download aplikasi Android (.apk) — login & register
=========================== */
.auth-apk-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #E8F8EE;
  border: 1.5px dashed var(--green);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 10px 0 4px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.auth-apk-banner:hover { background: #D8F3E2; }
.auth-apk-banner-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.auth-apk-banner-text { flex: 1; }
.auth-apk-banner-title { font-size: 12px; font-weight: 700; color: var(--navy); line-height: 1.3; }
.auth-apk-banner-sub { font-size: 10.5px; color: var(--gray-500); margin-top: 1px; }
.auth-apk-banner-arrow { color: var(--green); font-size: 13px; flex-shrink: 0; }
.auth-fitur-banner-arrow { color: var(--blue); font-size: 13px; flex-shrink: 0; }
