/* ============================================================
   admin.css — Panel Admin PKPA PERADI DPC Tangerang Raya
   ============================================================ */

:root {
  --navy:   #0B2A66;
  --navy2:  #123A8C;
  --gold:   #C9A24B;
  --sidebar-w: 250px;
  --sidebar-bg: #0d1f4e;
  --topbar-h: 56px;
  --font: 'Inter', system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 2px 16px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; }

body.admin-body {
  font-family: var(--font);
  background: #f0f2f8;
  -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ── */
.admin-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  flex-shrink: 0;
  transition: width .25s ease;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex; align-items: center;
  padding: 1.1rem 1.25rem;
  font-size: 1rem; font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}

.text-accent { color: var(--gold) !important; }

.sidebar-nav {
  padding: .75rem .5rem;
  list-style: none;
  margin: 0;
}
.sidebar-label {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,.35);
  padding: 1rem 1rem .3rem;
  white-space: nowrap;
}
.sidebar-nav .nav-link {
  color: rgba(255,255,255,.75) !important;
  font-size: .875rem; font-weight: 500;
  padding: .55rem 1rem;
  border-radius: 8px;
  display: flex; align-items: center;
  transition: all .2s;
  white-space: nowrap;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff !important; }
.sidebar-nav .nav-link.active { background: var(--navy2); color: #fff !important; box-shadow: 0 2px 8px rgba(18,58,140,.4); }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}

/* Collapsed sidebar */
#wrapper.sidebar-collapsed .admin-sidebar { width: 0; }
#wrapper.sidebar-collapsed #page-content-wrapper { margin-left: 0; }

/* ── Topbar ── */
.admin-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid #e5e9f2;
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 100;
}

/* ── Cards ── */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  border: 1px solid #e5e9f2;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.25rem;
}
.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .78rem; color: #6b7a99; font-weight: 500; }

/* ── Card wrapper ── */
.card { border: 1px solid #e5e9f2; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: #fff; border-bottom: 1px solid #e5e9f2; font-weight: 600; }

/* ── DataTables ── */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  border: 1px solid #d0d7e8;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .875rem;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--navy2); outline: none; box-shadow: 0 0 0 .15rem rgba(18,58,140,.15); }
table.dataTable thead th { background: #f8f9fd; color: var(--navy); font-size: .82rem; font-weight: 700; border-bottom: 2px solid #d0d7e8; }
table.dataTable tbody tr:hover { background: #f4f6fb; }

/* ── Buttons ── */
.btn-navy { background: var(--navy); color: #fff; border: none; }
.btn-navy:hover { background: var(--navy2); color: #fff; }

/* ── Badge ── */
.badge { font-weight: 600; font-size: .75rem; letter-spacing: .3px; }

/* ── Footer ── */
.admin-footer { background: #fff; border-top: 1px solid #e5e9f2; font-size: .78rem; }

/* ── Form ── */
.form-control:focus, .form-select:focus {
  border-color: var(--navy2);
  box-shadow: 0 0 0 .2rem rgba(18,58,140,.12);
}

/* ── Login page ── */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #1a4db3 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo {
  width: 60px; height: 60px;
  background: var(--gold);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.8rem; color: var(--navy);
  margin: 0 auto 1.25rem;
}

@media (max-width: 767px) {
  .admin-sidebar { width: 0; position: fixed; z-index: 200; height: 100vh; }
  #wrapper.sidebar-open .admin-sidebar { width: var(--sidebar-w); }
}
