:root {
  --pdps-navy: #072f63;
  --pdps-navy-deep: #04264f;
  --pdps-blue: #0d6efd;
  --pdps-cyan: #0dcaf0;
  --pdps-sidebar-width: 172px;
  --pdps-topbar-height: 50px;
  --pdps-surface: #ffffff;
  --pdps-page: #edf3f9;
  --pdps-border: #d7e0ea;
  --pdps-muted: #6c7b8b;
  --pdps-card-radius: 11px;
}

[data-bs-theme="dark"] {
  --pdps-surface: #22272d;
  --pdps-page: #292f35;
  --pdps-border: #3b454f;
  --pdps-muted: #aeb8c2;
}

html, body { min-height: 100%; }
body {
  background: var(--pdps-page);
  font-size: .91rem;
}
a { text-underline-offset: 2px; }

/* Shell */
.pdps-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--pdps-topbar-height);
  z-index: 1040;
  background: var(--pdps-navy);
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
}
.pdps-topbar .navbar-brand img { height: 34px; width: auto; }
.pdps-topbar .form-control,
.pdps-topbar .input-group-text {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.24);
  color: #fff;
}
.pdps-topbar .form-control::placeholder { color: rgba(255,255,255,.68); }
.pdps-topbar .form-control:focus { background: rgba(255,255,255,.11); color: #fff; box-shadow: none; border-color: rgba(255,255,255,.5); }

.pdps-sidebar {
  position: fixed;
  top: var(--pdps-topbar-height);
  bottom: 0;
  left: 0;
  width: var(--pdps-sidebar-width);
  background: var(--pdps-navy-deep);
  color: #dfeaf7;
  overflow-y: auto;
  z-index: 1030;
  border-right: 1px solid rgba(255,255,255,.08);
}
.pdps-sidebar .nav-section {
  color: #6fb2ff;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 15px 14px 5px;
}
.pdps-sidebar .nav-link {
  color: #e7eff8;
  border-radius: 7px;
  margin: 2px 8px;
  padding: 8px 9px;
  font-size: .82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdps-sidebar .nav-link i { width: 16px; text-align: center; color: #57a7ff; }
.pdps-sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.pdps-sidebar .nav-link.active { background: #0b4e9b; color: #fff; font-weight: 600; }
.pdps-sidebar .nav-link.active i { color: #fff; }
.pdps-sidebar-footer {
  position: sticky;
  bottom: 0;
  background: var(--pdps-navy-deep);
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 10px 12px;
  font-size: .7rem;
  color: #9ec4ee;
}
.pdps-sidebar-footer .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #20c997; margin-right: 6px; }

.pdps-main {
  margin-left: var(--pdps-sidebar-width);
  padding-top: var(--pdps-topbar-height);
  min-height: 100vh;
}
.pdps-content { padding: 18px 20px 32px; max-width: 1800px; margin: 0 auto; }

/* Page hierarchy */
.page-eyebrow { color: var(--pdps-blue); font-size: .67rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 3px; }
.page-title { font-weight: 700; letter-spacing: -.025em; margin-bottom: 2px; font-size: clamp(1.65rem, 2vw, 2.15rem); }
.page-subtitle { color: var(--bs-secondary-color); margin: 0; }
.section-kicker { color: var(--pdps-blue); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.section-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }

/* Cards and controls */
.card {
  border-color: var(--pdps-border);
  border-radius: var(--pdps-card-radius);
  background: var(--pdps-surface);
  box-shadow: 0 1px 1px rgba(12, 38, 68, .02);
}
.card-header { background: transparent; border-bottom-color: var(--pdps-border); padding: .82rem 1rem; }
.card-body { padding: 1rem; }
.metric-card .metric-label { color: var(--bs-secondary-color); font-size: .75rem; font-weight: 600; }
.metric-card .metric-value { font-size: 1.75rem; font-weight: 700; line-height: 1.05; letter-spacing: -.035em; }
.metric-card .metric-note { color: var(--bs-secondary-color); font-size: .72rem; margin-top: 6px; }
.metric-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: rgba(13,110,253,.1); color: var(--pdps-blue); }
.metric-icon.warning { background: rgba(255,193,7,.12); color: #d99a00; }
.metric-icon.danger { background: rgba(220,53,69,.1); color: #dc3545; }
.metric-icon.success { background: rgba(25,135,84,.1); color: #198754; }
.metric-icon.info { background: rgba(13,202,240,.1); color: #0891b2; }

.table { --bs-table-bg: transparent; }
.table thead th { font-size: .72rem; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .025em; font-weight: 700; white-space: nowrap; border-bottom-width: 1px; }
.table tbody td { vertical-align: middle; }
.table-hover tbody tr:hover > * { --bs-table-bg-state: rgba(13,110,253,.035); }

.form-label { font-size: .78rem; font-weight: 600; margin-bottom: .35rem; }
.form-control, .form-select { border-color: var(--pdps-border); border-radius: 7px; }
.btn { border-radius: 7px; font-weight: 600; }
.btn-sm { font-size: .76rem; }
.badge { font-weight: 650; }

.filter-panel { background: var(--pdps-surface); border: 1px solid var(--pdps-border); border-radius: var(--pdps-card-radius); padding: 12px; }
.soft-panel { border: 1px solid var(--pdps-border); border-radius: 9px; padding: 14px; background: color-mix(in srgb, var(--pdps-surface) 94%, var(--pdps-page)); }

.demo-banner { background: #fff3cd; color: #664d03; border-bottom: 1px solid #ffecb5; padding: 5px 12px; font-size: .75rem; text-align: center; }
[data-bs-theme="dark"] .demo-banner { background: #4e3e07; color: #ffe69c; border-color: #6f5608; }


.demo-wordmark { display:inline-flex; align-items:center; gap:7px; color:#fff; font-size:1.05rem; font-weight:800; letter-spacing:-.02em; }
.demo-wordmark i { color:#57a7ff; font-size:1.2rem; }
.demo-login-mark { display:inline-flex; flex-direction:column; align-items:center; color:var(--pdps-navy); font-weight:800; font-size:1.6rem; line-height:1; }
.demo-login-mark i { color:var(--pdps-blue); font-size:2rem; margin-bottom:6px; }
.demo-login-mark small { color:var(--bs-secondary-color); font-size:.7rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-top:6px; }
[data-bs-theme="dark"] .demo-login-mark { color:#f4f7fb; }

/* Login */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(circle at 20% 10%, rgba(13,110,253,.12), transparent 32%), var(--pdps-page); }
.auth-card { width: min(440px, 100%); }
.auth-brand img { height: 48px; width: auto; }

/* Responsive */
@media (max-width: 991.98px) {
  .pdps-sidebar { display: none; }
  .pdps-main { margin-left: 0; }
  .pdps-content { padding: 16px 12px 28px; }
}
@media (min-width: 992px) {
  .offcanvas.pdps-mobile-nav { display: none !important; }
}

/* Dense dashboard helpers */
.dashboard-section { margin-top: 22px; }
.dashboard-section:first-child { margin-top: 0; }
.chart-box { position: relative; min-height: 240px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Make legacy templates look intentional without per-page rewrites. */
.pdps-content > h1:first-child,
.pdps-content > h2:first-child { font-weight: 700; letter-spacing: -.02em; }
.pdps-content > form.row { background: var(--pdps-surface); border: 1px solid var(--pdps-border); border-radius: var(--pdps-card-radius); padding: 12px; margin-left: 0; margin-right: 0; }

@media print {
  .pdps-sidebar, .pdps-topbar, .demo-banner { display: none !important; }
  .pdps-main { margin: 0; padding: 0; }
}

.demo-banner-fixed { position: fixed; top: var(--pdps-topbar-height); left: var(--pdps-sidebar-width); right: 0; z-index: 1029; }
@media (max-width: 991.98px) { .demo-banner-fixed { left: 0; } }
