/* ==========================================================================
   SecureEdge DPDP — application theme
   Loaded after the template stylesheet: re-brands its colour tokens and
   provides the application shell (sidebar, topbar), components and the few
   utilities the template build does not include. Light + dark (html.dark).
   ========================================================================== */

:root {
  --dp-brand: #3056d3;          /* SecureEdge blue */
  --dp-brand-2: #0ea5a4;        /* teal accent */
  --dp-brand-ink: #1e3a8a;
  --dp-bg: #f4f6fb;
  --dp-surface: #ffffff;
  --dp-surface-2: #f8fafd;
  --dp-line: #e3e8f1;
  --dp-text: #1b2537;
  --dp-muted: #61708a;
  --dp-success: #15803d;
  --dp-success-bg: #e7f6ec;
  --dp-warn: #b45309;
  --dp-warn-bg: #fdf3e2;
  --dp-danger: #c2353a;
  --dp-danger-bg: #fdecec;
  --dp-info-bg: #eaf0ff;
  --dp-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px rgba(16, 24, 40, .05);
  --dp-radius: 14px;
  --dp-sidebar-w: 272px;

  /* Re-brand the template tokens (used by text-primary, bg-primary/10, btn-primary, …). */
  --color-primary: #3056d3;
  --color-secondary: #0ea5a4;
  --color-error: #c2353a;
}

:root.dark {
  --dp-bg: #0b1220;
  --dp-surface: #111a2e;
  --dp-surface-2: #0f1729;
  --dp-line: #22304c;
  --dp-text: #e6ecf7;
  --dp-muted: #93a2bd;
  --dp-brand: #6b8cff;
  --dp-brand-ink: #c7d4ff;
  --dp-success: #4ade80;
  --dp-success-bg: rgba(74, 222, 128, .12);
  --dp-warn: #fbbf24;
  --dp-warn-bg: rgba(251, 191, 36, .12);
  --dp-danger: #f87171;
  --dp-danger-bg: rgba(248, 113, 113, .12);
  --dp-info-bg: rgba(107, 140, 255, .14);
  --dp-shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --color-primary: #6b8cff;
  --color-n0: #111a2e;
}

/* ---------- Base ---------- */
html, body { background: var(--dp-bg); color: var(--dp-text); }
body.dp-body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; display: block !important; }
.dp-body a { color: inherit; }
.dp-body h1, .dp-body h2, .dp-body h3, .dp-body h4, .dp-body h5 { color: var(--dp-text); font-weight: 650; letter-spacing: -.01em; }
.dp-main h3 { font-size: 1.45rem; }
.dp-main h4 { font-size: 1.05rem; }
.dp-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--dp-brand); color: #fff; padding: 8px 12px; border-radius: 8px; }
.dp-skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--dp-brand); outline-offset: 2px; }

/* ---------- Shell ---------- */
.dp-shell { background: linear-gradient(to right, var(--dp-surface) calc(var(--dp-sidebar-w) - 1px), var(--dp-line) calc(var(--dp-sidebar-w) - 1px), var(--dp-line) var(--dp-sidebar-w), transparent var(--dp-sidebar-w)); display: grid; grid-template-columns: var(--dp-sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.dp-main-col { display: flex; flex-direction: column; min-width: 0; }
.dp-main { flex: 1; padding: 28px 32px 40px; max-width: 1480px; width: 100%; }
.dp-main:focus { outline: none; }

.dp-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--dp-surface); border-right: 1px solid var(--dp-line); display: flex; flex-direction: column; z-index: 40; }
.dp-sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; }
.dp-brand-link { text-decoration: none; }
.dp-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--dp-text); }
.dp-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.dp-logo-text strong { font-size: 17px; letter-spacing: -.01em; }
.dp-logo-text span { font-size: 11.5px; color: var(--dp-muted); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }

.dp-org-chip { margin: 0 14px 10px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--dp-line); border-radius: 12px; background: var(--dp-surface-2); text-decoration: none; }
.dp-org-chip:hover { border-color: var(--dp-brand); }
.dp-org-chip > i { margin-left: auto; color: var(--dp-muted); }
.dp-org-avatar { flex: 0 0 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--dp-brand), var(--dp-brand-2)); color: #fff; font-weight: 700; display: grid; place-items: center; }
.dp-org-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.dp-org-meta strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-org-meta small { font-size: 11.5px; color: var(--dp-muted); }

.dp-nav { padding: 4px 10px 12px; flex: 1; }
.dp-nav-group { margin-bottom: 2px; }
.dp-nav-group summary { font-size: 12px !important; line-height: 1.3 !important; list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--dp-muted); user-select: none; }
.dp-nav-group summary::-webkit-details-marker { display: none; }
.dp-nav-group summary:hover { color: var(--dp-text); }
.dp-nav-group summary > i:first-child { font-size: 17px; }
.dp-chev { margin-left: auto; transition: transform .2s; }
.dp-nav-group[open] .dp-chev { transform: rotate(180deg); }
.dp-nav-group ul { margin: 2px 0 8px; padding: 0; list-style: none; }
.dp-nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; margin: 1px 0; border-radius: 10px; text-decoration: none; font-size: 14px; color: var(--dp-text); }
.dp-nav-link i { font-size: 18px; color: var(--dp-muted); width: 20px; text-align: center; }
.dp-nav-link:hover { background: var(--dp-surface-2); }
.dp-nav-link.is-active { background: var(--dp-info-bg); color: var(--dp-brand); font-weight: 600; }
.dp-nav-link.is-active i { color: var(--dp-brand); }

.dp-sidebar-foot { padding: 12px 14px 18px; border-top: 1px solid var(--dp-line); }
.dp-progress-mini { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: var(--dp-surface-2); text-decoration: none; font-size: 12.5px; color: var(--dp-muted); }
.dp-progress-mini strong { color: var(--dp-text); font-size: 14px; }

/* Topbar */
.dp-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 12px 32px; background: color-mix(in srgb, var(--dp-surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--dp-line); }
.dp-topbar-title { font-weight: 600; }
.dp-search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--dp-line); border-radius: 999px; background: var(--dp-surface-2); }
.dp-search:focus-within { border-color: var(--dp-brand); }
.dp-search i { color: var(--dp-muted); font-size: 18px; }
.dp-search input { flex: 1; border: 0 !important; background: transparent !important; padding: 9px 0 !important; outline: none; font-size: 14px; color: var(--dp-text); }
.dp-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.dp-icon-btn { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--dp-line); background: var(--dp-surface); color: var(--dp-text); font-size: 20px; cursor: pointer; list-style: none; }
.dp-icon-btn::-webkit-details-marker { display: none; }
.dp-icon-btn:hover { border-color: var(--dp-brand); color: var(--dp-brand); }
.dp-dot { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--dp-danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.dp-show-dark { display: none; }
:root.dark .dp-show-dark { display: inline; }
:root.dark .dp-show-light { display: none; }

.dp-menu { position: relative; }
.dp-menu > summary { list-style: none; cursor: pointer; }
.dp-menu > summary::-webkit-details-marker { display: none; }
.dp-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 6px; background: var(--dp-surface); border: 1px solid var(--dp-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); z-index: 50; }
.dp-menu-wide { min-width: 340px; }
.dp-menu-wide .dp-menu-item { position: relative; padding-left: 18px; }
.dp-menu-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--dp-line); margin-bottom: 4px; }
.dp-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--dp-text); background: none; border: 0; cursor: pointer; }
.dp-menu-wide .dp-menu-item { flex-direction: column; align-items: flex-start; gap: 0; }
.dp-menu-item small { color: var(--dp-muted); font-size: 12px; }
.dp-menu-item:hover { background: var(--dp-surface-2); }
.dp-menu-item.is-unread span { font-weight: 600; }
.dp-menu-item.is-unread::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dp-brand); position: absolute; left: 4px; margin-top: 8px; }
.dp-menu-empty { padding: 14px 10px; color: var(--dp-muted); font-size: 14px; }
.dp-link { background: none; border: 0; color: var(--dp-brand); cursor: pointer; font-size: 13px; padding: 0; }
.dp-user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--dp-line); background: var(--dp-surface); }
.dp-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--dp-brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.dp-user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.dp-user-meta strong { font-size: 13.5px; }
.dp-user-meta small { font-size: 11.5px; color: var(--dp-muted); }

.dp-footer { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding: 18px 32px; border-top: 1px solid var(--dp-line); color: var(--dp-muted); font-size: 13px; }
.dp-footer a { color: var(--dp-brand); }

.dp-only-mobile { display: none; }
.dp-scrim { display: none; }

@media (max-width: 1024px) {
  .dp-shell { grid-template-columns: minmax(0, 1fr); }
  .dp-sidebar { position: fixed; left: 0; top: 0; width: var(--dp-sidebar-w); transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  body.dp-sidebar-open .dp-sidebar { transform: none; }
  body.dp-sidebar-open .dp-scrim { display: block; position: fixed; inset: 0; background: rgba(10, 16, 30, .4); z-index: 35; }
  .dp-only-mobile { display: inline-grid; }
  .dp-main, .dp-topbar, .dp-footer { padding-left: 16px; padding-right: 16px; }
  .dp-user-meta, .dp-search input::placeholder { font-size: 0; }
  .dp-user-meta { display: none; }
}

/* ---------- Plain (sign-in / portal) layout ---------- */
.dp-plain-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: var(--dp-surface); border-bottom: 1px solid var(--dp-line); }
.dp-portal-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.dp-portal-brand span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.dp-portal-brand small { color: var(--dp-muted); font-size: 12px; }
.dp-portal-nav { display: flex; gap: 18px; margin-left: auto; margin-right: 12px; font-size: 14px; }
.dp-portal-nav a { text-decoration: none; color: var(--dp-muted); }
.dp-portal-nav a:hover { color: var(--dp-brand); }
.dp-plain-main { max-width: 480px; margin: 48px auto; padding: 0 16px; }
.dp-plain-main.is-wide { max-width: 820px; }
.dp-plain-title { font-size: 1.4rem; margin-bottom: 16px; }
.dp-plain-foot { text-align: center; color: var(--dp-muted); font-size: 12.5px; margin-top: 18px; }
.dp-plain .box label { display: block; }

/* ---------- Components (also restyles template classes used by module pages) ---------- */
.dp-body .box { background: var(--dp-surface) !important; border: 1px solid var(--dp-line); border-radius: var(--dp-radius); box-shadow: var(--dp-shadow); padding: 20px 22px; }
.dp-body .box.bg-primary\/10 { background: var(--dp-info-bg) !important; border-color: transparent; color: var(--dp-brand-ink); }
.dp-body .box.bg-error\/10 { background: var(--dp-danger-bg) !important; border-color: transparent; color: var(--dp-danger); }
.dp-body .bb-dashed { border-bottom: 1px dashed var(--dp-line); }
.dp-body .text-primary { color: var(--dp-brand) !important; }
.dp-body .text-error { color: var(--dp-danger) !important; }

.dp-body .btn-primary, .dp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--dp-brand); background: var(--dp-brand); color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; transition: filter .15s; }
.dp-body .btn-primary:hover, .dp-btn:hover { filter: brightness(1.08); }
.dp-btn-ghost { background: transparent; color: var(--dp-brand) !important; }
.dp-body button:not(.btn-primary):not(.dp-icon-btn):not(.dp-menu-item):not(.dp-link):not(.dp-btn) { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--dp-line); background: var(--dp-surface); color: var(--dp-text); font-size: 13.5px; cursor: pointer; }
.dp-body button:not(.btn-primary):not(.dp-icon-btn):not(.dp-menu-item):not(.dp-link):not(.dp-btn):hover { border-color: var(--dp-brand); color: var(--dp-brand); }
.dp-body button:disabled { opacity: .5; cursor: not-allowed; }

.dp-body input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]),
.dp-body select, .dp-body textarea { background: var(--dp-surface); color: var(--dp-text); border: 1px solid var(--dp-line); border-radius: 9px; padding: 8px 11px; font-size: 14px; max-width: 100%; }
.dp-body input:focus, .dp-body select:focus, .dp-body textarea:focus { border-color: var(--dp-brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--dp-brand) 18%, transparent); }
.dp-body label { font-size: 14px; color: var(--dp-text); }
.dp-body input[type=checkbox], .dp-body input[type=radio] { accent-color: var(--dp-brand); }

.dp-main table { width: 100%; border-collapse: collapse; }
.dp-main th { text-align: start; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--dp-muted); padding: 10px 8px; border-bottom: 1px solid var(--dp-line); }
.dp-main td { padding: 10px 8px; vertical-align: top; }
.dp-main tbody tr:hover { background: var(--dp-surface-2); }
.dp-main nav[role=navigation] svg { width: 18px; height: 18px; }

/* Page header */
.dp-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.dp-eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--dp-brand); margin-bottom: 4px; }
.dp-page-head h1 { font-size: 1.7rem; margin: 0; }
.dp-page-head p { color: var(--dp-muted); margin: 4px 0 0; max-width: 760px; }

/* KPI tiles */
.dp-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.dp-kpi { background: var(--dp-surface); border: 1px solid var(--dp-line); border-radius: var(--dp-radius); padding: 16px 18px; box-shadow: var(--dp-shadow); text-decoration: none; display: block; }
a.dp-kpi:hover { border-color: var(--dp-brand); }
.dp-kpi-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dp-muted); font-weight: 550; }
.dp-kpi-label i { font-size: 18px; color: var(--dp-brand); }
.dp-kpi-value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; color: var(--dp-text); }
.dp-kpi-sub { font-size: 12.5px; color: var(--dp-muted); }
.dp-kpi.is-alert .dp-kpi-value { color: var(--dp-danger); }

/* Cards / grid */
.dp-grid { display: grid; gap: 16px; }
.dp-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dp-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .dp-grid-2, .dp-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.dp-card { background: var(--dp-surface); border: 1px solid var(--dp-line); border-radius: var(--dp-radius); padding: 18px 20px; box-shadow: var(--dp-shadow); }
.dp-card h2 { font-size: 1.05rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.dp-card h2 i { color: var(--dp-brand); font-size: 20px; }
.dp-muted { color: var(--dp-muted); }
.dp-small { font-size: 13px; }

/* Badges */
.dp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--dp-surface-2); color: var(--dp-muted); border: 1px solid var(--dp-line); white-space: nowrap; }
.dp-badge.is-done { background: var(--dp-success-bg); color: var(--dp-success); border-color: transparent; }
.dp-badge.is-partial { background: var(--dp-warn-bg); color: var(--dp-warn); border-color: transparent; }
.dp-badge.is-planned { background: var(--dp-surface-2); color: var(--dp-muted); }
.dp-badge.is-info { background: var(--dp-info-bg); color: var(--dp-brand); border-color: transparent; }
.dp-badge.is-danger { background: var(--dp-danger-bg); color: var(--dp-danger); border-color: transparent; }

/* Progress */
.dp-bar { display: block; height: 8px; border-radius: 999px; background: var(--dp-line); overflow: hidden; }
.dp-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--dp-brand), var(--dp-brand-2)); }

/* Workflow (lifecycle) */
.dp-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; counter-reset: step; }
.dp-flow-step { position: relative; padding: 14px 14px 12px; border-radius: 12px; border: 1px solid var(--dp-line); background: var(--dp-surface); text-decoration: none; display: block; }
a.dp-flow-step:hover { border-color: var(--dp-brand); }
.dp-flow-step::before { counter-increment: step; content: counter(step); position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--dp-surface-2); color: var(--dp-muted); }
.dp-flow-step.is-done { border-color: color-mix(in srgb, var(--dp-success) 40%, var(--dp-line)); }
.dp-flow-step.is-done::before { background: var(--dp-success); color: #fff; content: "✓"; }
.dp-flow-step.is-partial::before { background: var(--dp-warn); color: #fff; }
.dp-flow-step i { font-size: 22px; color: var(--dp-brand); }
.dp-flow-step strong { display: block; margin-top: 6px; font-size: 14px; color: var(--dp-text); }
.dp-flow-step span { display: block; font-size: 12.5px; color: var(--dp-muted); margin-top: 2px; }

/* Prompt timeline */
.dp-steps { list-style: none; margin: 0; padding: 0; }
.dp-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; position: relative; }
.dp-step::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; background: var(--dp-line); }
.dp-step:last-child::before { display: none; }
.dp-step-num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--dp-brand), var(--dp-brand-2)); }
.dp-step-num.is-analysis { background: linear-gradient(135deg, #7c5cff, #3056d3); }
.dp-step-card { background: var(--dp-surface); border: 1px solid var(--dp-line); border-radius: var(--dp-radius); box-shadow: var(--dp-shadow); }
.dp-step-card > summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.dp-step-card > summary::-webkit-details-marker { display: none; }
.dp-step-card > summary h3 { font-size: 1.02rem; margin: 0; }
.dp-step-card > summary .dp-chev { margin-left: auto; }
.dp-step-card[open] > summary .dp-chev { transform: rotate(180deg); }
.dp-step-body { padding: 0 18px 16px; border-top: 1px solid var(--dp-line); }
.dp-step-body h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--dp-muted); margin: 14px 0 6px; }
.dp-step-body ul { margin: 0; padding-left: 20px; list-style: disc; }
.dp-step-body li { margin: 3px 0; font-size: 14px; }
.dp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dp-chip-link { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--dp-line); font-size: 13px; text-decoration: none; color: var(--dp-text); background: var(--dp-surface-2); }
.dp-chip-link:hover { border-color: var(--dp-brand); color: var(--dp-brand); }
.dp-chip-link.is-disabled { opacity: .55; pointer-events: none; }
.dp-stat-row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--dp-muted); }
.dp-stat-row strong { color: var(--dp-text); }

/* Landing */
.dp-hero { max-width: 1100px; margin: 0 auto; padding: 56px 24px 24px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.dp-hero h1 { font-size: clamp(2rem, 3.5vw, 2.9rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; }
.dp-hero p { color: var(--dp-muted); font-size: 17px; max-width: 560px; }
.dp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dp-hero-panel { background: var(--dp-surface); border: 1px solid var(--dp-line); border-radius: 18px; padding: 20px; box-shadow: var(--dp-shadow); }
.dp-section { max-width: 1100px; margin: 0 auto; padding: 24px; }
@media (max-width: 900px) { .dp-hero { grid-template-columns: minmax(0, 1fr); padding-top: 32px; } }

/* ---------- Utilities missing from the template build ---------- */
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-span-3 { grid-column: span 3 / span 3; }
@media (min-width: 768px) { .md\:col-span-4 { grid-column: span 4 / span 4; } }
@media (max-width: 900px) { .dp-main .grid-cols-2, .dp-main .grid-cols-3 { grid-template-columns: minmax(0, 1fr); } .dp-main .col-span-2, .dp-main .col-span-3 { grid-column: auto; } }
.break-all { word-break: break-all; }
.whitespace-pre-line { white-space: pre-line; }
.text-end { text-align: end; }
.max-w-md { max-width: 28rem; }
.me-3 { margin-inline-end: .75rem; }
.ms-3 { margin-inline-start: .75rem; }
.mt-16 { margin-top: 4rem; }
.ps-3 { padding-inline-start: .75rem; }
.ps-5 { padding-inline-start: 1.25rem; }
.h4 { font-size: 1.05rem; font-weight: 650; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dp-main ul.list-disc { list-style: disc; }
@media (max-width: 1024px) { .dp-shell { background: none; } }

/* Sidebar group label: the template sets span sizes globally */
.dp-nav-group summary span, .dp-nav-group summary i { font-size: 12px !important; line-height: 1.3 !important; }
.dp-nav-group summary > i:first-child { font-size: 17px !important; }
.dp-hero-panel p, .dp-hero-panel li { color: var(--dp-text); }

/* Module sub-navigation (inventory / privacy / cases _nav partials) */
.dp-main nav[aria-label] { gap: 6px !important; }
.dp-main nav[aria-label] > a { font-size: 12.5px !important; line-height: 1.2; padding: 5px 11px !important; border: 1px solid var(--dp-line); border-radius: 999px; color: var(--dp-muted); background: var(--dp-surface); text-decoration: none; }
.dp-main nav[aria-label] > a:hover { color: var(--dp-text); border-color: var(--dp-brand); }
.dp-main nav[aria-label] > a.bg-primary, .dp-main nav[aria-label] > a.font-bold { background: var(--dp-brand) !important; border-color: var(--dp-brand); color: #fff !important; font-weight: 600; }

/* ---- Module building blocks (breach, retention, compliance, reports) ---- */
.dp-table-wrap { overflow-x: auto; }
.dp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dp-table th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--dp-muted); font-weight: 650; padding: 10px 10px; border-bottom: 1px solid var(--dp-line); white-space: nowrap; }
.dp-table td { padding: 10px; border-bottom: 1px dashed var(--dp-line); vertical-align: top; }
.dp-table tr:last-child td { border-bottom: 0; }
.dp-table a { color: var(--dp-brand); font-weight: 600; text-decoration: none; }
.dp-form { display: grid; gap: 12px; }
.dp-form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.dp-field { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--dp-text); }
.dp-field small { font-weight: 400; color: var(--dp-muted); }
.dp-field input:not([type=checkbox]):not([type=radio]), .dp-field select, .dp-field textarea { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--dp-line); background: var(--dp-surface); color: var(--dp-text); font: inherit; font-weight: 400; }
.dp-field textarea { min-height: 84px; resize: vertical; }
.dp-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.dp-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.dp-filters .dp-field { min-width: 150px; }
.dp-dl { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 8px 14px; font-size: 13.5px; margin: 0; }
.dp-dl dt { color: var(--dp-muted); }
.dp-dl dd { margin: 0; overflow-wrap: anywhere; }
.dp-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dp-timeline li { position: relative; padding-left: 18px; font-size: 13px; }
.dp-timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--dp-brand); }
.dp-timeline time { display: block; color: var(--dp-muted); font-size: 12px; }
.dp-clock { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--dp-line); background: var(--dp-surface-2); margin-bottom: 16px; }
.dp-clock i { font-size: 26px; color: var(--dp-brand); }
.dp-clock.is-danger { background: var(--dp-danger-bg); border-color: transparent; }
.dp-clock.is-danger i, .dp-clock.is-danger strong { color: var(--dp-danger); }
.dp-clock.is-warn { background: var(--dp-warn-bg); border-color: transparent; }
.dp-clock.is-ok { background: var(--dp-success-bg); border-color: transparent; }
.dp-stack { display: grid; gap: 16px; align-content: start; }
.dp-layout-main { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .dp-layout-main { grid-template-columns: minmax(0, 1fr); } }
.dp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dp-note { font-size: 12.5px; color: var(--dp-muted); margin: 6px 0 0; }
.dp-alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px; }
.dp-alert.is-danger { background: var(--dp-danger-bg); color: var(--dp-danger); }
.dp-alert.is-info { background: var(--dp-info-bg); color: var(--dp-text); }
.dp-score { font-size: 2.2rem; font-weight: 750; line-height: 1; }
.dp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
details.dp-disclosure { border: 1px solid var(--dp-line); border-radius: 12px; padding: 10px 14px; background: var(--dp-surface); }
details.dp-disclosure > summary { cursor: pointer; font-weight: 650; font-size: 13.5px; }
details.dp-disclosure[open] > summary { margin-bottom: 10px; }
@media print { .dp-sidebar, .dp-topbar, .dp-footer, .dp-no-print { display: none !important; } .dp-shell { display: block; } }
