:root {
  --dnc-navy: #1e293b;
  --dnc-navy-dark: #131b29;
  --dnc-navy-light: #2b3a52;
  --dnc-green: #10b05f;
  --dnc-green-dark: #0c8a49;
  --dnc-green-light: #16c96e;
  --dnc-gold: #c9a24b;
  --dnc-gold-light: #e6c876;
  --dnc-ink: #1e293b;
  --dnc-bg: #eceff1;
  --dnc-card: #ffffff;
  --dnc-border: #dde1e4;
  --dnc-danger: #d9364a;
  --dnc-radius: 10px;
  --dnc-shadow: 0 10px 30px -14px rgba(30, 41, 59, 0.25);
}

body {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  background: var(--dnc-bg);
  color: var(--dnc-ink);
}

/* ---------- Login page ---------- */
.dnc-auth-topbar {
  height: 56px;
  background: var(--dnc-navy);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 0.75rem;
}

.dnc-auth-topbar-title {
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.15;
}

.dnc-auth-topbar-title small {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.65);
}

.dnc-auth-wrap {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  background: var(--dnc-bg);
}

.dnc-auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--dnc-card);
  border-radius: var(--dnc-radius);
  box-shadow: var(--dnc-shadow);
  border: 1px solid var(--dnc-border);
  padding: 2.25rem 2rem;
}

.dnc-auth-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dnc-auth-logos img {
  height: 84px;
  width: 84px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--dnc-border);
  padding: 4px;
}

.dnc-auth-card h2 {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  text-align: center;
}

.dnc-auth-card .text-muted-sm {
  font-size: 0.86rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  text-align: center;
}

.dnc-input-group {
  position: relative;
  margin-bottom: 1.1rem;
}

.dnc-input-group .bi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a988f;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.dnc-input-group input.form-control {
  padding-left: 2.6rem;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--dnc-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dnc-input-group input.form-control:focus {
  border-color: var(--dnc-green);
  box-shadow: 0 0 0 0.2rem rgba(16, 176, 95, 0.15);
}

.dnc-input-group input.form-control:focus ~ .bi {
  color: var(--dnc-green);
}

.dnc-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8a988f;
  cursor: pointer;
  padding: 4px;
}

.dnc-btn-primary {
  height: 38px;
  padding: 0 1.1rem;
  font-size: 0.8rem;
  border-radius: 6px;
  background: var(--dnc-green);
  border: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
}

.dnc-btn-primary:hover,
.dnc-btn-primary:focus {
  background: var(--dnc-green-dark);
}

.dnc-auth-footer {
  text-align: center;
  font-size: 0.78rem;
  color: #8a988f;
  margin-top: 1.5rem;
}

/* ---------- Authenticated app shell: top navbar ---------- */
.dnc-navbar {
  background: var(--dnc-navy);
  padding: 0.5rem 1.25rem;
  box-shadow: 0 2px 10px -4px rgba(0, 0, 0, 0.3);
}

.dnc-navbar .navbar-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dnc-navbar .navbar-brand img { height: 40px; width: 40px; border-radius: 50%; background: #fff; padding: 2px; object-fit: contain; }
.dnc-navbar .navbar-brand small { display: block; font-weight: 400; font-size: 0.7rem; color: rgba(255, 255, 255, 0.6); }

.dnc-navbar .nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  padding: 0.5rem 0.55rem !important;
  border-radius: 6px;
  white-space: nowrap;
}

.dnc-navbar .nav-link .bi { margin-right: 0.3rem; }

.dnc-navbar .navbar-collapse { flex-wrap: wrap; row-gap: 0.25rem; }
.dnc-navbar .navbar-nav { flex-wrap: wrap; row-gap: 0.25rem; }
.dnc-navbar .navbar-nav.align-items-lg-center { margin-left: auto; }

.dnc-navbar .nav-link:hover,
.dnc-navbar .nav-link:focus { color: #fff; background: rgba(255, 255, 255, 0.08); }
.dnc-navbar .nav-link.active { color: #fff; background: var(--dnc-green); font-weight: 600; }

.dnc-navbar .dropdown-menu { border: none; box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.35); border-radius: 8px; }
.dnc-navbar .navbar-toggler { border-color: rgba(255, 255, 255, 0.3); }
.dnc-navbar .navbar-toggler-icon { filter: invert(1); }

.dnc-content { padding: 1.75rem; }

.dnc-card {
  background: var(--dnc-card);
  border: 1px solid var(--dnc-border);
  border-radius: var(--dnc-radius);
  box-shadow: 0 6px 20px -12px rgba(30, 41, 59, 0.15);
}

.dnc-stat-card { padding: 1.25rem 1.4rem; }
.dnc-stat-card .value { font-size: 1.9rem; font-weight: 700; color: var(--dnc-navy); }
.dnc-stat-card .label { font-size: 0.82rem; color: #6b7a70; text-transform: uppercase; letter-spacing: 0.04em; }

.dnc-badge-tier1 { background: var(--dnc-gold); color: var(--dnc-navy); }

.dnc-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.65rem;
  padding: 0.2em 0.45em;
}

.dnc-notif-menu { width: 340px; max-height: 420px; overflow-y: auto; }
.dnc-notif-list { max-height: 340px; overflow-y: auto; }
.dnc-notif-item { white-space: normal; border-bottom: 1px solid var(--dnc-border); }
.dnc-notif-item:last-child { border-bottom: none; }
.dnc-notif-unread { background: rgba(13, 110, 253, 0.06); font-weight: 600; }

.dnc-ref-link { color: #1f4e79; font-weight: 600; text-decoration: none; }
.dnc-ref-link:hover, .dnc-ref-link:focus { color: #2e6da4; text-decoration: underline; }

/* ---------- Home module launcher ---------- */
.dnc-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.dnc-module-tile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--dnc-card);
  border: 1px solid var(--dnc-border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: var(--dnc-ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dnc-module-tile:hover {
  box-shadow: 0 10px 24px -14px rgba(30, 41, 59, 0.35);
  transform: translateY(-2px);
  color: var(--dnc-ink);
}

.dnc-module-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.dnc-module-title { font-weight: 600; font-size: 0.95rem; }

.dnc-icon-blue { background: #2f8fe0; }
.dnc-icon-red { background: #d9364a; }
.dnc-icon-orange { background: #e8792c; }
.dnc-icon-dark { background: #1c1f22; }
.dnc-icon-green { background: var(--dnc-green); }
.dnc-icon-gold { background: var(--dnc-gold); color: var(--dnc-navy); }

.dnc-search-btn { width: 120px; flex: 0 0 auto; text-align: center; }

/* ---------- Department picker (module landing screens) ---------- */
.dnc-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.dnc-dept-tile {
  position: relative;
  display: block;
  background: var(--dnc-card);
  border: 1px solid var(--dnc-border);
  border-radius: var(--dnc-radius);
  padding: 1.1rem 1.25rem 1.25rem;
  text-decoration: none;
  color: var(--dnc-ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dnc-dept-tile:hover {
  box-shadow: var(--dnc-shadow);
  transform: translateY(-2px);
  color: var(--dnc-ink);
}

.dnc-dept-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.5rem;
  border-radius: 8px;
  background: var(--dnc-gold);
  color: var(--dnc-navy);
  font-weight: 700;
  font-family: Georgia, 'Times New Roman', serif;
}

.dnc-dept-count-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid var(--dnc-card);
}

.dnc-dept-count-danger { background: var(--dnc-danger); }
.dnc-dept-count-gold { background: var(--dnc-gold); color: var(--dnc-navy); }
.dnc-dept-count-green { background: var(--dnc-green); }

.dnc-dept-name { font-weight: 700; margin: 0.9rem 0 0.1rem; }
.dnc-dept-type { font-size: 0.8rem; color: #6b7280; }
.dnc-dept-overdue { font-size: 0.82rem; color: #6b7280; margin-top: 1rem; }
.dnc-dept-overdue-active {
  color: var(--dnc-danger);
  font-weight: 700;
  display: inline-block;
  animation: dnc-dept-overdue-pulse 1.2s ease-in-out infinite;
}

@keyframes dnc-dept-overdue-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* ---------- Dashboard KPI tiles ---------- */
.dnc-kpi {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: var(--dnc-radius);
  padding: 1.1rem 1.3rem;
  color: #fff;
  box-shadow: 0 10px 24px -14px rgba(30, 41, 59, 0.4);
}

.dnc-kpi-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.dnc-kpi-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.9; }
.dnc-kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.dnc-kpi-sub { font-size: 0.78rem; opacity: 0.85; }

.dnc-kpi-green { background: linear-gradient(135deg, var(--dnc-green) 0%, var(--dnc-green-light) 100%); }
.dnc-kpi-gold { background: linear-gradient(135deg, #c9a24b 0%, #e6c876 100%); }
.dnc-kpi-blue { background: linear-gradient(135deg, #2f8fe0 0%, #5db0ee 100%); }
.dnc-kpi-red { background: linear-gradient(135deg, var(--dnc-danger) 0%, #d9364a 100%); }

.dnc-table-plain { color: #495057; }
.dnc-table-plain .badge { font-size: 0.78rem; font-weight: 600; padding: 0.4em 0.75em; border-radius: 4px; }

.dnc-chart-card { padding: 1.25rem 1.4rem; }
.dnc-chart-title { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #56655c; }
.dnc-chart-wrap { position: relative; height: 300px; }

/* ---------- Dashboard activity/incident feeds ---------- */
.dnc-feed-card { padding: 1.1rem 1.3rem; }
.dnc-feed-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.dnc-feed-header h6 { font-weight: 700; margin: 0; }
.dnc-feed-header .sub { font-size: 0.78rem; color: #6b7280; }

.dnc-feed-item { display: flex; gap: 0.85rem; padding: 0.8rem 0; border-bottom: 1px solid var(--dnc-border); }
.dnc-feed-item:last-child { border-bottom: none; padding-bottom: 0.2rem; }
.dnc-feed-item:first-child { padding-top: 0.4rem; }

.dnc-feed-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.dnc-feed-icon-green { background: #e3f6ec; color: #0c8a49; }
.dnc-feed-icon-blue { background: #e2eefa; color: #1f5fa8; }
.dnc-feed-icon-gold { background: #f3ecdf; color: #8a6d1f; }
.dnc-feed-icon-pink { background: #fbe4e6; color: #b3261e; }

.dnc-feed-title { font-weight: 600; font-size: 0.86rem; color: var(--dnc-ink); line-height: 1.35; }
.dnc-feed-time { font-size: 0.76rem; color: #8a8f98; margin-top: 0.2rem; }

.dnc-feed-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dnc-feed-dot-red { background: #d9364a; }
.dnc-feed-dot-orange { background: #e8792c; }
.dnc-feed-dot-gray { background: #9aa1a9; }

/* ---------- Outline stat cards (e.g. Attendance register) ---------- */
.dnc-stat-outline {
  background: var(--dnc-card);
  border: 1px solid var(--dnc-border);
  border-left: 4px solid var(--accent, var(--dnc-green));
  border-radius: 8px;
  padding: 1rem 1.25rem;
  height: 100%;
}
.dnc-stat-outline .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; font-weight: 700; }
.dnc-stat-outline .value { font-size: 1.7rem; font-weight: 700; color: var(--dnc-ink); line-height: 1.2; margin: 0.15rem 0; }
.dnc-stat-outline .sub { font-size: 0.78rem; color: #6b7280; }

/* ---------- Attendance register ---------- */
.dnc-att-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--dnc-green-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
}

.dnc-att-status { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.28rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.dnc-att-status .bi { font-size: 0.5rem; }
.dnc-att-status-present { background: #e3f6ec; color: #0c8a49; }
.dnc-att-status-late { background: #fbf0da; color: #92660c; }
.dnc-att-status-absent { background: #fbe4e6; color: #b3261e; }
.dnc-att-status-on_leave { background: #e7ebf7; color: #33478c; }
.dnc-att-status-field_duty { background: #e2eefa; color: #1f5fa8; }

/* ---------- Document header (application/complaint/task show pages) ---------- */
.dnc-back-link {
  font-size: 0.82rem;
  color: #56655c;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.dnc-back-link:hover { color: var(--dnc-green-dark); text-decoration: underline; }

.dnc-doc-title { font-size: 1.35rem; font-weight: 700; margin: 0; color: var(--dnc-navy); }
.dnc-doc-subtitle { font-size: 0.85rem; color: #6b7280; margin: 0.2rem 0 0; }

.dnc-status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.42em 0.85em;
  border-radius: 999px;
}

/* ---------- Vertical stepper (stage progress) ---------- */
.dnc-stepper { list-style: none; margin: 0; padding: 0; }
.dnc-stepper-item { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0 0 1.1rem 0; font-size: 0.86rem; }
.dnc-stepper-item:last-child { padding-bottom: 0; }
.dnc-stepper-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: -2px;
  width: 2px;
  background: var(--dnc-border);
}
.dnc-stepper-item.dnc-stepper-done:not(:last-child)::before { background: var(--dnc-green); }

.dnc-stepper-marker {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}
.dnc-stepper-done .dnc-stepper-marker { background: var(--dnc-green); color: #fff; }
.dnc-stepper-current .dnc-stepper-marker { background: #fff; border: 2px solid var(--dnc-green); color: var(--dnc-green); }
.dnc-stepper-pending .dnc-stepper-marker { background: #eceff1; border: 1px solid var(--dnc-border); color: #9aa1a9; }

.dnc-stepper-label { flex: 1; color: #495057; }
.dnc-stepper-current .dnc-stepper-label { font-weight: 700; color: var(--dnc-ink); }
.dnc-stepper-done .dnc-stepper-label { color: #6b7280; }

.dnc-stepper-tag {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--dnc-green-dark);
  background: #e3f6ec;
  padding: 0.18em 0.55em;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ---------- Action panel grouping (show pages) ---------- */
.dnc-action-subhead {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9aa1a9;
  margin: 0.5rem 0 0.35rem;
}

/* ---------- Timeline (processing history) ---------- */
.dnc-feed-icon-gray { background: #eef0f2; color: #56605c; }

.dnc-timeline-item { position: relative; display: flex; gap: 0.9rem; padding-bottom: 1.35rem; }
.dnc-timeline-item:last-child { padding-bottom: 0; }
.dnc-timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 38px;
  bottom: -4px;
  width: 2px;
  background: var(--dnc-border);
}
.dnc-timeline-time { font-size: 0.76rem; color: #8a8f98; white-space: nowrap; }
.dnc-timeline-actor { font-size: 0.78rem; color: #8a8f98; margin-top: 0.1rem; }
.dnc-timeline-remark {
  font-size: 0.82rem;
  color: #495057;
  background: #f6f7f8;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  margin: 0.45rem 0 0;
}

/* ---------- Map viewer ---------- */
.dnc-map-wrapper { position: relative; padding: 0; }
.dnc-map { width: 100%; height: 70vh; min-height: 420px; }
.dnc-map-drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
  background: rgba(30, 41, 59, 0.55);
  font-size: 1.1rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.dnc-map-drop-hint .bi { font-size: 2.2rem; }
.dnc-map-wrapper.dnc-map-dragover .dnc-map-drop-hint { opacity: 1; }
.dnc-map-wrapper.dnc-map-dragover { outline: 3px dashed var(--dnc-green); outline-offset: -3px; }

/* ---------- Map layer list ---------- */
.dnc-layer-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 70vh; overflow-y: auto; }

.dnc-layer-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--dnc-border);
  border-radius: 8px;
  transition: background 0.1s ease;
}
.dnc-layer-item:hover { background: #f7f8f9; }

.dnc-layer-swatch { width: 11px; height: 11px; min-width: 11px; border-radius: 3px; }

.dnc-layer-body { flex: 1; min-width: 0; }
.dnc-layer-name { font-size: 0.83rem; font-weight: 600; color: var(--dnc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dnc-layer-meta { font-size: 0.72rem; color: #8a8f98; }

.dnc-layer-delete { background: none; border: none; color: #9aa1a9; padding: 2px 4px; line-height: 1; }
.dnc-layer-delete:hover { color: var(--dnc-danger); }

/* ---------- List pages: status tabs, filter bar, list table (complaints, applications, tasks, PMRU) ---------- */
.dnc-dept-monogram.dnc-dept-monogram-sm { min-width: 34px; height: 34px; font-size: 0.8rem; border-radius: 6px; }
.dnc-btn-outline-sm { height: 38px; font-size: 0.8rem; border-radius: 6px; border-color: var(--dnc-border); color: var(--dnc-ink); background: var(--dnc-card); }
.dnc-btn-outline-sm:hover, .dnc-btn-outline-sm.show { background: #f3f5f6; color: var(--dnc-ink); border-color: #c6ccd1; }
.dnc-dropdown-scroll { max-height: 360px; overflow-y: auto; font-size: 0.85rem; }
.dnc-dropdown-scroll .dropdown-item.active { background: var(--dnc-navy); }

.dnc-status-tabs { display: flex; gap: 0.25rem; padding: 0.5rem 0.75rem 0; border-bottom: 1px solid var(--dnc-border); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.dnc-status-tab { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; padding: 0.6rem 0.8rem; font-size: 0.83rem; font-weight: 600; color: #6b7280; text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dnc-status-tab:hover { color: var(--dnc-ink); }
.dnc-status-tab.active { color: var(--dnc-ink); border-bottom-color: var(--dnc-green); }
.dnc-status-tab-count { font-size: 0.72rem; font-weight: 700; background: #eef0f2; color: #4b5563; border-radius: 999px; padding: 0.1rem 0.5rem; }
.dnc-status-tab.active .dnc-status-tab-count { background: var(--dnc-navy); color: #fff; }
.dnc-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, #9ca3af); }

.dnc-filter-bar { padding: 0.9rem 1rem 1rem; margin: 0; }
.dnc-filter-bar .form-label { color: #6b7280; font-weight: 600; }
.dnc-filter-bar .btn { height: 31px; }
.dnc-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding: 0 1rem 0.9rem; }
.dnc-chip { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.76rem; font-weight: 600; color: var(--dnc-ink); background: #eef0f2; border-radius: 999px; padding: 0.2rem 0.4rem 0.2rem 0.7rem; text-decoration: none; }
.dnc-chip:hover { background: #e2e5e8; color: var(--dnc-danger); }

.dnc-results-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.75rem 1rem; font-size: 0.82rem; color: #6b7280; border-bottom: 1px solid var(--dnc-border); }
.dnc-overdue-flag { color: var(--dnc-danger); font-weight: 600; }

.dnc-list-table { font-size: 0.86rem; color: #495057; }
.dnc-list-table thead th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; font-weight: 700; background: #f7f8f9; border-bottom: 1px solid var(--dnc-border); padding: 0.65rem 0.75rem; white-space: nowrap; }
.dnc-list-table td { padding: 0.75rem; border-color: #eef0f2; }
.dnc-list-table tbody tr:last-child td { border-bottom: 0; }
.dnc-row-link { cursor: pointer; }
.dnc-row-link.is-overdue td:first-child { border-left: 3px solid var(--dnc-danger); }
.dnc-cell-sub { font-size: 0.76rem; color: #8a8f98; line-height: 1.35; }
.dnc-cell-issue { max-width: 320px; }
.dnc-cell-sla { min-width: 110px; }
.dnc-row-chevron { color: #9aa1a9; padding: 0.25rem; }
.dnc-row-link:hover .dnc-row-chevron { color: var(--dnc-ink); }

.dnc-sla-bar { height: 4px; background: #eef0f2; border-radius: 4px; margin-top: 0.3rem; overflow: hidden; max-width: 110px; }
.dnc-sla-bar span { display: block; height: 100%; border-radius: 4px; }
.dnc-sla-bar .is-ok { background: var(--dnc-green); }
.dnc-sla-bar .is-warning { background: var(--dnc-gold); }
.dnc-sla-bar .is-danger { background: var(--dnc-danger); }

.dnc-status { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.74rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap; color: var(--fg); background: var(--bg); }
.dnc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Tones: each module maps its own statuses onto these (see *Service::STATUS_TONES). */
.dnc-tone-danger   { --fg: #b42335; --bg: #fdecee; --dot: #d9364a; }
.dnc-tone-info     { --fg: #1d6fb8; --bg: #e8f2fc; --dot: #2f8fe0; }
.dnc-tone-warning  { --fg: #9a6a00; --bg: #fdf4de; --dot: #e0a526; }
.dnc-tone-critical { --fg: #fff;    --bg: #b42335; --dot: #7f1523; }
.dnc-tone-success  { --fg: #0c7a41; --bg: #e3f6ec; --dot: #10b05f; }
.dnc-tone-muted    { --fg: #4b5563; --bg: #eef0f2; --dot: #9ca3af; }
.dnc-tone-slate    { --fg: #334155; --bg: #e9eef5; --dot: #64748b; }
.dnc-status-tab.dnc-tone-muted, .dnc-status-tab.dnc-tone-slate { --dot: #9ca3af; }

/* Priority pill (tasks): outlined so it never competes with the status pill. */
.dnc-priority { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 4px; border: 1px solid currentColor; color: var(--fg); white-space: nowrap; }
.dnc-priority.dnc-tone-muted { color: #6b7280; border-color: #d1d5db; }
.dnc-source-tag { display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7280; background: #eef0f2; border-radius: 4px; padding: 0.05rem 0.4rem; vertical-align: middle; }

.dnc-empty-state { text-align: center; padding: 3rem 1rem; }
.dnc-empty-state > .bi { font-size: 2.2rem; color: #c3c8cd; display: block; margin-bottom: 0.5rem; }

.dnc-form-section { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; border-bottom: 1px solid var(--dnc-border); padding-bottom: 0.35rem; margin-bottom: 0.9rem; }

/* ---------- Case details pages: header, progress, timeline, facts ---------- */
.dnc-case-header { padding: 1.25rem 1.4rem 1rem; }
.dnc-badge-info { background: #e6f4f8; color: #0d6e86; font-weight: 600; }
.dnc-sla-summary { min-width: 170px; padding: 0.6rem 0.9rem; border: 1px solid var(--dnc-border); border-radius: 8px; background: #fafbfb; }
.dnc-sla-summary.is-overdue { border-color: #f3c3ca; background: #fdf2f3; }
.dnc-sla-summary-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; }
.dnc-sla-summary-value { font-weight: 700; color: var(--dnc-ink); font-size: 0.95rem; }
.dnc-sla-summary.is-overdue .dnc-sla-summary-value { color: var(--dnc-danger); }
.dnc-sla-summary .dnc-sla-bar { max-width: none; }

.dnc-progress { display: flex; list-style: none; margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px solid #eef0f2; gap: 0.5rem; }
.dnc-step { flex: 1; display: flex; align-items: center; gap: 0.6rem; position: relative; min-width: 0; }
.dnc-step:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: #e3e6e9; margin-right: 0.5rem; min-width: 12px; }
.dnc-step.is-done:not(:last-child)::after { background: var(--dnc-green); }
.dnc-step-marker { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; background: #eef0f2; color: #8a8f98; border: 2px solid #eef0f2; }
.dnc-step.is-done .dnc-step-marker { background: var(--dnc-green); border-color: var(--dnc-green); color: #fff; }
.dnc-step.is-current .dnc-step-marker { background: #fff; border-color: var(--dnc-navy); color: var(--dnc-navy); }
.dnc-step.is-flagged .dnc-step-marker { border-color: var(--dnc-danger); color: var(--dnc-danger); }
.dnc-step-text { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.dnc-step-label { font-size: 0.8rem; font-weight: 700; color: #8a8f98; }
.dnc-step.is-done .dnc-step-label, .dnc-step.is-current .dnc-step-label { color: var(--dnc-ink); }
.dnc-step-date { font-size: 0.72rem; color: #8a8f98; }
.dnc-step.is-flagged .dnc-step-date { color: var(--dnc-danger); font-weight: 600; }
@media (max-width: 575.98px) {
  .dnc-progress { flex-direction: column; gap: 0.75rem; }
  .dnc-step::after { display: none; }
}

.dnc-card-head { display: flex; align-items: center; gap: 0.45rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--dnc-border); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dnc-ink); }
.dnc-card-head .bi { color: #8a8f98; }
.dnc-action-card { border-top: 3px solid var(--dnc-green); }
.dnc-description { font-size: 0.95rem; line-height: 1.6; color: var(--dnc-ink); white-space: normal; }
.dnc-field-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #8a8f98; margin-bottom: 0.15rem; }
.dnc-resolution { border-left: 3px solid var(--dnc-green); background: #f1faf5; border-radius: 0 6px 6px 0; padding: 0.6rem 0.8rem; }

.dnc-facts { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1rem; padding: 1rem; font-size: 0.83rem; }
.dnc-facts dt { font-weight: 600; color: #6b7280; }
.dnc-facts dd { margin: 0; color: var(--dnc-ink); text-align: right; }

.dnc-file-list { list-style: none; padding: 0; font-size: 0.83rem; }
.dnc-file-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid #eef0f2; }
.dnc-file-list li:last-child { border-bottom: 0; }

.dnc-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.dnc-tl::before { content: ""; position: absolute; left: 15px; top: 6px; bottom: 6px; width: 2px; background: #eef0f2; }
.dnc-tl-item { position: relative; display: flex; gap: 0.85rem; padding-bottom: 1.1rem; }
.dnc-tl-item:last-child { padding-bottom: 0; }
.dnc-tl-icon { position: relative; z-index: 1; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef0f2; color: #4b5563; border: 3px solid var(--dnc-card); }
.dnc-tl-body { flex: 1; min-width: 0; font-size: 0.85rem; padding-top: 0.3rem; }
.dnc-tl-remarks { margin-top: 0.35rem; padding: 0.5rem 0.7rem; background: #f7f8f9; border-radius: 6px; color: #374151; font-size: 0.83rem; }
.dnc-tl-item[class*="dnc-tone-"] .dnc-tl-icon { background: var(--bg); color: var(--fg); }

.dnc-progress-wrap { overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.25rem; }
.dnc-progress-wrap .dnc-step-text { white-space: normal; max-width: 150px; }
.dnc-stage-dots { display: flex; gap: 3px; margin-top: 0.3rem; max-width: 110px; }
.dnc-stage-dots span { flex: 1; height: 4px; border-radius: 2px; background: #e3e6e9; }
.dnc-stage-dots span.is-done { background: var(--dnc-green); }
.dnc-stage-dots span.is-current { background: var(--dnc-navy); }
.dnc-more-actions > summary { font-size: 0.8rem; font-weight: 600; color: #6b7280; cursor: pointer; list-style: none; }
.dnc-more-actions > summary::-webkit-details-marker { display: none; }
.dnc-more-actions > summary::before { content: "\F285"; font-family: "bootstrap-icons"; font-size: 0.7rem; margin-right: 0.35rem; display: inline-block; transition: transform 0.15s; }
.dnc-more-actions[open] > summary::before { transform: rotate(90deg); }

/* ---------- Metric strip (list-page dashboards) ---------- */
.dnc-metric { display: flex; gap: 0.85rem; align-items: flex-start; height: 100%; background: var(--dnc-card); border: 1px solid var(--dnc-border); border-radius: var(--dnc-radius); padding: 1rem 1.1rem; box-shadow: 0 1px 2px rgba(30, 41, 59, 0.04); position: relative; overflow: hidden; color: inherit; text-decoration: none; }
.dnc-metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--dot); }
.dnc-metric-link { transition: border-color 0.15s, box-shadow 0.15s; }
.dnc-metric-link:hover { border-color: #c6ccd1; box-shadow: var(--dnc-shadow); color: inherit; }
.dnc-metric-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; background: var(--bg); color: var(--dot); }
.dnc-tone-critical .dnc-metric-icon { color: var(--fg); }
.dnc-metric-body { min-width: 0; flex: 1; }
.dnc-metric-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; }
.dnc-metric-value { font-size: 1.65rem; font-weight: 700; color: var(--dnc-ink); line-height: 1.15; margin: 0.15rem 0 0.1rem; }
.dnc-metric-of { font-size: 0.8rem; font-weight: 600; color: #8a8f98; }
.dnc-metric-sub { font-size: 0.76rem; color: #6b7280; }
.dnc-metric-meter { height: 4px; background: #eef0f2; border-radius: 4px; margin-top: 0.45rem; overflow: hidden; }
.dnc-metric-meter span { display: block; height: 100%; background: var(--dot); border-radius: 4px; }
@media (max-width: 575.98px) {
  .dnc-metric { flex-direction: column; gap: 0.5rem; padding: 0.85rem; }
  .dnc-metric-icon { width: 34px; height: 34px; font-size: 1rem; }
  .dnc-metric-value { font-size: 1.35rem; }
}
