/* ============================================================
   TEMA PROFESIONAL — "Corporate Navy"
   Dimuat SETELAH style.css; hanya mengubah tampilan (warna, radius,
   bayangan, jarak). Tidak ada perubahan struktur/fungsi.
   Rollback: hapus <link href="/css/theme-professional.css"> di index.html.

   Palet: navy #0f2238 (sidebar) · brand #1e4b7a (aksi utama)
          aksen emas #b8893b (penanda kecil saja) · latar #f4f6f9
   Warna status (badge, success/danger/warning) sengaja TIDAK diubah
   karena membawa makna fungsional.
============================================================ */

:root {
  --ink:           #0f1f33;
  --navy-900:      #0f2238;
  --navy-800:      #132b47;
  --brand:         #1e4b7a;
  --brand-hover:   #173d65;
  --brand-soft:    #e9f0f7;
  --accent:        #b8893b;
  --bg:            #f4f6f9;
  --surface:       #ffffff;
  --border:        #e2e7ee;
  --border-strong: #cfd7e2;
  --muted:         #64748b;
  --radius:        10px;
  --radius-lg:     12px;

  /* Petakan ulang variabel tema Bali lama → elemen yang masih memakainya ikut menyesuaikan */
  --bali-teak:  var(--navy-900);
  --bali-brown: var(--navy-800);
  --bali-terra: var(--brand);
  --bali-gold:  #9a7230;
  --bali-prada: #d9b46a;
  --bali-cream: var(--bg);
  --bali-stone: var(--border);
}

::selection { background: rgba(30,75,122,.16); }

body { background: var(--bg) !important; color: #1f2d3d; }

/* Fokus keyboard yang jelas (aksesibilitas) */
.btn:focus-visible, .nav-item:focus-visible, .page-btn:focus-visible,
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}

/* ── LOGIN ──────────────────────────────────────────────── */
.login-brand {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--brand) 100%) !important;
}
.login-brand::before { opacity: .035 !important; }
.login-brand::after  { background: radial-gradient(circle, rgba(184,137,59,.14) 0%, transparent 68%) !important; }
.login-feature-icon  { background: rgba(255,255,255,.08) !important; color: #d9b46a !important; }
.login-form-wrap     { background: var(--bg) !important; }
/* Desktop saja — di mobile kartu login sengaja polos (lihat style.css @media max-width:768px) */
@media (min-width: 769px) {
  .login-form-card   { border-radius: var(--radius-lg); border-color: var(--border); box-shadow: 0 8px 30px rgba(15,34,56,.08); }
}
.login-form-heading  { color: var(--ink); }
#login-page          { background: var(--bg); }

/* ── SIDEBAR ────────────────────────────────────────────── */
#sidebar { background: var(--navy-900) !important; }
#sidebar > div:first-child::after {
  background: rgba(255,255,255,.08) !important;
}
#sidebar > div:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.08) !important; }
#sidebar-clock-time { color: rgba(255,255,255,.85) !important; }
#sidebar-clock-date { color: rgba(255,255,255,.45) !important; }
#sidebar > div:last-child { border-top-color: rgba(255,255,255,.08) !important; }

.nav-item { color: #a9b6c8; border-radius: 7px; font-weight: 500; }
.nav-item:hover {
  background: rgba(255,255,255,.06) !important;
  color: #ffffff !important;
}
.nav-item.active {
  background: rgba(255,255,255,.09) !important;
  color: #ffffff !important;
  border-left: 3px solid var(--accent) !important;
  font-weight: 600;
}
.nav-section {
  color: #6f819a !important;
  font-size: 10px; letter-spacing: .12em;
  padding-top: 18px !important;
}
.nav-section::after { display: none !important; }
#sidebar-overlay { background: rgba(15,34,56,.55) !important; }

/* ── TOPBAR ─────────────────────────────────────────────── */
#topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 2px rgba(15,34,56,.04) !important;
}
#topbar::after { display: none !important; }
#page-title { color: var(--ink); font-weight: 600; }

/* ── AREA KONTEN ────────────────────────────────────────── */
@media (min-width: 769px) {
  #main-content { padding: 24px 28px; }
}

/* Judul halaman: warna solid (tanpa gradasi) agar tegas & mudah dibaca */
#main-content h1 {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ink) !important;
  letter-spacing: -0.01em !important;
}

/* ── KARTU ──────────────────────────────────────────────── */
.card {
  border-radius: var(--radius);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(15,34,56,.04);
}
.card-header {
  background: #fafbfc !important;
  border-bottom-color: var(--border) !important;
}
.card-header span.font-semibold, .card-header h2, .card-header h3 { color: var(--ink); }

.stat-card {
  border-radius: var(--radius);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(15,34,56,.04);
}
.stat-card:hover { transform: none; box-shadow: 0 4px 14px rgba(15,34,56,.07); }
.stat-card-blue { border-top-color: var(--brand); }

/* Banner sapaan dashboard: putih + garis navy */
.bali-welcome-banner {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-left: 4px solid var(--brand) !important;
  border-radius: var(--radius) !important;
}
.bali-welcome-greeting { color: var(--ink) !important; }
.bali-welcome-quote    { color: var(--muted) !important; }
.bali-welcome-icon     { color: var(--accent) !important; opacity: .45 !important; }

/* Ornamen tumpal → garis tipis netral */
.asset-section-title::after { display: none !important; }
.asset-section-title { border-bottom: 1px solid var(--border) !important; padding-bottom: 8px !important; }
.divider-tumpal {
  background: none !important; height: 0 !important; opacity: 1 !important;
  border-top: 1px solid var(--border) !important;
}
.asset-section { border-color: var(--border); border-radius: var(--radius); }

/* ── TABEL ──────────────────────────────────────────────── */
.data-table th {
  background: #f6f8fb;
  color: #5b6b80;
  font-size: 11px;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-strong);
}
.data-table td { color: #1f2d3d; border-bottom-color: #eef1f5; }
.data-table tr:hover td { background: #f5f8fc; }

/* ── FORM ───────────────────────────────────────────────── */
.form-input, .filter-select {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}
.form-input:focus, .filter-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30,75,122,.14);
}
.form-label { color: #334155; }

/* ── TOMBOL ─────────────────────────────────────────────── */
.btn { border-radius: 8px; font-weight: 500; }
.btn-sm { border-radius: 7px; }
.btn-xs { border-radius: 6px; }
.btn-primary { background: var(--brand); }
.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: none;
  box-shadow: 0 2px 8px rgba(30,75,122,.25);
}
.btn-secondary {
  background: var(--surface);
  color: #1f2d3d;
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg); border-color: #b9c4d2; }

/* ── KOMPONEN LAIN ──────────────────────────────────────── */
.page-btn { border: 1px solid var(--border-strong); border-radius: 7px; }
.page-btn.active { background: var(--brand); border-color: var(--brand); }
.loading i { color: var(--brand); }
.timeline-item::before { background: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.notif-item.unread { background: var(--brand-soft); }
.notif-dot { background: var(--brand); }
.alert { border-radius: 8px; }
.alert-info { background: var(--brand-soft); color: var(--brand-hover); border-color: #c3d3e6; }
.toast { border-radius: 10px; }
.toast-info { background: var(--brand); }
.cal-cell.cal-today, .cal-cell.cal-today.cal-has-items { background: var(--brand-soft); }

/* Modal */
#modal-overlay, #pph21-overlay { background-color: rgba(15,34,56,.45) !important; }
#modal-box, #pph21-box { border-radius: var(--radius-lg); }
#modal-title, #pph21-title { color: var(--ink); }
@media (max-width: 768px) {
  #modal-box { border-radius: 16px 16px 0 0 !important; }
}

/* ── KARTU STATISTIK: tanpa garis warna-warni (warna hanya untuk "Perlu Tindakan") ── */
.stat-card-blue, .stat-card-green, .stat-card-indigo, .stat-card-amber,
.stat-card-purple, .stat-card-teal, .stat-card-red { border-top-color: transparent; }
.stat-card { border-top-width: 3px; }

/* ── TOMBOL AKSI DI TABEL: ikon polos, tegas saat hover ─── */
.data-table .btn-icon.btn-secondary {
  background: transparent; border-color: transparent; color: #5b6b80;
}
.data-table .btn-icon.btn-secondary:hover:not(:disabled) {
  background: #eef2f7; border-color: transparent; color: var(--brand);
}
.data-table .btn-icon.btn-danger {
  background: transparent; color: #b84a3e;
}
.data-table .btn-icon.btn-danger:hover:not(:disabled) { background: #fbeceb; color: #9b2c2c; }

/* Isi sel satu baris + "…" (teks lengkap muncul di tooltip) */
.cell-clip { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── TOPBAR: lebih ringkas ───────────────────────────────── */
#bali-greeting { display: none !important; }
#user-cluster-badge { display: none !important; }   /* dipindah ke menu pengguna */
#user-menu-btn { border-radius: 8px; }
#user-menu-btn:hover { background: var(--bg); }
#user-menu a, #user-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 16px; font-size: 13.5px; color: #1f2d3d; text-align: left;
  background: none; border: none; cursor: pointer;
}
#user-menu a:hover, #user-menu button:hover { background: var(--bg); }
#user-menu i { width: 16px; text-align: center; color: #5b6b80; }
#user-menu .menu-danger, #user-menu .menu-danger i { color: #b84a3e; }

/* Footer sidebar (Notifikasi/Panduan/Profil/Keluar) dipindah ke menu pengguna di topbar,
   supaya seluruh tinggi sidebar dipakai navigasi. Elemen tetap ada untuk kompatibilitas JS. */
#sidebar > div:last-child { display: none !important; }

/* ── LOGO SIDEBAR: versi putih monokrom tanpa kotak ─────── */
#sidebar-logo {
  background: transparent !important; padding: 0 !important;
  filter: brightness(0) invert(1); opacity: .92; height: 30px !important;
}

/* ── SIDEBAR CIUT (desktop): mode ikon saja ─────────────── */
@media (min-width: 769px) {
  #sidebar.collapsed { width: 68px; }
  #sidebar.collapsed nav { padding-left: 10px; padding-right: 10px; }
  #sidebar.collapsed .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
  #sidebar.collapsed .nav-item.active { padding-left: 0; }
  #sidebar.collapsed .nav-item > span { display: none !important; }
  #sidebar.collapsed .nav-item .nav-icon { font-size: 15px; }
  #sidebar.collapsed .nav-section { font-size: 0; padding: 10px 0 4px !important; }
  #sidebar.collapsed .nav-section::before {
    content: ''; display: block; height: 1px; margin: 0 8px; background: rgba(255,255,255,.1);
  }
  #sidebar.collapsed > div:nth-child(2) { display: none !important; }   /* jam sidebar */
  #sidebar.collapsed #sidebar-logo { height: 22px !important; }
  #sidebar.collapsed > div:first-child { justify-content: center; padding-left: 8px; padding-right: 8px; }
}

/* HP kecil: jam topbar bertabrakan dengan judul halaman → sembunyikan (jam HP sudah terlihat) */
@media (max-width: 480px) {
  #system-clock { display: none !important; }
}

/* ── BANNER DASHBOARD versi korporat ─────────────────────── */
.dash-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-summary-title { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.dash-summary-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ── NAVIGASI BAWAH (MOBILE) ────────────────────────────── */
#mobile-nav {
  background: var(--navy-900) !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}
.mobile-nav-item         { color: #8fa0b6; }
.mobile-nav-item.active  { color: #ffffff !important; }
.mobile-nav-item.active i { color: #d9b46a; }
.mobile-nav-item:hover   { color: #ffffff !important; }
