/* =====================================================================
   HRMS PAYROLL — THEME
   Palet: navy (kepercayaan/korporat) + gold (aksen nominal/uang)
   Tipografi: Plus Jakarta Sans (satu keluarga font, beberapa berat)
   ===================================================================== */

:root {
  --brand-navy:        #12233F;
  --brand-navy-light:  #1B3A63;
  --brand-navy-soft:   #EAF0F7;
  --brand-gold:        #C99A2E;
  --brand-gold-soft:   #FBF3DF;
  --brand-teal:        #1E7F72;
  --brand-bg:           #F4F6F9;
  --brand-ink:          #1B2233;
  --brand-muted:        #6B7686;
  --brand-border:       #E4E8EF;
  --radius-md: 0.65rem;
  --radius-lg: 0.9rem;

  --bs-body-bg: var(--brand-bg);
  --bs-body-color: var(--brand-ink);
  --bs-border-radius: var(--radius-md);
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: var(--radius-lg);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--brand-bg);
  color: var(--brand-ink);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand-navy);
}

a { color: var(--brand-navy); }
a:hover { color: var(--brand-navy-light); }

/* ---------------------------------------------------------------------
   TOPBAR
   --------------------------------------------------------------------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
  color: var(--brand-gold);
  font-size: 1.1rem;
}

.brand-text {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-navy);
}

.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  font-weight: 700;
  font-size: 0.9rem;
}

.role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-gold);
}

.user-chip { padding-right: 0.5rem; border-right: 1px solid var(--brand-border); }

.btn-logout {
  border: 1px solid var(--brand-border);
  color: var(--brand-navy);
  background: #fff;
}
.btn-logout:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ---------------------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------------------- */
.app-body { min-height: calc(100vh - 64px); }

.app-sidebar {
  width: 250px;
  min-width: 250px;
  background: linear-gradient(180deg, var(--brand-navy) 0%, #0C1B30 100%);
  color: #C9D3E0;
}

.sidebar-section {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7C8BA3;
  padding: 0 0.75rem;
  margin-bottom: 0.25rem;
}

.app-sidebar .nav-link {
  color: #C9D3E0;
  border-radius: var(--radius-md);
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.app-sidebar .nav-link i { font-size: 1rem; width: 1.1rem; text-align: center; }

.app-sidebar .nav-link:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.app-sidebar .nav-link.active {
  background: var(--brand-gold);
  color: var(--brand-navy);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
   CARDS & TABLES
   --------------------------------------------------------------------- */
.card {
  border: 1px solid var(--brand-border);
  box-shadow: 0 1px 2px rgba(18, 35, 63, 0.04);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid var(--brand-border);
  font-weight: 700;
  color: var(--brand-navy);
}

.card-summary {
  border-left: 4px solid var(--brand-navy);
}
.card-summary.accent-gold  { border-left-color: var(--brand-gold); }
.card-summary.accent-teal  { border-left-color: var(--brand-teal); }
.card-summary.accent-danger{ border-left-color: #C24B4B; }

.card-summary .stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  font-size: 1.15rem;
}
.card-summary.accent-gold .stat-icon   { background: var(--brand-gold-soft); color: #9C7A1F; }
.card-summary.accent-teal .stat-icon   { background: #E4F3F0; color: var(--brand-teal); }
.card-summary.accent-danger .stat-icon { background: #FBEAEA; color: #C24B4B; }

table.dataTable-simple thead,
.table-dark {
  --bs-table-bg: var(--brand-navy);
  background-color: var(--brand-navy);
}

.table > :not(caption) > * > * { vertical-align: middle; }

/* ---------------------------------------------------------------------
   BUTTONS & FORMS
   --------------------------------------------------------------------- */
.btn-primary {
  --bs-btn-bg: var(--brand-navy);
  --bs-btn-border-color: var(--brand-navy);
  --bs-btn-hover-bg: var(--brand-navy-light);
  --bs-btn-hover-border-color: var(--brand-navy-light);
  --bs-btn-active-bg: var(--brand-navy-light);
  --bs-btn-focus-shadow-rgb: 18, 35, 63;
  font-weight: 600;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-navy);
  --bs-btn-border-color: var(--brand-navy);
  --bs-btn-hover-bg: var(--brand-navy);
  --bs-btn-hover-border-color: var(--brand-navy);
}

.form-control:focus, .form-select:focus {
  border-color: var(--brand-navy-light);
  box-shadow: 0 0 0 0.2rem rgba(18, 35, 63, 0.12);
}

.badge.bg-primary { background-color: var(--brand-navy) !important; }

/* Nilai uang ditonjolkan dengan warna gold-gelap agar mudah dipindai mata */
.money-figure { color: #8A6A1E; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   LOGIN / SETUP PAGE
   --------------------------------------------------------------------- */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(201,154,46,0.12), transparent 40%),
    linear-gradient(155deg, var(--brand-navy) 0%, #0C1B30 100%);
}

.auth-card {
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(6, 14, 28, 0.35);
}

.auth-side {
  background: linear-gradient(165deg, var(--brand-navy-light) 0%, var(--brand-navy) 60%, #0C1B30 100%);
  color: #fff;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.auth-side .brand-mark { background: rgba(255,255,255,0.12); color: var(--brand-gold); width: 52px; height: 52px; font-size: 1.4rem; }
.auth-side h5 { color: #fff; }
.auth-side p { color: #B9C6DA; }

/* ---------------------------------------------------------------------
   PRINT (dipakai halaman payroll)
   --------------------------------------------------------------------- */
@media print {
  .no-print, nav.topbar, aside.app-sidebar { display: none !important; }
  main { padding: 0 !important; }
  body { background: #fff !important; }
}
