/**
 * Presensi Satpol PP & Damkar - Modern Home & Login Design System
 * Taste-Skill v2 / Civic Discipline Edition
 */

:root {
  --ep-ground: #f8fafc;
  --ep-surface: #ffffff;
  --ep-surface-subtle: #f1f5f9;
  --ep-border: #e2e8f0;
  --ep-border-strong: #cbd5e1;
  --ep-text: #0f172a;
  --ep-text-secondary: #334155;
  --ep-text-muted: #64748b;
  
  /* Civic Badges & Accents */
  --ep-navy: #1e3a8a;
  --ep-navy-dark: #0f172a;
  --ep-navy-hover: #172554;
  --ep-gold: #b45309;
  --ep-gold-subtle: #fef3c7;
  --ep-damkar-red: #dc2626;
  --ep-damkar-subtle: #fee2e2;
  --ep-emerald: #16a34a;
  --ep-emerald-subtle: #dcfce7;
  --ep-sky: #0284c7;
  --ep-sky-subtle: #e0f2fe;

  --ep-radius-card: 16px;
  --ep-radius-control: 10px;
  --ep-radius-badge: 6px;
  
  --ep-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --ep-shadow-md: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
}

/* ==========================================================================
   GLOBAL PAGE OVERRIDES (Neutral civic surface, Instrument Sans font)
   ========================================================================== */
html,
body,
body[data-page="homepage"],
.body-scroll,
.loader-display,
main,
.main,
.main.ep-dashboard-wrap {
  background: var(--ep-ground) !important;
  background-color: var(--ep-ground) !important;
  color: var(--ep-text) !important;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.color-picker,
.colorsettings {
  display: none !important;
}

/* ==========================================================================
   1. GUEST / EMPLOYEE LOGIN VIEW
   ========================================================================== */

.ep-login-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--ep-ground) !important;
  padding: 32px 16px;
  box-sizing: border-box;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: var(--ep-text);
}

.ep-login-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: stretch;
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  box-shadow: var(--ep-shadow-md);
  overflow: hidden;
}

/* Civic Left Hero Panel (Desktop) */
.ep-login-hero-side {
  flex: 1 1 50%;
  background-color: var(--ep-navy-dark);
  padding: 44px 38px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ep-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ep-hero-emblem {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px;
  display: inline-flex;
}

.ep-hero-emblem img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.ep-hero-inst-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

.ep-hero-inst-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.ep-hero-main {
  margin: 36px 0;
}

.ep-hero-headline {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.ep-hero-desc {
  font-size: 14px;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 24px 0;
}

.ep-hero-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ep-hero-point {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #f1f5f9;
}

.ep-hero-point i {
  color: var(--ep-emerald);
  font-size: 14px;
  flex-shrink: 0;
}

.ep-hero-footer {
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

/* Right Form Side */
.ep-login-form-side {
  flex: 1 1 50%;
  padding: 44px 38px;
  background: var(--ep-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ep-login-brand {
  margin-bottom: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ep-login-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  padding: 6px 10px;
  background: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  border-radius: 12px;
}

.ep-login-emblem img {
  height: 48px !important;
  max-height: 48px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

.ep-login-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ep-text);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
  text-align: center;
}

.ep-login-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--ep-text-secondary);
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

.ep-form-group {
  margin-bottom: 18px;
  text-align: left;
}

.ep-form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ep-text);
  margin-bottom: 8px;
}

.ep-form-label a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ep-navy);
  text-decoration: none;
  transition: color 0.15s ease;
}

.ep-form-label a:hover {
  text-decoration: underline;
}

.ep-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ep-input-icon {
  position: absolute;
  left: 14px;
  color: var(--ep-text-muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

.ep-input {
  width: 100%;
  height: 46px;
  padding: 10px 14px 10px 40px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ep-text);
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border-strong);
  border-radius: var(--ep-radius-control);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  font-family: inherit;
}

.ep-input:focus {
  border-color: var(--ep-navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.ep-input-password {
  padding-right: 44px;
}

.ep-input-toggle {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--ep-text-muted);
  cursor: pointer;
  padding: 8px 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.ep-input-toggle:hover {
  color: var(--ep-text);
}

.ep-btn-primary {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ep-navy);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--ep-navy);
  border-radius: var(--ep-radius-control);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  outline: none;
  font-family: inherit;
}

.ep-btn-primary:hover:not(:disabled) {
  background-color: var(--ep-navy-hover);
  border-color: var(--ep-navy-hover);
}

.ep-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.ep-btn-google {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ep-surface);
  color: var(--ep-text) !important;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--ep-border-strong);
  border-radius: var(--ep-radius-control);
  text-decoration: none;
  margin-top: 12px;
  transition: background-color 0.15s ease;
  font-family: inherit;
}

.ep-btn-google:hover {
  background-color: var(--ep-surface-subtle);
}

.ep-btn-google i {
  color: #ea4335;
  margin-right: 8px;
}

.ep-login-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--ep-text-secondary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ep-login-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  background-color: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ep-text-secondary);
  margin: 16px auto 0 auto;
}

.ep-login-badge i {
  color: var(--ep-emerald);
}

/* ==========================================================================
   2. LOGGED-IN EMPLOYEE DASHBOARD (MOBILE FIRST CIVIC DESIGN)
   ========================================================================== */

/* Header Bar Civic Override */
header.header {
  background: var(--ep-surface) !important;
  background-color: var(--ep-surface) !important;
  border-bottom: 1px solid var(--ep-border) !important;
  box-shadow: var(--ep-shadow-sm) !important;
  height: 60px !important;
  padding: 0 16px !important;
  display: flex !important;
  align-items: center !important;
  z-index: 1000 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

header.header .row {
  width: 100% !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
}

header.header .ep-header-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
  padding: 0 !important;
  gap: 4px !important;
}

header.header .ep-header-actions .btn-link,
header.header .ep-header-actions .dropdown,
header.header .ep-header-actions .ep-btn-setting {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

header.header .ep-header-actions .btn-40 {
  position: relative !important;
  overflow: visible !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--ep-text-secondary) !important;
  background: transparent !important;
  border: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

header.header .ep-header-actions .btn-40:hover,
header.header .ep-header-actions .btn-40:focus {
  background-color: var(--ep-surface-subtle) !important;
  color: var(--ep-navy) !important;
  text-decoration: none !important;
}

header.header .ep-header-icon {
  width: 20px !important;
  height: 20px !important;
  color: currentColor !important;
  display: block !important;
  pointer-events: none;
}

header.header .btn-link,
header.header .material-icons,
header.header .btn-open-chat i {
  color: var(--ep-text) !important;
}

header.header .counter,
header.header .ep-header-actions .counter,
.ep-header-actions .btn-40 .counter,
.ep-header-actions .counter {
  position: absolute !important;
  top: 1px !important;
  right: 1px !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  transform: translate(25%, -25%) !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 4px !important;
  font-size: 10px !important;
  line-height: 14px !important;
  text-align: center !important;
  border-radius: 999px !important;
  background-color: var(--ep-damkar-red) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 2px solid var(--ep-surface) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

/* Header Notification Dropdown */
header.header .dropdown-menu {
  border: 1px solid var(--ep-border) !important;
  border-radius: var(--ep-radius-card) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05) !important;
  background-color: var(--ep-surface) !important;
  overflow: hidden !important;
  min-width: 300px !important;
  max-width: 360px !important;
  margin-top: 8px !important;
}

header.header .dropdown-menu .list-group-item {
  border-color: var(--ep-border) !important;
  background-color: var(--ep-surface) !important;
  color: var(--ep-text) !important;
  padding: 12px 16px !important;
  transition: background-color 0.15s ease;
}

header.header .dropdown-menu .list-group-item:hover {
  background-color: var(--ep-surface-subtle) !important;
  text-decoration: none !important;
}

.ep-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ep-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.color-picker,
.colorsettings,
.main-menu,
.menu-btn {
  display: none !important;
}

/* Dashboard Container (Mobile First) */
main.main,
.main.ep-dashboard-wrap {
  background: var(--ep-ground) !important;
  background-color: var(--ep-ground) !important;
  min-height: 100vh !important;
  padding-top: 64px !important;
  padding-bottom: 96px !important;
}

/* 1. Officer Identity Hero Card */
/* 1. Officer Identity Hero Card (Modern Blue Card) */
.ep-officer-hero,
.ep-hero-modern-blue {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #2563eb 100%) !important;
  background-color: #1e3a8a !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 16px !important;
  padding: 16px 18px !important;
  margin-bottom: 14px !important;
  box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.35), 0 8px 10px -6px rgba(30, 58, 138, 0.25) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  text-align: left !important;
  gap: 16px !important;
  position: relative !important;
  overflow: hidden !important;
}

.ep-officer-hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.ep-officer-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 20%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22) 0%, rgba(96, 165, 250, 0) 75%);
  pointer-events: none;
}

.ep-officer-avatar-wrap {
  position: relative !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.ep-officer-avatar {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2.5px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  display: block !important;
}

.ep-officer-online-dot {
  position: absolute !important;
  bottom: 2px !important;
  right: 2px !important;
  width: 13px !important;
  height: 13px !important;
  border-radius: 50% !important;
  background-color: var(--ep-emerald) !important;
  border: 2px solid #ffffff !important;
}

.ep-officer-info {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  text-align: left !important;
  gap: 3px !important;
  z-index: 1 !important;
}

.ep-officer-name {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em !important;
  text-align: left !important;
}

.ep-officer-nip {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #bfdbfe !important;
  margin: 0 !important;
  text-align: left !important;
  letter-spacing: 0.02em !important;
}

.ep-officer-position {
  margin-top: 2px !important;
  max-width: 100% !important;
  text-align: left !important;
}

.ep-officer-pos-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 2px 8px !important;
  border-radius: 9999px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: #eff6ff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  letter-spacing: 0.01em !important;
  line-height: 1.3 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.ep-date-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ep-text-secondary);
}

/* 2. Primary Duty & Live Attendance Hub */
.ep-duty-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--ep-shadow-sm);
}

.ep-duty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--ep-border);
  gap: 8px;
}

.ep-shift-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--ep-text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ep-live-clock {
  font-size: 16px;
  font-weight: 700;
  color: var(--ep-navy);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.ep-clock-digits {
  font-size: 18px;
  font-weight: 700;
  color: var(--ep-navy);
}

.ep-clock-tz {
  font-size: 11px;
  font-weight: 600;
  color: var(--ep-text-muted);
}

.ep-duty-status-banner {
  margin-bottom: 14px;
}

.ep-duty-desc {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  color: var(--ep-text-secondary);
}

/* Attendance Buttons Grid */
.ep-duty-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ep-duty-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--ep-radius-control);
  text-decoration: none !important;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 54px;
  box-sizing: border-box;
}

.ep-duty-action-btn:active {
  transform: scale(0.98);
}

.ep-duty-btn-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-duty-btn-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ep-duty-btn-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.ep-duty-btn-sub {
  font-size: 11px;
  line-height: 1.2;
  margin-top: 2px;
}

/* Button States */
.ep-btn-in.active-action {
  background-color: var(--ep-emerald);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.ep-btn-in.active-action .ep-duty-btn-sub {
  color: #dcfce7;
}

.ep-btn-out.active-action {
  background-color: var(--ep-damkar-red);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.ep-btn-out.active-action .ep-duty-btn-sub {
  color: #fee2e2;
}

.ep-btn-recorded {
  background-color: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  color: var(--ep-text) !important;
}

.ep-btn-recorded .ep-duty-btn-sub {
  color: var(--ep-text-muted);
}

.ep-btn-disabled {
  background-color: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  color: var(--ep-text-muted) !important;
  cursor: not-allowed;
  opacity: 0.7;
}

.ep-btn-disabled .ep-duty-btn-sub {
  color: var(--ep-text-muted);
}

/* 3. Weekly Attendance Summary Metrics */
.ep-metrics-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--ep-shadow-sm);
}

.ep-metrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ep-metrics-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0;
}

.ep-metrics-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ep-text-muted);
}

.ep-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ep-metric {
  background: var(--ep-ground);
  border: 1px solid var(--ep-border);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.dot-hadir {
  background-color: var(--ep-emerald);
}

.dot-telat {
  background-color: var(--ep-damkar-red);
}

.dot-izin {
  background-color: var(--ep-sky);
}

.ep-metric-info {
  display: flex;
  flex-direction: column;
}

.ep-metric-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--ep-text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ep-metric-label {
  font-size: 11px;
  color: var(--ep-text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* 4. Quick Services Menu */
.ep-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ep-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0;
}

.ep-section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--ep-navy);
  text-decoration: none;
}

.ep-section-link:hover {
  text-decoration: underline;
}

/* 4. Quick Services: divider + stacked full-width buttons */
.ep-section-divider {
  height: 1px;
  border: 0;
  margin: 2px 2px 14px 2px;
  background: linear-gradient(to right, transparent, var(--ep-border) 20%, var(--ep-border) 80%, transparent);
}

.ep-services-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.ep-service-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  box-shadow: var(--ep-shadow-sm);
  text-decoration: none !important;
  color: var(--ep-text);
  box-sizing: border-box;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ep-service-action:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.ep-service-action:active {
  transform: scale(0.98);
}

.ep-service-action-centered {
  justify-content: center;
  text-align: center;
  padding: 14px;
}

.ep-service-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--ep-navy);
}

.ep-service-action-icon svg {
  width: 20px;
  height: 20px;
}

.ep-service-action-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ep-text);
  line-height: 1.3;
}

/* Warta & Arahan Satpol PP - Clean Title-Only List View */
.ep-article-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  overflow: hidden;
  box-shadow: var(--ep-shadow-sm);
  margin-bottom: 16px;
}

/* Header di dalam card Warta: beri napas dari garis border/frame card */
.ep-article-card > .ep-section-header {
  padding: 16px 16px 12px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--ep-border);
}

.ep-article-list {
  display: flex;
  flex-direction: column;
}

.ep-article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ep-border);
  text-decoration: none !important;
  color: var(--ep-text);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
  gap: 12px;
}

.ep-article-item:last-child {
  border-bottom: none;
}

.ep-article-item:hover {
  background-color: #f8fafc;
  color: var(--ep-navy);
}

.ep-article-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.ep-article-icon {
  font-size: 13px;
  color: var(--ep-navy);
  background: rgba(30, 58, 138, 0.08);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-article-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ep-text);
  line-height: 1.4;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Detail Warta - selaras card dashboard (hero + isi dalam 1 card) */
.ep-article-detail-hero {
  overflow: hidden;
  border-bottom: 1px solid var(--ep-border);
}

.ep-article-detail-hero img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.ep-article-detail-body {
  padding: 16px;
}

.ep-article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 10px;
}

.ep-article-detail-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ep-text);
  line-height: 1.45;
  margin: 0 0 6px;
}

.ep-article-detail-publisher {
  font-size: 12.5px;
  color: var(--ep-text-muted);
  margin: 0 0 12px;
}

.ep-article-detail-desc {
  font-size: 14px;
  color: var(--ep-text);
  line-height: 1.7;
  overflow-wrap: break-word;
}

.ep-article-detail-desc img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ep-radius-control);
}

.ep-article-item:hover .ep-article-title {
  color: var(--ep-navy);
}

.ep-article-arrow {
  font-size: 11px;
  color: var(--ep-text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.ep-article-item:hover .ep-article-arrow {
  color: var(--ep-navy);
  transform: translateX(3px);
}

/* 4b. Blog: pencarian & filter kategori chip */
.ep-blog-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ep-blog-search-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  color: var(--ep-text-muted);
  pointer-events: none;
}

.ep-blog-search-input {
  padding-left: 38px !important;
}

.ep-blog-cat-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.ep-blog-cat-row::-webkit-scrollbar {
  display: none;
}

.ep-chip {
  flex-shrink: 0;
  border: 1px solid var(--ep-border);
  background: var(--ep-surface);
  color: var(--ep-text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ep-chip:hover {
  border-color: #cbd5e1;
}

.ep-chip-active {
  background: var(--ep-navy);
  border-color: var(--ep-navy);
  color: #ffffff;
}

/* 5. Recent Attendance List */
.ep-history-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--ep-shadow-sm);
}

.ep-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--ep-border);
}

.ep-history-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ep-history-row:first-child {
  padding-top: 0;
}

.ep-history-date-col {
  min-width: 110px;
}

.ep-history-day {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
  margin: 0;
}

.ep-history-status-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.ep-badge-ontime {
  background-color: var(--ep-emerald-subtle);
  color: var(--ep-emerald);
}

.ep-badge-late {
  background-color: var(--ep-damkar-subtle);
  color: var(--ep-damkar-red);
}

.ep-badge-permit {
  background-color: var(--ep-gold-subtle);
  color: var(--ep-gold);
}

.ep-history-time-col {
  display: flex;
  gap: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ep-time-block {
  display: flex;
  flex-direction: column;
}

.ep-time-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ep-text-muted);
  text-transform: uppercase;
}

.ep-time-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
}

.ep-time-val.in {
  color: var(--ep-emerald);
}

.ep-time-val.out {
  color: var(--ep-text-secondary);
}

/* Incomplete Profile Alert */
.ep-alert-profile {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--ep-radius-control);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #92400e;
}

.ep-alert-profile i {
  font-size: 18px;
  color: #b45309;
  flex-shrink: 0;
}

.ep-alert-profile a {
  font-weight: 700;
  color: #b45309;
  text-decoration: underline;
}

/* Bottom App Navigation Bar Civic Overrides */
.appBottomMenu {
  background: var(--ep-surface) !important;
  background-color: var(--ep-surface) !important;
  border-top: 1px solid var(--ep-border) !important;
  box-shadow: 0 -1px 3px rgba(15, 23, 42, 0.04) !important;
  height: 60px !important;
  z-index: 999 !important;
}

.appBottomMenu .item span,
.appBottomMenu .item .icon {
  color: var(--ep-text-muted) !important;
}

.appBottomMenu .item strong {
  color: var(--ep-text-secondary) !important;
  font-family: inherit !important;
  font-weight: 600 !important;
}

.appBottomMenu .item.active span,
.appBottomMenu .item.active .icon,
.appBottomMenu .item.active strong {
  color: var(--ep-navy) !important;
  font-weight: 700 !important;
}

.appBottomMenu .item.active:before {
  background: var(--ep-navy) !important;
}

.appBottomMenu .item .action-button {
  background: var(--ep-navy) !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25) !important;
}

.appBottomMenu .item .action-button.large {
  background: var(--ep-navy) !important;
  border: 3px solid #ffffff !important;
  width: 58px !important;
  height: 58px !important;
  margin-top: -24px !important;
}

.appBottomMenu .item .action-button.large span {
  color: #ffffff !important;
  font-size: 26px !important;
}

/* ==========================================================================
   3. RESPONSIVENESS & MOBILE CENTERING
   ========================================================================== */

@media (max-width: 991px) {
  .ep-login-container {
    max-width: 440px;
    flex-direction: column;
  }
  .ep-login-hero-side {
    display: none !important;
  }
  .ep-login-form-side {
    padding: 36px 28px;
  }
}

@media (max-width: 767.98px) {
  /* --- Login Pegawai (Mobile Centering) --- */
  .ep-login-wrapper {
    padding: 24px 16px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .ep-login-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .ep-login-form-side {
    padding: 32px 20px;
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .ep-login-brand {
    text-align: center;
    margin: 0 auto 24px auto;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .ep-login-emblem {
    margin: 0 auto 12px auto;
    justify-content: center;
  }

  .ep-login-title,
  .ep-login-subtitle {
    text-align: center;
    width: 100%;
  }

  .form-login {
    width: 100%;
    text-align: center;
  }

  .ep-form-group {
    text-align: center;
    width: 100%;
  }

  .ep-form-label {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .ep-form-label label {
    margin-bottom: 0;
  }

  .ep-input {
    text-align: center;
    padding-left: 38px;
    padding-right: 38px;
  }

  .ep-btn-primary,
  .ep-btn-google {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .ep-login-footer {
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .ep-login-badge {
    margin: 16px auto 0 auto;
    justify-content: center;
    text-align: center;
  }

  /* --- Dashboard Pegawai (Mobile Layout) --- */
  .ep-officer-hero,
  .ep-hero-modern-blue {
    flex-direction: row !important;
    text-align: left !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 16px !important;
    gap: 14px !important;
  }

  .ep-officer-avatar-wrap {
    margin: 0 !important;
  }

  .ep-officer-info {
    text-align: left !important;
    width: auto !important;
    flex: 1 !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  .ep-officer-name {
    text-align: left !important;
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .ep-officer-nip {
    text-align: left !important;
  }

  .ep-officer-position {
    text-align: left !important;
  }

  .ep-date-badge {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .ep-alert-profile {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .ep-shift-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
  }

  .ep-shift-title {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .ep-shift-time {
    text-align: center;
    width: 100%;
  }

  .ep-section-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    margin-bottom: 14px;
  }

  .ep-section-title {
    text-align: center;
    width: 100%;
  }

  .ep-section-link {
    text-align: center;
    margin-top: 2px;
  }

  .ep-history-card {
    text-align: center;
  }

  .ep-history-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 14px 0;
  }

  .ep-history-date-col {
    text-align: center;
    width: 100%;
  }

  .ep-history-status-badge {
    margin: 4px auto 0 auto;
  }

  .ep-history-time-col {
    justify-content: center;
    text-align: center;
    width: 100%;
    gap: 28px;
  }

  .ep-time-block {
    align-items: center;
    text-align: center;
  }

  .swiper-home-article .card,
  .swiper-home-article .card-body {
    text-align: center !important;
  }
}

@media (max-width: 576px) {
  .ep-login-form-side {
    padding: 28px 18px;
  }
}

/* ==========================================================================
   6. HISTORI ABSEN (EMPLOYEE ATTENDANCE HISTORY & CIVIC REDESIGN)
   ========================================================================== */

/* Filter Card */
.ep-histori-filter-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: var(--ep-shadow-sm);
}

.ep-histori-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.ep-histori-filter-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ep-btn-print-rekap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ep-navy);
  background-color: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  padding: 6px 12px;
  min-height: 32px;
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
}

.ep-btn-print-rekap:has(> i:only-child) {
  padding: 6px 10px;
  min-width: 32px;
}

.ep-btn-print-rekap:hover,
.ep-btn-print-rekap:active {
  background-color: var(--ep-navy);
  color: #ffffff !important;
  border-color: var(--ep-navy);
}

.ep-filter-chips {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ep-filter-chip {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--ep-border);
  background: var(--ep-ground);
  color: var(--ep-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ep-filter-chip:hover {
  border-color: var(--ep-navy);
  color: var(--ep-navy);
}

.ep-filter-chip.active {
  background: var(--ep-navy);
  border-color: var(--ep-navy);
  color: #ffffff;
}

.ep-date-input-wrap {
  position: relative;
}

.ep-date-input-wrap .ep-date-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ep-text-muted);
  pointer-events: none;
  font-size: 16px;
}

.ep-date-input-wrap input.form-control {
  border-radius: var(--ep-radius-control);
  border: 1px solid var(--ep-border);
  background-color: var(--ep-ground);
  font-size: 13px;
  color: var(--ep-text);
  padding: 10px 36px 10px 12px;
  height: 42px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ep-date-input-wrap input.form-control:focus {
  border-color: var(--ep-navy);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
  outline: none;
}

/* Attendance Metrics Grid */
.ep-histori-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.ep-histori-metric-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  padding: 10px 8px;
  text-align: center;
  box-shadow: var(--ep-shadow-sm);
  transition: transform 0.15s ease;
}

.ep-histori-metric-card .metric-val {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

.ep-histori-metric-card .metric-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ep-text-muted);
  line-height: 1.2;
}

.ep-histori-metric-card.hadir .metric-val { color: var(--ep-emerald); }
.ep-histori-metric-card.ontime .metric-val { color: var(--ep-navy); }
.ep-histori-metric-card.late .metric-val { color: var(--ep-damkar-red); }
.ep-histori-metric-card.permit .metric-val { color: var(--ep-sky); }

/* History Records Cards */
.ep-history-card-item {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--ep-shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ep-history-card-item:hover {
  border-color: var(--ep-border-strong);
  box-shadow: var(--ep-shadow-md);
}

.ep-record-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ep-border);
}

.ep-record-date {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ep-record-times {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--ep-ground);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  padding: 10px 14px;
  margin-bottom: 10px;
}

.ep-record-time-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-record-time-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ep-text-muted);
}

.ep-record-time-val {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ep-record-time-val.in { color: var(--ep-emerald); }
.ep-record-time-val.out { color: var(--ep-text); }
.ep-record-time-val.out.empty { color: var(--ep-text-muted); }

.ep-record-note {
  font-size: 12px;
  color: var(--ep-text-secondary);
  background: #f8fafc;
  border-left: 3px solid var(--ep-navy);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.ep-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ep-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--ep-radius-badge);
  border: 1px solid var(--ep-border);
  background: #ffffff;
  color: var(--ep-text-secondary);
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ep-btn-action:hover {
  background: var(--ep-surface-subtle);
  color: var(--ep-text);
  border-color: var(--ep-border-strong);
}

.ep-btn-action.btn-map-in {
  color: var(--ep-navy);
}

.ep-btn-action.btn-map-out {
  color: var(--ep-damkar-red);
}

.ep-btn-action.btn-view {
  color: var(--ep-sky);
}

.ep-btn-action.btn-update {
  color: var(--ep-text-secondary);
}

/* Load More Button */
.ep-btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin: 16px auto;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
  background: var(--ep-surface);
  border: 1px solid var(--ep-border-strong);
  border-radius: var(--ep-radius-control);
  box-shadow: var(--ep-shadow-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ep-btn-load-more:hover {
  background: var(--ep-surface-subtle);
  border-color: var(--ep-navy);
  color: var(--ep-navy);
}

/* Civic Modals */
.ep-modal .modal-dialog {
  max-width: 520px;
  margin: 1.25rem auto;
}

.ep-modal .modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 2.5rem);
}

.ep-modal .modal-content,
.ep-modal form.modal-content,
.ep-modal .modal-content > form {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--ep-radius-card);
  border: 1px solid var(--ep-border);
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.ep-modal .modal-dialog-scrollable .modal-content,
.ep-modal .modal-dialog-scrollable form.modal-content {
  max-height: calc(100vh - 2.5rem);
  height: 100%;
}

.ep-modal .modal-header {
  background: var(--ep-surface);
  border-bottom: 1px solid var(--ep-border);
  padding: 14px 18px;
  align-items: center;
  flex-shrink: 0;
}

.ep-modal .modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ep-modal .modal-body {
  padding: 18px;
  background: #ffffff;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.ep-modal .modal-footer {
  background: var(--ep-surface-subtle);
  border-top: 1px solid var(--ep-border);
  padding: 12px 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 5;
}

.ep-modal .modal-footer .btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 16px;
  border-radius: var(--ep-radius-control);
  transition: all 0.15s ease;
}

.ep-modal .modal-footer .btn + .btn {
  margin-left: 10px;
}

.ep-modal .modal-footer .btn-primary {
  background: var(--ep-navy);
  border-color: var(--ep-navy);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(27, 42, 74, 0.2);
}

.ep-modal .modal-footer .btn-primary:hover,
.ep-modal .modal-footer .btn-primary:focus {
  background: #142038;
  border-color: #142038;
}

.ep-modal .modal-footer .btn-light {
  background: #ffffff;
  border: 1px solid var(--ep-border);
  color: var(--ep-text-muted);
}

.ep-modal .modal-footer .btn-light:hover,
.ep-modal .modal-footer .btn-light:focus {
  background: var(--ep-ground);
  color: var(--ep-text);
  border-color: var(--ep-border-strong);
}

/* Responsive adjustments for mobile and small viewports */
@media (max-width: 575.98px) {
  .ep-modal .modal-dialog {
    margin: 0.5rem;
  }

  .ep-modal .modal-dialog-centered {
    min-height: calc(100% - 1rem);
  }

  .ep-modal .modal-dialog-scrollable .modal-content,
  .ep-modal .modal-dialog-scrollable form.modal-content {
    max-height: calc(100vh - 1rem);
    border-radius: 14px;
  }

  .ep-modal .modal-header {
    padding: 12px 14px;
  }

  .ep-modal .modal-title {
    font-size: 14px;
  }

  .ep-modal .modal-body {
    padding: 14px;
    max-height: calc(100vh - 145px);
  }

  .ep-modal .modal-footer {
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    gap: 8px;
  }

  .ep-modal .modal-footer .btn {
    flex: 1 1 50%;
    margin: 0 !important;
    min-height: 42px;
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* Photo Cards in Details Modal */
.ep-photo-card {
  background: var(--ep-ground);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  overflow: hidden;
  margin-bottom: 12px;
}

.ep-photo-wrap {
  position: relative;
  background: #000000;
  text-align: center;
}

.ep-photo-wrap img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.ep-photo-stamp {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.ep-photo-caption {
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ep-text-secondary);
}

@media (max-width: 576px) {
  .ep-histori-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   5. ATTENDANCE SCANNER & CAMERA PAGES (Absen Masuk & Absen Pulang)
   ========================================================================== */

/* Attendance Hero Card */
.ep-attendance-hero {
  border-radius: var(--ep-radius-card);
  padding: 16px 18px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--ep-shadow-md);
  position: relative;
  overflow: hidden;
}

.ep-attendance-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.ep-hero-in {
  background: linear-gradient(135deg, #065f46 0%, #047857 55%, #1e3a8a 100%);
}

.ep-hero-out {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #b91c1c 100%);
}

.ep-attendance-hero-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ep-attendance-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.ep-attendance-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  display: block;
}

.ep-attendance-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  background-color: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.ep-attendance-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep-attendance-user-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.25;
}

.ep-attendance-user-sub {
  font-size: 12px;
  color: #d1fae5;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ep-hero-out .ep-attendance-user-sub {
  color: #e0f2fe;
}

.ep-attendance-pos-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}

.ep-attendance-hero-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.ep-attendance-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #ffffff;
  box-shadow: var(--ep-shadow-sm);
}

.ep-badge-in {
  color: #065f46;
}

.ep-badge-out {
  color: #991b1b;
}

.ep-attendance-clock-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.ep-attendance-clock {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

/* Environment & Geofence Card */
.ep-attendance-env-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 14px 16px;
  margin-top: 12px;
  box-shadow: var(--ep-shadow-sm);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.ep-env-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ep-env-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ep-navy);
  flex-shrink: 0;
  margin-top: 2px;
}

.ep-env-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ep-env-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ep-text-muted);
}

.ep-env-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
  line-height: 1.35;
}

.ep-env-val.safe {
  color: var(--ep-emerald) !important;
}

.ep-env-val.danger {
  color: var(--ep-damkar-red) !important;
}

/* Viewfinder & Camera Hub Card */
.ep-viewfinder-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--ep-shadow-md);
  position: relative;
  text-align: center;
}

.ep-webcam-wrap {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
}

.ep-viewfinder-viewport {
  position: relative;
  width: 100%;
  min-height: 360px;
  background: #090d16;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ep-viewfinder-viewport #webcam-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 0;
}

.ep-viewfinder-viewport #webcam {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  margin: 0 auto;
  z-index: 0;
}

.ep-viewfinder-viewport #canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.ep-viewfinder-viewport #reflay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
}

/* Viewfinder Reticle Corners */
.ep-reticle-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #38bdf8;
  z-index: 25;
  pointer-events: none;
  opacity: 0.85;
}

.ep-reticle-corner.top-left {
  top: 12px;
  left: 12px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 6px;
}

.ep-reticle-corner.top-right {
  top: 12px;
  right: 12px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 6px;
}

.ep-reticle-corner.bottom-left {
  bottom: 12px;
  left: 12px;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 6px;
}

.ep-reticle-corner.bottom-right {
  bottom: 12px;
  right: 12px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 6px;
}

.ep-viewfinder-live-pill {
  position: absolute;
  top: 12px;
  left: 14px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 30;
}

.ep-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: epPulse 1.8s infinite;
}

@keyframes epPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.ep-btn-flip {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ep-btn-flip:hover {
  transform: rotate(180deg);
  background: rgba(30, 58, 138, 0.95);
}

.ep-btn-flip span {
  font-size: 20px;
}

/* Camera Controls HUD Overlay (Integrated into Viewfinder Area) */
.ep-camera-controls {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  margin: 0 !important;
  width: 100% !important;
  background: linear-gradient(to top, rgba(9, 13, 22, 0.92) 0%, rgba(9, 13, 22, 0.55) 55%, transparent 100%) !important;
  padding: 36px 16px 18px 16px !important;
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  gap: 22px !important;
  z-index: 35 !important;
  pointer-events: none;
}

.ep-camera-controls > * {
  pointer-events: auto;
}

/* Neutralize legacy third-party styles on mobile and desktop */
.webcam-app .cameraControls,
.ep-webcam-wrap .cameraControls {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
  z-index: 35 !important; /* Low stack - will NEVER overlay modal or SweetAlert dialogs */
  opacity: 1 !important;
}

@media only screen and (max-width: 680px) {
  .webcam-app .cameraControls,
  .ep-webcam-wrap .cameraControls,
  .ep-camera-controls {
    position: absolute !important;
    bottom: 0 !important;
    z-index: 35 !important;
    padding: 28px 12px 14px 12px !important;
  }
}

.ep-btn-shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 3.5px solid #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.14s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.14s ease, background 0.14s ease;
}

.ep-hero-in ~ .ep-viewfinder-card .ep-btn-shutter,
.ep-hero-in ~ .ep-attendance-env-card ~ .ep-viewfinder-card .ep-btn-shutter {
  border-color: #34d399;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(52, 211, 153, 0.3);
}

.ep-hero-out ~ .ep-viewfinder-card .ep-btn-shutter,
.ep-hero-out ~ .ep-attendance-env-card ~ .ep-viewfinder-card .ep-btn-shutter {
  border-color: #f87171;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(248, 113, 113, 0.3);
}

.ep-btn-shutter:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.25);
}

.ep-btn-shutter:active {
  transform: scale(0.92);
}

.ep-shutter-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--ep-navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
}

.ep-hero-in ~ .ep-viewfinder-card .ep-shutter-inner,
.ep-hero-in ~ .ep-attendance-env-card ~ .ep-viewfinder-card .ep-shutter-inner {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.5);
}

.ep-hero-out ~ .ep-viewfinder-card .ep-shutter-inner,
.ep-hero-out ~ .ep-attendance-env-card ~ .ep-viewfinder-card .ep-shutter-inner {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
}

.ep-shutter-inner span {
  font-size: 26px;
}

.ep-btn-resume {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ep-btn-resume:hover {
  background: rgba(220, 38, 38, 0.9);
  border-color: #ffffff;
  color: #ffffff !important;
  transform: scale(1.06);
}

.ep-btn-resume span.material-icons {
  font-size: 20px;
  line-height: 1;
}

.ep-btn-resume .ep-ctrl-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Dialog and Modal Safety - SweetAlert always takes top priority */
.swal-overlay {
  z-index: 999999 !important;
}

.swal-modal {
  z-index: 1000000 !important;
}

/* Loading Glassmorphism Overlay */
.ep-loading-box {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 50;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.ep-loading-text strong {
  display: block;
  font-size: 15px;
  color: var(--ep-text);
  margin-top: 12px;
}

/* QR Code Reader Box */
.ep-qr-scanner-wrap {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.ep-qr-guide-box {
  background: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text-secondary);
}

.ep-qr-reader {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ep-border-strong) !important;
}

.ep-error-msg {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
}

@media (max-width: 576px) {
  .ep-attendance-hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    gap: 8px;
  }
}

/* ==========================================================================
   5. EMPLOYEE ACCOUNT & SETTINGS VIEW (/setting)
   Civic Discipline Design System Alignment
   ========================================================================== */

.ep-setting-hero {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 55%, #2563eb 100%) !important;
  border-radius: var(--ep-radius-card);
  padding: 18px 20px;
  color: #ffffff;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  text-align: left !important;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.35), 0 8px 10px -6px rgba(30, 58, 138, 0.25) !important;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  overflow: hidden;
}

.ep-setting-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.ep-avatar-uploader {
  position: relative;
  flex-shrink: 0;
  width: 86px;
  height: 86px;
}

.ep-setting-avatar-img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: block;
  background-color: #ffffff;
}

.ep-avatar-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--ep-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: 2px solid #ffffff;
  transition: transform 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
}

.ep-avatar-btn:hover {
  transform: scale(1.08);
  background: var(--ep-surface-subtle);
  color: var(--ep-sky);
}

.ep-avatar-btn input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.ep-avatar-btn i {
  font-size: 14px;
}

.ep-avatar-uploader.is-loading .ep-avatar-btn i {
  animation: ep-spin 0.8s infinite linear;
}

@keyframes ep-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ep-setting-hero-info {
  flex: 1 1 auto;
  min-width: 0;
}

.ep-setting-hero-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-setting-hero-nip {
  font-size: 13px;
  color: #cbd5e1;
  margin: 0 0 6px 0;
}

.ep-setting-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ep-setting-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ep-setting-badge-gold {
  background: rgba(254, 243, 199, 0.18);
  color: #fef08a;
  border: 1px solid rgba(254, 240, 138, 0.3);
}

.ep-setting-badge-verified {
  background: rgba(220, 252, 231, 0.18);
  color: #86efac;
  border: 1px solid rgba(134, 239, 172, 0.3);
}

/* Quick Officer Overview Card */
.ep-setting-overview-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 16px;
  box-shadow: var(--ep-shadow-sm);
  margin-bottom: 20px;
}

.ep-setting-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ep-setting-overview-item {
  display: flex;
  flex-direction: column;
}

.ep-setting-overview-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ep-text-muted);
  margin-bottom: 4px;
}

.ep-setting-overview-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Settings Menu Group Card */
.ep-setting-group {
  margin-bottom: 20px;
}

.ep-setting-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  box-shadow: var(--ep-shadow-sm);
  overflow: hidden;
}

.ep-setting-list {
  display: flex;
  flex-direction: column;
}

.ep-setting-item {
  display: flex;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid var(--ep-border);
  text-decoration: none !important;
  color: var(--ep-text) !important;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.ep-setting-item:last-child {
  border-bottom: none;
}

.ep-setting-item:hover,
.ep-setting-item:active {
  background-color: var(--ep-surface-subtle);
}

.ep-setting-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  margin-right: 14px;
  transition: transform 0.2s ease;
}

.ep-setting-item:hover .ep-setting-icon-box {
  transform: scale(1.05);
}

.ep-icon-blue {
  background-color: #e0f2fe;
  color: #0369a1;
}

.ep-icon-purple {
  background-color: #f3e8ff;
  color: #7e22ce;
}

.ep-icon-emerald {
  background-color: #dcfce7;
  color: #15803d;
}

.ep-icon-amber {
  background-color: #fef3c7;
  color: #b45309;
}

.ep-icon-indigo {
  background-color: #e0e7ff;
  color: #4338ca;
}

.ep-setting-text {
  flex: 1 1 auto;
  min-width: 0;
}

.ep-setting-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ep-text);
  margin: 0 0 2px 0;
}

.ep-setting-desc {
  font-size: 12px;
  color: var(--ep-text-muted);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-setting-chevron {
  color: var(--ep-text-muted);
  font-size: 13px;
  margin-left: 10px;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ep-setting-item:hover .ep-setting-chevron {
  transform: translateX(2px);
  color: var(--ep-navy);
}

/* Logout Card */
.ep-logout-card {
  background: var(--ep-surface);
  border: 1px solid #fecaca;
  border-radius: var(--ep-radius-card);
  padding: 14px 16px;
  box-shadow: var(--ep-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.ep-logout-card:hover {
  background: #fff5f5;
  border-color: #f87171;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.ep-logout-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ep-logout-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fee2e2;
  color: var(--ep-damkar-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ep-logout-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ep-damkar-red);
  margin: 0 0 2px 0;
}

.ep-logout-desc {
  font-size: 12px;
  color: var(--ep-text-muted);
  margin: 0;
}

.ep-logout-chevron {
  color: var(--ep-damkar-red);
  font-size: 14px;
}

/* Footer security seal */
.ep-setting-footer {
  text-align: center;
  font-size: 12px;
  color: var(--ep-text-muted);
  padding: 8px 0 24px 0;
}

.ep-setting-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--ep-text-secondary);
  margin-bottom: 4px;
}

@media (max-width: 576px) {
  .ep-setting-hero {
    flex-direction: row !important;
    text-align: left !important;
    align-items: center !important;
    padding: 16px !important;
    gap: 14px !important;
  }
  .ep-setting-hero-meta {
    justify-content: flex-start !important;
  }
  .ep-setting-hero .ep-avatar-uploader {
    width: 68px !important;
    height: 68px !important;
  }
  .ep-setting-hero .ep-setting-avatar-img {
    width: 68px !important;
    height: 68px !important;
  }
  .ep-setting-hero .ep-avatar-btn {
    width: 26px !important;
    height: 26px !important;
  }
  .ep-setting-hero .ep-avatar-btn i {
    font-size: 11px !important;
  }
  .ep-setting-overview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ep-setting-overview-item {
    border-bottom: 1px solid var(--ep-border);
    padding-bottom: 8px;
  }
  .ep-setting-overview-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* ==========================================================================
   ID CARD DIGITAL (Civic Discipline Edition)
   ========================================================================== */

.ep-idcard-preview {
  margin-bottom: 24px;
}

.ep-idcard-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  padding: 6px;
  border-radius: var(--ep-radius-control);
  margin-bottom: 20px;
  box-shadow: var(--ep-shadow-sm);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.ep-idcard-tab-btn {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text-secondary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ep-idcard-tab-btn.active {
  background: var(--ep-navy);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.ep-idcard-tab-btn:hover:not(.active) {
  background: var(--ep-surface-subtle);
  color: var(--ep-text);
}

.ep-idcard-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.ep-idcard-card-box {
  width: 290px;
  min-height: 460px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.2), 0 8px 15px -6px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 18px;
  text-align: center;
  color: #ffffff;
  background-color: #0f172a;
  background-size: cover;
  background-position: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ep-idcard-card-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -5px rgba(15, 23, 42, 0.25), 0 12px 20px -6px rgba(15, 23, 42, 0.2);
}

.ep-idcard-card-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 58, 138, 0.82) 45%, rgba(15, 23, 42, 0.92) 100%);
  pointer-events: none;
  z-index: 1;
}

.ep-idcard-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.ep-idcard-slot {
  width: 44px;
  height: 7px;
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  margin: 0 auto 12px auto;
}

.ep-idcard-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ep-idcard-emblem-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.ep-idcard-inst-text {
  text-align: left;
}

.ep-idcard-inst-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.2;
}

.ep-idcard-inst-sub {
  font-size: 9px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.ep-idcard-avatar-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 12px auto;
}

.ep-idcard-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  background: #ffffff;
}

.ep-idcard-verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--ep-emerald);
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.ep-idcard-officer-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.ep-idcard-officer-nip {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #cbd5e1;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.ep-idcard-officer-pos {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.3) 0%, rgba(245, 158, 11, 0.3) 100%);
  color: #fef3c7;
  border: 1px solid rgba(245, 158, 11, 0.45);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.ep-idcard-qr-box {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ep-idcard-qr-frame {
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  display: inline-block;
}

.ep-idcard-qr-img {
  width: 70px;
  height: 70px;
  display: block;
}

.ep-idcard-qr-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-weight: 600;
}

/* Back of Card */
.ep-idcard-back-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.ep-idcard-back-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fef3c7;
  margin-bottom: 2px;
}

.ep-idcard-back-sub {
  font-size: 9px;
  color: #94a3b8;
}

.ep-idcard-rules-list {
  text-align: left;
  font-size: 9.5px;
  line-height: 1.5;
  color: #e2e8f0;
  padding-left: 16px;
  margin-bottom: 14px;
}

.ep-idcard-rules-list li {
  margin-bottom: 6px;
}

.ep-idcard-back-qr-box {
  margin: 10px auto;
}

.ep-idcard-back-qr-frame {
  background: #ffffff;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: inline-block;
}

.ep-idcard-back-qr-frame img {
  width: 100px;
  height: 100px;
  display: block;
}

.ep-idcard-back-seal {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ep-idcard-seal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ep-emerald-subtle);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.ep-idcard-seal-sub {
  font-size: 8.5px;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

/* Action card container */
.ep-idcard-actions-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--ep-shadow-sm);
  text-align: center;
}

.ep-btn-print-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--ep-radius-control);
  border: none;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.28);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.ep-btn-print-large:hover {
  background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.35);
  transform: translateY(-1px);
  color: #ffffff !important;
}

.ep-btn-print-large:active {
  transform: translateY(0);
}

.ep-idcard-print-hint {
  font-size: 12px;
  color: var(--ep-text-muted);
  margin-top: 10px;
  margin-bottom: 0;
}

/* Security Notice Box */
.ep-idcard-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid var(--ep-border);
  border-left: 4px solid var(--ep-navy);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.ep-idcard-notice-icon {
  font-size: 20px;
  color: var(--ep-navy);
  flex-shrink: 0;
  margin-top: 2px;
}

.ep-idcard-notice-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0 0 4px 0;
}

.ep-idcard-notice-desc {
  font-size: 12px;
  color: var(--ep-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   CIVIC DISCIPLINE SUBPAGE STYLING (Profile, Keamanan, Recognition, Jam Kerja)
   ========================================================================== */

.ep-subpage-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  box-shadow: var(--ep-shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

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

.ep-subpage-header-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ep-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-subpage-header-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(30, 58, 138, 0.08);
  color: var(--ep-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.ep-subpage-body {
  padding: 20px;
}

.ep-subpage-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--ep-border);
  background: var(--ep-surface-subtle);
}

.ep-form-group {
  margin-bottom: 18px;
}

.ep-form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ep-text-secondary);
  margin-bottom: 6px;
}

.ep-form-control {
  display: block;
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ep-text);
  background-color: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ep-form-control:focus {
  border-color: var(--ep-sky);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea.ep-form-control {
  height: auto;
  min-height: 90px;
  resize: vertical;
}

.ep-btn-civic-primary {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--ep-radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.ep-btn-civic-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.35);
  color: #ffffff !important;
}

.ep-btn-civic-primary:active {
  transform: translateY(0);
}

.ep-btn-civic-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ep-password-field-wrap {
  position: relative;
}

.ep-password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--ep-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  font-size: 16px;
  z-index: 2;
}

.ep-password-toggle-btn:hover {
  color: var(--ep-navy);
}

/* Subpage action header for recognition & jam-kerja */
.ep-subpage-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.ep-subpage-action-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ep-navy);
  margin: 0;
}

.ep-btn-civic-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--ep-radius-control);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.ep-btn-civic-sm:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Face Recognition Card Grid */
.ep-rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.ep-rec-item {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  overflow: hidden;
  box-shadow: var(--ep-shadow-sm);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ep-rec-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--ep-shadow-md);
}

.ep-rec-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.ep-rec-meta {
  padding: 10px;
  text-align: center;
}

.ep-rec-date {
  font-size: 11px;
  color: var(--ep-text-muted);
  display: block;
  margin-bottom: 6px;
}

.ep-rec-btn-del {
  width: 100%;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ep-damkar-red);
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ep-rec-btn-del:hover {
  background: #fca5a5;
  color: #7f1d1d;
}

.ep-rec-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.ep-rec-badge-active {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(22, 163, 74, 0.9);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ep-rec-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ep-navy);
  display: block;
  margin-bottom: 2px;
}

/* Recognition Navigation Tabs */
.ep-rec-tabs {
  border-bottom: 2px solid var(--ep-border);
  display: flex;
  gap: 8px;
}

.ep-rec-tabs .nav-item {
  margin-bottom: -2px;
}

.ep-rec-tabs .nav-link {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ep-text-secondary);
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  transition: all 0.2s ease;
}

.ep-rec-tabs .nav-link:hover {
  color: var(--ep-navy);
  border-bottom-color: var(--ep-border-strong);
}

.ep-rec-tabs .nav-link.active {
  color: var(--ep-navy) !important;
  border-bottom: 2px solid #2563eb !important;
  background: transparent !important;
}

/* Recognition Guidelines Grid */
.ep-rec-guidelines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.ep-rec-guide-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  transition: transform 0.15s ease;
}

.ep-rec-guide-item:hover {
  transform: translateY(-1px);
}

.ep-rec-guide-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.ep-guide-icon-sun {
  background: #fef3c7;
  color: #b45309;
}

.ep-guide-icon-face {
  background: #e0f2fe;
  color: #0284c7;
}

.ep-guide-icon-mask {
  background: #fee2e2;
  color: #dc2626;
}

.ep-guide-icon-ai {
  background: #dcfce7;
  color: #16a34a;
}

.ep-rec-guide-content {
  flex: 1;
  min-width: 0;
}

.ep-rec-guide-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ep-navy);
  margin: 0 0 3px 0;
}

.ep-rec-guide-desc {
  font-size: 11.5px;
  color: var(--ep-text-secondary);
  line-height: 1.45;
  margin: 0;
}

/* Jam Kerja Shift Card List */
.ep-shift-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ep-shift-card {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  padding: 16px;
  box-shadow: var(--ep-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.ep-shift-card.is-active {
  border-color: #2563eb;
  background: #f8faff;
}

.ep-shift-info {
  flex: 1;
  min-width: 0;
}

.ep-shift-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0 0 4px 0;
}

.ep-shift-time {
  font-size: 12.5px;
  color: var(--ep-text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ep-shift-badge-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #dcfce7;
  color: #15803d;
}

.ep-shift-badge-inactive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
}

.ep-empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--ep-surface);
  border: 1px dashed var(--ep-border);
  border-radius: var(--ep-radius-card);
  margin-bottom: 20px;
}

.ep-empty-icon {
  font-size: 40px;
  color: var(--ep-text-muted);
  margin-bottom: 12px;
}

.ep-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ep-text);
  margin-bottom: 4px;
}

.ep-empty-desc {
  font-size: 13px;
  color: var(--ep-text-secondary);
  max-width: 360px;
  margin: 0 auto;
}

/* Password Requirements Checklist */
.ep-pwd-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--ep-text-muted);
}

.ep-req-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

/* ==========================================================================
   CIVIC BOTTOM NAVIGATION BAR (Taste-Skill v2 / Mobile First)
   ========================================================================== */
.footer.ep-footer-wrap {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1020 !important;
  pointer-events: none;
}

.appBottomMenu.ep-bottom-nav {
  pointer-events: auto;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;
  height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: 64px !important;
  width: 100% !important;
  max-width: 560px !important;
  margin: 0 auto !important;
  padding: 0 8px !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  background-color: var(--ep-surface) !important;
  background: var(--ep-surface) !important;
  border-top: 1px solid var(--ep-border) !important;
  border-left: 1px solid var(--ep-border) !important;
  border-right: 1px solid var(--ep-border) !important;
  border-radius: 20px 20px 0 0 !important;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

@media (max-width: 576px) {
  .appBottomMenu.ep-bottom-nav {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    max-width: 100% !important;
  }
}

.appBottomMenu.ep-bottom-nav .item.ep-nav-item {
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  min-height: 48px !important;
  padding: 6px 2px !important;
  text-decoration: none !important;
  color: var(--ep-text-muted) !important;
  position: relative !important;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.appBottomMenu.ep-bottom-nav .item.ep-nav-item .ep-nav-col {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 3px !important;
}

.appBottomMenu.ep-bottom-nav .ep-nav-icon {
  width: 22px !important;
  height: 22px !important;
  color: var(--ep-text-muted) !important;
  transition: color 0.15s ease, stroke-width 0.15s ease, transform 0.15s ease;
}

.appBottomMenu.ep-bottom-nav .item.ep-nav-item strong {
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  color: var(--ep-text-muted) !important;
  letter-spacing: -0.01em !important;
  transition: color 0.15s ease, font-weight 0.15s ease;
  white-space: nowrap !important;
}

/* Hover & Active States */
.appBottomMenu.ep-bottom-nav .item.ep-nav-item:hover .ep-nav-icon,
.appBottomMenu.ep-bottom-nav .item.ep-nav-item:hover strong {
  color: var(--ep-text-secondary) !important;
}

.appBottomMenu.ep-bottom-nav .item.ep-nav-item.active {
  color: var(--ep-navy) !important;
}

.appBottomMenu.ep-bottom-nav .item.ep-nav-item.active .ep-nav-icon {
  color: var(--ep-navy) !important;
  stroke-width: 2.2px !important;
}

.appBottomMenu.ep-bottom-nav .item.ep-nav-item.active strong {
  color: var(--ep-navy) !important;
  font-weight: 700 !important;
}

/* Active Top Indicator Pill */
.appBottomMenu.ep-bottom-nav .item.ep-nav-item.active::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 20px !important;
  height: 3px !important;
  background-color: var(--ep-navy) !important;
  border-radius: 999px !important;
}

/* Floating Chatbox Dialog (Dialog Mengambang) */
.chatbox {
  position: fixed !important;
  right: 16px !important;
  bottom: 74px !important;
  top: auto !important;
  left: auto !important;
  width: 340px !important;
  max-width: calc(100vw - 32px) !important;
  height: 484px !important;
  max-height: calc(100vh - 120px) !important;
  max-height: calc(100dvh - 120px) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(15, 23, 42, 0.08) !important;
  z-index: 1060 !important;
  overflow: hidden !important;
  background: var(--ep-surface, #ffffff) !important;
}

.chatbox:not(.active) {
  display: none !important;
}

.chatbox.active {
  display: block !important;
}

@media (max-width: 480px) {
  .chatbox {
    right: 12px !important;
    bottom: 70px !important;
    max-width: calc(100vw - 24px) !important;
  }
}

/* ==========================================================================
   MODULE IZIN PEGAWAI (Permohonan Izin Satpol PP & Damkar)
   ========================================================================== */

.ep-btn-add-izin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff !important;
  background-color: var(--ep-navy);
  border: 1px solid var(--ep-navy);
  border-radius: var(--ep-radius-control);
  padding: 6px 12px;
  min-height: 32px;
  text-decoration: none !important;
  transition: all 0.15s ease;
  cursor: pointer;
}

.ep-btn-add-izin:hover,
.ep-btn-add-izin:active {
  background-color: var(--ep-navy-hover);
  border-color: var(--ep-navy-hover);
  color: #ffffff !important;
}

.ep-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.ep-badge-pending {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
}

.ep-badge-approved {
  background: #dcfce7 !important;
  color: #15803d !important;
  border: 1px solid #bbf7d0 !important;
}

.ep-badge-rejected {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.ep-izin-card-item {
  background: var(--ep-surface);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-card);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--ep-shadow-sm);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ep-izin-card-item:hover {
  border-color: var(--ep-border-strong);
  box-shadow: var(--ep-shadow-md);
}

.ep-izin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ep-border);
  flex-wrap: wrap;
}

.ep-izin-card-date {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ep-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ep-izin-card-duration {
  font-size: 11px;
  font-weight: 600;
  color: var(--ep-navy);
  background: var(--ep-sky-subtle);
  padding: 2px 7px;
  border-radius: var(--ep-radius-badge);
}

.ep-izin-card-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.ep-izin-card-content {
  flex: 1;
  min-width: 0;
}

.ep-izin-reason-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ep-navy);
  background: var(--ep-surface-subtle);
  border: 1px solid var(--ep-border);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.ep-izin-desc {
  font-size: 12.5px;
  color: var(--ep-text-secondary);
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

.ep-izin-thumb-wrap {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--ep-border);
  position: relative;
  cursor: pointer;
  background: var(--ep-ground);
}

.ep-izin-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-izin-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ep-izin-thumb-wrap:hover .ep-izin-thumb-overlay {
  opacity: 1;
}

.ep-izin-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--ep-border);
  flex-wrap: wrap;
}

.ep-izin-time {
  font-size: 11px;
  color: var(--ep-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Civic File Upload Drag and Drop */
.image-upload-wrap {
  border: 2px dashed var(--ep-border-strong);
  position: relative;
  border-radius: var(--ep-radius-control);
  background: var(--ep-ground);
  transition: all 0.15s ease;
  cursor: pointer;
  text-align: center;
  padding: 22px 14px;
}

.image-upload-wrap:hover,
.image-upload-wrap.image-dropping {
  background-color: var(--ep-surface-subtle);
  border-color: var(--ep-navy);
}

.file-upload-input {
  position: absolute;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  outline: none;
  opacity: 0;
  cursor: pointer;
  top: 0;
  left: 0;
}

.drag-text {
  text-align: center;
  pointer-events: none;
}

.drag-text i {
  font-size: 30px;
  color: var(--ep-navy);
  margin-bottom: 6px;
  display: block;
}

.drag-text h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--ep-text);
  margin: 0 0 2px 0;
}

.drag-text p {
  font-size: 11px;
  color: var(--ep-text-muted);
  margin: 0;
}

.file-upload-content {
  display: none;
  text-align: center;
  background: var(--ep-ground);
  border: 1px solid var(--ep-border);
  border-radius: var(--ep-radius-control);
  padding: 12px;
}

.file-upload-image {
  max-height: 180px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: var(--ep-shadow-sm);
  display: block;
}

.image-title-wrap {
  margin-top: 10px;
}

/* ==========================================================================
   OPTIMASI KHUSUS MOBILE & IOS SAFARI (IPHONE / IPAD)
   ========================================================================== */

/* 1. Mencegah Auto-Zoom paksa Safari iOS saat fokus input pada layar kecil */
@media screen and (max-width: 768px) {
  .ep-input,
  .form-control,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* 2. Eliminasi 300ms Tap Delay di Safari iOS dan optimasi responsivitas sentuhan */
button,
a,
.btn,
.ep-btn-primary,
.ep-duty-action-btn,
.ep-btn-shutter,
.ep-nav-item,
.cameraFlip,
.resume-camera,
.btn-toggle-password,
.ep-input-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 3. Penataan viewport video stream kamera untuk iOS WebKit */
.ep-viewfinder-viewport video#webcam {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  background-color: #000;
}


