/* ==========================================================================
   PORTAL KEHADIRAN PEJABAT KANWIL KEMENAG DIY
   Design System - Referensi Kemenag DIY Landing Page
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  /* ==========================================================================
     PALET WARNA RESMI KEMENTERIAN AGAMA REPUBLIK INDONESIA
     ========================================================================== */
  --kemenag-kuning: #FEC013;       /* Kuning: R:252 G:224 B:19 (#FEC013) */
  --kemenag-hijau-laut: #158684;   /* Hijau Laut: R:21 G:134 B:132 (#158684) */
  --kemenag-biru-langit: #6DFBFA;  /* Biru Langit: R:109 G:235 B:250 (#6DFBFA) */
  --kemenag-hijau-muda: #B9DB08;   /* Hijau Muda: R:185 G:219 B:8 (#B9DB08) */
  --kemenag-oren: #FDB200;         /* Oren: R:253 G:178 B:0 (#FDB200) */
  --kemenag-biru-gelap: #026686;
  --hijau-dark-bg: #158684;
  --hijau-dark-deep: #026686;   /* Biru Gelap: R:2 G:102 B:134 (#026686) */

  /* Legacy brand aliases */
  --hijau-tua: var(--kemenag-hijau-laut);
  --kuning-emas: var(--kemenag-kuning);
  --hijau-muda: var(--kemenag-hijau-muda);
  --biru-gelap: var(--kemenag-biru-gelap);
  --biru-langit: var(--kemenag-biru-langit);
  --oren-kemenag: var(--kemenag-oren);

  /* Status Colors */
  --status-ada-bg: #e6f7f6;
  --status-ada-text: #0e5b59;
  --status-ada-border: #158684;

  --status-dl-bg: #e5f3f7;
  --status-dl-text: #024e66;
  --status-dl-border: #026686;

  --status-cuti-bg: #fff8e6;
  --status-cuti-text: #946300;
  --status-cuti-border: #FDB200;

  --status-tidak-bg: #fef2f2;
  --status-tidak-text: #991b1b;
  --status-tidak-border: #fca5a5;

  /* Neutrals */
  --bg-main: #f0f7f9;
  --bg-surface: #ffffff;
  --text-main: #0a2533;
  --text-muted: #537587;
  --border-light: #d6e7ed;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   Hero Header (from Landing Page Reference)
   ========================================================================== */
.hero-header {
  position: relative;
  background: linear-gradient(135deg, rgba(2, 102, 134, 0.92) 0%, rgba(21, 134, 132, 0.92) 100%), url('../assets/kanwildepan1.webp') center/cover no-repeat;
  color: white;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-bottom: 4px solid var(--kemenag-kuning);
}

/* Top bar buttons inside hero */
.top-action-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  flex-wrap: wrap;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FFE27A 0%, var(--kemenag-kuning) 55%, var(--kemenag-oren) 100%);
  color: #241c00;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
  cursor: pointer;
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.hero-btn-dark {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
}

.hero-btn-dark:hover {
  background: rgba(255, 255, 255, 0.28);
  color: white;
}

.hero-logo-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 12px;
  display: inline-block;
  margin-bottom: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.hero-logo-img {
  width: 82px;
  height: auto;
  display: block;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.35rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--kuning-emas);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

/* Clock & Pasaran Jawa Box */
.hero-clock-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 0.5rem;
}

.hero-clock-time {
  color: var(--kuning-emas);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

/* Office Hours Banner Status */
.office-hours-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 0.85rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.office-hours-status-badge.open {
  background: #065f46;
  color: #d1fae5;
  border: 1px solid #34d399;
}

.office-hours-status-badge.closed {
  background: #991b1b;
  color: #fee2e2;
  border: 1px solid #f87171;
}

/* ==========================================================================
   Running Text Ticker (from Landing Page)
   ========================================================================== */
.ticker-wrap {
  width: 100%;
  background: #ffffff;
  color: #000000;
  padding: 0.55rem 0;
  overflow: hidden;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ticker-track {
  display: flex;
  white-space: nowrap;
}

.ticker-content {
  font-size: 0.85rem;
  font-weight: 600;
  padding-left: 100%;
  animation: marquee 35s linear infinite;
  color: #14532d;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ==========================================================================
   Page Container & Grid
   ========================================================================== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

.section-divider {
  text-align: center;
  margin: 1.5rem 0 2rem;
}

.section-divider img {
  max-width: 260px;
  height: auto;
  opacity: 0.85;
}

/* Summary Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.stat-card.stat-all::before { background: var(--hijau-kemenag); }
.stat-card.stat-ada::before { background: var(--status-ada-dot); }
.stat-card.stat-dl::before { background: var(--status-dl-dot); }
.stat-card.stat-rapat::before { background: var(--status-rapat-dot); }
.stat-card.stat-cuti::before { background: var(--status-cuti-dot); }
.stat-card.stat-tidak::before { background: var(--status-tidak-dot); }

.stat-info .stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.stat-info .stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #f1f5f9;
}

/* Toolbar & Filters */
.toolbar-section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
  max-width: 420px;
}

.search-input-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  background: var(--bg-main);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--hijau-tua);
  background: white;
  box-shadow: 0 0 0 3px rgba(21, 134, 132, 0.15);
}

.status-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.filter-pill.active {
  background: var(--hijau-dark-bg);
  color: white;
  border-color: var(--hijau-dark-bg);
}

/* Pejabat Cards Grid */
.pejabat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.card-pejabat {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition);
  position: relative;
}

.card-pejabat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

/* Kepala Kanwil Card */
.card-pejabat.kakanwil-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 2px solid var(--kuning-emas);
  box-shadow: 0 6px 20px rgba(254, 192, 19, 0.2);
}

.card-pejabat.kakanwil-card::after {
  content: '★ KEPALA KANTOR WILAYAH';
  position: absolute;
  top: -10px;
  right: 20px;
  background: linear-gradient(135deg, #FEC013, #E5A800);
  color: #14532d;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.08em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pejabat-profile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #14532d 0%, #158684 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kakanwil-card .avatar-circle {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, #0e2f1c 0%, #FEC013 100%);
  border-color: var(--kuning-emas);
}

.pejabat-thumb-sm {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
  display: inline-block;
  vertical-align: middle;
}

.upload-preview-box {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px dashed var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  overflow: hidden;
  background: var(--bg-main);
  position: relative;
}

.upload-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
}

.pejabat-meta {
  flex: 1;
}

.pejabat-meta .jabatan-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hijau-tua);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.pejabat-meta .nama-pejabat {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.pejabat-meta .unit-name {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Status Box */
.presence-status-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.presence-status-box.status-ada {
  background: var(--status-ada-bg);
  border: 1px solid var(--status-ada-border);
  color: var(--status-ada-text);
}

.presence-status-box.status-dinas_luar {
  background: var(--status-dl-bg);
  border: 1px solid var(--status-dl-border);
  color: var(--status-dl-text);
}

.presence-status-box.status-rapat {
  background: var(--status-rapat-bg);
  border: 1px solid var(--status-rapat-border);
  color: var(--status-rapat-text);
}

.presence-status-box.status-cuti {
  background: var(--status-cuti-bg);
  border: 1px solid var(--status-cuti-border);
  color: var(--status-cuti-text);
}

.presence-status-box.status-tidak_ada {
  background: var(--status-tidak-bg);
  border: 1px solid var(--status-tidak-border);
  color: var(--status-tidak-text);
}

.status-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-badge-text {
  font-size: 0.88rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.status-ada .status-pulse-dot { background: var(--status-ada-dot); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }
.status-dinas_luar .status-pulse-dot { background: var(--status-dl-dot); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); }
.status-rapat .status-pulse-dot { background: var(--status-rapat-dot); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.status-cuti .status-pulse-dot { background: var(--status-cuti-dot); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25); }
.status-tidak_ada .status-pulse-dot { background: var(--status-tidak-dot); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25); }

.status-keterangan {
  font-size: 0.85rem;
  font-weight: 600;
  word-break: break-word;
}

.status-lokasi-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  opacity: 0.8;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
  padding-top: 0.35rem;
  margin-top: 0.2rem;
}

/* ==========================================================================
   Footer (Exact Match with Landing Page)
   ========================================================================== */
.footer {
  background: #0e2f1c;
  color: white;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.88rem;
  border-top: 3px solid var(--kuning-emas);
  margin-top: auto;
}

.footer-container {
  max-width: 850px;
  margin: 0 auto;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.footer-contact {
  opacity: 0.9;
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
}

.footer-contact a {
  color: #d1fae5;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: var(--kuning-emas);
  text-decoration: underline;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1.25rem 0 1rem;
}

.social-icon {
  width: 28px;
  height: 28px;
  transition: transform 0.2s;
  display: block;
}

.social-icon:hover {
  transform: scale(1.15);
}

.footer-copy {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* ==========================================================================
   Admin Panel Specifics
   ========================================================================== */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  flex: 1;
}

.admin-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.admin-title-wrap h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--hijau-dark-bg);
}

.admin-date-picker-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-date-input {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-main);
}

.bulk-action-bar {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-kemenag {
  background: #158684 !important;
  background: linear-gradient(135deg, #158684 0%, #026686 100%) !important;
  color: #ffffff !important;
  border: 1px solid #106d6b !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(21, 134, 132, 0.35) !important;
}

.btn-kemenag:hover {
  background: #0f6c6a !important;
  background: linear-gradient(135deg, #0f6c6a 0%, #014c64 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(21, 134, 132, 0.5) !important;
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Print Header & Badges (Hidden on standard screen) */
.print-header {
  display: none;
}
.status-print-badge {
  display: none;
}

/* Admin Tabs */
.admin-tab-bar {
  display: inline-flex;
  gap: 0.35rem;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.admin-tab-btn {
  border: none;
  background: transparent;
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.admin-tab-btn:hover {
  color: var(--hijau-dark-bg);
  background: rgba(255, 255, 255, 0.7);
}

.admin-tab-btn.active {
  background: white;
  color: var(--hijau-dark-bg);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-table-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 2rem;
}

.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  background: #f8fafc;
  padding: 0.9rem 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-light);
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover {
  background-color: #fbfdfc;
}

.status-btn-group {
  display: inline-flex;
  gap: 5px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.btn-toggle-status {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  color: #475569;
  background: transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.btn-toggle-status:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
}

.btn-toggle-status.active-ada { background: #059669; color: white; border-color: #047857; box-shadow: 0 2px 4px rgba(5, 150, 105, 0.25); }
.btn-toggle-status.active-dl { background: #2563eb; color: white; border-color: #1d4ed8; box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25); }
.btn-toggle-status.active-rapat { background: #d97706; color: white; border-color: #b45309; box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25); }
.btn-toggle-status.active-cuti { background: #7c3aed; color: white; border-color: #6d28d9; box-shadow: 0 2px 4px rgba(124, 58, 237, 0.25); }
.btn-toggle-status.active-tidak { background: #dc2626; color: white; border-color: #b91c1c; box-shadow: 0 2px 4px rgba(220, 38, 38, 0.25); }

/* Admin Toast Notification */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #14532d;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--kuning-emas);
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PIN Keypad Modal
   ========================================================================== */
.keypad-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 1rem;
}

.keypad-header-info {
  text-align: center;
  margin-bottom: 1.25rem;
}

.pin-dots-container {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 0.5rem 0 1.25rem;
}

.pin-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-dot.filled {
  background: var(--kuning-emas);
  border-color: #d97706;
  box-shadow: 0 0 12px rgba(254, 192, 19, 0.6);
  transform: scale(1.18);
}

.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  gap: 14px;
  justify-content: center;
  margin-bottom: 1rem;
}

.keypad-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  font-family: inherit;
}

.keypad-btn:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.keypad-btn:active {
  background: #e2e8f0;
  transform: scale(0.94);
}

.keypad-btn.action-btn {
  font-size: 1.1rem;
  font-weight: 600;
}

.keypad-btn.action-delete {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.keypad-btn.action-delete:hover {
  background: #fee2e2;
}

.keypad-btn.action-submit {
  background: #14532d;
  color: var(--kuning-emas);
  border-color: #14532d;
}

.keypad-btn.action-submit:hover {
  background: #0e2f1c;
}

@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.shake {
  animation: shakeAnim 0.35s ease-in-out;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-header {
  background: var(--hijau-dark-bg);
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: transparent; border: none; color: white; font-size: 1.25rem; cursor: pointer; }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label { font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  outline: none;
}
.modal-footer { padding: 1rem 1.5rem; background: #f8fafc; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ==========================================================================
   TV Mode (High Contrast & Far-Distance Legibility)
   ========================================================================== */
body.tv-mode {
  background: #011219 !important;
  background: radial-gradient(circle at 50% 10%, #032b38 0%, #01141d 60%, #000a0f 100%) !important;
  color: #ffffff !important;
  overflow: hidden !important;
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.tv-container {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

/* TV Header (High Contrast, Bold, Clear) */
.tv-header {
  background: linear-gradient(90deg, #01222d 0%, #063c4a 50%, #01222d 100%);
  padding: 0.65rem 1.75rem;
  border-bottom: 4px solid #fec013;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.tv-logo-card {
  background: #ffffff;
  border: 2px solid #fec013;
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.tv-brand-title {
  font-size: 1.65rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.tv-header-subtitle {
  font-size: 0.98rem;
  color: #6dfbfa;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tv-clock {
  font-size: 2.3rem;
  font-weight: 900;
  color: #fec013;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(254, 192, 19, 0.4);
}

.tv-date {
  font-size: 1.05rem;
  color: #e0f2fe;
  font-weight: 700;
  margin-top: 3px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* TV Header Center Info Box */
.tv-header-info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 20, 28, 0.85);
  border: 2px solid #fec013;
  border-radius: 8px;
  padding: 6px 24px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.tv-info-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #6dfbfa;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.tv-info-status {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fec013;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* TV Grid (10 Officials: 1 full-width row + 3 rows of 3 cols) */
.tv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto repeat(3, 1fr);
  gap: 12px;
  padding: 12px 18px;
  flex: 1;
  min-height: 0;
  overflow: hidden !important;
}

/* Card Styling (Vertical Hierarchy: Title -> Name -> Status di Bagian Bawah) */
.tv-card {
  background: #04222f;
  background: linear-gradient(135deg, #052938 0%, #031c26 100%);
  border: 2px solid #0d586e;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 0;
  min-width: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
}

.tv-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

.tv-card-avatar-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tv-card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.tv-card .pejabat-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fec013;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.tv-card .pejabat-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.tv-card-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
  flex-wrap: wrap;
}

/* High-Contrast Status Badges (Posisinya di Bagian Bawah Nama) */
.tv-card-status {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
  border: 2px solid transparent;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 1. ADA DI KANTOR: Solid Vivid Emerald Green with Crisp White Text */
.tv-card-status.status-ada {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

/* 2. TIDAK DI KANTOR: Solid Vivid Crimson Red with Crisp White Text */
.tv-card-status.status-tidak_ada {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #f87171 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.35);
}

/* 3. DINAS LUAR (DL): Solid Vivid Royal Blue with Crisp White Text */
.tv-card-status.status-dinas_luar {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.35);
}

/* 4. CUTI / IZIN: Solid Vivid Amber / Orange with Crisp White Text */
.tv-card-status.status-cuti {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #fbbf24 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.35);
}

/* Special Featured Card for Kepala Kantor Wilayah */
.tv-card.kakanwil-tv {
  grid-column: 1 / -1;
  background: linear-gradient(90deg, #06384a 0%, #0d5464 50%, #06384a 100%);
  border: 3px solid #fec013;
  padding: 0.85rem 1.65rem;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(254, 192, 19, 0.3);
}

.tv-card.kakanwil-tv .pejabat-title {
  font-size: 1.15rem;
  color: #fec013;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.tv-card.kakanwil-tv .pejabat-name {
  font-size: 1.65rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.tv-card.kakanwil-tv .tv-card-status {
  padding: 10px 24px;
  font-size: 1.25rem;
  border-radius: 8px;
}


/* TV Header Summary Stats Pills */
.tv-summary-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 18, 26, 0.75);
  border: 1.5px solid #0d586e;
  border-radius: 8px;
  padding: 5px 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.tv-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.tv-stat-pill .stat-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.tv-stat-pill .stat-num {
  font-size: 1.05rem;
  font-weight: 900;
}

.tv-stat-pill.pill-ada {
  background: rgba(5, 150, 105, 0.25);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.tv-stat-pill.pill-ada .stat-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.tv-stat-pill.pill-dl {
  background: rgba(37, 99, 235, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.4);
}
.tv-stat-pill.pill-dl .stat-dot {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.tv-stat-pill.pill-cuti {
  background: rgba(217, 119, 6, 0.25);
  color: #fcd34d;
  border: 1px solid rgba(252, 211, 77, 0.4);
}
.tv-stat-pill.pill-cuti .stat-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.tv-stat-pill.pill-tidak {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.4);
}
.tv-stat-pill.pill-tidak .stat-dot {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

/* Card Status Variants & Accents */
.tv-card.card-status-ada {
  border-left: 6px solid #10b981 !important;
  background: linear-gradient(135deg, #052c3c 0%, #031c26 100%);
  border-color: #0e6b82;
}

.tv-card.card-status-dinas_luar {
  border-left: 6px solid #3b82f6 !important;
  background: linear-gradient(135deg, #05263c 0%, #021726 100%);
  border-color: #1e40af;
}

.tv-card.card-status-cuti {
  border-left: 6px solid #f59e0b !important;
  background: linear-gradient(135deg, #261f06 0%, #171202 100%);
  border-color: #b45309;
}

/* Subdued & Positioned at Bottom for TIDAK DI KANTOR */
.tv-card.card-status-tidak_ada {
  border-left: 6px solid #ef4444 !important;
  background: linear-gradient(135deg, #220b0b 0%, #150606 100%);
  border-color: #7f1d1d;
  opacity: 0.88;
}
.tv-card.card-status-tidak_ada .pejabat-name {
  color: #f8fafc;
}
.tv-card.card-status-tidak_ada .pejabat-title {
  color: #fb923c;
}

.pejabat-subtext {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6dfbfa;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* TV Footer Ticker */
.tv-ticker-footer {
  background: #011117;
  color: #ffffff;
  padding: 0.45rem 1.5rem;
  border-top: 3.5px solid #fec013;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
}

.tv-ticker-tag {
  background: #fec013;
  color: #000000;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 6px;
  margin-right: 1.25rem;
  white-space: nowrap;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.tv-ticker-track {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
  position: relative;
  display: flex;
}

.tv-ticker-footer .ticker-marquee {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: tvTickerScroll 35s linear infinite;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.tv-ticker-footer .ticker-marquee:hover {
  animation-play-state: paused;
}

.tv-btn-fullscreen {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 1rem;
  flex-shrink: 0;
  transition: all 0.2s;
}

.tv-btn-fullscreen:hover {
  background: #fec013;
  color: #000000;
  border-color: #fec013;
}


