:root {
  --brand-primary: #2563eb;
  --brand-primary-dark: #1d4ed8;
  --brand-secondary: #0ea5e9;
  --brand-dark: #0f172a;
  --sidebar-bg: #111827;
  --sidebar-hover: #1f2937;
  --bg-soft: #f4f6fb;
  --radius: 14px;
}

body {
  background-color: var(--bg-soft);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e293b;
}

/* ===== Login Page ===== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #0ea5e9 100%);
  padding: 20px;
}
.login-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
  max-width: 900px;
  width: 100%;
}
.login-brand {
  background: linear-gradient(160deg, #1e3a8a, #2563eb 60%, #0ea5e9);
  color: #fff;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.login-brand .icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 20px;
}
.login-form-side {
  padding: 48px 40px;
  background: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}
.btn-brand {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  transition: 0.2s;
}
.btn-brand:hover {
  filter: brightness(1.08);
  color: #fff;
}

/* ===== Layout ===== */
.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 260px;
  background: var(--sidebar-bg);
  color: #cbd5e1;
  z-index: 1030;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.app-sidebar .brand {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.app-sidebar .brand .badge-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 18px;
}
.app-sidebar .brand-text h6 { color:#fff; margin:0; font-weight:600; font-size:14px;}
.app-sidebar .brand-text small { color:#94a3b8; font-size: 11px;}

.app-sidebar .nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 16px 20px 6px;
}
.app-sidebar .nav-link {
  color: #cbd5e1;
  padding: 11px 20px;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid transparent;
  border-radius: 0;
}
.app-sidebar .nav-link i { width: 20px; text-align: center; font-size: 16px; }
.app-sidebar .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.app-sidebar .nav-link.active {
  background: var(--sidebar-hover);
  color: #fff;
  border-left-color: var(--brand-secondary);
  font-weight: 600;
}

.app-main {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app-topbar {
  background: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.app-content {
  padding: 24px;
  flex: 1;
}
.sidebar-toggle-btn {
  display: none;
  border: none;
  background: transparent;
  font-size: 20px;
}

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.show { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .sidebar-toggle-btn { display: inline-block; }
}

/* ===== Cards / Stats ===== */
.stat-card {
  border: none;
  border-radius: var(--radius);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.stat-card .stat-icon {
  position: absolute;
  right: 16px; top: 16px;
  font-size: 40px;
  opacity: 0.35;
}
.stat-card h3 { font-weight: 700; margin-bottom: 2px;}
.stat-card small { opacity: 0.9; }
.bg-grad-blue { background: linear-gradient(135deg,#2563eb,#0ea5e9); }
.bg-grad-green { background: linear-gradient(135deg,#059669,#10b981); }
.bg-grad-orange { background: linear-gradient(135deg,#d97706,#f59e0b); }
.bg-grad-purple { background: linear-gradient(135deg,#7c3aed,#a855f7); }

.card {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
}
.card-header {
  background: #fff;
  border-bottom: 1px solid #eef1f6;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 600;
  padding: 16px 20px;
}
.table thead th {
  background: #f8fafc;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  border-bottom: 1px solid #eef1f6;
  white-space: nowrap;
}
.table td { vertical-align: middle; font-size: 14.5px; }
.badge-soft-primary { background: #dbeafe; color: #1d4ed8; }
.badge-soft-success { background: #d1fae5; color: #047857; }
.badge-soft-danger { background: #fee2e2; color: #b91c1c; }
.badge-soft-warning { background: #fef3c7; color: #b45309; }
.badge-soft-secondary { background: #e2e8f0; color: #475569; }

.avatar-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
}

/* ===== Payslip ===== */
.payslip {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.payslip-header {
  background: linear-gradient(135deg,#1e3a8a,#2563eb 60%, #0ea5e9);
  color: #fff;
  padding: 26px 28px;
}
.payslip-body { padding: 26px 28px; }
.payslip-table th, .payslip-table td { font-size: 14px; }
.payslip-total-row td { font-weight: 700; font-size: 15px; border-top: 2px solid #cbd5e1; }
.payslip-note {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92400e;
}

@media print {
  .app-sidebar, .app-topbar, .no-print { display: none !important; }
  .app-main { margin-left: 0 !important; }
  body { background: #fff !important; }
  .payslip { box-shadow: none !important; }
}

.doc-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
  background: #f1f5f9;
}
.login-side-list li { margin-bottom: 10px; display:flex; gap:10px; align-items:flex-start;}

/* ===== Announcement / Papan Informasi ===== */
.announcement-feed { display: flex; flex-direction: column; gap: 14px; }
.announcement-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px 18px 22px;
  box-shadow: 0 4px 16px rgba(15,23,42,0.06);
  display: flex;
  gap: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer;
  border-left: 5px solid var(--ann-color, #2563eb);
}
.announcement-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,0.1); }
.announcement-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: var(--ann-bg, #dbeafe);
  color: var(--ann-color, #2563eb);
}
.announcement-body { flex: 1; min-width: 0; }
.announcement-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.announcement-title { font-weight: 700; font-size: 15px; color: #1e293b; margin: 0; }
.announcement-time { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.announcement-excerpt { font-size: 13.5px; color: #64748b; margin-top: 4px; margin-bottom: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.announcement-type-badge { font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--ann-bg, #dbeafe); color: var(--ann-color, #2563eb); text-transform: uppercase; letter-spacing: .03em; }

.ann-Info { --ann-color: #2563eb; --ann-bg: #dbeafe; }
.ann-Penting { --ann-color: #dc2626; --ann-bg: #fee2e2; }
.ann-Pengumuman { --ann-color: #d97706; --ann-bg: #fef3c7; }
.ann-Acara { --ann-color: #7c3aed; --ann-bg: #ede9fe; }

.announcement-hero {
  background: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #0ea5e9);
  border-radius: 16px;
  padding: 20px 24px;
  color: #fff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.announcement-hero h5 { margin: 0; font-weight: 700; }
.announcement-hero small { opacity: .9; }

.announcement-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}
