/* ============================================================
   WRPC PDMS — Enterprise prototype theme
   Built on Bootstrap 5. Left sidebar admin shell.
   ============================================================ */
:root {
  --pdms-sidebar-bg: #0f2747;
  --pdms-sidebar-bg-2: #0b1f39;
  --pdms-sidebar-fg: #c7d4e6;
  --pdms-sidebar-fg-muted: #7e93b4;
  --pdms-sidebar-active: #1d4ed8;
  --pdms-accent: #1d4ed8;
  --pdms-bg: #f4f6fb;
  --pdms-card-border: #e6eaf2;
  --pdms-topbar-h: 58px;
  --pdms-sidebar-w: 260px;
}

* { scrollbar-width: thin; }
body {
  background: var(--pdms-bg);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: #1f2937;
}

/* ---------- Layout shell ---------- */
.pdms-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--pdms-sidebar-w);
  background: linear-gradient(180deg, var(--pdms-sidebar-bg), var(--pdms-sidebar-bg-2));
  color: var(--pdms-sidebar-fg);
  display: flex; flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
}
.pdms-main {
  margin-left: var(--pdms-sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.pdms-content { padding: 1.25rem 1.5rem 3rem; flex: 1; }

/* ---------- Brand ---------- */
.pdms-brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 1rem 1.15rem; color: #fff; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.pdms-brand .logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--pdms-accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  box-shadow: 0 4px 12px rgba(29,78,216,.45);
}
.pdms-brand .name { font-weight: 700; font-size: .98rem; line-height: 1.05; }
.pdms-brand .sub { font-size: .68rem; color: var(--pdms-sidebar-fg-muted); letter-spacing: .04em; }

/* ---------- Nav ---------- */
.pdms-nav { padding: .5rem .6rem 2rem; }
.pdms-nav .group-label {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--pdms-sidebar-fg-muted); padding: .9rem .75rem .35rem;
}
.pdms-nav a.nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .75rem; margin: .08rem 0; border-radius: 8px;
  color: var(--pdms-sidebar-fg); text-decoration: none; font-size: .855rem;
  white-space: nowrap;
}
.pdms-nav a.nav-item i { width: 18px; text-align: center; font-size: 1rem; opacity: .9; }
.pdms-nav a.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.pdms-nav a.nav-item.active {
  background: var(--pdms-sidebar-active); color: #fff;
  box-shadow: 0 4px 14px rgba(29,78,216,.4);
}
.pdms-nav a.nav-item .badge { margin-left: auto; }

/* ---------- Topbar ---------- */
.pdms-topbar {
  height: var(--pdms-topbar-h);
  background: #fff; border-bottom: 1px solid var(--pdms-card-border);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem; position: sticky; top: 0; z-index: 1030;
}
.pdms-topbar .page-title { font-weight: 650; font-size: 1.02rem; margin: 0; }
.pdms-topbar .crumb { font-size: .72rem; color: #94a3b8; }
.pdms-topbar .spacer { flex: 1; }
.role-pill {
  font-size: .72rem; font-weight: 600; padding: .3rem .6rem; border-radius: 999px;
  background: #eef2ff; color: #3730a3; border: 1px solid #e0e7ff;
}

/* ---------- Cards / KPIs ---------- */
.card { border: 1px solid var(--pdms-card-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--pdms-card-border); font-weight: 600; }
.kpi {
  border-radius: 12px; background: #fff; border: 1px solid var(--pdms-card-border);
  padding: 1rem 1.1rem; height: 100%;
}
.kpi .kpi-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }
.kpi .kpi-value { font-size: 1.7rem; font-weight: 700; line-height: 1.1; margin-top: .15rem; }
.kpi .kpi-icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem;
}
.kpi-icon.blue { background: #e0ecff; color: #1d4ed8; }
.kpi-icon.green { background: #dcfce7; color: #16a34a; }
.kpi-icon.amber { background: #fef3c7; color: #d97706; }
.kpi-icon.red { background: #fee2e2; color: #dc2626; }
.kpi-icon.violet { background: #ede9fe; color: #7c3aed; }
.kpi-icon.slate { background: #e2e8f0; color: #475569; }

/* ---------- Tables ---------- */
.table { font-size: .85rem; }
.table > thead th {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  color: #6b7280; font-weight: 600; border-bottom: 2px solid var(--pdms-card-border);
  white-space: nowrap;
}
.table > tbody td { vertical-align: middle; }
.table-hover > tbody > tr:hover { background: #f8faff; }

/* ---------- Status badges ---------- */
.badge.s-green  { background: #dcfce7; color: #15803d; }
.badge.s-amber  { background: #fef3c7; color: #b45309; }
.badge.s-red    { background: #fee2e2; color: #b91c1c; }
.badge.s-blue   { background: #dbeafe; color: #1e40af; }
.badge.s-slate  { background: #e2e8f0; color: #475569; }
.badge.s-violet { background: #ede9fe; color: #6d28d9; }
.badge { font-weight: 600; padding: .32em .6em; border-radius: 6px; font-size: .72rem; }

/* ---------- Reconciliation buzzer ---------- */
.buzzer {
  border: 1px solid #fecaca; background: linear-gradient(90deg,#fff5f5,#fff);
  border-left: 4px solid #dc2626; border-radius: 12px; padding: .9rem 1.1rem;
  display: flex; align-items: center; gap: .9rem;
}
.buzzer .dot {
  width: 14px; height: 14px; border-radius: 50%; background: #dc2626;
  box-shadow: 0 0 0 0 rgba(220,38,38,.5); animation: buzz 1.6s infinite;
}
@keyframes buzz {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
  70% { box-shadow: 0 0 0 12px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* ---------- Misc ---------- */
.page-actions .btn { font-size: .82rem; }
.filter-bar { background:#fff; border:1px solid var(--pdms-card-border); border-radius:12px; padding:.75rem 1rem; }
.text-tiny { font-size: .72rem; }
.login-wrap { min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 70% -10%, #1d4ed8 0%, #0f2747 45%, #0b1f39 100%); }
.login-card { width: 100%; max-width: 410px; }
.empty-state { text-align: center; padding: 3rem 1rem; color: #94a3b8; }
.empty-state i { font-size: 2.4rem; }
a { text-decoration: none; }
.detail-row dt { color:#6b7280; font-weight:600; font-size:.74rem; text-transform:uppercase; letter-spacing:.03em; }
.detail-row dd { font-size:.9rem; margin-bottom:.85rem; }
