/* ==========================================================================
   KALKULATOR GAJI BULANAN KARYAWAN (STANDALONE TANPA ADMIN PANEL)
   Tema: Dominan Biru & Putih, Modern, Bersih, Responsif & Mobile-First
   ========================================================================== */

:root {
  /* Palet Warna Biru & Netral */
  --primary-900: #0f172a;
  --primary-800: #1e3a8a; /* Deep Navy */
  --primary-700: #1d4ed8;
  --primary-600: #2563eb; /* Royal Blue */
  --primary-500: #3b82f6;
  --primary-400: #60a5fa;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;

  --accent-cyan: #0284c7;
  --accent-cyan-bg: #e0f2fe;
  --accent-indigo: #4338ca;
  --accent-indigo-bg: #eef2ff;

  --hl-color: #dc2626; /* Merah untuk Hari Libur Nasional */
  --hl-bg: #fef2f2;
  --hl-border: #fca5a5;

  --lembur-color: #0284c7;
  --lembur-bg: #e0f2fe;
  --lembur-border: #7dd3fc;

  --success-color: #059669;
  --success-bg: #d1fae5;
  --warning-color: #d97706;

  --surface-white: #ffffff;
  --surface-bg: #f8fafc;
  --surface-card: #ffffff;
  --surface-border: #e2e8f0;
  --surface-border-subtle: #edf2f7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-white: #ffffff;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(30, 58, 138, 0.12), 0 8px 10px -6px rgba(30, 58, 138, 0.08);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--surface-bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px; /* Ruang untuk mobile sticky bar */
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Aplikasi */
.app-header {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
  color: var(--text-white);
  padding: 14px 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.app-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.app-subtitle {
  font-size: 0.8rem;
  color: var(--primary-100);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Tombol Kustom */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: #ffffff;
  color: var(--primary-800);
  border-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.btn-shift-link {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.btn-shift-link:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-primary);
  border-color: var(--surface-border);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff !important;
  border-color: #15803d;
  box-shadow: 0 2px 4px rgba(22, 163, 74, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(22, 163, 74, 0.35);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

/* ==========================================================================
   MENU DIVISI & SUB-MENU DIVISI QMGP
   ========================================================================== */
.division-bar-wrapper {
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.division-top-row {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
}

.division-top-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.division-brand-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.division-brand-label svg {
  color: #38bdf8;
}

.division-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.division-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.division-tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.division-tab-btn.active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #60a5fa;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.div-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}

.div-tab-name {
  font-weight: 800;
}

.div-tab-sub {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.18);
  color: #e0f2fe;
}

.div-tab-badge-soon {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background-color: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Sub-Menu Divisi QMGP (Kalkulator Gaji & Jadwal Shift) */
.status-bar-wrapper {
  background-color: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  padding: 10px 0;
}

.status-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.qmgp-module-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qmgp-module-tabs {
  display: inline-flex;
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  gap: 4px;
}

.qmgp-module-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.qmgp-module-btn:hover {
  color: var(--primary-700);
}

.qmgp-module-btn.active {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.25);
}

.qmgp-regu-group,
.status-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-tabs {
  display: inline-flex;
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  gap: 4px;
  flex-wrap: wrap;
}

.status-tab-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.status-tab-btn:hover {
  color: var(--primary-700);
}

.status-tab-btn.active {
  background-color: #ffffff;
  color: var(--primary-700);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Panel Placeholder Divisi Lainnya */
.division-other-panel {
  padding-top: 28px;
  padding-bottom: 40px;
}

.division-other-card {
  background: #ffffff;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 40px 24px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

.division-other-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.division-other-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.division-other-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

.btn-division-primary {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-division-primary:hover {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}


/* Main Content */
.main-content {
  padding-top: 20px;
  padding-bottom: 24px;
}

/* ==========================================================================
   HERO CARD: TOTAL GAJI DITERIMA
   ========================================================================== */
.hero-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
  border-radius: var(--radius-xl);
  color: #ffffff;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-100);
  letter-spacing: 0.02em;
}

.hero-total-amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.15;
  margin: 6px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-period-info {
  font-size: 0.85rem;
  color: var(--primary-100);
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: rgba(0, 0, 0, 0.18);
  padding: 16px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-item.highlight-blue {
  background: rgba(59, 130, 246, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(147, 197, 253, 0.3);
}

.stat-name {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

/* ==========================================================================
   CARDS UMUM (A, B, C)
   ========================================================================== */
.grid-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.card {
  background-color: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--surface-border-subtle);
  background-color: #ffffff;
}

.card-title-group {
  display: flex;
  flex-direction: column;
}

.section-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-600);
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.badge-fixed {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-100);
}

.badge-bonus {
  background-color: var(--accent-indigo-bg);
  color: var(--accent-indigo);
  border: 1px solid #c7d2fe;
}

.badge-night {
  background-color: var(--accent-cyan-bg);
  color: var(--accent-cyan);
  border: 1px solid #bae6fd;
}

.card-body {
  padding: 16px 20px;
  flex: 1;
}

/* List Gaji Komponen */
.salary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.salary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--surface-border-subtle);
}

.salary-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.item-name {
  color: var(--text-secondary);
}

.item-price {
  font-weight: 600;
  color: var(--text-primary);
}

.item-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-salary-field {
  width: 120px;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  text-align: right;
  color: var(--text-primary);
}

.input-salary-field:focus {
  outline: none;
  border-color: var(--primary-500);
}

.select-skill {
  padding: 4px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-primary);
}

/* Card Footers */
.card-footer {
  padding: 14px 20px;
  background-color: var(--surface-bg);
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-footer-highlight {
  background-color: var(--primary-50);
  border-top: 2px solid var(--primary-500);
}

.card-footer-indigo {
  background-color: var(--accent-indigo-bg);
  border-top: 2px solid var(--accent-indigo);
}

.card-footer-cyan {
  background-color: var(--accent-cyan-bg);
  border-top: 2px solid var(--accent-cyan);
}

/* Card Category Accents & BPJS Styling */
.card-accent-blue { border-top: 3px solid var(--primary-600); }
.card-accent-indigo { border-top: 3px solid var(--accent-indigo); }
.card-accent-cyan { border-top: 3px solid var(--accent-cyan); }
.card-accent-red { border-top: 3px solid #ef4444; }

.card-header-red {
  background-color: #fff5f5;
  border-bottom: 1px solid #fee2e2;
}

.section-tag-red {
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.text-red-dark {
  color: #991b1b !important;
}

.badge-pill-red {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  font-weight: 700;
}

.bpjs-card-body {
  padding: 16px 20px;
}

.bpjs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.bpjs-item-card {
  background: #ffffff;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.05);
}

.bpjs-item-card:hover {
  border-color: #fca5a5;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.bpjs-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 6px;
}

.bpjs-item-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.bpjs-rate-pill {
  font-size: 0.68rem;
  font-weight: 800;
  color: #dc2626;
  background-color: #fee2e2;
  padding: 1.5px 7px;
  border-radius: 12px;
}

.bpjs-item-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: #dc2626;
  letter-spacing: -0.01em;
}

.bpjs-item-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.bpjs-info-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #7f1d1d;
  background-color: #fef2f2;
  border: 1px dashed #fca5a5;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  line-height: 1.35;
}

.bpjs-info-note svg {
  flex-shrink: 0;
  color: #dc2626;
}

.card-footer-red {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-top: 1px solid #fecaca;
}

.card-footer-red .main-label {
  color: #991b1b;
}

.card-footer-red .sub-label {
  color: #b91c1c;
}

.card-footer-red .footer-amount {
  color: #dc2626;
  font-size: 1.28rem;
  font-weight: 800;
}

.footer-label-group {
  display: flex;
  flex-direction: column;
}

.sub-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.main-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-800);
  letter-spacing: -0.02em;
}

/* Shift Malam Controls */
.night-shift-control {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.number-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-stepper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--surface-border);
  background-color: #ffffff;
  color: var(--primary-700);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-stepper:hover {
  background-color: var(--primary-50);
  border-color: var(--primary-400);
}

.input-wrapper {
  position: relative;
  flex: 1;
}

.form-input-number {
  width: 100%;
  height: 44px;
  padding: 8px 65px 8px 16px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input-number:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

.quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chip-btn {
  background: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-700);
}

.chip-btn.chip-auto {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
  font-weight: 700;
}

.chip-btn.chip-auto:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.chip-btn.active {
  background: var(--primary-600);
  border-color: var(--primary-700);
  color: #ffffff !important;
}

.shift-auto-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: #f8fafc;
  border: 1px solid var(--surface-border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}

.btn-sync-calendar {
  border: none;
  background: #eff6ff;
  color: var(--primary-700);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #bfdbfe;
  transition: all var(--transition-fast);
}

.btn-sync-calendar:hover {
  background: #dbeafe;
  color: var(--primary-800);
}

.formula-box {
  background-color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px dashed var(--surface-border);
}

.formula-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.formula-calc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   KALENDER LEMBUR & HL
   ========================================================================== */
.calendar-section {
  margin-bottom: 24px;
}

.calendar-card {
  border-top: 4px solid var(--primary-600);
}

.calendar-header-wrapper {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  background-color: #ffffff;
  border-bottom: 1px solid var(--surface-border);
}

.badge-section-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary-700);
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}

.calendar-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
}

.calendar-subheading {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 650px;
}

/* Period Control Card (Modern & Responsif) */
.period-control-card,
.period-control-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 330px;
  transition: all var(--transition-fast);
}

.period-control-card:hover,
.period-control-box:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

/* Nav Buttons Segmented Control */
.period-nav-segmented,
.period-nav-buttons {
  background-color: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.period-segmented-btn,
.period-nav-buttons .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.period-segmented-btn:hover,
.period-nav-buttons .btn:hover {
  background-color: #ffffff;
  color: var(--primary-700);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.period-segmented-btn:active,
.period-nav-buttons .btn:active {
  transform: scale(0.97);
}

.period-segmented-btn.period-current-btn {
  background-color: #ffffff;
  color: var(--primary-700);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(191, 219, 254, 0.7);
  font-weight: 800;
}

.period-segmented-btn.period-current-btn:hover {
  background-color: var(--primary-50);
  color: var(--primary-800);
  border-color: var(--primary-300);
}

.period-segmented-btn svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.period-segmented-btn:first-child:hover svg {
  transform: translateX(-2px);
}

.period-segmented-btn:last-child:hover svg {
  transform: translateX(2px);
}

/* Dropdown Selectors Grid */
.period-dropdown-grid,
.period-selectors {
  display: flex;
  gap: 10px;
  width: 100%;
}

.period-select-box,
.select-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.period-select-month {
  flex: 1.5;
}

.period-select-year {
  flex: 1;
}

.period-select-label,
.small-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.period-select-label svg {
  color: var(--primary-500);
}

/* Custom Select with SVG Chevron Wrapper */
.select-arrow-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.modern-period-select,
.form-select {
  width: 100%;
  height: 38px;
  padding: 0 32px 0 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  background-color: #ffffff;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.modern-period-select:hover,
.form-select:hover {
  border-color: #94a3b8;
  background-color: #fafbfc;
}

.modern-period-select:focus,
.form-select:focus {
  border-color: var(--primary-600);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.select-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-muted);
  transition: transform 0.15s ease, color 0.15s ease;
}

.select-arrow-wrapper:focus-within .select-chevron {
  color: var(--primary-600);
  transform: rotate(180deg);
}


/* Periode Active Bar */
.period-active-bar {
  padding: 12px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.active-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.active-cal-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--primary-600);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.active-range-content {
  display: flex;
  flex-direction: column;
}

.active-range-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.active-range-text {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary-900);
  letter-spacing: -0.01em;
}

.active-days-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 4px 10px;
  border-radius: 20px;
}

.days-count-badge {
  font-size: 0.7rem;
  font-weight: 800;
  background-color: var(--primary-600);
  color: #ffffff;
  padding: 1.5px 7px;
  border-radius: 12px;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #0284c7;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(2, 132, 199, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-bulk {
  background-color: var(--surface-bg);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-bulk:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-400);
}

/* Legenda Sinkronisasi Shift Kalender (Grid Modern) */
.calendar-shift-legend {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--surface-border);
}

.c-legend-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
}

.c-legend-chip:hover {
  transform: translateY(-1px);
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.c-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.c-legend-dot.dot-pagi {
  background-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}
.c-legend-dot.dot-sore {
  background-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}
.c-legend-dot.dot-malam {
  background-color: #1e293b;
  box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.25);
}
.c-legend-dot.dot-overpagi {
  background-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}
.c-legend-dot.dot-overmalam {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.c-legend-dot.dot-off {
  background-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.c-legend-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.c-legend-time {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  margin-left: auto;
  white-space: nowrap;
}

/* Grid Hari Kalender */
.calendar-days-grid {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  background-color: #f8fafc;
  max-height: 700px;
  overflow-y: auto;
}

/* Kartu Hari Satuan */
.day-card {
  background-color: #ffffff;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition-fast);
  position: relative;
}

.day-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

/* State Kartu Hari */
.day-card.status-lembur {
  border-color: var(--primary-500);
  background-color: #f0f7ff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.day-card.status-hl {
  border-color: var(--hl-color);
  background-color: #fef2f2;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.12);
}

.day-card.status-off {
  background-color: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.95;
}

.day-card.status-off.is-wednesday {
  background-color: #fef2f2;
  border-color: #fca5a5;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.08);
}

.day-card.is-holiday-national {
  border-top: 4px solid #dc2626 !important;
  outline: 1.5px solid #dc2626;
  outline-offset: -1px;
}

/* ==========================================================================
   SINKRONISASI WARNA SHIFT PADA KARTU HARI SLIP GAJI
   Pagi (#0099ff), OverPagi (#8de4f7), Sore (#228b22), OverMalam (#c8f5d0),
   Malam (#374151), Off (#e62020)
   ========================================================================== */

/* Garis Border Atas Identitas Shift */
.day-card.shift-card-pagi {
  border-top: 4px solid #0099ff;
}
.day-card.shift-card-overpagi {
  border-top: 4px solid #06b6d4;
}
.day-card.shift-card-sore {
  border-top: 4px solid #228b22;
}
.day-card.shift-card-overmalam {
  border-top: 4px solid #10b981;
}
.day-card.shift-card-malam {
  border-top: 4px solid #374151;
}
.day-card.shift-card-off {
  border-top: 4px solid #e62020;
}

/* Nuansa Background Halus Sesuai Shift (Saat Lembur) */
.day-card.status-lembur.shift-card-pagi {
  background-color: #f0f7ff;
  border-color: #bae6fd;
}
.day-card.status-lembur.shift-card-overpagi {
  background-color: #f0fdfa;
  border-color: #a5f3fc;
}
.day-card.status-lembur.shift-card-sore {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}
.day-card.status-lembur.shift-card-overmalam {
  background-color: #f2fbf5;
  border-color: #bbf7d0;
}
.day-card.status-lembur.shift-card-malam {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}
.day-card.status-lembur.shift-card-off {
  background-color: #fef2f2;
  border-color: #fecaca;
}

/* Badge Keterangan Shift (Pagi, Sore, Malam, OverPagi, OverMalam, Off) */
.shift-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.shift-badge.shift-badge-pagi {
  background-color: #0099ff;
  color: #ffffff;
}

.shift-badge.shift-badge-overpagi {
  background-color: #8de4f7;
  color: #0f4c5c;
  border: 1px solid #38bdf8;
}

.shift-badge.shift-badge-sore {
  background-color: #228b22;
  color: #ffffff;
}

.shift-badge.shift-badge-overmalam {
  background-color: #c8f5d0;
  color: #0b3d0b;
  border: 1px solid #86efac;
}

.shift-badge.shift-badge-malam {
  background-color: #374151;
  color: #ffffff;
}

.shift-badge.shift-badge-off {
  background-color: #e62020;
  color: #ffffff;
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.day-date-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.day-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.day-month {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.day-badges-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.day-name-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-secondary);
}

.holiday-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  white-space: nowrap;
}

.transfer-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  white-space: nowrap;
}

.friday-off-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

.day-card.is-wednesday .day-name-badge {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
}

.day-card.is-friday .day-name-badge {
  background: var(--primary-100);
  color: var(--primary-800);
  font-weight: 800;
}

.day-card.is-sunday .day-name-badge {
  background: #fee2e2;
  color: #991b1b;
}

/* Segmented Control untuk Status (3 Pilihan: Lembur, HL, Off) */
.status-pill-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: var(--radius-sm);
}

.pill-option {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 0;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition-fast);
  user-select: none;
}

.pill-option:hover {
  background: rgba(255, 255, 255, 0.7);
}

.pill-option.active-kerja {
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.pill-option.active-lembur {
  background: var(--primary-600);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.pill-option.active-hl {
  background: var(--hl-color);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

.pill-option.active-off {
  background: #64748b;
  color: #ffffff;
  font-weight: 700;
}

.pill-option.active-off-regu {
  background: #d97706 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

.day-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding-top: 4px;
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.rate-status-label {
  font-weight: 600;
  color: var(--text-muted);
}

.rate-status-val {
  font-weight: 800;
  color: var(--text-primary);
}

.day-card.status-lembur .rate-status-val {
  color: var(--primary-700);
}

.day-card.status-hl .rate-status-val {
  color: var(--hl-color);
}

/* Kalender Footer Totals Redesign */
.calendar-totals-footer {
  padding: 16px 20px;
  background-color: #ffffff;
  border-top: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.totals-sub-grid {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.sub-total-card {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition-fast);
}

.sub-total-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.sub-lembur-card {
  border-left: 3px solid var(--primary-600);
}

.sub-hl-card {
  border-left: 3px solid #dc2626;
}

.sub-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.sub-card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sub-card-dot.dot-blue { background-color: var(--primary-600); }
.sub-card-dot.dot-purple { background-color: #dc2626; }

.sub-total-card .tot-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sub-total-card .tot-val {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.text-blue { color: var(--primary-600); }
.text-purple { color: #dc2626; }

.main-overtime-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 300px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

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

.overtime-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
}

.overtime-text-wrap {
  display: flex;
  flex-direction: column;
}

.text-primary-dark {
  color: #1e40af !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.03em;
}

.overtime-sub-note {
  font-size: 0.65rem;
  color: #3b82f6;
  font-weight: 600;
}

.tot-val-highlight {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ==========================================================================
   SECTION 3: RINGKASAN REKAPITULASI
   ========================================================================== */
.summary-section {
  margin-bottom: 24px;
}

.tag-summary {
  color: var(--success-color);
}

.period-stamp {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.summary-table-wrapper {
  overflow-x: auto;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.summary-table th {
  background-color: #f8fafc;
  color: var(--text-secondary);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--surface-border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.summary-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--surface-border-subtle);
  color: var(--text-primary);
}

.summary-table tbody tr:hover {
  background-color: #f8fafc;
}

.th-no { width: 50px; text-align: center; }
.th-amount, .td-amount { text-align: right; }
.font-semibold { font-weight: 600; }

.total-row-highlight {
  background: linear-gradient(to right, #eff6ff, #f8fafc) !important;
  border-top: 2px solid var(--primary-500) !important;
}

.total-label-cell {
  padding: 18px 16px !important;
  vertical-align: middle;
}

.badge-total-pill {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  background-color: var(--primary-700);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-right: 6px;
  vertical-align: middle;
}

.total-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: normal;
  margin-top: 2px;
}

.total-amount-cell {
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: var(--primary-800) !important;
  padding: 18px 16px !important;
  vertical-align: middle;
}

.summary-actions {
  padding: 16px 20px;
  background-color: #f8fafc;
  border-top: 1px solid var(--surface-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   STICKY MOBILE BOTTOM BAR
   ========================================================================== */
.sticky-mobile-bar {
  display: none; /* Desktop hidden */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 12px 16px;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-total-info {
  display: flex;
  flex-direction: column;
}

.mobile-sub-label {
  font-size: 0.68rem;
  color: #cbd5e1;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mobile-total-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #60a5fa;
  line-height: 1.1;
}

/* ==========================================================================
   PWA INSTALL BANNER (PROMOSI INSTALASI APK)
   ========================================================================== */
.pwa-install-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  color: #ffffff;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 2px solid #38bdf8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 99;
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.pwa-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
}

.pwa-banner-text strong {
  font-size: 0.92rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pwa-banner-text span {
  font-size: 0.78rem;
  color: #bae6fd;
  line-height: 1.25;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-pwa-install {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pwa-install:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
}

.btn-pwa-dismiss {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-pwa-dismiss:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
  .pwa-install-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px;
  }
  .pwa-banner-actions {
    justify-content: flex-end;
  }
}

/* Footer Web */
.app-footer {
  text-align: center;
  padding: 24px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--surface-border);
  background-color: #ffffff;
}

/* ==========================================================================
   MODAL & PREVIEW STYLES
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}

body.modal-open {
  overflow: hidden;
}

.modal-dialog {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.18s ease-out;
}

.modal-dialog-lg {
  max-width: 860px;
  width: 95%;
  max-height: 94vh;
}

.modal-header {
  padding: 12px 18px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.preview-scroll-hint {
  display: inline-block;
  font-size: 0.68rem;
  color: #0284c7;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  width: fit-content;
}

@media (min-width: 800px) {
  .preview-scroll-hint {
    display: none;
  }
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.btn-close-modal:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-preview-scroll {
  padding: 12px 10px;
  background-color: #334155;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

@media (min-width: 780px) {
  .modal-preview-scroll {
    justify-content: center;
    padding: 18px;
  }
}

.slip-preview-paper {
  background-color: #ffffff;
  flex-shrink: 0;
  width: 720px;
  min-width: 720px;
  max-width: 720px;
  min-height: 980px;
  padding: 20px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  color: #000000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  box-sizing: border-box;
  margin: 0 auto;
}

.modal-footer {
  padding: 12px 20px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.form-group-modal {
  margin-bottom: 12px;
}

.form-group-modal label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.form-group-modal input {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.88rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background-color: #ffffff;
  transition: border-color var(--transition-fast);
}

.form-group-modal input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   TTRI SLIP GAJI FORMAT (PERSIS SEPERTI SLIP RESMI)
   ========================================================================== */
.ttri-slip {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #000000;
  background-color: #ffffff;
  width: 100%;
  margin: 0 auto;
}

.ttri-header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  margin-bottom: 2px;
  gap: 8px;
}

.ttri-header-spacer {
  /* empty spacer for 3-column grid balance */
}

.ttri-header-title {
  font-size: 17pt;
  font-weight: 800;
  color: #2e7d32;
  text-align: center;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ttri-header-period {
  font-size: 8pt;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  text-align: right;
  justify-self: end;
}

.ttri-divider-line {
  height: 1.5px;
  background-color: #2e7d32;
  margin: 3px 0 6px 0;
  width: 100%;
}

.ttri-section-label {
  font-size: 8.5pt;
  font-weight: 800;
  color: #000000;
  margin: 4px 0 2px 0;
}

/* Data Karyawan */
.ttri-employee-box {
  display: flex;
  border: 1px solid #94a3b8;
  font-size: 7.5pt;
  line-height: 1.35;
  margin-bottom: 6px;
  background-color: #ffffff;
}

.ttri-emp-col {
  flex: 1;
  min-width: 0;
  padding: 3px 6px;
}

.ttri-emp-col:first-child {
  border-right: 1px solid #94a3b8;
}

.ttri-emp-row {
  display: flex;
  align-items: baseline;
  margin-bottom: 1.5px;
}

.ttri-k {
  width: 92px;
  min-width: 92px;
  color: #0f172a;
  font-weight: 600;
  flex-shrink: 0;
}

.ttri-sep {
  width: 10px;
  min-width: 10px;
  text-align: center;
  flex-shrink: 0;
}

.ttri-v {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  color: #000000;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Data Gaji */
.ttri-salary-container {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.ttri-salary-left {
  flex: 1.15;
  font-size: 7.5pt;
  line-height: 1.3;
}

.ttri-sal-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5px 0;
}

.ttri-sal-item.indent {
  padding-left: 12px;
}

.ttri-sal-item.font-bold {
  font-weight: 800;
  color: #000000;
}

.ttri-sal-group-title {
  font-weight: 800;
  color: #000000;
  margin-top: 2px;
}

.ttri-sal-name {
  color: #000000;
}

.ttri-sal-val {
  font-weight: 700;
  color: #000000;
  text-align: right;
}

.ttri-salary-right {
  flex: 0.85;
  display: flex;
  flex-direction: column;
  font-size: 7.5pt;
}

.ttri-potongan-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #94a3b8;
  margin-bottom: 6px;
}

.ttri-potongan-table th {
  background-color: #f1f5f9;
  font-weight: 800;
  padding: 2.5px 4px;
  border: 1px solid #94a3b8;
  font-size: 7.5pt;
  text-align: center;
}

.ttri-potongan-table td {
  padding: 2px 5px;
  border: 1px solid #cbd5e1;
  font-size: 7.5pt;
}

.ttri-net-box {
  margin-top: auto;
  border: 1px solid #94a3b8;
  padding: 5px 8px;
  background-color: #ffffff;
}

.ttri-net-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ttri-net-label {
  font-weight: 800;
  font-size: 8.5pt;
  color: #000000;
}

.ttri-net-val {
  font-weight: 800;
  font-size: 10pt;
  color: #000000;
}

.ttri-thr-row {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px dashed #cbd5e1;
}

.ttri-thr-label {
  font-weight: 600;
  font-size: 7.5pt;
}

.ttri-thr-val {
  font-weight: 600;
  font-size: 7.5pt;
}

/* Absensi */
.ttri-absensi-box {
  display: flex;
  gap: 18px;
  align-items: center;
  border: 1px solid #94a3b8;
  padding: 2px 8px;
  font-size: 7.5pt;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ttri-absensi-title {
  font-weight: 800;
  color: #000000;
}

.ttri-abs-item {
  color: #000000;
}

.ttri-abs-item strong {
  font-weight: 800;
}

/* Overtime Detail */
.ttri-overtime-wrapper {
  margin-top: 4px;
}

.ttri-ot-title {
  font-weight: 800;
  font-size: 8pt;
  margin-bottom: 2px;
  color: #000000;
}

.ttri-ot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 7pt;
  line-height: 1.15;
}

.ttri-ot-table th {
  background-color: #f1f5f9;
  font-weight: 800;
  padding: 2px 4px;
  border: 1px solid #94a3b8;
  text-align: left;
  font-size: 7pt;
}

.ttri-ot-table td {
  padding: 1.2px 4px;
  border: 1px solid #cbd5e1;
  font-size: 7pt;
  color: #000000;
}

.ttri-ot-table .text-center {
  text-align: center;
}

.ttri-ot-table .text-right {
  text-align: right;
}

.ttri-ot-table .font-semibold {
  font-weight: 700;
}

/* ==========================================================================
   PRINT / PDF STYLES (A4 SINGLE-PAGE FIT)
   ========================================================================== */
.print-only {
  display: none;
}

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

  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 7.5pt !important;
    line-height: 1.2 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .no-print,
  .modal-backdrop,
  header,
  nav,
  main,
  footer,
  .sticky-mobile-bar {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .print-document {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .ttri-slip {
    font-size: 7.5pt !important;
  }

  .ttri-header-row {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: flex-end !important;
    margin-bottom: 2px !important;
    gap: 8px !important;
  }

  .ttri-header-spacer {
    display: block !important;
  }

  .ttri-header-title {
    font-size: 16pt !important;
    color: #2e7d32 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }

  .ttri-header-period {
    font-size: 7.5pt !important;
    text-align: right !important;
    justify-self: end !important;
    white-space: nowrap !important;
  }

  .ttri-divider-line {
    background-color: #2e7d32 !important;
    height: 1.5px !important;
  }

  .ttri-employee-box,
  .ttri-potongan-table,
  .ttri-net-box,
  .ttri-absensi-box,
  .ttri-ot-table {
    border-color: #64748b !important;
  }

  .ttri-potongan-table th,
  .ttri-ot-table th {
    background-color: #f1f5f9 !important;
    border-color: #64748b !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .ttri-emp-col:first-child {
    border-right-color: #64748b !important;
  }

  .ttri-potongan-table td,
  .ttri-ot-table td {
    border-color: #94a3b8 !important;
  }

  .ttri-ot-table {
    font-size: 6.8pt !important;
  }

  .ttri-ot-table td {
    padding: 1px 3px !important;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-sections {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }

  .modal-backdrop {
    padding: 8px 6px;
  }

  .modal-dialog-lg {
    width: 98%;
    max-width: 100%;
    max-height: 96vh;
    border-radius: 8px;
    margin: 4px;
  }

  .sticky-mobile-bar {
    display: block;
  }

  .app-header {
    padding: 12px 0;
  }

  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .header-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 8px 10px;
  }

  .division-top-inner {
    gap: 8px;
  }

  .division-tabs {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .division-tab-btn {
    flex: 1 1 calc(33.333% - 6px);
    justify-content: center;
    padding: 7px 6px;
    font-size: 0.73rem;
  }

  .div-tab-sub {
    display: none;
  }

  .status-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .qmgp-module-group,
  .qmgp-regu-group,
  .status-selector-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .qmgp-module-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .qmgp-module-btn {
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .status-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .status-tabs.regu-qmgp-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

  .status-tab-btn {
    padding: 6px 4px;
    font-size: 0.75rem;
    text-align: center;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-total-amount {
    font-size: 1.95rem;
  }

  .hero-stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
  }

  .calendar-header-wrapper {
    padding: 16px;
    flex-direction: column;
  }

  .period-control-card,
  .period-control-box {
    width: 100%;
    min-width: 100%;
    padding: 10px 12px;
  }

  .period-nav-segmented,
  .period-nav-buttons {
    width: 100%;
  }

  .period-dropdown-grid,
  .period-selectors {
    width: 100%;
  }

  .modern-period-select,
  .form-select {
    width: 100%;
    height: 42px;
    font-size: 0.82rem;
  }


  .period-active-bar {
    padding: 10px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .active-days-pill {
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  /* Legend 3-kolom di Tablet & HP Besar */
  .calendar-shift-legend {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 12px;
    gap: 6px;
  }

  .c-legend-chip {
    padding: 5px 8px;
  }

  .c-legend-name {
    font-size: 0.68rem;
  }

  .c-legend-time {
    font-size: 0.6rem;
  }

  .bulk-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .calendar-days-grid {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  /* Totals Footer Responsive */
  .calendar-totals-footer {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .totals-sub-grid {
    width: 100%;
    gap: 8px;
  }

  .sub-total-card {
    padding: 8px 10px;
  }

  .sub-total-card .tot-val {
    font-size: 0.98rem;
  }

  .main-overtime-card {
    width: 100%;
    min-width: 100%;
    padding: 10px 14px;
  }

  .tot-val-highlight {
    font-size: 1.22rem;
  }

  .summary-actions {
    flex-direction: column;
  }

  .summary-actions .btn {
    width: 100%;
  }

  /* Summary Table Responsive (Kecilkan huruf & padding agar pas dan tidak terpotong di HP) */
  .summary-section .card-header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .summary-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .summary-table {
    font-size: 0.76rem;
    table-layout: fixed;
    width: 100%;
  }

  .summary-table th {
    padding: 8px 6px;
    font-size: 0.68rem;
    letter-spacing: 0;
    line-height: 1.25;
    vertical-align: middle;
  }

  .summary-table td {
    padding: 8px 6px;
    font-size: 0.72rem;
    line-height: 1.3;
    word-break: break-word;
    vertical-align: middle;
  }

  .summary-table th.th-no,
  .summary-table td.th-no {
    width: 24px;
    padding: 8px 2px;
    text-align: center;
    font-size: 0.7rem;
  }

  .summary-table th:nth-child(2),
  .summary-table td:nth-child(2) {
    width: 36%;
  }

  .summary-table th:nth-child(3),
  .summary-table td:nth-child(3) {
    width: 34%;
    font-size: 0.68rem;
  }

  .summary-table th.th-amount,
  .summary-table td.td-amount {
    width: 30%;
    padding: 8px 4px;
    text-align: right;
    white-space: nowrap;
    font-size: 0.74rem;
  }

  .total-label-cell {
    padding: 10px 6px !important;
  }

  .badge-total-pill {
    font-size: 0.58rem;
    padding: 1px 4px;
    margin-right: 4px;
  }

  .total-row-highlight strong {
    font-size: 0.74rem;
  }

  .total-amount-cell {
    font-size: 0.95rem !important;
    padding: 10px 4px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .summary-section .card-header {
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .summary-section .card-title {
    font-size: 0.92rem;
  }

  .period-stamp {
    font-size: 0.72rem;
  }

  .summary-table {
    font-size: 0.68rem;
    table-layout: fixed;
    width: 100%;
  }

  .summary-table th {
    padding: 6px 3px;
    font-size: 0.62rem;
    letter-spacing: 0;
  }

  .summary-table td {
    padding: 6px 3px;
    font-size: 0.66rem;
    line-height: 1.25;
  }

  .summary-table th.th-no,
  .summary-table td.th-no {
    width: 18px;
    padding: 6px 1px;
    font-size: 0.62rem;
  }

  .summary-table th:nth-child(2),
  .summary-table td:nth-child(2) {
    width: 36%;
  }

  .summary-table th:nth-child(3),
  .summary-table td:nth-child(3) {
    width: 34%;
    font-size: 0.62rem;
  }

  .summary-table th.th-amount,
  .summary-table td.td-amount {
    width: 30%;
    padding: 6px 2px;
    text-align: right;
    white-space: nowrap;
    font-size: 0.68rem;
  }

  .total-label-cell {
    padding: 8px 3px !important;
  }

  .badge-total-pill {
    font-size: 0.52rem;
    padding: 1px 3px;
    margin-right: 2px;
  }

  .total-row-highlight strong {
    font-size: 0.66rem;
  }

  .total-amount-cell {
    font-size: 0.85rem !important;
    padding: 8px 2px !important;
    white-space: nowrap !important;
  }

  /* Legend 2-kolom Simetris di HP */
  .calendar-shift-legend {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px 10px;
  }

  /* BPJS Card di HP */
  .bpjs-card-body {
    padding: 12px 14px;
  }

  .bpjs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .bpjs-item-card {
    padding: 10px 8px;
  }

  .bpjs-item-name {
    font-size: 0.72rem;
  }

  .bpjs-rate-pill {
    font-size: 0.62rem;
    padding: 1px 5px;
  }

  .bpjs-item-val {
    font-size: 0.98rem;
  }

  .bpjs-item-sub {
    font-size: 0.64rem;
  }

  .card-footer-red {
    padding: 12px 14px;
  }

  .card-footer-red .footer-amount {
    font-size: 1.15rem;
  }

  /* Totals Footer di HP */
  .totals-sub-grid {
    gap: 6px;
  }

  .sub-total-card {
    padding: 8px;
  }

  .sub-total-card .tot-label {
    font-size: 0.62rem;
  }

  .sub-total-card .tot-val {
    font-size: 0.88rem;
  }

  .overtime-icon-badge {
    width: 30px;
    height: 30px;
  }

  .tot-val-highlight {
    font-size: 1.12rem;
  }
}

@media (max-width: 440px) {
  .period-segmented-btn {
    padding: 6px 4px;
    font-size: 0.72rem;
    gap: 3px;
  }
  
  .period-select-month {
    flex: 1.35;
  }

  .period-select-year {
    flex: 1;
  }

  .modern-period-select {
    padding: 0 24px 0 8px;
    font-size: 0.78rem;
  }

  .select-chevron {
    right: 6px;
  }
}

