/* ============================================================
   JURNAL HRD — Tampilan Opsional (tema, landing, absensi)
   Diatur Owner di menu "Tampilan Aplikasi" (Pengaturan).
   Nilai bawaan (default / klasik / klasik) TIDAK mengubah apa pun:
   semua aturan di bawah hanya aktif bila atribut data-* pada <html> diisi.
   Spesifisitas dibuat tinggi agar menang atas tema dasar.
   ============================================================ */

/* ---------- 1. TEMA WARNA ---------- */

/* Biru laut — terang */
html[data-tema="laut"] {
  --primary: #1D4ED8;
  --secondary: #1E3A8A;
  --tertiary: #3B82F6;
  --surface-canvas: #F0F7FF;
}
/* Biru laut — gelap (OS gelap tanpa pilihan manual, atau mode gelap manual) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"])[data-tema="laut"] {
    --primary: #60A5FA;
    --secondary: #BFDBFE;
    --tertiary: #93C5FD;
    --surface-canvas: #0B1424;
  }
}
html[data-theme="dark"][data-tema="laut"] {
  --primary: #60A5FA;
  --secondary: #BFDBFE;
  --tertiary: #93C5FD;
  --surface-canvas: #0B1424;
}

/* Hijau hutan */
html[data-tema="hutan"] {
  --primary: #166534;
  --secondary: #14532D;
  --tertiary: #15803D;
  --surface-canvas: #F0FDF4;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"])[data-tema="hutan"] {
    --primary: #4ADE80;
    --secondary: #BBF7D0;
    --tertiary: #86EFAC;
    --surface-canvas: #07140C;
  }
}
html[data-theme="dark"][data-tema="hutan"] {
  --primary: #4ADE80;
  --secondary: #BBF7D0;
  --tertiary: #86EFAC;
  --surface-canvas: #07140C;
}

/* Oranye hangat */
html[data-tema="hangat"] {
  --primary: #B45309;
  --secondary: #92400E;
  --tertiary: #D97706;
  --surface-canvas: #FFF9F0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"])[data-tema="hangat"] {
    --primary: #FBBF24;
    --secondary: #FDE68A;
    --tertiary: #FCD34D;
    --surface-canvas: #17110A;
  }
}
html[data-theme="dark"][data-tema="hangat"] {
  --primary: #FBBF24;
  --secondary: #FDE68A;
  --tertiary: #FCD34D;
  --surface-canvas: #17110A;
}

/* Ungu */
html[data-tema="ungu"] {
  --primary: #7E22CE;
  --secondary: #581C87;
  --tertiary: #A855F7;
  --surface-canvas: #FAF5FF;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"])[data-tema="ungu"] {
    --primary: #C084FC;
    --secondary: #E9D5FF;
    --tertiary: #D8B4FE;
    --surface-canvas: #120A1C;
  }
}
html[data-theme="dark"][data-tema="ungu"] {
  --primary: #C084FC;
  --secondary: #E9D5FF;
  --tertiary: #D8B4FE;
  --surface-canvas: #120A1C;
}

/* ---------- 2. MODEL LANDING PAGE ---------- */

/* Modern — hero bergradien, kartu KPI transparan */
html[data-landing="modern"] .mt-public {
  background: radial-gradient(1200px 600px at 10% -10%, #DBEAFE 0%, transparent 60%),
              radial-gradient(900px 500px at 100% 0%, #EDE9FE 0%, transparent 55%),
              var(--surface-canvas);
}
html[data-landing="modern"] .mt-hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #7C3AED 100%);
  color: #FFFFFF;
  border-radius: 24px;
  padding: 44px 36px;
  box-shadow: 0 24px 60px rgba(37, 99, 235, .28);
}
html[data-landing="modern"] .mt-hero h1 { color: #FFFFFF; }
html[data-landing="modern"] .mt-hero h1 em { color: #93C5FD; font-style: normal; }
html[data-landing="modern"] .mt-hero > div:first-child p { color: rgba(255, 255, 255, .88); }
html[data-landing="modern"] .mt-hero > div:first-child .mt-muted { color: rgba(255, 255, 255, .75); }
html[data-landing="modern"] .mt-hero .badge-pill {
  background: rgba(255, 255, 255, .16);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .28);
}
html[data-landing="modern"] .mt-hero .btn-primary-custom {
  background: #FFFFFF;
  color: #1E3A8A;
  border-color: #FFFFFF;
}
html[data-landing="modern"] .mt-hero .btn-outline-custom {
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .7);
}
html[data-landing="modern"] .mt-hero .card-panel {
  background: rgba(255, 255, 255, .96);
  color: #0F172A;
  border: 0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .25);
}

/* Minimal — satu kolom, terpusat, tanpa dekorasi */
html[data-landing="minimal"] .mt-public { background: var(--surface-canvas); }
html[data-landing="minimal"] .mt-hero {
  grid-template-columns: 1fr;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px;
}
html[data-landing="minimal"] .mt-hero > div:first-child { margin: 0 auto; }
html[data-landing="minimal"] .mt-hero .mt-hero-cta { justify-content: center; }
html[data-landing="minimal"] .mt-hero > .card-panel { display: none; }
html[data-landing="minimal"] .mt-hero h1 { font-weight: 600; letter-spacing: -.02em; }

/* ---------- 3. MODEL ABSENSI SELFIE ---------- */

/* Modern — kotak selfie berbentuk lingkaran dengan bingkai gradien */
html[data-absensi="modern"] #dropzoneSelfieAbsensi,
html[data-absensi="modern"] #empDropzoneSelfie {
  width: 200px;
  height: 200px;
  margin: 10px auto;
  border: 4px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(var(--surface-canvas), var(--surface-canvas)) padding-box,
    linear-gradient(135deg, #2563EB, #7C3AED, #DB2777) border-box;
  box-shadow: 0 12px 32px rgba(79, 70, 229, .22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  padding: 0;
}
html[data-absensi="modern"] #dropzoneSelfieAbsensi img,
html[data-absensi="modern"] #empDropzoneSelfie img {
  width: 100%;
  height: 100%;
  max-height: none !important;
  object-fit: cover;
  border-radius: 50%;
}
html[data-absensi="modern"] #dropzoneSelfieAbsensi i,
html[data-absensi="modern"] #empDropzoneSelfie i {
  font-size: 30px !important;
  color: var(--tertiary);
}

/* Elegan — krem, serif, bingkai ganda halus */
html[data-absensi="elegan"] #dropzoneSelfieAbsensi,
html[data-absensi="elegan"] #empDropzoneSelfie {
  min-height: 190px;
  margin: 12px auto;
  background: #FBF6EA;
  color: #4A3B1E;
  border: 1px solid #C9A96E;
  outline: 1px solid #E7D7B0;
  outline-offset: 5px;
  border-radius: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: .02em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(74, 59, 30, .08);
}
html[data-absensi="elegan"] #dropzoneSelfieAbsensi img,
html[data-absensi="elegan"] #empDropzoneSelfie img {
  max-height: 150px !important;
  border-radius: 4px;
  border: 1px solid #C9A96E;
  padding: 3px;
  background: #FFFDF7;
}
html[data-absensi="elegan"] #dropzoneSelfieAbsensi i,
html[data-absensi="elegan"] #empDropzoneSelfie i {
  color: #A8864A;
  font-size: 26px !important;
}
html[data-absensi="elegan"][data-theme="dark"] #dropzoneSelfieAbsensi,
html[data-absensi="elegan"][data-theme="dark"] #empDropzoneSelfie {
  background: #211B10;
  color: #EADCBF;
  border-color: #7A6230;
  outline-color: #3D321C;
}
