/*
 * SiAnggar — style.css
 * Letakkan kustom CSS Anda di sini.
 * Bootstrap 5.3 sudah di-load via CDN di header.php
 */

/* ============================================================
   LAYOUT
   ============================================================ */
:root {
  --sidebar-width: 240px;
  --topbar-height: 56px;
}

body {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: #1e293b;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  transition: transform .25s ease;
}

.sidebar-brand {
  padding: 1.1rem 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid #334155;
}

.sidebar-section {
  padding: .5rem 1.25rem .2rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: .5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.25rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13.5px;
  transition: background .15s, color .15s;
}
.sidebar-link:hover { background: #334155; color: #e2e8f0; }
.sidebar-link.active { background: #0ea5e9; color: #fff; }

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #334155;
  padding: .5rem 0;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  gap: .75rem;
  position: sticky;
  top: 0;
  z-index: 900;
}
.topbar-title { font-weight: 600; font-size: 15px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }

.btn-toggle-sidebar {
  background: none; border: none; font-size: 1.3rem;
  color: #64748b; cursor: pointer; padding: .2rem .4rem;
  display: none;
}

.btn-icon {
  background: none; border: none; font-size: 1.15rem;
  color: #64748b; cursor: pointer; padding: .35rem .5rem;
  border-radius: 8px; transition: background .15s;
}
.btn-icon:hover { background: #f1f5f9; }

/* ============================================================
   PAGE BODY
   ============================================================ */
.page-body { padding: 1.5rem; flex: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.card-header {
  display: flex; align-items: center; gap: .5rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600; font-size: 14px;
  background: transparent;
}
.card-footer {
  padding: .6rem 1rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.blue   { background:#eff6ff; color:#3b82f6; }
.stat-icon.green  { background:#f0fdf4; color:#22c55e; }
.stat-icon.amber  { background:#fffbeb; color:#f59e0b; }
.stat-icon.purple { background:#faf5ff; color:#a855f7; }
.stat-icon.cyan   { background:#ecfeff; color:#06b6d4; }
.stat-icon.red    { background:#fef2f2; color:#ef4444; }
.stat-info .label { font-size: 12px; color: #64748b; }
.stat-info .value { font-size: 1.5rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.stat-info .sub   { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* ============================================================
   TABLE
   ============================================================ */
.table th { font-size: 12px; font-weight: 600; color: #64748b; white-space: nowrap; }
.table td { font-size: 13px; vertical-align: middle; }

/* ============================================================
   BADGE STATUS
   ============================================================ */
.badge-status {
  display: inline-block; padding: .25em .65em;
  border-radius: 999px; font-size: 11px; font-weight: 600;
}
.bs-draft      { background:#f1f5f9; color:#475569; }
.bs-menunggu   { background:#fef9c3; color:#854d0e; }
.bs-disetujui  { background:#dcfce7; color:#15803d; }
.bs-ditolak    { background:#fee2e2; color:#991b1b; }
.bs-revisi     { background:#fce7f3; color:#9d174d; }

/* ============================================================
   NOTIFIKASI
   ============================================================ */
.notif-dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; border-radius: 999px;
  background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-dropdown { width: 320px; padding: 0; }
.notif-header {
  padding: .7rem 1rem; font-weight: 600; font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
  display: flex; align-items: center;
}
.notif-item {
  display: flex; gap: .75rem; padding: .75rem 1rem;
  text-decoration: none; color: inherit;
  border-bottom: 1px solid #f8fafc;
  transition: background .12s;
}
.notif-item:hover { background: #f8fafc; }
.notif-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px;
}
.notif-sukses    .notif-icon { background:#dcfce7; color:#15803d; }
.notif-peringatan .notif-icon { background:#fef9c3; color:#92400e; }
.notif-error     .notif-icon { background:#fee2e2; color:#991b1b; }
.notif-info      .notif-icon { background:#eff6ff; color:#1d4ed8; }
.notif-judul   { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-pesan   { font-size: 11px; color: #64748b; }
.notif-time    { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.notif-empty   { padding: 1.5rem 1rem; text-align: center; color: #94a3b8; font-size: 13px; }
.notif-footer  { display: block; text-align: center; padding: .6rem; font-size: 12px; color: #3b82f6; border-top: 1px solid #f1f5f9; }
.badge-notif {
  min-width: 18px; height: 18px;
  background: #ef4444; color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ============================================================
   USER CHIP (topbar)
   ============================================================ */
.user-chip {
  display: flex; align-items: center; gap: .45rem;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: .35rem .75rem .35rem .4rem;
  font-size: 13px; font-weight: 600; color: #1e293b;
  cursor: pointer; transition: background .15s;
}
.user-chip:hover { background: #e2e8f0; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #3b82f6; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* ============================================================
   KODE TEXT
   ============================================================ */
.kode-text {
  background: #f1f5f9; padding: .2em .5em;
  border-radius: 4px; font-size: 12px; color: #0f172a;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-xs { padding: .2rem .5rem; font-size: 12px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; color: #94a3b8; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; }
.empty-state p { font-size: 13px; margin: 0; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
body.login-page {
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9; margin: 0;
}
.login-box {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 2.5rem 2rem;
  width: 100%; max-width: 400px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}
.login-logo { font-size: 1.5rem; font-weight: 800; color: #1e293b; text-align: center; }
.login-subtitle { text-align: center; color: #64748b; font-size: 13px; margin-bottom: 1.75rem; }
.login-footer { text-align: center; color: #94a3b8; font-size: 11px; margin-top: 1.5rem; }
.btn-pwd-toggle { background: #f8fafc; border-color: #dee2e6; cursor: pointer; }

/* ============================================================
   RESPONSIVE MOBILE
   ============================================================ */
@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,.2);
  }
  .main-content { margin-left: 0; }
  .btn-toggle-sidebar { display: inline-flex; }

  #sidebarOverlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 999;
  }
}

/* ============================================================
   CARD ACTION LINK
   ============================================================ */
.card-action-link {
  transition: box-shadow .15s, transform .15s;
}
.card-action-link:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-1px);
}
