/* ============================================================
   PACK — Packing Traceability and Shipping Management System
   Design System — HARTING Brand Colors
   Source: harting.com CSS variables + DevTools inspection
   ============================================================ */

/* Google Font — Source Sans Pro (same font as harting.com) */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  /* ── HARTING Brand ───────────────────────────── */
  --ptsms-navy: #1d2b37;
  /* Header, sidebar, dark panels */
  --ptsms-navy-hover: #253545;
  /* Sidebar item hover */
  --ptsms-navy-active: #2e4159;
  /* Sidebar item active bg */
  --ptsms-yellow: #ffcc00;
  /* Brand yellow — logo, accents, primary CTA */
  --ptsms-yellow-dark: #e6b800;
  /* Yellow hover/pressed */
  --ptsms-yellow-light: #fff9e6;
  /* Light yellow bg — highlights */

  /* ── Surfaces ────────────────────────────────── */
  --ptsms-bg: #f4f5f7;
  /* Page background */
  --ptsms-surface: #ffffff;
  /* Cards, panels, forms */
  --ptsms-border: #e2e4e9;
  /* Input borders, dividers */

  /* ── Text ────────────────────────────────────── */
  --ptsms-text: #1a1b1f;
  /* Primary body text (harting.com on-surface) */
  --ptsms-text-muted: #6b7280;
  /* Secondary / helper text */
  --ptsms-text-light: #9ca3af;
  /* Placeholder text */
  --ptsms-text-on-navy: #ffffff;
  /* Text on dark navy panels */
  --ptsms-text-on-yellow: #1d2b37;
  /* Text on yellow buttons */

  /* ── Status / Scan Feedback ──────────────────── */
  --ptsms-success: #16a34a;
  /* Scan OK, HU Packed, Dispatched */
  --ptsms-success-bg: #dcfce7;
  --ptsms-success-border: #bbf7d0;
  --ptsms-danger: #dc2626;
  /* Block — V1,V2,V3,V5,V6,V9 */
  --ptsms-danger-bg: #fee2e2;
  --ptsms-danger-border: #fecaca;
  --ptsms-warning: #d97706;
  /* Warn — V4,V10 */
  --ptsms-warning-bg: #fef3c7;
  --ptsms-warning-border: #fde68a;
  --ptsms-info: #2563eb;
  /* InProgress status */
  --ptsms-info-bg: #dbeafe;
  --ptsms-info-border: #bfdbfe;

  /* ── HU / Order Status Badge Colors ─────────── */
  --status-pending: #6b7280;
  /* Gray */
  --status-inprogress: #2563eb;
  /* Blue */
  --status-packed: #16a34a;
  /* Green */
  --status-partial: #d97706;
  /* Amber */
  --status-dispatched: #1d2b37;
  /* Navy */

  /* ── Typography (harting.com font) ──────────── */
  --ptsms-font: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
  --ptsms-font-size-base: 1rem;
  /* 16px */
  --ptsms-font-size-sm: 0.875rem;
  /* 14px */
  --ptsms-font-size-lg: 1.125rem;
  /* 18px */
  --ptsms-font-size-xl: 1.375rem;
  /* 22px */
  --ptsms-font-size-2xl: 1.75rem;
  /* 28px */
  --ptsms-font-size-scan: 2rem;
  /* Barcode input — large + legible */

  /* ── Shadows (from harting.com Material tokens) ─ */
  --ptsms-shadow-sm: 0px 2px 1px -1px rgba(0, 0, 0, .20), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);
  --ptsms-shadow-md: 0px 3px 3px -2px rgba(0, 0, 0, .20), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);
  --ptsms-shadow-lg: 0px 3px 5px -1px rgba(0, 0, 0, .20), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);
  --ptsms-shadow-xl: 0px 5px 5px -3px rgba(0, 0, 0, .20), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);

  /* ── Border Radius (from harting.com Material tokens) ─ */
  --ptsms-radius-xs: 4px;
  /* Inputs, small chips */
  --ptsms-radius-sm: 8px;
  /* Buttons */
  --ptsms-radius-md: 12px;
  /* Cards */
  --ptsms-radius-lg: 16px;
  /* Large cards, modals */
  --ptsms-radius-xl: 28px;
  /* Dialogs */

  /* ── Layout ──────────────────────────────────── */
  --ptsms-sidebar-width: 240px;
  --ptsms-sidebar-width-collapsed: 64px;
  --ptsms-header-height: 60px;
  --ptsms-content-padding: 24px;
}

/* ── Base Reset ──────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  font-family: var(--ptsms-font);
  font-size: var(--ptsms-font-size-base);
  color: var(--ptsms-text);
  background-color: var(--ptsms-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--ptsms-text);
}

h1 {
  font-size: var(--ptsms-font-size-2xl);
}

h2 {
  font-size: var(--ptsms-font-size-xl);
}

h3 {
  font-size: var(--ptsms-font-size-lg);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--ptsms-navy);
  text-decoration: none;
}

a:hover {
  color: var(--ptsms-yellow-dark);
}

a.btn:hover {
  color: inherit;
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--ptsms-font);
  font-size: var(--ptsms-font-size-base);
  font-weight: 600;
  border-radius: var(--ptsms-radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--ptsms-yellow);
  outline-offset: 2px;
}

a.btn {
  text-decoration: none;
}

a.btn:hover {
  text-decoration: none;
}

/* Primary — Yellow on Navy (HARTING brand) */
.btn-primary {
  background: var(--ptsms-yellow);
  color: var(--ptsms-text-on-yellow);
  box-shadow: var(--ptsms-shadow-sm);
}

.btn-primary:hover,
a.btn-primary:hover {
  background: var(--ptsms-yellow-dark);
  color: var(--ptsms-text-on-yellow);
  box-shadow: var(--ptsms-shadow-md);
}

/* Secondary — Navy on white */
.btn-secondary {
  background: var(--ptsms-navy);
  color: var(--ptsms-text-on-navy);
  box-shadow: var(--ptsms-shadow-sm);
}

.btn-secondary:hover,
a.btn-secondary:hover {
  background: var(--ptsms-navy-active);
  color: var(--ptsms-text-on-navy);
  box-shadow: var(--ptsms-shadow-md);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--ptsms-navy);
  border: 2px solid var(--ptsms-navy);
}

.btn-outline:hover,
a.btn-outline:hover {
  background: var(--ptsms-navy);
  color: white;
}

/* Danger */
.btn-danger {
  background: var(--ptsms-danger);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* Warning */
.btn-warning {
  background: #d97706;
  color: white;
}

.btn-warning:hover {
  background: #b45309;
}

/* Sizes */
.btn-sm {
  padding: 6px 14px;
  font-size: var(--ptsms-font-size-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--ptsms-font-size-lg);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ── Form Inputs ─────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: var(--ptsms-font-size-sm);
  font-weight: 600;
  color: var(--ptsms-text);
  margin-bottom: 6px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: var(--ptsms-font);
  font-size: var(--ptsms-font-size-base);
  color: var(--ptsms-text);
  background: var(--ptsms-surface);
  border: 1.5px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--ptsms-yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

.form-control::placeholder {
  color: var(--ptsms-text-light);
}

/* Scan Input — large, high-contrast, barcode-optimised */
.scan-input {
  font-size: var(--ptsms-font-size-scan);
  font-weight: 600;
  padding: 16px 20px;
  border: 3px solid var(--ptsms-navy);
  border-radius: var(--ptsms-radius-sm);
  text-align: center;
  letter-spacing: 2px;
  background: var(--ptsms-yellow-light);
}

.scan-input:focus {
  border-color: var(--ptsms-yellow);
  box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.3);
  background: white;
}

/* Input with icon prefix */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input-icon {
  position: absolute;
  left: 12px;
  color: var(--ptsms-text-muted);
  pointer-events: none;
}

.input-group .form-control {
  padding-left: 40px;
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--ptsms-surface);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  padding: 24px;
}

.card-sm {
  padding: 16px;
}

.card-header {
  font-size: var(--ptsms-font-size-lg);
  font-weight: 600;
  color: var(--ptsms-text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ptsms-yellow);
}

/* ── Status Badges ───────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--ptsms-radius-xs);
  font-size: var(--ptsms-font-size-sm);
  font-weight: 600;
}

.badge-pending {
  background: #f3f4f6;
  color: var(--status-pending);
}

.badge-inprogress {
  background: var(--ptsms-info-bg);
  color: var(--status-inprogress);
}

.badge-packed {
  background: var(--ptsms-success-bg);
  color: var(--status-packed);
}

.badge-partial {
  background: var(--ptsms-warning-bg);
  color: var(--status-partial);
}

.badge-dispatched {
  background: #e5e7eb;
  color: var(--status-dispatched);
}

/* ASP.NET Core adds this class when no validation errors — hide the empty box */
.validation-summary-valid {
  display: none !important;
}

/* ── Alert Banners (Scan feedback) ───────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--ptsms-radius-sm);
  font-size: var(--ptsms-font-size-lg);
  font-weight: 600;
  border-left: 5px solid;
  animation: slideIn 0.2s ease;
}

.alert-success {
  background: var(--ptsms-success-bg);
  color: var(--ptsms-success);
  border-color: var(--ptsms-success);
}

.alert-danger {
  background: var(--ptsms-danger-bg);
  color: var(--ptsms-danger);
  border-color: var(--ptsms-danger);
}

.alert-warning {
  background: var(--ptsms-warning-bg);
  color: var(--ptsms-warning);
  border-color: var(--ptsms-warning);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── KPI Cards (Dashboard) ───────────────────────── */
.kpi-card {
  background: var(--ptsms-surface);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  padding: 20px 24px;
  border-top: 4px solid var(--ptsms-yellow);
  transition: box-shadow 0.2s ease;
}

.kpi-card:hover {
  box-shadow: var(--ptsms-shadow-md);
}

.kpi-card .kpi-label {
  font-size: var(--ptsms-font-size-sm);
  font-weight: 600;
  color: var(--ptsms-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.kpi-card .kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  line-height: 1.1;
  margin: 8px 0 4px;
}

.kpi-card .kpi-sub {
  font-size: var(--ptsms-font-size-sm);
  color: var(--ptsms-text-muted);
}

/* ── Tables ──────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ptsms-surface);
}

thead th {
  background: var(--ptsms-navy);
  color: var(--ptsms-text-on-navy);
  font-size: var(--ptsms-font-size-sm);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

thead th:first-child {
  border-radius: var(--ptsms-radius-xs) 0 0 0;
}

thead th:last-child {
  border-radius: 0 var(--ptsms-radius-xs) 0 0;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ptsms-border);
  font-size: var(--ptsms-font-size-base);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--ptsms-yellow-light);
}

/* Override Bootstrap .table defaults (Bootstrap's `.table > :not(caption) > * > *` outranks bare thead/tbody selectors) */
.table>thead>tr>th {
  background: var(--ptsms-navy);
  color: var(--ptsms-text-on-navy);
  font-size: var(--ptsms-font-size-sm);
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: none;
  --bs-table-bg: transparent;
  --bs-table-color: var(--ptsms-text-on-navy);
}

.table>tbody>tr>td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ptsms-border);
  font-size: var(--ptsms-font-size-base);
  --bs-table-bg: transparent;
}

.table>tbody>tr:last-child>td {
  border-bottom: none;
}

.table.table-hover>tbody>tr:hover>* {
  --bs-table-hover-bg: var(--ptsms-yellow-light);
  color: inherit;
}

/* ── Page primitives (reusable across list/detail pages) ─── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-header .page-header-text h1 {
  color: var(--ptsms-navy);
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.page-header .page-subtitle {
  color: var(--ptsms-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.page-header .page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Filter toolbar — compact card with clear "Filters" identity */
.filter-toolbar {
  padding: 0;
  margin-bottom: 12px;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-top: 3px solid var(--ptsms-navy);
  border-radius: 0;
  position: relative;
}

.filter-toolbar .filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px dashed var(--ptsms-border);
  background: #fafbfc;
}

.filter-toolbar .filter-header .filter-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-toolbar .filter-header .filter-title .filter-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
  border-radius: 4px;
  font-size: 0.75rem;
}

.filter-toolbar .filter-header .active-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  margin-left: 4px;
}

.filter-toolbar .filter-body {
  padding: 16px 16px 18px;
}

.filter-toolbar .filter-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ptsms-text-muted);
  margin-bottom: 5px;
}

.filter-toolbar .filter-label i {
  color: var(--ptsms-text-light);
  font-size: 0.7rem;
}

.filter-toolbar .form-select,
.filter-toolbar .form-control {
  font-size: 0.875rem;
  padding: 7px 32px 7px 12px;
  height: auto;
  min-height: 36px;
  text-overflow: ellipsis;
  background-color: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: 4px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.filter-toolbar .form-select:hover,
.filter-toolbar .form-control:hover {
  border-color: var(--ptsms-navy);
}

.filter-toolbar .form-select:focus,
.filter-toolbar .form-control:focus {
  border-color: var(--ptsms-yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
  background-color: #fffef8;
}

/* Highlight fields with an active (non-default) value */
.filter-toolbar .filter-field.is-active .form-select,
.filter-toolbar .filter-field.is-active .form-control {
  border-color: var(--ptsms-navy);
  background-color: var(--ptsms-yellow-light);
  font-weight: 600;
  color: var(--ptsms-navy);
}

.filter-toolbar .filter-field.is-active .filter-label {
  color: var(--ptsms-navy);
}

.filter-toolbar .filter-field.is-active .filter-label::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ptsms-yellow-dark);
  margin-left: 4px;
}

.filter-toolbar .btn-link-clear {
  color: var(--ptsms-danger);
  background: transparent;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.filter-toolbar .btn-link-clear:hover {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

/* Unified data panel — search header + table + pagination footer in one card */
.data-panel {
  padding: 0;
  overflow: hidden;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: 0;
  box-shadow: var(--ptsms-shadow-sm);
  margin-bottom: 0;
}

.data-panel .data-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fafbfc 0%, var(--ptsms-surface) 100%);
  border-bottom: 1px solid var(--ptsms-border);
  flex-wrap: wrap;
}

.data-panel .data-panel-header .header-search {
  flex: 1 1 300px;
  max-width: 460px;
}

.data-panel .data-panel-header .header-search .input-group {
  flex-wrap: nowrap;
}

.data-panel .data-panel-header .header-search .input-group>* {
  height: 38px;
  border-radius: 0;
  border-color: var(--ptsms-border);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.data-panel .data-panel-header .header-search .input-group .form-control {
  padding: 6px 12px;
  line-height: 1.2;
  border-left: 0;
  border-right: 0;
}

.data-panel .data-panel-header .header-search .input-group .form-control:focus {
  border-color: var(--ptsms-yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
  z-index: 2;
}

.data-panel .data-panel-header .header-search .input-group-text {
  background: var(--ptsms-surface);
  color: var(--ptsms-text-muted);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.data-panel .data-panel-header .header-search .input-group .btn {
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.data-panel .data-panel-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.data-panel .data-panel-header .header-actions .bulk-count {
  font-size: 0.85rem;
  color: var(--ptsms-text-muted);
  padding-right: 10px;
  border-right: 1px solid var(--ptsms-border);
}

.data-panel .data-panel-header .header-actions .bulk-count strong {
  color: var(--ptsms-navy);
  font-weight: 700;
}

.data-panel .data-panel-body {
  padding: 0;
}

.data-panel .data-panel-body .table-wrapper {
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
}

.data-panel .data-panel-body .data-table {
  margin: 0 !important;
}

.data-panel .data-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(0deg, #fafbfc 0%, var(--ptsms-surface) 100%);
  border-top: 1px solid var(--ptsms-border);
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--ptsms-text-muted);
}

.data-panel .data-panel-footer .footer-info strong {
  color: var(--ptsms-navy);
  font-weight: 700;
}

/* Pagination shell — standalone by default (flex row); flows into .data-panel-footer via display:contents */
.pagination-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--ptsms-text-muted);
}

.pagination-shell .footer-info strong {
  color: var(--ptsms-navy);
  font-weight: 700;
}

.data-panel-footer>.pagination-shell {
  display: contents;
  margin-top: 0;
}

/* Themed pagination — navy/yellow */
.pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pagination-nav .page-btn {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ptsms-navy);
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-xs);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  cursor: pointer;
}

.pagination-nav .page-btn:hover:not(.disabled):not(.active) {
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  border-color: var(--ptsms-navy);
}

.pagination-nav .page-btn.active {
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  border-color: var(--ptsms-navy);
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25);
}

.pagination-nav .page-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
  background: #f7f8fa;
}

.pagination-nav .page-ellipsis {
  padding: 0 4px;
  color: var(--ptsms-text-muted);
  font-weight: 700;
}

/* Table toolbar (search + actions above table) */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  margin-bottom: 10px;
}

.table-toolbar .toolbar-search {
  flex: 1 1 320px;
  max-width: 480px;
}

.table-toolbar .toolbar-search .input-group .form-control {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.table-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-toolbar .toolbar-actions .bulk-count {
  font-size: 0.85rem;
  color: var(--ptsms-text-muted);
  padding: 0 8px;
  border-right: 1px solid var(--ptsms-border);
  margin-right: 4px;
}

.table-toolbar .toolbar-actions .bulk-count strong {
  color: var(--ptsms-navy);
  font-weight: 700;
}

/* Bulk action bar — thin strip above table */
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  margin-bottom: 12px;
  box-shadow: var(--ptsms-shadow-sm);
}

.bulk-bar .bulk-count {
  font-size: 0.875rem;
  color: var(--ptsms-text-muted);
}

.bulk-bar .bulk-count strong {
  color: var(--ptsms-navy);
  font-weight: 700;
  font-size: 1rem;
}

/* Data table — zero-padding card wrapper, compact rows, aligned cells */
.data-table-card {
  padding: 0;
  overflow: hidden;
}

.data-table-card .table-wrapper {
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
}

.data-table {
  margin: 0 !important;
  font-size: 0.85rem;
}

.data-table>thead>tr>th {
  padding: 12px 12px !important;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table>tbody>tr>td {
  padding: 8px 12px !important;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.35;
}

.data-table td.cell-wrap,
.data-table th.cell-wrap {
  white-space: normal;
}

.data-table .sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.data-table .sort-link .sort-arrow {
  opacity: 0.55;
  font-size: 0.7rem;
}

.data-table .sort-link:hover {
  color: var(--ptsms-yellow);
}

.data-table .col-check {
  width: 44px;
  text-align: center;
}

.data-table .col-actions {
  width: 100px;
  text-align: center;
}

.data-table .table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ptsms-text-muted);
}

.data-table .table-empty i {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.5;
}

/* Truncate long text in cells with ellipsis; hover title attr provides full text */
.text-truncate-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Icon-only / compact action button — refined "Assign"-style CTA */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ptsms-navy);
  background: transparent;
  border: 1.5px solid var(--ptsms-navy);
  border-radius: var(--ptsms-radius-sm);
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-action:hover {
  background: var(--ptsms-yellow);
  color: var(--ptsms-text-on-yellow);
  border-color: var(--ptsms-yellow-dark);
  box-shadow: var(--ptsms-shadow-sm);
}

.btn-action i {
  font-size: 0.75rem;
}

/* Row hover highlight for the checkbox column too */
.data-table>tbody>tr:hover .form-check-input {
  border-color: var(--ptsms-navy);
}

/* Slim stage/status badge pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--ptsms-text-muted);
  border: 1px solid var(--ptsms-border);
}

.badge-pill.badge-stage {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

.badge-pill.badge-status-unassigned {
  background: #f3f4f6;
  color: #6b7280;
}

.badge-pill.badge-status-inprogress {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.badge-pill.badge-status-complete {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.badge-pill.badge-status-blocked {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* Sortable table headers */
thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

thead th.sortable:hover {
  background: var(--ptsms-navy-hover);
  color: var(--ptsms-yellow);
}

thead th.sortable a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

thead th.sortable .sort-icon {
  margin-left: 6px;
  opacity: 0.5;
  font-size: 0.75rem;
}

thead th.sortable.active .sort-icon {
  opacity: 1;
  color: var(--ptsms-yellow);
}

/* ── Sidebar Layout (Admin) ──────────────────────── */
.layout-admin {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  width: var(--ptsms-sidebar-width);
  background: linear-gradient(180deg, #131e28 0%, #1a2733 50%, #15202b 100%);
  color: var(--ptsms-text-on-navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .18) transparent;
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .28);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}

.sidebar-brand .brand-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ffcc00 0%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.25);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-brand:hover .brand-logo-wrap {
  transform: scale(1.05);
}

.sidebar-brand .brand-logo {
  color: #121d27;
  font-size: 1.1rem;
}

.sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.sidebar-brand .brand-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-brand .brand-abbr {
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sidebar-brand .brand-tag {
  font-size: 0.58rem;
  font-weight: 700;
  background: rgba(255, 204, 0, 0.16);
  color: var(--ptsms-yellow);
  border: 1px solid rgba(255, 204, 0, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sidebar-brand .brand-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.04em;
  margin-top: 1px;
}

.sidebar-nav-container {
  padding: 8px 0 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-section-label {
  padding: 14px 18px 5px;
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.36);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-section-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 8px 14px;
  list-style: none;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  border-left: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.sidebar-nav li a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  transform: translateX(3px);
}

.sidebar-nav li a:hover .nav-icon {
  opacity: 1;
  color: #ffffff;
  transform: scale(1.08);
}

.sidebar-nav li a.active {
  background: linear-gradient(90deg, rgba(255, 204, 0, 0.16) 0%, rgba(255, 204, 0, 0.05) 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--ptsms-yellow);
}

.sidebar-nav li a.active .nav-icon {
  color: var(--ptsms-yellow);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.45));
}

.sidebar-nav li a .nav-icon {
  width: 20px;
  text-align: center;
  opacity: 0.8;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.sidebar-nav li a .nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Collapsible parent groups ─────────────────────── */
.sidebar-nav .nav-parent {
  display: block;
}

.sidebar-nav .nav-parent-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  width: calc(100% - 20px);
  margin: 2px 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav .nav-parent-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  transform: translateX(3px);
}

.sidebar-nav .nav-parent-toggle:hover .nav-icon {
  opacity: 1;
  color: #ffffff;
}

.sidebar-nav .nav-parent-toggle .nav-icon {
  width: 20px;
  text-align: center;
  opacity: 0.85;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-parent-toggle .nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav .nav-parent-toggle .nav-chevron {
  margin-left: auto;
  font-size: 0.68rem;
  opacity: 0.55;
  transition: transform 0.22s ease-out, color 0.18s ease, opacity 0.18s ease;
}

.sidebar-nav .nav-parent.is-open>.nav-parent-toggle {
  color: var(--ptsms-yellow);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav .nav-parent.is-open>.nav-parent-toggle .nav-chevron {
  transform: rotate(180deg);
  opacity: 0.95;
  color: var(--ptsms-yellow);
}

.sidebar-nav .sub-nav {
  list-style: none;
  margin: 2px 10px 6px 20px;
  padding: 2px 0 2px 8px;
  max-height: 0;
  overflow: hidden;
  border-left: 1.5px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  transition: max-height 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav .nav-parent.is-open>.sub-nav {
  max-height: 600px;
}

.sidebar-nav .sub-nav li a {
  margin: 2px 0;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.65);
  box-shadow: none;
}

.sidebar-nav .sub-nav li a .nav-icon {
  width: 16px;
  font-size: 0.8rem;
  opacity: 0.75;
}

.sidebar-nav .sub-nav li a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.sidebar-nav .sub-nav li a.active {
  color: var(--ptsms-yellow);
  background: rgba(255, 204, 0, 0.14);
  font-weight: 600;
  box-shadow: none;
}

.sidebar-nav .sub-nav li a.active .nav-icon {
  color: var(--ptsms-yellow);
  opacity: 1;
}

/* Collapsed sidebar hides submenu + chevron; parent icon acts alone */
.layout-admin.is-collapsed .sidebar-nav .nav-parent-toggle {
  justify-content: center;
  padding: 0;
  gap: 0;
  width: 42px;
  height: 42px;
  margin: 4px auto;
  border-radius: 10px;
}

.layout-admin.is-collapsed .sidebar-nav .nav-parent-toggle .nav-icon {
  width: auto;
  font-size: 1.05rem;
}

.layout-admin.is-collapsed .sidebar-nav .nav-parent-toggle .nav-chevron,
.layout-admin.is-collapsed .sidebar-nav .sub-nav {
  display: none;
}

.sidebar-footer {
  padding: 10px 10px 14px;
  margin-top: auto;
}

.sidebar-footer-card {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
}

.sidebar-footer .footer-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sidebar-footer .version-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 12px;
}

.sidebar-footer .footer-info-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all 0.15s;
  font-size: 0.78rem;
}

.sidebar-footer .footer-info-btn:hover {
  color: var(--ptsms-yellow);
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-footer .footer-copyright {
  margin-top: 5px;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
}

.main-content {
  margin-left: var(--ptsms-sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: calc(100vw - var(--ptsms-sidebar-width));
  overflow-x: hidden;
  transition: margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Sidebar Collapsed State ─────────────────────── */
.layout-admin.is-collapsed .sidebar {
  width: var(--ptsms-sidebar-width-collapsed);
}

.layout-admin.is-collapsed .main-content {
  margin-left: var(--ptsms-sidebar-width-collapsed);
  max-width: calc(100vw - var(--ptsms-sidebar-width-collapsed));
}

.layout-admin.is-collapsed .brand-logo,
.layout-admin.is-collapsed .brand-text,
.layout-admin.is-collapsed .sidebar-section-label,
.layout-admin.is-collapsed .sidebar-section-divider,
.layout-admin.is-collapsed .sidebar-footer,
.layout-admin.is-collapsed .nav-label {
  display: none;
}

.layout-admin.is-collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 0;
}

.layout-admin.is-collapsed .sidebar-brand .brand-logo-wrap {
  width: 36px;
  height: 36px;
}

.layout-admin.is-collapsed .sidebar-nav li a {
  justify-content: center;
  padding: 0;
  gap: 0;
  width: 42px;
  height: 42px;
  margin: 4px auto;
  border-radius: 10px;
}

.layout-admin.is-collapsed .sidebar-nav li a .nav-icon {
  width: auto;
  font-size: 1.05rem;
}

.layout-admin.is-collapsed .sidebar-nav li a.active {
  background: rgba(255, 204, 0, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 204, 0, 0.35);
}

/* Preload class avoids flash of full-width sidebar before JS applies is-collapsed */
html.sidebar-preload-collapsed .sidebar {
  width: var(--ptsms-sidebar-width-collapsed);
}

html.sidebar-preload-collapsed .main-content {
  margin-left: var(--ptsms-sidebar-width-collapsed);
  max-width: calc(100vw - var(--ptsms-sidebar-width-collapsed));
}

/* ── Top Header Bar ──────────────────────────────── */
.topbar {
  background: rgba(21, 33, 44, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ptsms-text-on-navy);
  height: var(--ptsms-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--ptsms-content-padding) 0 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  width: 100%;
}

.topbar .topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Breadcrumb & Title */
.topbar .topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .topbar-context-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.7);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar .topbar-crumb-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.65rem;
}

.topbar .page-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

/* Toggle Button */
.sidebar-toggle-btn {
  position: relative;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.sidebar-toggle-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(0);
}

.sidebar-toggle-btn:focus-visible {
  outline: 2px solid var(--ptsms-yellow);
  outline-offset: 2px;
}

.sidebar-toggle-btn .toggle-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.sidebar-toggle-btn .toggle-icon-bars {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.sidebar-toggle-btn .toggle-icon-arrow {
  opacity: 0;
  transform: translateX(-6px) scale(0.6);
}

.layout-admin.is-collapsed .sidebar-toggle-btn .toggle-icon-bars {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.layout-admin.is-collapsed .sidebar-toggle-btn .toggle-icon-arrow {
  opacity: 1;
  transform: translateX(0) scale(1);
}

html.sidebar-preload-collapsed .sidebar-toggle-btn .toggle-icon-bars {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

html.sidebar-preload-collapsed .sidebar-toggle-btn .toggle-icon-arrow {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Clock Pill */
.topbar .topbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.topbar .topbar-clock i {
  color: var(--ptsms-yellow);
  opacity: 0.9;
}

/* Quick link button */
.topbar-quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
}

.topbar-quick-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.topbar-quick-link i {
  color: var(--ptsms-yellow);
}

/* User Chip */
.topbar .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px 3px 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.18s ease;
  cursor: pointer;
}

.topbar .user-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.topbar .user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcc00 0%, #d97706 100%);
  color: #121d27;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.topbar .user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .status-dot-online {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.7);
  display: inline-block;
}

/* Action / Signout button */
.topbar-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.topbar-action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.topbar-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
  transform: translateY(-1px);
}

/* Admin Panel toggle — prominent yellow pill on the employee topbar */
.topbar-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--ptsms-yellow, #f6c445);
  color: var(--ptsms-navy, #1b3a67);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.18s ease;
}

.topbar-admin-btn:hover {
  background: #ffd35c;
  color: var(--ptsms-navy, #1b3a67);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.topbar-admin-btn i {
  font-size: 0.9rem;
}

/* ── Standard Layout Header (_Layout.cshtml) ─────── */
.layout-header .topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding-right: 8px;
}

.layout-header .topbar-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffcc00 0%, #f59e0b 100%);
  color: #121d27;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255, 204, 0, 0.25);
}

.layout-header .topbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.layout-header .topbar-brand-text .brand-title {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.layout-header .topbar-brand-text .brand-sub {
  color: var(--ptsms-yellow);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.layout-header .topbar-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.topbar-nav-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.topbar-nav-btn.active {
  background: transparent;
  color: var(--ptsms-yellow, #f6c445);
  border: 1.5px solid var(--ptsms-yellow, #f6c445);
  font-weight: 700;
  box-shadow: none;
}

.topbar-nav-btn.active:hover {
  background: rgba(246, 196, 69, 0.08);
  color: var(--ptsms-yellow, #f6c445);
  border-color: var(--ptsms-yellow, #f6c445);
}

.topbar-nav-btn.active i {
  color: var(--ptsms-yellow, #f6c445);
}

.topbar-page-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

@media (max-width: 576px) {
  .topbar-nav-label {
    display: none;
  }

  .topbar-context-badge {
    display: none;
  }
}

/* ── Page Content ────────────────────────────────── */
.page-content {
  padding: var(--ptsms-content-padding);
  flex: 1;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: var(--ptsms-font-size-xl);
}

.page-header p {
  color: var(--ptsms-text-muted);
  margin-top: 4px;
}

/* ── Login Screen (Split Panel) ──────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ptsms-bg);
}

.login-card {
  display: flex;
  width: 880px;
  max-width: 96vw;
  min-height: 520px;
  border-radius: var(--ptsms-radius-lg);
  overflow: hidden;
  box-shadow: var(--ptsms-shadow-xl);
}

/* Left panel — dark navy with HARTING yellow brand */
.login-brand-panel {
  width: 42%;
  background: var(--ptsms-navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px;
  text-align: center;
  gap: 20px;
}

.login-brand-panel .brand-icon {
  width: 140px;
  height: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-panel .brand-icon img {
  width: 100%;
  height: auto;
  display: block;
}

.login-brand-panel h1 {
  color: white;
  font-size: 1.25rem;
  line-height: 1.4;
}

.login-brand-panel h1 span {
  color: var(--ptsms-yellow);
}

.login-brand-panel p {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--ptsms-font-size-sm);
}

.login-brand-panel .version-tag {
  margin-top: auto;
  padding: 4px 10px;
  background: rgba(255, 204, 0, 0.15);
  border: 1px solid rgba(255, 204, 0, 0.3);
  border-radius: var(--ptsms-radius-xs);
  color: var(--ptsms-yellow);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Right panel — white form */
.login-form-panel {
  flex: 1;
  background: var(--ptsms-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 40px;
}

.login-form-panel h2 {
  font-size: var(--ptsms-font-size-xl);
  margin-bottom: 8px;
}

.login-form-panel .login-subtitle {
  color: var(--ptsms-text-muted);
  margin-bottom: 32px;
  font-size: var(--ptsms-font-size-sm);
}

/* ── Home Screen ──────────────────────────────────── */
.home-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ptsms-bg);
}

/* Header — sticky, subtle gradient, thin yellow accent */
.home-header {
  background: linear-gradient(180deg, #1d2b37 0%, #1a2732 100%);
  color: white;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 2px solid var(--ptsms-yellow);
}

.home-header .app-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-header .app-title span {
  color: var(--ptsms-yellow);
  margin: 0 4px;
}

.home-header .user-info {
  font-size: var(--ptsms-font-size-sm);
  color: rgba(255, 255, 255, 0.75);
}

/* Hero band — greeting + role summary */
.home-hero {
  background: linear-gradient(135deg, #1d2b37 0%, #253545 100%);
  color: white;
  padding: 40px 40px 80px;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.14) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 204, 0, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.home-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.home-hero .home-greeting {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.home-hero .home-subtitle {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-size: 0.95rem;
}

.home-hero .home-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 204, 0, 0.12);
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-radius: 999px;
  color: var(--ptsms-yellow);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

/* Role summary card on the right of hero */
.hero-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 130px;
  backdrop-filter: blur(6px);
}

.hero-stat .hero-stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.hero-stat .hero-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ptsms-yellow);
  margin-top: 2px;
  line-height: 1.1;
}

/* Content area — pulled up over hero */
.home-content {
  flex: 1;
  padding: 0 40px 48px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.home-content-inner {
  max-width: 1180px;
  margin: 0 auto;
}

/* Role section (a card containing a group of tiles) */
.role-section {
  background: var(--ptsms-surface);
  border-radius: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.06);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.role-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ptsms-border);
}

.role-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-section-title .role-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
  box-shadow: 0 2px 6px rgba(255, 204, 0, 0.35);
}

.role-section-title .role-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-section-title .role-sub {
  font-size: 0.72rem;
  color: var(--ptsms-text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.role-section-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ptsms-text-muted);
  background: var(--ptsms-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Tile grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.tile {
  position: relative;
  background: var(--ptsms-surface);
  border: 1.5px solid var(--ptsms-border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  overflow: hidden;
}

.tile::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ptsms-yellow);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.tile:hover {
  border-color: var(--ptsms-yellow);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}

.tile:hover::before {
  transform: scaleY(1);
}

.tile:hover .tile-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.tile:hover .tile-icon {
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
}

.tile-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  background: var(--ptsms-yellow-light);
  color: var(--ptsms-navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.tile-body {
  flex: 1;
  min-width: 0;
}

.tile-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ptsms-text);
  line-height: 1.3;
}

.tile-desc {
  font-size: 0.75rem;
  color: var(--ptsms-text-muted);
  margin-top: 3px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tile-arrow {
  flex: 0 0 auto;
  color: var(--ptsms-text-light);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
}

/* Empty state */
.home-empty {
  background: var(--ptsms-surface);
  border-radius: 14px;
  padding: 60px 40px;
  text-align: center;
  color: var(--ptsms-text-muted);
  box-shadow: var(--ptsms-shadow-sm);
}

.home-empty i {
  font-size: 2.5rem;
  color: var(--ptsms-text-light);
  margin-bottom: 12px;
  display: block;
}

/* Footer */
.home-footer {
  text-align: center;
  padding: 18px 24px;
  font-size: 0.72rem;
  color: var(--ptsms-text-muted);
  border-top: 1px solid var(--ptsms-border);
  background: var(--ptsms-surface);
}

.home-footer .footer-dot {
  color: var(--ptsms-text-light);
  margin: 0 8px;
}

/* Responsive */
@media (max-width: 720px) {
  .home-hero {
    padding: 28px 20px 72px;
  }

  .home-hero .home-greeting {
    font-size: 1.5rem;
  }

  .home-content {
    padding: 0 20px 32px;
  }

  .role-section {
    padding: 18px;
  }

  .hero-summary {
    width: 100%;
  }
}

/* ── Utilities ───────────────────────────────────── */
.text-muted {
  color: var(--ptsms-text-muted);
}

.text-yellow {
  color: var(--ptsms-yellow);
}

.text-navy {
  color: var(--ptsms-navy);
}

.text-success {
  color: var(--ptsms-success);
}

.text-danger {
  color: var(--ptsms-danger);
}

.text-warning {
  color: var(--ptsms-warning);
}

.text-sm {
  font-size: var(--ptsms-font-size-sm);
}

.text-lg {
  font-size: var(--ptsms-font-size-lg);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mt-6 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 4px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.w-full {
  width: 100%;
}

/* ============================================================
   Permission Picker — grouped toggle switches
   Used by Admin/Users/Create and Edit pages.
   ============================================================ */
.perm-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--ptsms-bg);
  border-radius: var(--ptsms-radius-md);
  border: 1px solid var(--ptsms-border);
}

.perm-section-header {
  margin-bottom: 14px;
}

.perm-section-header h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.perm-section-header p {
  margin: 0;
}

.perm-admin-toggle {
  background: var(--ptsms-surface);
  border: 1.5px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

.perm-admin-toggle .perm-row {
  padding: 14px 16px;
}

.perm-admin-toggle:has(input:checked) {
  border-color: var(--ptsms-yellow);
  background: linear-gradient(0deg, var(--ptsms-yellow-light), var(--ptsms-surface));
}

.perm-admin-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--ptsms-info-bg);
  color: var(--ptsms-info);
  border: 1px solid var(--ptsms-info-border);
  border-radius: var(--ptsms-radius-sm);
  font-size: var(--ptsms-font-size-sm);
}

#permGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  align-items: start;
  transition: opacity .15s ease;
}

#permGrid.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.perm-group {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  overflow: hidden;
}

.perm-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ptsms-navy);
  color: var(--ptsms-text-on-navy);
}

.perm-group-header>i {
  font-size: 1.1rem;
}

.perm-group-heading {
  flex: 1;
  min-width: 0;
}

.perm-group-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.perm-group-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, .7);
}

.perm-group-selectall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .75);
  cursor: pointer;
  user-select: none;
  padding: 6px 10px;
  border-radius: var(--ptsms-radius-xs);
  transition: background .12s ease, color .12s ease;
}

.perm-group-selectall:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.perm-group-selectall .toggle-track {
  background: rgba(255, 255, 255, .28);
}

.perm-group-selectall input:checked+.toggle-track {
  background: var(--ptsms-yellow);
}

.perm-group-body {
  padding: 4px 0;
}

.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--ptsms-border);
  transition: background .12s ease;
}

.perm-group-body .perm-row:last-child {
  border-bottom: none;
}

.perm-row:hover {
  background: var(--ptsms-bg);
}

.perm-row-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.perm-row-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ptsms-yellow-light);
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.perm-row-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.perm-row-desc {
  color: var(--ptsms-text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

/* Toggle switch — accessible, keyboard-focusable */
.toggle-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
  z-index: 2;
}

.toggle-switch input:disabled {
  cursor: not-allowed;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .18s ease;
}

.toggle-knob {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transform: translateY(-50%);
  transition: transform .18s ease;
}

.toggle-switch input:checked+.toggle-track {
  background: var(--ptsms-yellow);
}

.toggle-switch input:checked+.toggle-track .toggle-knob {
  transform: translate(20px, -50%);
}

/* Password rules — live checklist under password fields */
.pw-rules {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.pw-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ptsms-text-muted);
  transition: color .12s ease;
}

.pw-rules li i {
  font-size: 0.75rem;
  width: 14px;
  text-align: center;
}

.pw-rules li.is-ok {
  color: var(--ptsms-success);
  font-weight: 600;
}

.pw-rules li.is-fail {
  color: var(--ptsms-danger);
}

/* Master Data chooser tiles (/Admin/Masters) */
.master-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  color: var(--ptsms-text);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.master-tile:hover {
  transform: translateY(-2px);
  border-color: var(--ptsms-yellow);
  box-shadow: var(--ptsms-shadow-md);
  color: var(--ptsms-text);
}

.master-tile-icon {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ptsms-yellow-light);
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.master-tile-body {
  flex: 1;
  min-width: 0;
}

.master-tile-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.master-tile-desc {
  font-size: 0.85rem;
  color: var(--ptsms-text-muted);
}

.master-tile-arrow {
  color: var(--ptsms-text-light);
  transition: color .12s ease, transform .12s ease;
}

.master-tile:hover .master-tile-arrow {
  color: var(--ptsms-navy);
  transform: translateX(4px);
}

/* Master Data picker modal (opened from Home tile) */
.mm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: mmFade .15s ease;
}

.mm-backdrop.is-open {
  display: flex;
}

@keyframes mmFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes mmPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.mm-dialog {
  position: relative;
  background: var(--ptsms-surface);
  border-radius: var(--ptsms-radius-lg);
  box-shadow: var(--ptsms-shadow-xl);
  width: 100%;
  max-width: 520px;
  padding: 24px;
  animation: mmPop .18s ease;
}

.mm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ptsms-text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: background .12s ease, color .12s ease;
}

.mm-close:hover {
  background: var(--ptsms-bg);
  color: var(--ptsms-text);
}

.mm-header {
  margin-bottom: 16px;
}

.mm-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.mm-header h3 i {
  color: var(--ptsms-yellow);
}

.mm-header p {
  margin: 0;
  color: var(--ptsms-text-muted);
  font-size: .875rem;
}

.mm-choices {
  display: grid;
  gap: 10px;
}

.mm-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  text-decoration: none;
  color: var(--ptsms-text);
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.mm-choice:hover {
  border-color: var(--ptsms-yellow);
  background: var(--ptsms-yellow-light);
  transform: translateY(-1px);
  color: var(--ptsms-text);
}

.mm-choice>div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.mm-choice-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ptsms-yellow-light);
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.mm-choice-title {
  font-weight: 700;
  font-size: 1rem;
}

.mm-choice-desc {
  color: var(--ptsms-text-muted);
  font-size: .8rem;
  margin-top: 2px;
}

.mm-choice-arrow {
  color: var(--ptsms-text-light);
  transition: color .12s ease, transform .12s ease;
}

.mm-choice:hover .mm-choice-arrow {
  color: var(--ptsms-navy);
  transform: translateX(4px);
}

/* Read-only pill — shown on master pages when user lacks MasterWrite */
.pill-readonly {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ptsms-bg);
  color: var(--ptsms-text-muted);
  border: 1px solid var(--ptsms-border);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

.toggle-switch input:focus-visible+.toggle-track {
  box-shadow: 0 0 0 3px rgba(255, 204, 0, .35);
}

.toggle-switch input:disabled+.toggle-track {
  opacity: .55;
}

/* ============================================================
   Maintenance Countdown Banner (bottom-right corner)
   ============================================================ */
.maintenance-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  max-width: 340px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
  border: 2px solid var(--ptsms-yellow-dark);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
  font-weight: 600;
  font-size: 0.92rem;
  animation: maint-pulse 2.4s ease-in-out infinite;
}

.maintenance-banner-icon {
  font-size: 1.4rem;
  color: var(--ptsms-navy);
  flex-shrink: 0;
}

.maintenance-banner-text {
  line-height: 1.35;
}

.maintenance-banner-imminent {
  background: var(--ptsms-danger);
  color: #ffffff;
  border-color: #a01818;
  animation: maint-pulse-strong 1.2s ease-in-out infinite;
}

.maintenance-banner-imminent .maintenance-banner-icon {
  color: #ffffff;
}

@keyframes maint-pulse {

  0%,
  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
  }

  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 6px rgba(255, 204, 0, 0.35);
  }
}

@keyframes maint-pulse-strong {

  0%,
  100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(220, 38, 38, 0.55);
  }

  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(220, 38, 38, 0.15);
  }
}

@media (max-width: 640px) {
  .maintenance-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

/* ============================================================
   Clause Hero — reusable clause-context header for detail pages
   Used by Admin/Assignments/Edit and future stage screens
   ============================================================ */
.clause-hero {
  position: relative;
  background: linear-gradient(135deg, var(--ptsms-navy) 0%, #263749 100%);
  color: var(--ptsms-text-on-navy);
  border-radius: var(--ptsms-radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--ptsms-shadow-sm);
  border-left: 4px solid var(--ptsms-yellow);
  overflow: hidden;
}

.clause-hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(255, 204, 0, 0.10), transparent 65%);
  pointer-events: none;
}

.clause-hero .clause-hero-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.clause-hero .clause-hero-breadcrumb .sep {
  color: rgba(255, 255, 255, 0.35);
}

.clause-hero .clause-hero-breadcrumb .crumb-strong {
  color: var(--ptsms-yellow);
  font-weight: 600;
}

.clause-hero-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: stretch;
}

.clause-hero-no {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 204, 0, 0.25);
  border-radius: var(--ptsms-radius-sm);
}

.clause-hero-no .lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 2px;
}

.clause-hero-no .num {
  font-family: 'Source Sans 3', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ptsms-yellow);
  line-height: 1.1;
}

.clause-hero-question {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.clause-hero-question .q-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 4px;
}

.clause-hero-question .q-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}

.clause-hero-question .q-meta {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.clause-hero-question .q-meta .meta-item i {
  color: var(--ptsms-yellow);
  margin-right: 4px;
}

.clause-hero-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 200px;
}

.clause-hero-status .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.pill-assigned {
  background: var(--ptsms-success-bg);
  color: var(--ptsms-success);
}

.status-pill.pill-unassigned {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.status-pill.pill-overdue {
  background: var(--ptsms-danger-bg);
  color: var(--ptsms-danger);
}

.clause-hero-status .status-line {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: right;
}

.clause-hero-status .status-line .lbl {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-right: 4px;
}

@media (max-width: 900px) {
  .clause-hero-body {
    grid-template-columns: 1fr;
  }

  .clause-hero-status {
    align-items: flex-start;
  }

  .clause-hero-status .status-line {
    text-align: left;
  }
}

/* ============================================================
   Form section — grouped panel used on assignment/stage forms
   ============================================================ */
.form-section {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}

.form-section .form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--ptsms-bg);
  border-bottom: 1px solid var(--ptsms-border);
}

.form-section .form-section-head .fs-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ptsms-navy);
  font-size: 0.95rem;
}

.form-section .form-section-head .fs-title i {
  color: var(--ptsms-yellow);
}

.form-section .form-section-head .fs-hint {
  font-size: 0.75rem;
  color: var(--ptsms-text-muted);
}

.form-section .form-section-body {
  padding: 18px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}

.support-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--ptsms-surface);
  border: 1.5px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  cursor: pointer;
  transition: border-color 120ms, background 120ms, box-shadow 120ms;
}

.support-chip:hover {
  border-color: var(--ptsms-yellow);
  box-shadow: var(--ptsms-shadow-sm);
}

.support-chip input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

.support-chip:has(input:checked) {
  border-color: var(--ptsms-yellow);
  background: var(--ptsms-yellow-light);
}

.support-chip .chip-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ptsms-text);
  line-height: 1.2;
}

.support-chip .chip-dept {
  font-size: 0.72rem;
  color: var(--ptsms-text-muted);
  margin-top: 2px;
}

.support-chip .chip-inactive {
  margin-left: 4px;
  font-size: 0.65rem;
  color: var(--ptsms-danger);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.support-chip-label {
  flex: 1;
  min-width: 0;
}

.form-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-top: 3px solid var(--ptsms-navy);
  border-radius: var(--ptsms-radius-md);
  position: sticky;
  bottom: 12px;
  z-index: 10;
  box-shadow: var(--ptsms-shadow-sm);
}

.form-action-bar .action-note {
  color: var(--ptsms-text-muted);
  font-size: 0.8rem;
}

/* ==================================================================
   Clause Detail — Stage Stepper, Banner, Tabs, Action Bar, Side Rail
   ================================================================== */

/* Sticky stepper sits directly under the sticky topbar */
.clause-stepper {
  position: sticky;
  top: 56px;
  z-index: 40;
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 10px 14px;
  box-shadow: var(--ptsms-shadow-sm);
  margin-bottom: 12px;
}

.clause-stepper-track {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.clause-stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 92px;
  padding: 4px 2px;
  border-radius: 6px;
  cursor: default;
  transition: background 0.12s ease;
}

.clause-stepper-step.is-clickable {
  cursor: pointer;
}

.clause-stepper-step.is-clickable:hover {
  background: rgba(255, 204, 0, 0.08);
}

.clause-stepper-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid var(--ptsms-border);
  background: #fff;
  color: var(--ptsms-text-muted);
  transition: all 0.15s ease;
}

.clause-stepper-step.is-done .clause-stepper-bubble {
  background: var(--ptsms-success);
  color: #fff;
  border-color: var(--ptsms-success);
}

.clause-stepper-step.is-active .clause-stepper-bubble {
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
  border-color: var(--ptsms-navy);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}

.clause-stepper-step.is-inprogress .clause-stepper-bubble {
  background: #fff;
  color: var(--ptsms-warning);
  border-color: var(--ptsms-warning);
}

.clause-stepper-step.is-locked .clause-stepper-bubble {
  background: #f3f4f6;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.clause-stepper-label {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 3px;
  color: var(--ptsms-navy);
  text-align: center;
  line-height: 1.1;
  max-width: 90px;
}

.clause-stepper-step.is-locked .clause-stepper-label {
  color: #94a3b8;
}

.clause-stepper-connector {
  flex: 1;
  height: 2px;
  background: var(--ptsms-border);
  min-width: 14px;
  max-width: 36px;
  margin-top: -18px;
}

.clause-stepper-connector.is-done {
  background: var(--ptsms-success);
}

/* Stage Banner Header (Treatment 1 - White Surface) */
.stage-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #ffffff;
  color: var(--ptsms-navy);
  border-radius: var(--ptsms-radius-md) var(--ptsms-radius-md) 0 0;
  border-bottom: 1px solid var(--ptsms-border);
  position: relative;
}

.stage-banner .stage-eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ptsms-text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.stage-banner .stage-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ptsms-navy) !important;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.stage-banner .stage-desc {
  font-size: 0.82rem;
  color: var(--ptsms-text-muted);
  margin: 0;
  max-width: 780px;
  line-height: 1.4;
}

.stage-banner .stage-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
  white-space: nowrap;
}

.stage-banner .stage-status-chip.is-completed {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #15803d;
}

.stage-banner .stage-status-chip.is-inprogress {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.stage-banner .help-btn {
  background: transparent;
  color: var(--ptsms-yellow);
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  margin-left: 6px;
}

.stage-banner .help-btn:hover {
  opacity: 0.8;
}

/* Tabs inside the active-stage card */
.stage-tabs {
  border-bottom: 1px solid var(--ptsms-border);
  background: #fafbfc;
  padding: 0 12px;
  display: flex;
  gap: 2px;
}

.stage-tabs .stage-tab {
  border: none;
  background: transparent;
  color: var(--ptsms-text-muted);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.stage-tabs .stage-tab:hover {
  color: var(--ptsms-navy);
}

.stage-tabs .stage-tab.active {
  color: var(--ptsms-navy);
  border-bottom-color: var(--ptsms-yellow);
}

.stage-tab-panel {
  display: none;
  padding: 18px;
}

.stage-tab-panel.active {
  display: block;
}

/* Sticky action bar at the bottom of the stage card */
.stage-action-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--ptsms-border);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 0 0 var(--ptsms-radius-md) var(--ptsms-radius-md);
  z-index: 5;
}

.stage-action-bar .action-hint {
  font-size: 0.78rem;
  color: var(--ptsms-text-muted);
}

.stage-action-bar .unsaved-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ptsms-warning);
  margin-right: 6px;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Quick-facts side rail */
.quick-facts .qf-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.quick-facts .qf-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ptsms-text-muted);
  font-weight: 700;
}

.quick-facts .qf-value {
  font-size: 0.95rem;
  color: var(--ptsms-navy);
  font-weight: 600;
  margin-top: 2px;
}

.quick-facts .qf-value.small {
  font-size: 0.82rem;
  font-weight: 500;
}

/* Compact question strip (replaces old question card) */
.clause-summary-strip {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-left: 4px solid var(--ptsms-yellow);
  border-radius: var(--ptsms-radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.clause-summary-strip .cs-body {
  flex: 1;
  min-width: 0;
}

.clause-summary-strip .cs-question {
  font-size: 0.92rem;
  color: var(--ptsms-navy);
  margin: 0;
  line-height: 1.35;
}

.clause-summary-strip .cs-meta {
  font-size: 0.72rem;
  color: var(--ptsms-text-muted);
  margin-top: 4px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.clause-summary-strip .cs-meta strong {
  color: var(--ptsms-navy);
}

/* Inline evidence dropzone (in the stage tab) */
.evidence-dropzone {
  border: 2px dashed var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 18px;
  text-align: center;
  background: #fafbfc;
  transition: all 0.15s ease;
  cursor: pointer;
}

.evidence-dropzone:hover {
  border-color: var(--ptsms-yellow);
  background: rgba(255, 204, 0, 0.04);
}

.evidence-dropzone .dz-icon {
  font-size: 1.8rem;
  color: var(--ptsms-navy);
  opacity: 0.55;
}

.evidence-dropzone .dz-primary {
  font-weight: 600;
  color: var(--ptsms-navy);
  margin: 6px 0 2px;
}

.evidence-dropzone .dz-sub {
  font-size: 0.75rem;
  color: var(--ptsms-text-muted);
}

/* ==================================================================
   My Dashboard
   ================================================================== */

/* Hero Page Header */
.mdash-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 0 6px;
}

.mdash-hero-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease;
}

.mdash-hero-icon:hover {
  transform: rotate(6deg) scale(1.05);
}

.mdash-hero-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  letter-spacing: -0.02em;
  font-family: var(--ptsms-font);
  line-height: 1.2;
}

.badge-live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.mdash-hero-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

/* Modern Audit Selector Pill */
.mdash-audit-picker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ptsms-surface);
  border: 1.5px solid var(--ptsms-border);
  border-radius: 10px;
  padding: 6px 14px 6px 10px;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  position: relative;
  min-width: 320px;
}

.mdash-audit-picker:hover,
.mdash-audit-picker:focus-within {
  border-color: var(--ptsms-navy);
  box-shadow: 0 4px 12px -2px rgba(29, 43, 55, 0.12);
  transform: translateY(-1px);
}

.mdash-audit-picker .picker-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.25) 0%, rgba(255, 204, 0, 0.08) 100%);
  color: var(--ptsms-navy);
  border: 1px solid rgba(255, 204, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.mdash-audit-picker .picker-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mdash-audit-picker .picker-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.mdash-audit-picker .picker-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ptsms-text-muted);
  line-height: 1;
}

.mdash-audit-picker .picker-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.mdash-audit-picker .picker-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: transparent;
  border: none;
  padding: 0 22px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  cursor: pointer;
  outline: none;
  line-height: 1.25;
}

.mdash-audit-picker .picker-select:focus {
  outline: none;
  box-shadow: none;
}

.mdash-audit-picker .picker-chevron {
  position: absolute;
  right: 0;
  font-size: 0.72rem;
  color: var(--ptsms-text-muted);
  pointer-events: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mdash-audit-picker:hover .picker-chevron,
.mdash-audit-picker:focus-within .picker-chevron {
  color: var(--ptsms-navy);
}

/* Modern Executive KPI Metric Cards */
.mdash-kpi-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 16px;
}

@media (max-width: 1200px) {
  .mdash-kpi-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .mdash-kpi-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-seg {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kpi-seg:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.kpi-seg-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #64748b;
}

.kpi-seg-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: transform 0.2s ease;
}

.kpi-seg:hover .kpi-seg-icon {
  transform: scale(1.08);
}

.kpi-seg.tone-info .kpi-seg-icon {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.kpi-seg.tone-info {
  border-top: 3px solid #3b82f6;
}

.kpi-seg.tone-active .kpi-seg-icon {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.kpi-seg.tone-active {
  border-top: 3px solid #f59e0b;
}

.kpi-seg.tone-good .kpi-seg-icon {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.kpi-seg.tone-good {
  border-top: 3px solid #10b981;
}

.kpi-seg.tone-warn .kpi-seg-icon {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.kpi-seg.tone-warn {
  border-top: 3px solid #f59e0b;
}

.kpi-seg.tone-danger .kpi-seg-icon {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.kpi-seg.tone-danger {
  border-top: 3px solid #ef4444;
}

.kpi-seg.tone-neutral .kpi-seg-icon {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.kpi-seg.tone-neutral {
  border-top: 3px solid #94a3b8;
}

.kpi-seg-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  font-family: var(--ptsms-font);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.kpi-seg.tone-danger .kpi-seg-value {
  color: #dc2626;
}

.kpi-seg-unit {
  font-size: 0.88rem;
  font-weight: 700;
  margin-left: 2px;
  color: #64748b;
}

.kpi-seg-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
  border-top: 1px dashed #f1f5f9;
}

.kpi-sub-highlight {
  font-weight: 700;
  color: var(--ptsms-navy);
}

.mdash-panels {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .mdash-panels {
    grid-template-columns: 1fr;
  }
}

.mdash-panel {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 16px;
  box-shadow: var(--ptsms-shadow-sm);
}

.mdash-panel-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ptsms-text-muted);
  font-weight: 700;
  margin-bottom: 10px;
}

/* Horizontal funnel */
.funnel-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
}

.funnel-row .fn-label {
  font-size: 0.78rem;
  color: var(--ptsms-navy);
  font-weight: 600;
}

.funnel-row .fn-bar-outer {
  height: 14px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}

.funnel-row .fn-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--ptsms-yellow), #ffb800);
  border-radius: 8px;
  transition: width 0.4s ease;
}

.funnel-row.is-complete .fn-bar-inner {
  background: var(--ptsms-success);
}

.funnel-row .fn-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  text-align: right;
}

/* Donut */
.mdash-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mdash-donut {
  --pct: 0;
  --size: 130px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(var(--ptsms-success) calc(var(--pct) * 1%), #e5e7eb 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.mdash-donut::before {
  content: '';
  position: absolute;
  width: calc(var(--size) - 30px);
  height: calc(var(--size) - 30px);
  background: #fff;
  border-radius: 50%;
}

.mdash-donut .donut-text {
  position: relative;
  z-index: 1;
  text-align: center;
}

.mdash-donut .donut-pct {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  line-height: 1;
}

.mdash-donut .donut-sub {
  font-size: 0.7rem;
  color: var(--ptsms-text-muted);
  margin-top: 2px;
}

.mdash-donut-legend {
  font-size: 0.8rem;
  color: var(--ptsms-navy);
}

.mdash-donut-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Pipeline summary bar */
.mdash-pipeline-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 14px 16px 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--ptsms-shadow-sm);
}

.mdash-pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.mdash-pipeline-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

@@media (min-width: 1200px) {
  .mdash-pipeline-track {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

.mdash-pipeline-node {
  background: #ffffff;
  border: 1px solid var(--ptsms-border);
  border-radius: 8px;
  padding: 10px 12px 0 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mdash-pipeline-node .pipeline-node-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.mdash-pipeline-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.mdash-pipeline-node.is-active {
  background: #fffdf5;
  border-color: var(--ptsms-navy);
  box-shadow: 0 0 0 2px var(--ptsms-yellow), 0 4px 14px rgba(29, 43, 55, 0.12);
  transform: translateY(-2px);
}

/* Pipeline Node Top Row */
.mdash-pipeline-node .pipeline-node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  min-height: 18px;
}

.mdash-pipeline-node .stage-tag-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.03em;
}

.mdash-pipeline-node .stage-tag-label.is-done-tag {
  color: var(--ptsms-success);
  font-weight: 800;
}

/* Stage Name */
.mdash-pipeline-node .stage-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  line-height: 1.25;
  min-height: 2.5em;
  max-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.mdash-pipeline-node .stage-name.is-done-name {
  color: var(--ptsms-success);
}

/* Stage Bottom Row */
.mdash-pipeline-node .stage-bottom-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: auto;
  margin-bottom: 7px;
}

.mdash-pipeline-node .stage-progress-fraction {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.mdash-pipeline-node .frac-completed {
  font-size: 0.92rem;
  font-weight: 800;
  font-family: var(--ptsms-font);
}

.mdash-pipeline-node .frac-slash {
  font-size: 0.72rem;
  color: #94a3b8;
  margin: 0 1px;
}

.mdash-pipeline-node .frac-total {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}

.mdash-pipeline-node .stage-pct-label {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--ptsms-font);
  color: #64748b;
  line-height: 1;
}

/* Bottom Progress Rail */
.mdash-pipeline-node .stage-progress-rail {
  height: 3px;
  background: #e2e8f0;
  margin: 0 -12px;
  overflow: hidden;
  border-radius: 0 0 7px 7px;
}

.mdash-pipeline-node .stage-progress-fill {
  height: 100%;
  background: #e2e8f0;
  transition: width 0.35s ease;
}

.mdash-pipeline-node.state-active .stage-progress-fill,
.mdash-pipeline-node .stage-progress-fill.is-active-fill {
  background: var(--ptsms-yellow-dark);
}

.mdash-pipeline-node.state-complete .stage-progress-fill,
.mdash-pipeline-node .stage-progress-fill.is-complete-fill {
  background: var(--ptsms-success);
}

.mdash-pipeline-node .stage-progress-fill.is-done-fill {
  background: var(--ptsms-success);
}

/* ── All Clauses & Stages Matrix View ── */
.mdash-matrix-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  overflow: hidden;
  margin-top: 6px;
}

.mdash-matrix-header {
  padding: 14px 18px 12px;
  background: #fcfdfe;
  border-bottom: 1px solid #f1f5f9;
}

.mdash-matrix-icon-badge {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.mdash-matrix-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ptsms-navy);
}

.matrix-count-badge {
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.matrix-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 10px;
  min-width: 240px;
  height: 34px;
  transition: all 0.15s ease;
}

.matrix-search-box:focus-within {
  border-color: var(--ptsms-navy);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.matrix-search-icon {
  color: #94a3b8;
  font-size: 0.82rem;
  margin-right: 8px;
  flex-shrink: 0;
}

.matrix-search-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100%;
  font-size: 0.82rem;
  color: var(--ptsms-navy);
  padding: 0 !important;
  height: 100%;
}

.matrix-search-input::placeholder {
  color: #94a3b8;
}

.matrix-search-clear {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.8rem;
  margin-left: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.matrix-search-clear:hover {
  color: #dc2626;
}

.mdash-matrix-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.matrix-filter-btn {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  transition: all 0.15s ease;
}

.matrix-filter-btn:hover {
  background: #f1f5f9;
  color: var(--ptsms-navy);
}

.matrix-filter-btn.active {
  background: var(--ptsms-navy);
  border-color: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  font-weight: 700;
}

.matrix-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
  font-weight: 600;
}

.matrix-legend .legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.matrix-legend .bg-light-slate {
  background: #cbd5e1;
}

/* Column Header Strip */
.clause-matrix-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 210px minmax(210px, 0.85fr) 490px;
  gap: 16px;
  padding: 10px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.col-head-clause {
  text-align: left;
}

.col-head-time {
  text-align: left;
}

.col-head-stage {
  text-align: left;
}

.col-head-stepper {
  text-align: left;
}

@media (max-width: 992px) {
  .clause-matrix-head {
    display: none !important;
  }
}

/* Clauses Matrix List & Rows */
.clause-matrix-list {
  display: flex;
  flex-direction: column;
}

.clause-matrix-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 210px minmax(210px, 0.85fr) 490px;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s ease;
  background: #ffffff;
  align-items: center;
}

.clause-matrix-row:last-child {
  border-bottom: none;
}

.clause-matrix-row:hover {
  background: #f8fafc;
}

.clause-matrix-row.row-is-overdue {
  background: #fffafa;
  border-left: 3px solid #ef4444;
}

.clause-matrix-row.row-is-done {
  border-left: 3px solid #10b981;
}

/* Zone 2: Time Taken & Days Remaining */
.clause-col-time {
  display: flex;
  align-items: center;
  min-width: 0;
}

.time-timeline-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.time-due-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  line-height: 1.25;
  white-space: nowrap;
}

.time-status-pill i {
  font-size: 0.72rem;
}

.time-status-pill.pill-done {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.time-status-pill.pill-overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.time-status-pill.pill-duesoon {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.time-status-pill.pill-date {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.time-status-pill.pill-nodate {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.time-meta-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.71rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.time-spent-tag {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.time-spent-tag i {
  font-size: 0.68rem;
  opacity: 0.75;
}

.time-sep-dot {
  color: #cbd5e1;
  font-weight: 800;
}

.time-due-target {
  color: #475569;
  font-weight: 700;
}

@media (max-width: 992px) {
  .clause-matrix-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Zone 1: Clause & Requirement Details */
.clause-col-details {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.clause-section-code-pill {
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.clause-col-details:hover .clause-section-code-pill {
  background: #e2e8f0;
  color: var(--ptsms-navy);
}

.clause-id-badge {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  font-family: var(--ptsms-font);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 3px 9px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.clause-col-details:hover .clause-id-badge {
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  border-color: var(--ptsms-navy);
}

.clause-short-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clause-section-mini {
  font-size: 0.76rem;
  color: #475569;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
}

.pill-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.pill-overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.pill-duesoon {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.pill-date {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Zone 2: Active Stage & Readiness Widget */
.clause-col-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}

.stage-widget-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.15s ease;
}

.clause-col-stage:hover .stage-widget-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.stage-widget-card.widget-inprog {
  background: #fffdf8;
  border-color: #fde68a;
}

.stage-widget-card.widget-overdue {
  background: #fff8f8;
  border-color: #fecaca;
}

.stage-widget-card.widget-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stage-widget-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.widget-stage-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.25;
  flex-shrink: 0;
}

.widget-stage-chip.chip-inprog {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.widget-stage-chip.chip-overdue {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.widget-stage-chip.chip-done {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.widget-stage-chip.chip-initial {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.widget-stage-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.widget-fraction-pill {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.stage-widget-card.widget-inprog .widget-fraction-pill {
  border-color: #fde68a;
  color: #b45309;
}

.stage-widget-card.widget-done .widget-fraction-pill {
  border-color: #86efac;
  color: #15803d;
}

.widget-progress-rail {
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.widget-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.widget-progress-fill.fill-done {
  background: #10b981;
}

.widget-progress-fill.fill-inprog {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.widget-progress-fill.fill-overdue {
  background: #ef4444;
}

.widget-progress-fill.fill-initial {
  background: #cbd5e1;
}

/* Zone 3: 7-Stage Connected Stepper Track */
.clause-col-stepper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.stage-connected-track {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.stage-connector-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 2px;
}

.stage-connector-line.line-done {
  background: #10b981;
}

.stage-node-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  min-width: 48px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.stage-node-pill .node-num {
  font-size: 0.86rem;
  font-weight: 800;
}

.stage-node-pill i {
  font-size: 0.84rem;
}

.stage-node-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.stage-node-pill.node-done {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

.stage-node-pill.node-inprog {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.stage-node-pill.node-inprog .node-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
}

.stage-node-pill.node-overdue {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.stage-node-pill.node-pending {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.stage-node-pill.node-final {
  min-width: 36px;
  font-size: 0.95rem;
}

.stage-node-pill.node-final.node-done {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.btn-row-open {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--ptsms-navy);
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-row-open:hover {
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  border-color: var(--ptsms-navy);
  transform: translateX(2px);
}

/* Master-Detail Workspace */
.mdash-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

@media (max-width: 1080px) {
  .mdash-workspace {
    grid-template-columns: 1fr;
  }
}

/* Left Navigator */
.mdash-navigator {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  min-height: 520px;
  position: sticky;
  top: 70px;
}

.mdash-nav-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--ptsms-border);
  background: #fafbfc;
  border-radius: var(--ptsms-radius-md) var(--ptsms-radius-md) 0 0;
}

.mdash-nav-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.mdash-nav-filter-btn {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--ptsms-border);
  background: #fff;
  color: var(--ptsms-text-muted);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s ease;
}

.mdash-nav-filter-btn:hover {
  border-color: var(--ptsms-navy);
  color: var(--ptsms-navy);
}

.mdash-nav-filter-btn.active {
  background: var(--ptsms-navy);
  border-color: var(--ptsms-navy);
  color: #fff;
}

.mdash-clause-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
}

.mdash-clause-list::-webkit-scrollbar {
  width: 6px;
}

.mdash-clause-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.mdash-clause-card {
  display: block;
  background: #fff;
  border: 1.5px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  position: relative;
}

.mdash-clause-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateX(2px);
  text-decoration: none;
  color: inherit;
}

.mdash-clause-card.is-selected {
  border-color: var(--ptsms-navy);
  background: var(--ptsms-yellow-light);
  box-shadow: 0 0 0 2px rgba(29, 43, 55, 0.15);
}

.mdash-clause-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mdash-clause-card .clause-no {
  font-family: monospace;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ptsms-navy);
}

.mdash-clause-card .clause-question {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ptsms-text);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mdash-clause-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
}

.mdash-clause-card .stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(29, 43, 55, 0.08);
  color: var(--ptsms-navy);
}

.mdash-clause-card .stage-tag.is-done {
  background: var(--ptsms-success-bg);
  color: var(--ptsms-success);
}

/* Right Work Desk */
.mdash-workdesk {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  display: flex;
  flex-direction: column;
}

.mdash-desk-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ptsms-border);
  background: #fff;
  border-radius: var(--ptsms-radius-md) var(--ptsms-radius-md) 0 0;
}

.mdash-desk-body {
  padding: 16px 18px;
}

/* Inline Stepper in Workdesk */
.mdash-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.mdash-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
  text-align: center;
}

.mdash-step-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  border: 2px solid var(--ptsms-border);
  background: #fff;
  color: var(--ptsms-text-muted);
  transition: all 0.15s ease;
}

.mdash-step-node.is-done .mdash-step-bubble {
  background: var(--ptsms-success);
  border-color: var(--ptsms-success);
  color: #fff;
}

.mdash-step-node.is-active .mdash-step-bubble {
  background: var(--ptsms-yellow);
  border-color: var(--ptsms-navy);
  color: var(--ptsms-navy);
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.3);
}

.mdash-step-node.is-inprogress .mdash-step-bubble {
  border-color: var(--ptsms-warning);
  color: var(--ptsms-warning);
}

.mdash-step-node.is-locked .mdash-step-bubble {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.mdash-step-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ptsms-navy);
  margin-top: 3px;
  line-height: 1.1;
  max-width: 75px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mdash-step-connector {
  flex: 1;
  height: 2px;
  background: var(--ptsms-border);
  min-width: 8px;
  margin-top: -14px;
}

.mdash-step-connector.is-done {
  background: var(--ptsms-success);
}

/* Evidence section in Workdesk */
.mdash-evidence-section {
  background: #f8fafc;
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  padding: 12px 14px;
  margin-top: 14px;
}

.mdash-evidence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  margin-bottom: 8px;
}

.mdash-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--ptsms-border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 0.78rem;
}

.mdash-file-name {
  font-weight: 600;
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================================================================
   Sleek & Compact Info Tooltip Triggers (.info-tip)
   ================================================================== */

.info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  border-radius: 50%;
  background: rgba(29, 43, 55, 0.08);
  color: var(--ptsms-text-muted);
  font-size: 0.58rem;
  line-height: 1;
  cursor: help;
  transition: all 0.15s ease;
  vertical-align: middle;
  text-decoration: none;
  margin-left: 4px;
}

.info-tip:hover {
  background: var(--ptsms-navy);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.info-tip i {
  font-size: 0.58rem;
  line-height: 1;
}

/* Tiny variant for compact pipeline stage nodes */
.mdash-pipeline-node .info-tip {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  font-size: 0.52rem;
  background: rgba(29, 43, 55, 0.06);
  opacity: 0.75;
}

.mdash-pipeline-node .info-tip i {
  font-size: 0.52rem;
}

.mdash-pipeline-node .info-tip:hover {
  opacity: 1;
  background: var(--ptsms-navy);
  color: #fff;
}

/* Highlighted yellow variant for active stage banners */
.info-tip.info-tip-yellow {
  background: rgba(255, 204, 0, 0.25);
  color: var(--ptsms-yellow-dark);
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
}

.info-tip.info-tip-yellow:hover {
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
}

/* ==================================================================
   HARTING Theme Custom Tooltip Popups
   ================================================================== */

.tooltip {
  --bs-tooltip-bg: var(--ptsms-navy);
  --bs-tooltip-color: #ffffff;
  --bs-tooltip-padding-x: 10px;
  --bs-tooltip-padding-y: 7px;
  --bs-tooltip-border-radius: 6px;
  --bs-tooltip-font-size: 0.76rem;
  --bs-tooltip-opacity: 1;
  font-family: var(--ptsms-font);
  pointer-events: none;
  z-index: 1080;
}

.tooltip.show {
  opacity: 1;
}

.tooltip .tooltip-inner {
  background: linear-gradient(135deg, #1d2b37 0%, #253847 100%);
  color: #f8fafc;
  border: 1px solid rgba(255, 204, 0, 0.28);
  border-top: 2.5px solid var(--ptsms-yellow);
  box-shadow: 0 4px 14px -1px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: left;
  max-width: 280px;
}

.tooltip .tooltip-inner strong,
.tooltip .tooltip-inner b {
  color: var(--ptsms-yellow);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 2px;
}

.tooltip .tooltip-inner em {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  font-size: 0.7rem;
  display: block;
  margin-top: 3px;
}

/* Tooltip arrows matching navy theme */
.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: #253847;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: var(--ptsms-yellow);
}

.bs-tooltip-start .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
  border-left-color: #1d2b37;
}

.bs-tooltip-end .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: #1d2b37;
}

/* ==================================================================
   Clause Detail Page Styling
   ================================================================== */

.clause-detail-hero {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--ptsms-shadow-sm);
  border-top: 4px solid var(--ptsms-navy);
}

.clause-detail-hero .hero-breadcrumb {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ptsms-text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.clause-detail-hero .clause-badge {
  font-family: monospace;
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  letter-spacing: -0.02em;
}

/* ── Treatment 1: Side-by-Side Dual Dock (Requirement + Auditor Guidance) ── */
.clause-detail-hero .split-content-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-top: 14px;
}

@media (max-width: 992px) {
  .clause-detail-hero .split-content-grid {
    grid-template-columns: 1fr;
  }
}

.req-panel-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--ptsms-info);
  border-radius: 8px;
  padding: 14px 16px;
  height: 100%;
}

.audit-panel-box {
  background: #fffdf5;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--ptsms-yellow-dark);
  border-radius: 8px;
  padding: 14px 16px;
  height: 100%;
}

.panel-header-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.req-content-text {
  white-space: pre-line;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ptsms-text);
  line-height: 1.55;
}

.audit-content-text {
  white-space: pre-line;
  font-size: 0.88rem;
  font-weight: 600;
  color: #78350f;
  line-height: 1.5;
  background: rgba(254, 243, 199, 0.4);
  border: 1px solid rgba(253, 230, 138, 0.6);
  border-radius: 6px;
  padding: 10px 14px;
}

.clause-detail-hero .question-box {
  background: #f8fafc;
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  padding: 14px 16px;
  margin-top: 10px;
}

.clause-detail-hero .question-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  line-height: 1.45;
  margin-bottom: 8px;
}

.clause-detail-hero .metadata-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: var(--ptsms-text-muted);
}

/* ==================================================================
   7-Stage Progression Ribbon (Matching User-Approved Design)
   ================================================================== */
.clause-stage-ribbon {
  background: #ffffff;
  border: 1px solid var(--ptsms-border);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 16px;
  box-shadow: var(--ptsms-shadow-sm);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1250px) {
  .clause-stage-ribbon {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .clause-stage-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stage-ribbon-btn {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  position: relative;
  text-align: left;
  user-select: none;
  transition: all 0.15s ease;
  text-decoration: none;
  min-width: 0;
  box-sizing: border-box;
  color: inherit;
}

.stage-ribbon-btn.is-done {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.stage-ribbon-btn.is-done:hover {
  background: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.stage-ribbon-btn.is-active,
.stage-ribbon-btn.is-inprogress {
  background: #ffffff;
  border-color: var(--ptsms-navy);
  box-shadow: 0 4px 12px rgba(29, 43, 55, 0.12);
}

.stage-ribbon-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--ptsms-navy);
  z-index: 10;
}

.stage-ribbon-btn.is-locked {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  opacity: 0.65;
  cursor: not-allowed;
}

.stage-ribbon-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.stage-ribbon-icon.is-done {
  background: #ecfdf5;
  color: #10b981;
  border: 1px solid #a7f3d0;
}

.stage-ribbon-icon.is-active,
.stage-ribbon-icon.is-inprogress {
  background: #fffbeb;
  color: #f59e0b;
  border: 1px solid #fde68a;
}

.stage-ribbon-icon.is-locked {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}

.stage-ribbon-content {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stage-ribbon-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.stage-ribbon-btn.is-locked .stage-ribbon-title {
  color: #94a3b8;
  font-weight: 600;
}

.stage-ribbon-sub {
  font-size: 0.7rem;
  color: var(--ptsms-text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chat Message Bubbles */
/* Chat Message Bubbles (Exact Match to Expected Design) */
.chat-bubble-other {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-right: 24px;
  margin-left: 0;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-align: left;
}

.chat-bubble-mine {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 8px 12px;
  margin-left: 24px;
  margin-right: 0;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.05);
  text-align: left;
}

/* Evidence file chip */
.evidence-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--ptsms-border);
  border-radius: 8px;
  margin-top: 4px;
}


/* Upload Dropzone Box */
.upload-dropzone-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.upload-dropzone-box:hover {
  border-color: #94a3b8 !important;
  background: #f1f5f9;
}

.card-shell {
  background: var(--ptsms-surface, #ffffff);
  border: 1px solid var(--ptsms-border, #e2e4e9);
  border-radius: var(--ptsms-radius-md, 10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 14px;
}

/* Detail Desk Card & Segmented Tabs */
.clause-desk-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  box-shadow: var(--ptsms-shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}

.stage-tabs {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--ptsms-border);
  padding: 4px 6px 0;
  gap: 4px;
}

.stage-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ptsms-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stage-tab:hover {
  color: var(--ptsms-navy);
  background: rgba(255, 255, 255, 0.6);
}

.stage-tab.active {
  background: #ffffff;
  color: var(--ptsms-navy);
  border-color: var(--ptsms-border);
  box-shadow: 0 -2px 0 0 var(--ptsms-yellow) inset;
}

.stage-tab-panel {
  display: none;
  padding: 18px 20px;
}

.stage-tab-panel.active {
  display: block;
}

/* Quick Facts Side Rail */
.quick-facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qf-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-md);
  padding: 14px 16px;
  box-shadow: var(--ptsms-shadow-sm);
  position: relative;
  transition: transform 0.15s ease;
}

.qf-card:hover {
  transform: translateY(-2px);
}

.qf-card .qf-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ptsms-text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.qf-card .qf-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ptsms-navy);
}

.qf-card .qf-value.small {
  font-size: 0.92rem;
  font-weight: 600;
}

/* Timeline Feed */
.timeline-feed {
  position: relative;
  padding-left: 24px;
}

.timeline-feed::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--ptsms-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -24px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ptsms-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  z-index: 1;
}

.timeline-marker.is-success {
  border-color: var(--ptsms-success);
  color: var(--ptsms-success);
}

.timeline-marker.is-warning {
  border-color: var(--ptsms-warning);
  color: var(--ptsms-warning);
}

.timeline-marker.is-danger {
  border-color: var(--ptsms-danger);
  color: var(--ptsms-danger);
}

/* ==================================================================
   Compact File Upload Section Styling
   ================================================================== */

.compact-upload-slot {
  background: #f8fafc;
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  padding: 8px 10px;
  margin-top: 4px;
}

.compact-upload-slot .upload-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: var(--ptsms-text-muted);
}

.compact-upload-slot .upload-inputs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.compact-upload-slot .upload-inputs-row .form-control {
  font-size: 0.78rem;
  padding: 4px 8px;
  height: 31px;
}

.compact-upload-slot .upload-inputs-row input[type="file"] {
  flex: 1 1 200px;
  background: #fff;
}

.compact-upload-slot .upload-inputs-row input[type="text"] {
  flex: 1 1 140px;
}

.compact-upload-slot .upload-inputs-row .btn-upload {
  background: var(--ptsms-navy);
  color: #fff;
  border: none;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  height: 31px;
  border-radius: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.compact-upload-slot .upload-inputs-row .btn-upload:hover {
  background: #25394b;
  color: var(--ptsms-yellow);
}

.compact-upload-slot .uploaded-files-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compact-upload-slot .uploaded-file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--ptsms-border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.76rem;
}

.compact-upload-slot .uploaded-file-chip .file-name {
  font-weight: 600;
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==================================================================
   Clause Queries Chat Bubble Styling
   ================================================================== */

.chat-thread-container {
  background: #f8fafc;
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius-sm);
  padding: 12px 10px;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}

.chat-thread-container::-webkit-scrollbar {
  width: 5px;
}

.chat-thread-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.chat-msg-row {
  display: flex;
  gap: 8px;
  max-width: 88%;
  align-items: flex-end;
}

.chat-msg-row.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-row.is-other {
  align-self: flex-start;
  flex-direction: row;
}

.chat-avatar {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  border-radius: 50%;
  background: var(--ptsms-navy);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.chat-msg-row.is-mine .chat-avatar {
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
}

.chat-bubble {
  padding: 8px 12px;
  font-size: 0.8rem;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  word-wrap: break-word;
  word-break: break-word;
}

/* Sent by Current User (Right side) */
.chat-msg-row.is-mine .chat-bubble {
  background: var(--ptsms-navy);
  color: #ffffff;
  border-radius: 14px 14px 2px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Received by Other Users (Left side) */
.chat-msg-row.is-other .chat-bubble {
  background: #ffffff;
  color: var(--ptsms-navy);
  border-radius: 14px 14px 14px 2px;
  border: 1px solid var(--ptsms-border);
}

.chat-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-size: 0.7rem;
}

.chat-msg-row.is-mine .chat-bubble-header .sender-name {
  color: var(--ptsms-yellow);
  font-weight: 700;
}

.chat-msg-row.is-other .chat-bubble-header .sender-name {
  color: var(--ptsms-navy);
  font-weight: 700;
}

.chat-bubble-footer {
  text-align: right;
  font-size: 0.64rem;
  margin-top: 3px;
  opacity: 0.75;
}

.chat-msg-row.is-mine .chat-bubble-footer {
  color: rgba(255, 255, 255, 0.75);
}

.chat-msg-row.is-other .chat-bubble-footer {
  color: var(--ptsms-text-muted);
}

/* ─────────────────────────────────────────────────────────────
   Stage Read-Only Details (My Dashboard modal)
   Clicking a completed node in the 7-stage stepper opens a modal
   populated by /MyDashboard?handler=StageDetails.
   ───────────────────────────────────────────────────────────── */
.stage-node-pill.stage-node-clickable {
  cursor: pointer;
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
  outline: none;
}

.stage-node-pill.stage-node-clickable:hover,
.stage-node-pill.stage-node-clickable:focus-visible {
  background: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.20);
}

.stage-node-pill.stage-node-clickable:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.stage-ro-modal {
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.stage-ro-modal .modal-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 20px;
}

.stage-ro-modal .modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ptsms-navy);
}

.stage-ro-modal .modal-body {
  background: #f8fafc;
  padding: 20px;
}

.stage-ro-modal .modal-footer {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 12px 20px;
}

.stage-ro-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Stage Hero Banner */
.stage-ro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--ptsms-navy);
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.stage-ro-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.stage-ro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.stage-ro-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.stage-ro-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 3px;
}

.stage-ro-sub strong {
  color: #ffffff;
}

.stage-ro-sub .ro-dot {
  margin: 0 5px;
  opacity: 0.6;
}

.stage-ro-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.stage-ro-status-badge.status-done {
  background: #10b981;
  color: #ffffff;
}

.stage-ro-status-badge.status-inprog {
  background: var(--ptsms-yellow);
  color: var(--ptsms-navy);
}

.stage-ro-status-badge.status-pending {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
}

/* Clause Context Card */
.stage-ro-clause-context {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--ptsms-navy);
  border-radius: 8px;
  padding: 12px 16px;
}

.stage-ro-question {
  font-size: 0.88rem;
  color: #334155;
  font-weight: 600;
  line-height: 1.45;
}

/* 3-Column Metadata Strip */
.stage-ro-meta-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ro-meta-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ro-meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ro-meta-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  word-break: break-word;
}

/* Form Fields & Sections */
.stage-ro-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
}

.stage-ro-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ptsms-navy);
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.stage-ro-section-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
}

.stage-ro-empty {
  text-align: center;
  padding: 24px 12px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.stage-ro-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ro-field-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.ro-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ro-field-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ro-mand-dot {
  color: #dc2626;
  font-weight: 900;
}

.ro-field-type {
  font-size: 0.65rem;
  font-weight: 800;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ro-field-help {
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
  margin-bottom: 8px;
}

.ro-field-value {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #1e293b;
  word-break: break-word;
  line-height: 1.45;
}

.ro-value-multiline {
  white-space: pre-wrap;
  border-left: 3px solid #94a3b8;
}

.ro-value-empty {
  color: #94a3b8;
  font-style: italic;
  background: #f8fafc;
}

/* File Attachment Chips */
.ro-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ro-file-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  transition: all 0.15s ease;
}

.ro-file-chip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.ro-file-chip-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.ro-file-chip-body {
  flex: 1;
  min-width: 0;
}

.ro-file-chip-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ptsms-navy);
  font-size: 0.86rem;
}

.ro-file-name-text {
  word-break: break-all;
}

.ro-file-version {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
}

.ro-file-chip-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.ro-file-chip-meta .text-sep {
  opacity: 0.5;
}

.ro-file-chip-notes {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #475569;
  background: #fafbfc;
  border: 1px dashed #e2e8f0;
  border-radius: 6px;
  padding: 5px 8px;
}

.ro-file-chip-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Image evidence thumbnail (fixed-size inline preview) */
.ro-file-chip-image {
  align-items: flex-start;
}

.ro-file-thumb-link {
  display: inline-flex;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ro-file-thumb-link:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.ro-file-thumb {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #ffffff;
}

/* Remarks Block */
.ro-remarks-block {
  background: #fffdf8;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 16px;
  color: #92400e;
  font-size: 0.88rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .stage-ro-meta-bar {
    grid-template-columns: 1fr;
  }

  .stage-ro-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ro-file-chip {
    flex-direction: column;
    align-items: flex-start;
  }

  .ro-file-chip-actions {
    align-self: flex-start;
  }
}

/* ==================================================================
   Executive Audit Readiness Dashboard (.edash-*)
   ================================================================== */

.edash-container {
  padding: 4px 0 24px;
}

/* Hero Header */
.edash-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 0 16px;
}

.edash-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.edash-hero-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease;
}

.edash-hero-icon:hover {
  transform: rotate(5deg) scale(1.05);
}

.edash-hero-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  letter-spacing: -0.02em;
  font-family: var(--ptsms-font);
  line-height: 1.2;
  margin: 0;
}

.edash-hero-subtitle {
  font-size: 0.84rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 3px;
  margin-bottom: 0;
}

.edash-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Filter Card */
.edash-filter-card {
  background: #ffffff;
  border: 1px solid var(--ptsms-border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.edash-filter-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.edash-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.edash-filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ptsms-navy);
}

.edash-filter-badge {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.edash-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.edash-filter-group {
  display: flex;
  flex-direction: column;
}

.edash-filter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.edash-filter-control {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ptsms-navy);
  background-color: #f8fafc;
  transition: all 0.15s ease;
  height: 34px;
  outline: none;
}

.edash-filter-control:focus {
  border-color: var(--ptsms-navy);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 43, 55, 0.08);
}

.edash-filter-control[multiple] {
  height: 34px;
  padding: 4px 8px;
  cursor: pointer;
}

/* ==================================================================
   Option E: Hybrid Fusion Executive Health Deck
   ================================================================== */

.edash-health-deck {
  background: #ffffff;
  border: 1px solid var(--ptsms-border);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: grid;
  grid-template-columns: 290px 1fr;
  overflow: hidden;
  margin-bottom: 22px;
  align-items: stretch;
  transition: all 0.2s ease;
}

.edash-health-deck:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

@media (max-width: 992px) {
  .edash-health-deck {
    grid-template-columns: 1fr;
  }
}

/* Left Hero (Full Height Dark Navy Panel) */
.edash-deck-hero {
  background: linear-gradient(145deg, #1d2b37 0%, #15202a 100%);
  color: #ffffff;
  padding: 12px 18px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--ptsms-border);
  position: relative;
}

.edash-deck-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.edash-deck-hero-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.edash-deck-hero-body {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.edash-deck-hero-dial {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.edash-deck-hero-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
}

.edash-deck-hero-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edash-deck-hero-bottom {
  font-size: 0.68rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 5px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Right Metrics & Health Section */
.edash-deck-right {
  padding: 12px 20px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.edash-deck-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: stretch;
}

@media (max-width: 768px) {
  .edash-deck-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.edash-deck-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 16px;
  border-right: 1px solid #f1f5f9;
  border-radius: 6px;
  transition: background 0.15s ease;
  position: relative;
}

.edash-deck-stat:last-child {
  border-right: none;
}

.edash-deck-stat:hover {
  background: #f8fafc;
}

.edash-deck-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.edash-deck-stat-lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #64748b;
}

.edash-deck-stat-icon {
  font-size: 0.8rem;
  color: #94a3b8;
}

.edash-deck-stat-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  line-height: 1.1;
  font-family: var(--ptsms-font);
  letter-spacing: -0.02em;
}

.edash-deck-stat-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bottom Health Distribution Strip */
.edash-deck-bottom {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.edash-deck-progress-wrap {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.edash-deck-progress-lbl {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.edash-deck-multi-bar {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  display: flex;
  overflow: hidden;
}

.edash-deck-multi-bar .bar-seg-verified {
  background: var(--ptsms-success);
  transition: width 0.4s ease;
}

.edash-deck-multi-bar .bar-seg-active {
  background: #f59e0b;
  transition: width 0.4s ease;
}

.edash-deck-multi-bar .bar-seg-overdue {
  background: var(--ptsms-danger);
  transition: width 0.4s ease;
}

.edash-deck-legend {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.edash-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.edash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}



/* Stage Funnel Card */
.edash-funnel-card {
  background: #ffffff;
  border: 1px solid var(--ptsms-border);
  border-radius: 12px;
  margin-bottom: 22px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.edash-card-header {
  padding: 14px 20px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.edash-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.edash-card-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  margin-left: 4px;
}

.edash-funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  padding: 18px 20px;
}

@media (min-width: 1200px) {
  .edash-funnel-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.edash-funnel-node {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 10px 10px;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.edash-funnel-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.edash-funnel-node.is-completed-bucket {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.edash-funnel-node.is-active-bucket {
  background: #fcfdfe;
  border-color: #93c5fd;
}

.edash-funnel-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

.is-completed-bucket .edash-funnel-tag {
  color: #059669;
}

.edash-funnel-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.edash-funnel-count {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ptsms-navy);
  font-family: var(--ptsms-font);
  margin-bottom: 4px;
}

.is-completed-bucket .edash-funnel-count {
  color: #16a34a;
}

.edash-funnel-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}

.edash-funnel-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: auto;
}

.edash-funnel-bar-fill {
  height: 100%;
  background: var(--ptsms-navy);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.is-completed-bucket .edash-funnel-bar-fill {
  background: #16a34a;
}

/* Mid & Bottom 2-Column Grids */
.edash-grid-2col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-bottom: 22px;
}

.edash-bot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

@media (max-width: 992px) {

  .edash-grid-2col,
  .edash-bot-grid {
    grid-template-columns: 1fr;
  }
}

.edash-card {
  background: #ffffff;
  border: 1px solid var(--ptsms-border);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.edash-card-body {
  padding: 16px 20px;
  flex: 1;
}

/* Section Matrix Area Box */
.edash-area-box {
  background: #fbfbfc;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.edash-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.edash-area-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ptsms-navy);
  display: flex;
  align-items: center;
  gap: 6px;
}

.edash-section-item {
  margin-bottom: 9px;
}

.edash-section-item:last-child {
  margin-bottom: 0;
}

.edash-section-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 3px;
}

.edash-section-title {
  font-weight: 600;
  color: var(--ptsms-navy);
}

.edash-section-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-left: 4px;
}

.edash-section-score {
  font-size: 0.82rem;
  font-weight: 800;
}

.edash-progress-rail {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.edash-progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Tables */
.edash-table-wrap {
  overflow-x: auto;
}

.edash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.edash-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}

.edash-table th a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edash-table th a:hover {
  color: var(--ptsms-navy);
}

.edash-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--ptsms-navy);
  vertical-align: middle;
}

.edash-table tr:hover td {
  background-color: #fafbfc;
}

/* Owner Avatar Chip */
.edash-owner-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edash-avatar-circle {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d2b37 0%, #2e4159 100%);
  color: var(--ptsms-yellow);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edash-owner-name {
  font-weight: 700;
  color: var(--ptsms-navy);
  line-height: 1.2;
}

/* Days Remaining Badge */
.edash-days-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-block;
}

.edash-days-badge.is-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.edash-days-badge.is-warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* Activity Feed */
.edash-activity-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edash-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #fbfbfc;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.edash-activity-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.edash-activity-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  margin-top: 1px;
}

.edash-activity-icon.is-complete {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.edash-activity-icon.is-rollback {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.edash-activity-icon.is-upload {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* =========================================================================
   Section & Clause Progress Matrix (Option A - Scalable Executive Rollup)
   ========================================================================= */
.edash-sec-matrix-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  margin-bottom: 24px;
  overflow: visible;
}

.edash-sec-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}

.edash-sec-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.edash-sec-filter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: var(--ptsms-font);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.edash-sec-filter-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--ptsms-navy);
}

.edash-sec-filter-btn.active {
  background: var(--ptsms-navy);
  color: #ffffff;
  border-color: var(--ptsms-navy);
  box-shadow: 0 2px 6px rgba(29, 43, 55, 0.2);
}

.edash-sec-filter-select {
  font-family: var(--ptsms-font);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: var(--ptsms-navy);
  outline: none;
  cursor: pointer;
  max-width: 240px;
}

.edash-sec-filter-select:focus {
  border-color: var(--ptsms-navy);
}

.edash-sec-matrix-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.edash-sec-matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.edash-sec-matrix-table th {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 1.5px solid #e2e8f0;
  text-align: left;
  background: #f8fafc;
  white-space: nowrap;
}

.edash-sec-matrix-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.edash-sec-matrix-table tr:hover td {
  background: #fafbfc;
}

.edash-sec-meta-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edash-sec-code-badge {
  font-family: var(--ptsms-mono);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.edash-sec-name-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  line-height: 1.25;
}

.edash-sec-sub-text {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.edash-sec-readiness-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.edash-sec-readiness-bar {
  flex: 1;
  height: 7px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.edash-sec-readiness-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.edash-clause-nodes-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.edash-node-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 4px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: var(--ptsms-navy);
  position: relative;
  user-select: none;
}

.edash-node-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-color: #94a3b8;
  color: var(--ptsms-navy);
  text-decoration: none;
  z-index: 10;
}

.edash-node-pill.is-100 {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.edash-node-pill.is-mid {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.edash-node-pill.is-low {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

/* Unassigned Clause Behavior */
.edash-node-pill.is-unassigned-clause {
  display: none;
  opacity: 0.82;
  border-style: dashed;
}

.show-unassigned .edash-node-pill.is-unassigned-clause {
  display: inline-flex;
}

.edash-unassigned-counter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.edash-unassigned-counter:hover {
  background: #e2e8f0;
  color: var(--ptsms-navy);
  border-color: #94a3b8;
}

.show-unassigned .edash-unassigned-counter {
  display: none !important;
}

.edash-sec-filter-btn.toggle-on {
  background: #1e293b;
  color: var(--ptsms-yellow);
  border-color: #1e293b;
}

.edash-clause-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  background: #e2e8f0;
  display: inline-block;
}

.edash-clause-initials {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ptsms-navy);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.edash-avatar-stack {
  display: inline-flex;
  align-items: center;
}

.edash-avatar-stack .edash-clause-avatar,
.edash-avatar-stack .edash-clause-initials {
  margin-left: -6px;
  transition: transform 0.15s ease;
}

.edash-avatar-stack .edash-clause-avatar:first-child,
.edash-avatar-stack .edash-clause-initials:first-child {
  margin-left: 0;
}

.edash-avatar-stack .edash-clause-avatar:hover,
.edash-avatar-stack .edash-clause-initials:hover {
  transform: translateY(-2px) scale(1.18);
  z-index: 10;
}

/* On-Hover Popover System */
.has-clause-popover {
  position: relative;
}

.edash-clause-popover {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 310px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.24), 0 4px 10px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}

.edash-clause-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

.edash-clause-popover::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: #cbd5e1 transparent transparent transparent;
}

.has-clause-popover:hover .edash-clause-popover {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.edash-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.edash-pop-clause-id {
  font-family: var(--ptsms-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
}

.edash-pop-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  margin-bottom: 8px;
}

.edash-pop-owner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 7px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #f1f5f9;
}

.edash-pop-owner-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  line-height: 1.1;
}

.edash-pop-owner-role {
  font-size: 0.7rem;
  color: #64748b;
}

.edash-pop-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 0.72rem;
}

.edash-pop-metric-item {
  display: flex;
  flex-direction: column;
}

.edash-pop-metric-lbl {
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
}

.edash-pop-metric-val {
  font-weight: 800;
  color: #1e293b;
}

/* =========================================================================
   Stage Progression Timeline / Connected Milestone Stepper (Option 3)
   ========================================================================= */
.edash-stepper-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius);
  padding: 12px 18px 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 20px;
}

.edash-stepper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.edash-stepper-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edash-stepper-subtitle {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  margin-left: 6px;
}

.edash-stepper-rail {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: 0 6px;
}

.edash-stepper-rail::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
}

.edash-stepper-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 1;
  text-decoration: none;
  user-select: none;
}

.edash-stepper-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ptsms-mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.edash-stepper-node:hover .edash-stepper-circle {
  border-color: var(--ptsms-navy);
  transform: scale(1.14);
  color: var(--ptsms-navy);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.edash-stepper-node.is-active .edash-stepper-circle {
  background: var(--ptsms-navy);
  border-color: var(--ptsms-navy);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(29, 43, 55, 0.14);
}

.edash-stepper-node.is-completed .edash-stepper-circle {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
}

.edash-stepper-count-badge {
  position: absolute;
  top: -8px;
  right: calc(50% - 24px);
  background: #2563eb;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  line-height: 1.2;
}

.edash-stepper-node.is-completed .edash-stepper-count-badge {
  background: #16a34a;
}

.edash-stepper-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  margin-top: 6px;
  white-space: nowrap;
  text-align: center;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edash-stepper-node.is-zero .edash-stepper-label {
  color: #94a3b8;
  font-weight: 600;
}

.edash-stepper-node.is-completed .edash-stepper-label {
  color: #16a34a;
  font-weight: 800;
}

/* Tooltip on hover */
.edash-stepper-node .edash-stepper-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e293b;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  z-index: 100;
  pointer-events: none;
  transition: all 0.15s ease;
}

.edash-stepper-node .edash-stepper-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #1e293b transparent transparent transparent;
}

.edash-stepper-node:hover .edash-stepper-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================================
   Option 3: Header-Integrated Filter Bar (0px Vertical Space Waste)
   ========================================================================= */
.edash-hero-header-integrated {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius);
  padding: 8px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.edash-hero-integrated-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.edash-hero-integrated-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ptsms-navy);
  color: var(--ptsms-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.edash-hero-integrated-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  margin: 0;
  line-height: 1.2;
}

.edash-hero-integrated-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin: 0;
}

.edash-hdr-filter-form {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  background: #f8fafc;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.edash-hdr-select {
  font-family: var(--ptsms-font);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: var(--ptsms-navy);
  outline: none;
  cursor: pointer;
  max-width: 140px;
  transition: all 0.15s ease;
}

.edash-hdr-select:focus {
  border-color: var(--ptsms-navy);
  box-shadow: 0 0 0 2px rgba(29, 43, 55, 0.08);
}

.edash-hdr-select.is-audit {
  font-weight: 800;
  max-width: 175px;
  border-color: #94a3b8;
  background: #ffffff;
}

.edash-hdr-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* =========================================================================
   Searchable Area Suggestion Filter in Section & Clause Progress Matrix
   ========================================================================= */
.edash-area-suggest-box {
  position: relative;
  display: inline-block;
  min-width: 250px;
}

.edash-area-suggest-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.edash-area-suggest-input {
  font-family: var(--ptsms-font);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 28px 5px 28px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: var(--ptsms-navy);
  outline: none;
  width: 100%;
  transition: all 0.15s ease;
}

.edash-area-suggest-input:focus {
  border-color: var(--ptsms-navy);
  box-shadow: 0 0 0 2px rgba(29, 43, 55, 0.08);
}

.edash-area-suggest-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: #94a3b8;
  pointer-events: none;
}

.edash-area-suggest-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: #94a3b8;
  cursor: pointer;
  display: none;
  background: none;
  border: none;
  padding: 2px;
}

.edash-area-suggest-clear:hover {
  color: var(--ptsms-danger);
}

.edash-area-suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 320px;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.15);
  z-index: 999;
  display: none;
  padding: 4px;
}

.edash-area-suggest-dropdown.open {
  display: block;
}

.edash-area-suggest-item {
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  font-size: 0.78rem;
}

.edash-area-suggest-item:hover,
.edash-area-suggest-item.active-item {
  background: #f1f5f9;
}

.edash-area-item-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.edash-area-code-chip {
  font-family: var(--ptsms-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: var(--ptsms-navy);
  flex-shrink: 0;
}

.edash-area-name-text {
  font-weight: 700;
  color: var(--ptsms-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edash-area-sub-text {
  font-size: 0.68rem;
  color: #64748b;
}

.edash-area-suggest-empty {
  padding: 14px;
  text-align: center;
  font-size: 0.76rem;
  color: #64748b;
}

/* =========================================================================
   Auto-Scrolling Stacked Donut Carousel (Completion Breakdown & Progression)
   ========================================================================= */
:root {
  --c-unassigned: #94a3b8;
  --c-notstarted: #f43f5e;
  --c-inprogress: #f59e0b;
  --c-validation: #06b6d4;
  --c-completed: #10b981;
}

.edash-donut-carousel-card {
  background: var(--ptsms-surface);
  border: 1px solid var(--ptsms-border);
  border-radius: var(--ptsms-radius);
  padding: 14px 18px 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.edash-donut-carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.edash-donut-carousel-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edash-donut-carousel-subtitle {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  margin-left: 6px;
}

/* View Switcher Pill Buttons */
.view-toggle-wrap {
  display: inline-flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  font-family: var(--ptsms-font);
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.view-toggle-btn:hover {
  color: var(--ptsms-navy);
}

.view-toggle-btn.active {
  background: #ffffff;
  color: var(--ptsms-navy);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

/* Play/Pause Control Button */
.ctrl-pill-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--ptsms-font);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.ctrl-pill-btn:hover {
  background: var(--ptsms-navy);
  color: #ffffff;
  border-color: var(--ptsms-navy);
}

.ctrl-pill-btn.active-play {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

/* Subtle & Clean Legend Bar */
.edash-donut-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.74rem;
}

.edash-donut-legend-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.edash-donut-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.74rem;
  color: #475569;
  font-weight: 500;
}

.edash-donut-legend-pill strong {
  color: var(--ptsms-navy);
  font-weight: 800;
}

.edash-donut-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.pill-unassigned .edash-donut-legend-dot {
  background: #94a3b8;
}

.pill-notstarted .edash-donut-legend-dot {
  background: #f43f5e;
}

.pill-inprogress .edash-donut-legend-dot {
  background: #f59e0b;
}

.pill-validation .edash-donut-legend-dot {
  background: #06b6d4;
}

.pill-completed .edash-donut-legend-dot {
  background: #10b981;
}

.edash-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  padding: 2px 0;
}

.edash-carousel-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ptsms-navy);
  font-size: 0.8rem;
  z-index: 10;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.edash-carousel-nav-btn:hover {
  background: var(--ptsms-navy);
  color: #ffffff;
  transform: scale(1.08);
  border-color: var(--ptsms-navy);
}

.edash-carousel-viewport {
  overflow-x: hidden;
  padding: 6px 2px;
  margin: 0 8px;
  flex: 1;
  display: flex;
  user-select: none;
}

.edash-carousel-track {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.edash-donut-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: all 0.18s ease;
  cursor: pointer;
  position: relative;
  flex: 0 0 144px;
}

.edash-donut-card:hover {
  transform: translateY(-3px);
  border-color: #3b82f6;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.14);
}

.edash-donut-badge {
  font-family: var(--ptsms-mono);
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--ptsms-navy);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.edash-donut-svg-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 2px 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edash-donut-svg {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.edash-donut-arc {
  transition: stroke-width 0.15s ease;
}

.edash-donut-arc:hover {
  stroke-width: 9.5 !important;
  filter: brightness(1.2);
}

.edash-donut-center-info {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.edash-donut-center-pct {
  font-family: var(--ptsms-font);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  line-height: 1;
}

.edash-donut-center-lbl {
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
}

.edash-donut-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ptsms-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 126px;
  line-height: 1.2;
}

.edash-donut-sub {
  font-size: 0.66rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 1px;
}

/* Global Fixed Unclipped Tooltip */
#globalDonutTooltip {
  position: fixed;
  display: none;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.75rem;
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  z-index: 999999;
  pointer-events: none;
  min-width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -100%) translateY(-10px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  opacity: 0;
}

#globalDonutTooltip.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-12px);
}

#globalDonutTooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.tip-header {
  font-family: var(--ptsms-font);
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 4px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tip-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  font-size: 0.7rem;
}

.tip-lbl {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tip-val {
  font-family: var(--ptsms-mono);
  font-weight: 800;
  color: #ffffff;
  text-align: right;
}

/* ── Owner Readiness Matrix & Red-to-Green Progress Pills ─────────────── */
.edash-owner-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.edash-owner-matrix-table th {
  background: #f8fafc;
  padding: 8px 10px;
  font-family: var(--ptsms-font);
  font-size: 0.7rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1.5px solid #e2e8f0;
  text-align: left;
}

.edash-owner-matrix-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.edash-owner-profile-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.edash-owner-photo-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
}

.edash-owner-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ptsms-navy) 0%, #334155 100%);
  color: #ffffff;
  font-family: var(--ptsms-font);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid #cbd5e1;
}

.edash-owner-name-txt {
  font-family: var(--ptsms-font);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  line-height: 1.15;
}

.edash-owner-dept-txt {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 1px;
}

.edash-clause-flow-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

/* Fixed Width 54px Pill with Crisp 3px Radius */
.clause-bar-pill-v1 {
  position: relative;
  width: 54px;
  height: 25px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.clause-bar-pill-v1:hover {
  transform: translateY(-1.5px);
  border-color: #3b82f6;
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2);
  z-index: 10;
}

.pill-v1-label {
  font-family: var(--ptsms-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--ptsms-navy);
  line-height: 1;
  margin-top: -2px;
  z-index: 2;
}

.pill-v1-track {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  background: #f43f5e;
  /* Default Red */
}

.pill-v1-fill {
  height: 100%;
  background: #10b981;
  /* Green fill */
  transition: width 0.2s ease;
}

.clause-bar-pill-v1.is-100 {
  border-color: #86efac;
  background: #f0fdf4;
}

/* ── Global Rich Floating Tooltip (Crisp 6px Radius, Zero Clipping, Dark Theme) ──── */
#globalClauseTooltip {
  position: fixed;
  display: none;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.74rem;
  box-shadow: 0 14px 35px -4px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999999;
  pointer-events: none;
  min-width: 240px;
  max-width: 320px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  transform: translate(-50%, -100%) translateY(-8px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  opacity: 0;
  text-align: left;
}

#globalClauseTooltip.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-10px);
}

#globalClauseTooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

/* When placed below element to avoid colliding with topbar/header */
#globalClauseTooltip.placement-bottom {
  transform: translate(-50%, 0) translateY(8px);
}

#globalClauseTooltip.show.placement-bottom {
  transform: translate(-50%, 0) translateY(10px);
}

#globalClauseTooltip.placement-bottom::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #0f172a transparent;
}

.edash-tip-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 5px;
  margin-bottom: 6px;
  gap: 8px;
}

.edash-tip-clause-no {
  font-family: var(--ptsms-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.edash-tip-question-txt {
  font-size: 0.74rem;
  color: #cbd5e1;
  margin-bottom: 8px;
  line-height: 1.35;
  font-weight: 500;
}

.edash-tip-owner-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 9px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.edash-tip-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.edash-tip-avatar-init {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ptsms-navy);
  color: #ffffff;
  font-family: var(--ptsms-font);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.edash-tip-owner-name {
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.edash-tip-owner-dept {
  font-size: 0.66rem;
  color: #94a3b8;
}

.edash-tip-meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 10px;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: 5px;
}

.edash-tip-meta-lbl {
  color: #94a3b8;
  font-weight: 600;
}

.edash-tip-meta-val {
  font-weight: 700;
  color: #ffffff;
  text-align: right;
}

/* ── High-Density 1-Liner Activity Matrix (Option 3) ─────────────────── */
.edash-act-dense-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.edash-act-dense-table th {
  background: #f8fafc;
  padding: 7px 9px;
  font-family: var(--ptsms-font);
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1.5px solid #e2e8f0;
  text-align: left;
}

.edash-act-dense-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.edash-act-dense-table tr:hover td {
  background: #f8fafc;
}

.edash-act-pill {
  font-family: var(--ptsms-font);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.edash-act-pill.pill-verified {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.edash-act-pill.pill-validated {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.edash-act-pill.pill-upload {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.edash-act-pill.pill-rollback {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.edash-act-clause-tag {
  font-family: var(--ptsms-mono);
  font-weight: 800;
  color: var(--ptsms-navy);
  text-decoration: none;
  padding: 1px 5px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-left: 2px;
  transition: all 0.12s ease;
}

.edash-act-clause-tag:hover {
  background: var(--ptsms-navy);
  color: #ffffff;
}

/* ── Browse File Pill Button ── */
.btn-browse-pill {
  background: #ffffff !important;
  color: var(--ptsms-navy, #1d2b37) !important;
  border: 1.5px solid var(--ptsms-navy, #1d2b37) !important;
  font-weight: 700;
  transition: all 0.18s ease-in-out;
}

.btn-browse-pill:hover,
.btn-browse-pill:focus {
  background: var(--ptsms-navy, #1d2b37) !important;
  color: #ffffff !important;
  border-color: var(--ptsms-navy, #1d2b37) !important;
  box-shadow: 0 2px 8px rgba(29, 43, 55, 0.25);
  transform: translateY(-1px);
}

.btn-browse-pill:hover i,
.btn-browse-pill:focus i {
  color: var(--ptsms-yellow, #ffcc00) !important;
}

/* ─────────────────────────────────────────────────────────────
   Clause Queries & Notes Chat Bubbles (Exact Match to Design)
   ───────────────────────────────────────────────────────────── */
.chat-bubble-other {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
  margin-right: 16px !important;
  margin-left: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  text-align: left;
}

.chat-bubble-mine {
  background: #e0f2fe !important;
  border: 1px solid #bae6fd !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  margin-bottom: 10px !important;
  margin-left: 16px !important;
  margin-right: 0 !important;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.06);
  text-align: left;
}

.chat-bubble-header-title {
  color: var(--ptsms-navy, #1d2b37) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
}

.chat-bubble-header-time {
  color: #64748b !important;
  font-size: 0.76rem !important;
  font-weight: 500;
}

.chat-bubble-body-text {
  color: #1e293b !important;
  font-size: 0.84rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  margin-top: 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
  text-align: left;
}

/* ── Readiness Trajectory (executive dashboard) ─────────────────────── */
.edash-traj-summary-row {
  display: flex;
  gap: 24px;
  align-items: baseline;
  padding: 12px 18px 4px 18px;
  border-bottom: 1px dashed #eef0f3;
  flex-wrap: wrap;
}
.edash-traj-summary-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.edash-traj-summary-block-target {
  margin-left: auto;
  text-align: right;
}
.edash-traj-summary-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.edash-traj-summary-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ptsms-navy, #0f172a);
  font-family: 'Source Sans 3', sans-serif;
}
.edash-traj-body {
  padding: 8px 12px 12px 12px;
}
.edash-traj-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.edash-traj-grid {
  stroke: #e5e7eb;
  stroke-width: 1;
  stroke-dasharray: 2 3;
}
.edash-traj-area {
  fill-opacity: 0.14;
  stroke: none;
}
.edash-traj-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.edash-traj-projection {
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  stroke-opacity: 0.6;
  fill: none;
}
.edash-traj-today {
  stroke: #94a3b8;
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.edash-traj-today-dot {
  stroke: #ffffff;
  stroke-width: 1.5;
}
.edash-traj-target-star {
  font-size: 18px;
  font-weight: 800;
  fill: #f59e0b;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.edash-traj-axis-lbl {
  font-size: 10px;
  fill: #64748b;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
}
.edash-traj-axis-today {
  fill: #0f172a;
  font-weight: 800;
}
.edash-traj-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

/* Trajectory: header layout + sample-mode switch */
.edash-traj-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.edash-traj-sample-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  margin: 0;
}
.edash-traj-sample-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.edash-traj-switch-track {
  display: inline-block;
  position: relative;
  width: 30px;
  height: 16px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.edash-traj-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.edash-traj-sample-switch input:checked + .edash-traj-switch-track {
  background: var(--ptsms-warning, #d97706);
}
.edash-traj-sample-switch input:checked + .edash-traj-switch-track .edash-traj-switch-thumb {
  transform: translateX(14px);
}
.edash-traj-sample-switch input:focus-visible + .edash-traj-switch-track {
  outline: 2px solid var(--ptsms-warning, #d97706);
  outline-offset: 2px;
}
.edash-traj-switch-lbl {
  white-space: nowrap;
}

/* Trajectory: mode swap (real vs sample) */
.edash-traj-card[data-active-mode="real"] .edash-traj-when-sample { display: none; }
.edash-traj-card[data-active-mode="sample"] .edash-traj-when-real { display: none; }

.edash-traj-sample-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(217, 119, 6, 0.10);
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 1px dashed rgba(217, 119, 6, 0.35);
}
.edash-traj-sample-banner i {
  color: var(--ptsms-warning, #d97706);
}

/* Recent Activity: collapsible via <details>/<summary> */
.edash-act-collapsible > summary {
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding-right: 18px;
}
.edash-act-collapsible > summary::-webkit-details-marker { display: none; }
.edash-act-collapsible > summary::marker { display: none; }

.edash-act-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.edash-act-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.edash-act-summary-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.edash-act-chevron {
  color: #94a3b8;
  transition: transform 0.18s ease;
  font-size: 0.85rem;
}
.edash-act-collapsible[open] > summary .edash-act-chevron {
  transform: rotate(180deg);
  color: var(--ptsms-navy, #0f172a);
}
.edash-act-collapsible[open] > summary .edash-card-subtitle {
  opacity: 0.7;
}
.edash-act-collapsible:not([open]) > summary:hover {
  background: rgba(15, 23, 42, 0.02);
}

