:root {
  --navy: #0B1F33;
  --blue: #1F4E79;
  --teal: #0F766E;
  --bg: #F8FAFC;
  --line: #CBD5E1;
  --text: #0F172A;
  --muted: #64748B;
  --green: #DCFCE7;
  --amber: #FEF3C7;
  --red: #FEE2E2;
}
* { box-sizing: border-box; }
body { margin:0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
.header { background: var(--navy); color:white; padding:18px 24px; display:flex; justify-content:space-between; align-items:center; }
.header h1 { margin:0; font-size:22px; }
.header span { color:#CBD5E1; font-size:13px; }
.container { padding:20px 24px 48px; max-width: 1600px; margin:0 auto; }
.tabs { display:flex; gap:8px; margin:0 0 16px; flex-wrap:wrap; }
.tabs button { border:1px solid var(--line); background:white; padding:10px 14px; border-radius:8px; cursor:pointer; font-weight:600; }
.tabs button.active { background: var(--blue); color:white; border-color: var(--blue); }
.grid { display:grid; grid-template-columns: repeat(6, minmax(160px,1fr)); gap:12px; margin-bottom:18px; }
.card { background:white; border:1px solid var(--line); border-radius:12px; padding:14px; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.card .label { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.card .value { font-size:26px; font-weight:800; margin-top:6px; }
.rag { display:inline-block; padding:4px 10px; border-radius:999px; font-weight:700; font-size:12px; }
.rag.Green { background:var(--green); color:#166534; }
.rag.Amber { background:var(--amber); color:#92400E; }
.rag.Red { background:var(--red); color:#991B1B; }
.filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.filters input,.filters select { padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:white; }
.table-wrap { background:white; border:1px solid var(--line); border-radius:12px; overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { border-bottom:1px solid #E2E8F0; padding:10px; vertical-align:top; }
th { background:#E2E8F0; text-align:left; white-space:nowrap; }
td.small { white-space:nowrap; }
td.work { min-width:280px; }
.inline-edit input,.inline-edit select { width:100%; padding:7px; border:1px solid var(--line); border-radius:6px; }
.inline-edit button, .action-link { background: var(--teal); color:white; border:0; padding:8px 10px; border-radius:6px; cursor:pointer; text-decoration:none; display:inline-block; }
.section-title { font-size:18px; font-weight:800; margin:24px 0 10px; }
.note { color:var(--muted); font-size:13px; margin-bottom:12px; }
.footer { color:var(--muted); font-size:12px; margin-top:24px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(160px,1fr)); } }
.login-shell { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:linear-gradient(135deg,#0B1F33,#1F4E79); }
.login-card { width:100%; max-width:420px; background:white; border-radius:18px; padding:28px; box-shadow:0 24px 70px rgba(0,0,0,.22); }
.login-brand { color:var(--blue); font-weight:800; text-transform:uppercase; font-size:12px; letter-spacing:.08em; }
.login-card h1 { margin:8px 0 8px; font-size:26px; color:var(--navy); }
.login-sub,.login-note { color:var(--muted); font-size:13px; line-height:1.45; }
.login-card label { display:block; margin:14px 0 6px; font-weight:700; font-size:13px; }
.login-card input { width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font-size:15px; }
button.primary, button.secondary { border:0; padding:11px 12px; border-radius:10px; font-weight:800; cursor:pointer; margin-top:14px; }
button.primary { background:var(--blue); color:white; }
button.secondary { background:#E2E8F0; color:var(--navy); }
button.full { width:100%; display:block; }
button:disabled { opacity:.55; cursor:not-allowed; }
.login-message { margin-top:14px; background:#F1F5F9; border:1px solid var(--line); border-radius:10px; padding:10px; font-size:13px; color:var(--navy); }
.userbar { display:flex; align-items:center; gap:12px; }
.userbar button { background:white; color:var(--navy); border:0; padding:8px 10px; border-radius:8px; cursor:pointer; font-weight:700; }
.toast { background:#ECFEFF; border:1px solid #67E8F9; color:#155E75; border-radius:10px; padding:10px 12px; margin:0 0 12px; font-size:13px; font-weight:700; }

/* Elegant expandable tracker layout */
.header { box-shadow:0 8px 24px rgba(11,31,51,.18); }
.header h1 { letter-spacing:-.02em; }
.container { padding-top:22px; }
.panel-filters { background:#FFFFFF; border:1px solid #E2E8F0; border-radius:16px; padding:12px; box-shadow:0 8px 24px rgba(15,23,42,.04); align-items:center; }
.panel-filters input { min-width:300px; }
.elegant-table { border-radius:18px; box-shadow:0 14px 38px rgba(15,23,42,.06); overflow:auto; }
.elegant-table table { min-width:1180px; border-collapse:separate; border-spacing:0; }
.elegant-table th { background:#F1F5F9; color:#334155; font-size:11px; letter-spacing:.07em; text-transform:uppercase; padding:12px 14px; border-bottom:1px solid #CBD5E1; }
.elegant-table td { padding:12px 14px; border-bottom:1px solid #E2E8F0; }
.compact-row { cursor:pointer; background:#fff; transition:background .16s ease, box-shadow .16s ease; }
.compact-row:hover { background:#F8FAFC; }
.compact-row.open { background:#F0F9FF; }
.expand-cell { width:48px; text-align:center; }
.expand-btn { width:30px; height:30px; border-radius:10px; border:1px solid #CBD5E1; background:#FFFFFF; color:#1F4E79; font-size:22px; line-height:23px; font-weight:900; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.expand-btn:hover { background:#DBEAFE; border-color:#93C5FD; }
.id-cell strong,.module-cell strong,.work-title strong { display:block; color:#0F172A; font-weight:800; }
.id-cell span,.module-cell span,.work-title span { display:block; margin-top:3px; color:#64748B; font-size:12px; line-height:1.3; }
.work-title { min-width:330px; max-width:460px; }
.work-title span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:420px; }
.summary-chip { display:inline-flex; flex-direction:column; gap:2px; background:#F8FAFC; border:1px solid #E2E8F0; border-radius:10px; padding:6px 9px; margin:0 6px 6px 0; min-width:86px; vertical-align:top; }
.summary-chip-label { color:#64748B; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.summary-chip-value { color:#0F172A; font-size:12px; font-weight:700; line-height:1.25; }
.summary-chip.danger { background:#FEF2F2; border-color:#FECACA; }
.summary-chip.danger .summary-chip-value { color:#991B1B; }
.status-pill,.bucket-pill { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:12px; font-weight:800; margin:0 6px 6px 0; }
.status-pill { background:#E0F2FE; color:#075985; }
.bucket-pill { background:#F1F5F9; color:#334155; }
.dirty-dot { display:block; width:max-content; margin-top:6px; background:#FFF7ED; color:#C2410C; border:1px solid #FDBA74; border-radius:999px; padding:3px 8px; font-size:11px; font-weight:800; }
.detail-row td { background:#F8FAFC; padding:0 14px 18px 62px; }
.detail-panel { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr); gap:18px; background:#FFFFFF; border:1px solid #CBD5E1; border-top:0; border-radius:0 0 18px 18px; padding:18px; box-shadow:inset 4px 0 0 #1F4E79; }
.detail-title { font-size:15px; font-weight:900; color:#0B1F33; margin-bottom:10px; }
.small-title { margin-top:18px; }
.detail-meta { margin-bottom:8px; }
.detail-text { color:#334155; font-size:13px; line-height:1.55; white-space:pre-wrap; background:#F8FAFC; border:1px dashed #CBD5E1; border-radius:14px; padding:12px; }
.phase-grid { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:8px; }
.phase-tile { background:#F8FAFC; border:1px solid #E2E8F0; border-radius:12px; padding:9px 10px; }
.phase-label { color:#1F4E79; font-size:12px; font-weight:900; }
.phase-dates { color:#475569; font-size:12px; margin-top:3px; }
.edit-card { background:linear-gradient(180deg,#F8FAFC,#FFFFFF); border:1px solid #CBD5E1; border-radius:16px; padding:16px; align-self:start; box-shadow:0 12px 28px rgba(15,23,42,.06); }
.edit-title { font-size:15px; font-weight:900; color:#0B1F33; margin-bottom:12px; }
.edit-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.edit-field { display:block; margin:0; }
.edit-field span { display:block; color:#64748B; font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; margin-bottom:5px; }
.edit-field input,.edit-field select { height:38px; }
.edit-field:nth-child(5),.edit-field:nth-child(6) { grid-column:span 2; }
.edit-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
.small-btn { margin:0!important; padding:9px 12px!important; border-radius:10px!important; }
@media (max-width: 1100px) {
  .detail-panel { grid-template-columns:1fr; padding:14px; }
  .detail-row td { padding-left:14px; }
  .phase-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 700px) {
  .panel-filters input { min-width:100%; }
  .phase-grid,.edit-grid { grid-template-columns:1fr; }
  .edit-field:nth-child(5),.edit-field:nth-child(6) { grid-column:span 1; }
}


/* Dashboard v2 analytics */
.dashboard-hero {
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:stretch;
  background:linear-gradient(135deg,#0B1F33,#1F4E79);
  color:#FFFFFF;
  border-radius:20px;
  padding:24px;
  margin-bottom:18px;
  box-shadow:0 18px 44px rgba(15,23,42,.16);
}
.dashboard-hero h2 { margin:4px 0 8px; font-size:24px; letter-spacing:-.02em; }
.dashboard-hero p { margin:0; color:#DDEBFA; max-width:920px; line-height:1.55; font-size:14px; }
.eyebrow { color:#93E4D3; font-size:12px; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
.hero-rag { min-width:170px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.18); border-radius:16px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.hero-rag .rag { font-size:18px; padding:7px 18px; }
.hero-rag span:last-child { font-size:12px; color:#DDEBFA; }

.kpi-card .kpi-sub { color:var(--muted); font-size:11px; margin-top:6px; line-height:1.35; }
.analytics-grid { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(360px,.6fr); gap:16px; margin:16px 0; }
.analytics-card { background:#FFFFFF; border:1px solid #D9E3EF; border-radius:18px; padding:16px; box-shadow:0 14px 34px rgba(15,23,42,.06); overflow:hidden; }
.analytics-card.wide { min-width:0; }
.legend { display:flex; gap:14px; color:#475569; font-size:12px; font-weight:800; margin:-4px 0 12px; }
.legend span::before { content:""; display:inline-block; width:18px; height:7px; border-radius:99px; margin-right:6px; vertical-align:middle; }
.legend-planned::before { background:#93C5FD; }
.legend-actual::before { background:#0F766E; }

.dual-row { display:grid; grid-template-columns:220px minmax(280px,1fr) 82px; gap:14px; align-items:center; padding:10px 0; border-bottom:1px solid #EEF2F7; }
.dual-row:last-child { border-bottom:0; }
.dual-label strong { display:block; font-size:13px; color:#0F172A; }
.dual-label span { display:block; color:#64748B; font-size:11px; margin-top:3px; line-height:1.35; }
.bar-box { display:flex; flex-direction:column; gap:6px; }
.bar-line { position:relative; height:18px; min-width:34px; border-radius:999px; display:flex; align-items:center; justify-content:flex-end; transition:width .2s ease; }
.bar-line span { font-size:10px; font-weight:900; color:#0F172A; padding-right:6px; }
.bar-line.planned { background:#DBEAFE; border:1px solid #93C5FD; }
.bar-line.actual { background:#CCFBF1; border:1px solid #2DD4BF; }
.dual-right { text-align:right; }
.mini-count { display:grid; grid-template-columns:1fr 130px 38px; gap:10px; align-items:center; padding:8px 0; border-bottom:1px solid #EEF2F7; font-size:13px; }
.mini-count:last-child { border-bottom:0; }
.mini-count span { color:#334155; font-weight:700; }
.mini-track { background:#E2E8F0; border-radius:999px; height:8px; overflow:hidden; }
.mini-track div { background:#1F4E79; height:8px; border-radius:999px; }
.mini-count b { text-align:right; color:#0F172A; }
.analytics-card hr { border:0; border-top:1px dashed #CBD5E1; margin:10px 0; }

.module-cards { display:grid; grid-template-columns:repeat(4,minmax(220px,1fr)); gap:12px; }
.module-card { background:#FFFFFF; border:1px solid #D9E3EF; border-radius:16px; padding:14px; box-shadow:0 10px 26px rgba(15,23,42,.05); }
.module-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:10px; }
.module-head strong { color:#0B1F33; }
.module-bars { display:grid; gap:5px; font-size:12px; color:#334155; font-weight:700; }
.module-foot { margin-top:10px; padding-top:10px; border-top:1px dashed #CBD5E1; font-size:11px; color:#64748B; line-height:1.4; }

.responsibility-grid { display:grid; grid-template-columns:repeat(3,minmax(260px,1fr)); gap:12px; margin-bottom:18px; }
.resp-card { background:#FFFFFF; border:1px solid #D9E3EF; border-radius:16px; padding:14px; box-shadow:0 10px 26px rgba(15,23,42,.05); }
.resp-card strong { display:block; color:#0B1F33; margin-bottom:5px; }
.resp-card > span { display:block; color:#64748B; font-size:12px; margin-bottom:10px; }
.resp-metrics { display:flex; flex-wrap:wrap; gap:6px; }
.pill { display:inline-flex; border-radius:999px; padding:5px 9px; font-size:11px; font-weight:900; background:#F1F5F9; color:#334155; margin:0 4px 6px 0; }
.pill.red { background:#FEE2E2; color:#991B1B; }
.pill.amber { background:#FEF3C7; color:#92400E; }
.pill.blue { background:#DBEAFE; color:#1E3A8A; }
.pill.grey { background:#E2E8F0; color:#334155; }

.phase-table table { min-width:1320px; }
.phase-row .work-title span { white-space:normal; }
.phase-detail-panel { grid-template-columns:minmax(0,1.25fr) minmax(420px,.75fr); }
.io-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.io-block { min-width:0; }
.io-title { font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.08em; color:#1F4E79; margin:10px 0 6px; }
.io-block .detail-text { max-height:210px; overflow:auto; }
.phase-detail-row .edit-grid { grid-template-columns:1fr 1fr; }
.phase-detail-row .edit-field:nth-child(5),
.phase-detail-row .edit-field:nth-child(6),
.phase-detail-row .edit-field:nth-child(7),
.phase-detail-row .edit-field:nth-child(8),
.phase-detail-row .edit-field:nth-child(10),
.phase-detail-row .edit-field:nth-child(11) { grid-column:span 2; }

@media (max-width: 1300px) {
  .grid { grid-template-columns: repeat(4, minmax(160px,1fr)); }
  .analytics-grid { grid-template-columns:1fr; }
  .module-cards { grid-template-columns:repeat(3,minmax(220px,1fr)); }
  .responsibility-grid { grid-template-columns:repeat(2,minmax(260px,1fr)); }
}
@media (max-width: 900px) {
  .dashboard-hero { flex-direction:column; }
  .dual-row { grid-template-columns:1fr; }
  .module-cards { grid-template-columns:1fr; }
  .responsibility-grid { grid-template-columns:1fr; }
  .io-grid { grid-template-columns:1fr; }
}

/* ==========================================================
   Modern UX Refresh v3 — clean cockpit UI, chip filters, cards
   ========================================================== */
:root {
  --bg: #f3f7fb;
  --surface: rgba(255,255,255,.86);
  --surface-solid: #ffffff;
  --ink: #0b1220;
  --muted: #667085;
  --soft: #eef4fb;
  --line: #d7e2ee;
  --primary: #155e75;
  --primary-2: #0f766e;
  --accent: #2dd4bf;
  --shadow: 0 18px 48px rgba(15, 23, 42, .08);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, .055);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}
html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(45, 212, 191, .18), transparent 30rem),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, .14), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 18px 28px;
  background:
    linear-gradient(135deg, rgba(8, 27, 45, .98), rgba(13, 65, 82, .96)),
    radial-gradient(circle at 20% 0%, rgba(45,212,191,.24), transparent 30rem);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 52px rgba(15,23,42,.20);
  backdrop-filter: blur(18px);
}
.header h1 {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -.035em;
}
.header span { color: rgba(255,255,255,.72); }
.userbar {
  padding: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}
.userbar span { padding-left: 12px; font-weight: 650; }
.userbar button {
  border-radius: 999px;
  padding: 9px 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.container {
  max-width: 1520px;
  padding: 22px 26px 56px;
}
.workspace-top {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom: 18px;
}
.modern-tabs {
  padding: 6px;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(215,226,238,.9);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.modern-tabs button,
.tabs button {
  border: 0;
  background: transparent;
  color: #344054;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: all .18s ease;
}
.modern-tabs button:hover,
.tabs button:hover { background: #eef6fb; transform: translateY(-1px); }
.modern-tabs button.active,
.tabs button.active {
  background: linear-gradient(135deg, #0f766e, #155e75);
  color:#fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .26);
}
.scope-toolbar {
  min-width: 340px;
  display:flex;
  align-items:center;
  gap:12px;
  background: rgba(255,255,255,.76);
  border:1px solid rgba(215,226,238,.94);
  border-radius: 20px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.scope-hint {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  color: #667085;
  padding: 8px 10px;
  border-left: 1px solid #d7e2ee;
}
.dashboard-hero {
  position: relative;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 15% 10%, rgba(45,212,191,.28), transparent 23rem),
    radial-gradient(circle at 88% 0%, rgba(59,130,246,.22), transparent 24rem),
    linear-gradient(135deg, #071827, #0f3b46 58%, #0f766e);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(15,23,42,.20);
}
.dashboard-hero:after {
  content:"";
  position:absolute;
  right:-70px;
  top:-70px;
  width:220px;
  height:220px;
  border-radius:999px;
  border: 34px solid rgba(255,255,255,.07);
}
.dashboard-hero h2 {
  font-size: 28px;
  line-height: 1.16;
  max-width: 940px;
}
.eyebrow {
  color:#99f6e4;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
}
.hero-rag {
  min-width: 190px;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.grid {
  grid-template-columns: repeat(6, minmax(160px, 1fr));
  gap: 14px;
}
.card,
.analytics-card,
.module-card,
.resp-card,
.panel-filters,
.table-wrap {
  border: 1px solid rgba(215,226,238,.95);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}
.card { border-radius: 20px; padding: 16px; }
.kpi-card { position:relative; overflow:hidden; }
.kpi-card:before {
  content:"";
  position:absolute;
  inset:0 auto auto 0;
  width:4px;
  height:100%;
  background: linear-gradient(180deg, #2dd4bf, #60a5fa);
  opacity:.75;
}
.card .label { font-size:11px; font-weight:850; color:#667085; }
.card .value { font-size:28px; letter-spacing:-.04em; }
.rag {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.rag.Green { background:#dcfce7; color:#166534; }
.rag.Amber { background:#fef3c7; color:#92400e; }
.rag.Red { background:#fee2e2; color:#991b1b; }
.rag.Green:before { content:"●"; color:#22c55e; }
.rag.Amber:before { content:"●"; color:#f59e0b; }
.rag.Red:before { content:"●"; color:#ef4444; }
.modern-filters {
  display:block;
  border-radius: 24px;
  padding: 14px;
  margin-bottom: 14px;
}
.filter-topline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom: 12px;
}
.search-wrap {
  flex:1;
  min-width: 280px;
  display:flex;
  align-items:center;
  gap:9px;
  background:#fff;
  border:1px solid #d7e2ee;
  border-radius: 16px;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(15,23,42,.02);
}
.search-wrap span { color:#94a3b8; font-size:18px; font-weight:900; }
.search-wrap input {
  min-width: 0!important;
  width: 100%;
  height: 44px;
  border:0!important;
  outline:0;
  background:transparent;
  padding: 0!important;
  font-size: 14px;
}
.filter-rows { display:flex; flex-direction:column; gap:10px; }
.chip-filter {
  display:flex;
  align-items:flex-start;
  gap:10px;
  flex-wrap:wrap;
}
.chip-filter-label {
  width: 92px;
  min-width:92px;
  height: 34px;
  display:flex;
  align-items:center;
  color:#667085;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.chip-filter.compact .chip-filter-label { width:auto; min-width:auto; }
.chip-options { display:flex; flex-wrap:wrap; gap:7px; min-width:0; flex:1; }
.chip-btn {
  border: 1px solid #d7e2ee;
  background: #fff;
  color: #344054;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  line-height:1;
  font-weight: 850;
  cursor: pointer;
  transition: all .16s ease;
}
.chip-btn:hover {
  transform: translateY(-1px);
  border-color:#99f6e4;
  background:#f0fdfa;
}
.chip-btn.active {
  color:#fff;
  border-color: transparent;
  background: linear-gradient(135deg, #0f766e, #155e75);
  box-shadow: 0 10px 22px rgba(15,118,110,.22);
}
.chip-btn.green.active { background: linear-gradient(135deg, #16a34a, #15803d); }
.chip-btn.amber.active { background: linear-gradient(135deg, #d97706, #b45309); }
.chip-btn.red.active { background: linear-gradient(135deg, #dc2626, #991b1b); }
.export-btn,
.action-link {
  border-radius: 14px!important;
  padding: 12px 16px!important;
  font-weight: 900!important;
  background: linear-gradient(135deg, #0f766e, #155e75)!important;
  box-shadow: 0 12px 24px rgba(15,118,110,.18);
}
.note {
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(215,226,238,.8);
  border-radius: 14px;
  padding: 10px 12px;
  color: #667085;
}
.elegant-table {
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow:auto;
}
.elegant-table table { border-spacing:0 0; }
.elegant-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf3f9;
  color: #475467;
  font-weight: 900;
  padding: 13px 14px;
}
.elegant-table td {
  padding: 14px;
  background: rgba(255,255,255,.92);
}
.compact-row:hover td { background:#f8fcff; }
.compact-row.open td { background:#eff9ff; }
.expand-btn {
  border-radius: 999px;
  background:#fff;
  color:#0f766e;
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
.summary-chip,
.status-pill,
.bucket-pill,
.pill {
  border: 1px solid rgba(215,226,238,.95);
  box-shadow: 0 4px 10px rgba(15,23,42,.035);
}
.status-pill { background:#e0f2fe; color:#0369a1; }
.bucket-pill { background:#f1f5f9; color:#475467; }
.detail-panel {
  border-radius: 0 0 24px 24px;
  border-color: #d7e2ee;
  box-shadow: inset 5px 0 0 #2dd4bf, 0 18px 40px rgba(15,23,42,.06);
}
.edit-card {
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-color:#d7e2ee;
}
.edit-field input,
.edit-field select,
.filters input,
.filters select,
.login-card input {
  border-radius: 12px;
  border-color:#d7e2ee;
}
button.primary,
button.secondary,
.small-btn {
  border-radius: 14px!important;
}
button.primary { background: linear-gradient(135deg, #0f766e, #155e75); }
button.secondary { background:#eef4fb; }
.analytics-grid { gap:18px; }
.analytics-card { border-radius: 24px; padding: 18px; }
.dual-row { grid-template-columns: 230px minmax(280px,1fr) 92px; }
.bar-line { height: 20px; }
.bar-line.planned { background:#dbeafe; border-color:#93c5fd; }
.bar-line.actual { background:#ccfbf1; border-color:#5eead4; }
.mini-track { height: 10px; background:#e7eef6; }
.mini-track div { height: 10px; background: linear-gradient(90deg,#0f766e,#2dd4bf); }
.module-cards { gap:14px; }
.module-card,
.resp-card { border-radius: 22px; transition: all .16s ease; }
.module-card:hover,
.resp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.footer {
  text-align:center;
  margin-top: 30px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.52);
  border: 1px solid rgba(215,226,238,.8);
}
.login-shell {
  background:
    radial-gradient(circle at 12% 12%, rgba(45,212,191,.26), transparent 28rem),
    radial-gradient(circle at 90% 5%, rgba(59,130,246,.25), transparent 28rem),
    linear-gradient(135deg,#071827,#0f3b46 58%,#0f766e);
}
.login-card {
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.login-brand {
  display:inline-flex;
  border-radius:999px;
  padding:6px 10px;
  background:#ecfeff;
  color:#155e75;
}
@media (max-width: 1220px) {
  .workspace-top { flex-direction:column; }
  .scope-toolbar { min-width:0; width:100%; }
  .grid { grid-template-columns: repeat(3, minmax(160px,1fr)); }
}
@media (max-width: 760px) {
  .header { align-items:flex-start; flex-direction:column; gap:12px; }
  .userbar { width:100%; justify-content:space-between; }
  .grid { grid-template-columns: repeat(2, minmax(140px,1fr)); }
  .filter-topline { flex-direction:column; align-items:stretch; }
  .chip-filter { display:block; }
  .chip-filter-label { width:auto; min-width:0; height:auto; margin-bottom:8px; }
  .scope-toolbar { display:block; }
  .scope-hint { border-left:0; border-top:1px solid #d7e2ee; margin-top:8px; }
}

/* ==========================================================
   Modern Dashboard v4 — compact, executive, chart-led UI
   ========================================================== */
body {
  background:
    radial-gradient(circle at 8% -10%, rgba(20, 184, 166, .16), transparent 26rem),
    radial-gradient(circle at 95% 0%, rgba(59, 130, 246, .12), transparent 24rem),
    linear-gradient(180deg, #f7fbff 0%, #eef4f8 100%);
}
.header.compact-header,
.header {
  min-height: unset !important;
  padding: 14px 28px !important;
  background: rgba(7, 27, 51, .96) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 35px rgba(2, 8, 23, .16);
}
.header h1 { font-size: 20px !important; line-height: 1.15; margin: 0 0 3px 0 !important; letter-spacing: -.02em; }
.header span { font-size: 12px !important; opacity: .88; }
.userbar { gap: 10px !important; align-items: center; }
.userbar button { border-radius: 999px !important; padding: 8px 14px !important; font-weight: 800; }
.container { max-width: 1480px !important; padding: 18px 24px 36px !important; }
.workspace-top {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  position: sticky; top: 0; z-index: 20;
  padding: 10px 12px; margin-bottom: 16px;
  border: 1px solid rgba(207, 220, 234, .9);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}
.modern-tabs { display:flex; gap:6px; flex-wrap:nowrap; overflow-x:auto; padding:0; margin:0; }
.modern-tabs button {
  border: 0 !important;
  background: transparent !important;
  color: #334155 !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  white-space: nowrap;
}
.modern-tabs button.active {
  background: linear-gradient(135deg, #0f766e, #155e75) !important;
  color: #fff !important;
  box-shadow: 0 10px 25px rgba(15, 118, 110, .25);
}
.scope-toolbar { display:flex; align-items:center; gap:10px; min-width: 340px; justify-content:flex-end; }
.scope-hint { font-size: 12px; color:#64748b; white-space:nowrap; }
.scope-toolbar .chip-filter { margin:0; }
.scope-toolbar .chip-filter-label { display:none; }
.scope-toolbar .chip-options { background:#eef6fb; border-radius: 999px; padding: 4px; border: 1px solid #dbe7f3; }
.scope-toolbar .chip-btn { padding: 8px 13px !important; border-radius: 999px !important; }
.scope-ribbon {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,253,250,.92));
  border: 1px solid #dce9f5;
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .06);
}
.scope-ribbon strong { display:block; font-size: 22px; letter-spacing:-.03em; }
.scope-ribbon span { display:block; color:#667085; margin-top:3px; font-size:13px; }
.scope-badge {
  padding: 10px 14px; border-radius: 999px;
  background: #062c45; color:#e9fbff; font-weight: 900; font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.metric-grid.compact, .metric-grid {
  display:grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 16px;
}
.metric-card {
  background: rgba(255,255,255,.9);
  border: 1px solid #dbe7f3;
  border-radius: 18px;
  padding: 15px 15px 13px;
  box-shadow: 0 10px 26px rgba(15,23,42,.055);
  min-height: 92px;
}
.metric-card.danger { border-color: rgba(239,68,68,.25); background: linear-gradient(180deg,#fff,#fff7f7); }
.metric-card.ok { border-color: rgba(34,197,94,.22); background: linear-gradient(180deg,#fff,#f6fff8); }
.metric-label { color:#64748b; text-transform:uppercase; letter-spacing:.06em; font-size:11px; font-weight:900; }
.metric-value { margin-top:8px; font-size:28px; line-height:1; font-weight:950; letter-spacing:-.04em; color:#071b33; }
.metric-sub { margin-top:8px; font-size:12px; color:#64748b; }
.rag-kpi .metric-value { font-size:16px; }
.rag-summary-grid {
  display:grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; margin: 8px 0 12px;
}
.rag-counter {
  border-radius: 20px; padding: 15px 16px;
  border: 1px solid #dbe7f3;
  background:#fff; box-shadow: 0 12px 28px rgba(15,23,42,.055);
}
.rag-counter.green { background: linear-gradient(135deg,#f0fdf4,#ffffff); border-color:#bbf7d0; }
.rag-counter.amber { background: linear-gradient(135deg,#fffbeb,#ffffff); border-color:#fde68a; }
.rag-counter.red { background: linear-gradient(135deg,#fef2f2,#ffffff); border-color:#fecaca; }
.rag-counter-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.rag-counter-top span { color:#475569; font-weight:900; font-size:13px; }
.rag-counter-top b { font-size:32px; letter-spacing:-.04em; }
.rag-counter-split { margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.rag-counter-split span { background:rgba(255,255,255,.7); border:1px solid rgba(148,163,184,.25); border-radius:999px; padding:5px 8px; font-size:12px; color:#475569; }
.chart-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.chart-grid.top { grid-template-columns: 1.05fr 1.25fr 1.2fr; }
.chart-grid.wide-left { grid-template-columns: 2fr 1fr; }
.chart-card {
  background: rgba(255,255,255,.92);
  border:1px solid #dbe7f3;
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .065);
  overflow:hidden;
}
.chart-card.full { grid-column: 1 / -1; }
.chart-card.wide { min-height: 360px; }
.chart-card-head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom: 12px; }
.chart-card h3 { margin:0; font-size:16px; letter-spacing:-.02em; color:#0f172a; }
.chart-card p { margin:4px 0 0; color:#64748b; font-size:12px; line-height:1.4; }
.donut-wrap { display:flex; align-items:center; justify-content:center; gap:20px; min-height:210px; }
.donut {
  width: 170px; height: 170px; border-radius:50%;
  background: conic-gradient(#22c55e 0 calc(var(--green) * 1%), #f59e0b calc(var(--green) * 1%) calc((var(--green) + var(--amber)) * 1%), #ef4444 calc((var(--green) + var(--amber)) * 1%) 100%);
  display:grid; place-items:center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), 0 18px 36px rgba(15,23,42,.10);
}
.donut-hole { width: 108px; height:108px; border-radius:50%; background:#fff; display:grid; place-items:center; align-content:center; box-shadow: inset 0 0 0 1px #e5edf6; }
.donut-hole strong { font-size:28px; letter-spacing:-.04em; }
.donut-hole span { font-size:12px; color:#64748b; font-weight:800; }
.donut-legend { display:grid; gap:10px; min-width:120px; }
.donut-legend span { font-size:13px; font-weight:850; color:#334155; display:flex; align-items:center; gap:8px; }
.donut-legend span::before { content:''; width:10px; height:10px; border-radius:50%; display:inline-block; }
.green-dot::before { background:#22c55e; } .amber-dot::before { background:#f59e0b; } .red-dot::before { background:#ef4444; }
.progress-compare { display:grid; grid-template-columns: 1fr 1fr 1fr; align-items:center; gap:14px; min-height:210px; }
.progress-ring {
  --pct: 0;
  width: 132px; height:132px; border-radius:50%; margin:auto;
  background: conic-gradient(#0ea5e9 0 calc(var(--pct) * 1%), #e6eef7 0 100%);
  display:grid; place-items:center; align-content:center; position:relative;
}
.progress-ring::after { content:''; position:absolute; inset:13px; border-radius:50%; background:#fff; box-shadow: inset 0 0 0 1px #e5edf6; }
.progress-ring strong, .progress-ring span { position:relative; z-index:1; }
.progress-ring strong { font-size:24px; letter-spacing:-.04em; }
.progress-ring span { color:#64748b; font-size:12px; font-weight:850; }
.actual-ring { background: conic-gradient(#0f766e 0 calc(var(--pct) * 1%), #e6eef7 0 100%); }
.variance-tile { border-radius:18px; background:#f8fafc; border:1px solid #e3edf7; padding:16px; text-align:center; }
.variance-tile span { display:block; color:#64748b; font-weight:900; font-size:12px; text-transform:uppercase; letter-spacing:.05em; }
.variance-tile b { display:block; margin:8px 0; font-size:32px; letter-spacing:-.05em; }
.variance-tile small { color:#64748b; }
.bar-list { display:grid; gap:10px; }
.bar-list-row { display:grid; grid-template-columns: 145px 1fr 44px; gap:10px; align-items:center; }
.bar-list-label { color:#334155; font-size:13px; font-weight:800; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bar-list-track { height:11px; background:#edf3f8; border-radius:999px; overflow:hidden; }
.bar-list-track span { display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#0f766e,#38bdf8); }
.bar-list-row b { font-size:13px; text-align:right; color:#0f172a; }
.module-rag-chart { display:grid; gap:12px; max-height:520px; overflow:auto; padding-right:4px; }
.module-rag-row { display:grid; grid-template-columns: 118px minmax(170px,1fr) 132px; gap:12px; align-items:center; padding:10px; border-radius:16px; background:#f8fbfe; border:1px solid #e4edf6; }
.module-rag-label strong { display:block; font-size:13px; }
.module-rag-label span { color:#64748b; font-size:12px; }
.stacked-rag { display:flex; height:12px; border-radius:999px; overflow:hidden; background:#e5edf6; }
.stacked-rag .seg { display:block; min-width: 2px; }
.stacked-rag .green { background:#22c55e; }
.stacked-rag .amber { background:#f59e0b; }
.stacked-rag .red { background:#ef4444; }
.module-rag-counts { display:flex; gap:5px; align-items:center; justify-content:flex-end; }
.module-rag-counts .g,.module-rag-counts .a,.module-rag-counts .r { min-width:24px; text-align:center; border-radius:999px; padding:3px 6px; font-size:11px; font-weight:900; }
.module-rag-counts .g { background:#dcfce7; color:#166534; } .module-rag-counts .a { background:#fef3c7; color:#92400e; } .module-rag-counts .r { background:#fee2e2; color:#991b1b; }
.dual-row { grid-template-columns: 210px 1fr 72px !important; gap:14px !important; padding:10px 0 !important; border-bottom:1px solid #eef3f8; }
.dual-row:last-child { border-bottom:0; }
.dual-label strong { font-size:13px; }
.dual-label span { color:#64748b; font-size:12px; }
.bar-box { gap:5px; }
.bar-line { height:18px !important; border-radius:999px !important; }
.bar-line span { font-size:10px !important; }
.responsibility-modern { display:grid; gap:10px; }
.resp-line { display:grid; grid-template-columns: 260px minmax(180px,1fr) 320px; gap:12px; align-items:center; padding:10px 12px; border-radius:16px; background:#f8fbfe; border:1px solid #e4edf6; }
.resp-name strong { display:block; }
.resp-name span { color:#64748b; font-size:12px; }
.resp-badges { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.empty-state { color:#64748b; background:#f8fafc; border:1px dashed #cbd5e1; border-radius:16px; padding:18px; text-align:center; }
.panel-filters.modern-filters {
  background:rgba(255,255,255,.9) !important;
  border:1px solid #dbe7f3 !important;
  border-radius:20px !important;
  box-shadow:0 12px 30px rgba(15,23,42,.055) !important;
  padding:12px !important;
  display:grid !important;
  gap:10px !important;
}
.filter-topline { display:flex; align-items:center; gap:12px; justify-content:space-between; }
.search-wrap { flex:1; display:flex; align-items:center; gap:8px; background:#f8fbfe; border:1px solid #dbe7f3; border-radius:999px; padding:0 12px; min-width:280px; }
.search-wrap span { color:#64748b; font-weight:900; }
.search-wrap input { border:0 !important; background:transparent !important; box-shadow:none !important; width:100%; min-height:42px; outline:0; }
.export-btn { border-radius:999px !important; padding:11px 15px !important; white-space:nowrap; }
.filter-rows {
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  overflow-x:auto !important;
  padding:2px 0 4px !important;
}
.chip-filter { display:flex; align-items:center; gap:7px; background:#f8fbfe; border:1px solid #dbe7f3; padding:5px; border-radius:999px; white-space:nowrap; }
.chip-filter-label { font-size:11px !important; font-weight:950 !important; color:#64748b !important; text-transform:uppercase; letter-spacing:.05em; padding-left:7px; }
.chip-options { display:flex; gap:4px; align-items:center; flex-wrap:nowrap; }
.chip-btn {
  border:0 !important; background:transparent !important; color:#475569 !important;
  padding:8px 11px !important; border-radius:999px !important;
  font-size:12px !important; font-weight:900 !important; box-shadow:none !important;
}
.chip-btn.active { background:#071b33 !important; color:#fff !important; }
.chip-btn.green.active { background:#16a34a !important; } .chip-btn.amber.active { background:#d97706 !important; } .chip-btn.red.active { background:#dc2626 !important; }
.elegant-table table { border-collapse:separate !important; border-spacing:0 8px !important; }
.elegant-table thead th { background:transparent !important; border:0 !important; color:#64748b !important; font-size:11px !important; text-transform:uppercase; letter-spacing:.05em; }
.elegant-table tbody tr.compact-row { box-shadow:0 8px 24px rgba(15,23,42,.04); }
.elegant-table tbody tr.compact-row td { background:#fff !important; border-top:1px solid #e6eef7 !important; border-bottom:1px solid #e6eef7 !important; }
.elegant-table tbody tr.compact-row td:first-child { border-left:1px solid #e6eef7 !important; border-radius:14px 0 0 14px; }
.elegant-table tbody tr.compact-row td:last-child { border-right:1px solid #e6eef7 !important; border-radius:0 14px 14px 0; }
.loading-panel { background:#fff; border:1px solid #dbe7f3; border-radius:20px; padding:24px; color:#64748b; }
.footer { color:#64748b !important; text-align:center; margin-top:22px; }
@media (max-width: 1180px) {
  .metric-grid.compact, .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .chart-grid, .chart-grid.top, .chart-grid.wide-left { grid-template-columns:1fr; }
  .resp-line { grid-template-columns:1fr; }
  .workspace-top { flex-direction:column; align-items:stretch; }
  .scope-toolbar { justify-content:flex-start; min-width:0; }
}
@media (max-width: 720px) {
  .container { padding:14px !important; }
  .header { padding:12px 16px !important; flex-direction:column; align-items:flex-start !important; gap:8px; }
  .metric-grid.compact, .metric-grid, .rag-summary-grid { grid-template-columns:1fr; }
  .progress-compare, .donut-wrap { grid-template-columns:1fr; flex-direction:column; }
  .filter-topline { flex-direction:column; align-items:stretch; }
  .search-wrap { min-width:0; }
  .module-rag-row { grid-template-columns:1fr; }
  .dual-row { grid-template-columns:1fr !important; }
}

/* === V5 readability + multiselect refinement === */
.refined-filters {
  padding: 16px;
  border-radius: 22px;
}
.filter-topline {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.toolbar-actions {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.select-filter-grid {
  display:grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap:14px;
  margin-top:14px;
}
.select-filter-grid-three {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}
.multi-select {
  position:relative;
}
.multi-select-label {
  display:block;
  margin:0 0 7px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.multi-select-trigger {
  width:100%;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background:#fff;
  border:1px solid #d7e2ee;
  border-radius:14px;
  padding:0 14px;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
  color:#0f172a;
  cursor:pointer;
}
.multi-select-trigger.open,
.multi-select-trigger:hover {
  border-color:#93c5fd;
  box-shadow:0 12px 26px rgba(59,130,246,.12);
}
.multi-select-summary {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:700;
}
.multi-select-caret { color:#64748b; font-size:16px; }
.multi-select-menu {
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  z-index:25;
  background:#fff;
  border:1px solid #d7e2ee;
  border-radius:16px;
  box-shadow:0 24px 48px rgba(15,23,42,.14);
  padding:10px;
  max-height:280px;
  overflow:auto;
}
.multi-select-actions {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:4px 4px 10px;
  margin-bottom:6px;
  border-bottom:1px solid #edf2f7;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.multi-select-actions button {
  border:0;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  padding:6px 10px;
  font-weight:800;
  cursor:pointer;
}
.multi-select-option {
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 8px;
  border-radius:10px;
  cursor:pointer;
  color:#0f172a;
  font-size:14px;
}
.multi-select-option:hover { background:#f8fafc; }
.multi-select-option input { accent-color:#0f766e; width:16px; height:16px; }

.scope-toolbar {
  gap:14px;
  flex-wrap:wrap;
}
.scope-toolbar .chip-filter {
  background:#ffffffcc;
  border:1px solid #d9e3ef;
  padding:6px;
}

.modern-detail-panel {
  grid-template-columns:minmax(0,1.2fr) minmax(420px,.8fr);
  gap:22px;
  padding:22px;
}
.detail-meta-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.detail-meta-grid .summary-chip {
  margin:0;
  min-width:0;
  padding:10px 12px;
  border-radius:14px;
}
.detail-subtitle {
  color:#64748b;
  font-size:13px;
  font-weight:700;
  margin:-4px 0 12px;
}
.modern-io-grid {
  gap:14px;
}
.io-block .detail-text {
  background:#fbfdff;
  min-height:120px;
  padding:14px;
  line-height:1.65;
}
.modern-edit-card {
  border-radius:20px;
  padding:18px;
  position:sticky;
  top:88px;
}
.edit-section-label {
  margin:2px 0 10px;
  color:#1f4e79;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.compact-edit-grid {
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.edit-field textarea,
.edit-field input,
.edit-field select {
  width:100%;
  border:1px solid #d5dee8;
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  font:inherit;
  color:#0f172a;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.02);
}
.edit-field textarea {
  min-height:88px;
  resize:vertical;
}
.sticky-actions {
  position:sticky;
  bottom:0;
  background:linear-gradient(180deg, rgba(255,255,255,.72), #fff 35%);
  padding-top:10px;
}
.phase-detail-row .compact-edit-grid:last-of-type .edit-field:last-child,
.phase-detail-row .compact-edit-grid:last-of-type .edit-field:nth-child(2) {
  grid-column:span 2;
}
.compact-edit-grid .edit-field:nth-child(5),
.compact-edit-grid .edit-field:nth-child(6) {
  grid-column:span 2;
}
.summary-chip-value { word-break: break-word; }

@media (max-width: 1200px) {
  .select-filter-grid-three { grid-template-columns: 1fr 1fr; }
  .modern-detail-panel { grid-template-columns:1fr; }
  .modern-edit-card { position:relative; top:auto; }
}
@media (max-width: 800px) {
  .select-filter-grid,
  .select-filter-grid-three,
  .detail-meta-grid,
  .compact-edit-grid {
    grid-template-columns:1fr;
  }
  .phase-detail-row .compact-edit-grid:last-of-type .edit-field:last-child,
  .phase-detail-row .compact-edit-grid:last-of-type .edit-field:nth-child(2),
  .compact-edit-grid .edit-field:nth-child(5),
  .compact-edit-grid .edit-field:nth-child(6) {
    grid-column:span 1;
  }
}

/* === V6 dropdown visibility and CND filters === */
.panel-filters,
.modern-filters,
.refined-filters {
  position: relative;
  overflow: visible !important;
  z-index: 80;
}
.refined-filters:focus-within {
  z-index: 5000;
}
.multi-select {
  position: relative;
  z-index: 100;
}
.multi-select:focus-within {
  z-index: 10000;
}
.multi-select-menu {
  z-index: 20000 !important;
  overflow: auto;
}
.elegant-table,
.table-wrap,
.note {
  position: relative;
  z-index: 1;
}
.cnd-filters {
  margin-bottom: 14px;
}
.cnd-select-grid {
  grid-template-columns: minmax(240px,1fr) minmax(260px,1fr) minmax(180px,.7fr) minmax(180px,.7fr);
}
.date-filter-field {
  display:block;
}
.date-filter-field span {
  display:block;
  margin:0 0 7px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.date-filter-field input {
  width:100%;
  min-height:46px;
  border:1px solid #d7e2ee;
  border-radius:14px;
  padding:0 14px;
  background:#fff;
  font:inherit;
  font-weight:700;
  color:#0f172a;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.date-filter-field input:hover,
.date-filter-field input:focus {
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 12px 26px rgba(59,130,246,.12);
}
.cnd-section-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#ffffff;
  border:1px solid #d9e3ef;
  border-radius:16px;
  padding:12px 16px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.cnd-section-title b {
  background:#eef6ff;
  color:#1f4e79;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
}
.cnd-table {
  margin-top:10px;
  margin-bottom:18px;
}
@media (max-width: 1100px) {
  .cnd-select-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .cnd-select-grid { grid-template-columns: 1fr; }
}

/* === V7 cleanup: remove duplicate release filter, fix multiselect checkbox layout === */
.multi-select-menu {
  min-width: 100%;
  width: max-content;
  max-width: min(420px, 92vw);
}
.multi-select-option {
  justify-content:flex-start !important;
  text-align:left !important;
  gap:10px !important;
}
.multi-select-option input[type="checkbox"] {
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  max-width:16px !important;
  flex:0 0 16px !important;
  margin:0 !important;
  padding:0 !important;
  box-shadow:none !important;
  border-radius:3px !important;
}
.multi-select-option span {
  flex:1 1 auto;
  text-align:left !important;
  white-space:nowrap;
}
.cnd-filters .toolbar-actions {
  justify-content:flex-end;
}
@media (max-width: 900px) {
  .multi-select-menu { width:100%; max-width:100%; }
}


/* V8 focus stability polish */
.search-wrap input:focus,
.edit-field input:focus,
.edit-field textarea:focus,
.edit-field select:focus,
.multi-select-trigger:focus {
  outline: none;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,.14) !important;
}

/* V9 PMO / Teams Scheduling Assistant */
.pmo-schedule-shell {
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(420px,.9fr);
  gap:18px;
  margin-top:14px;
}
.pmo-card {
  background:rgba(255,255,255,.92);
  border:1px solid #d9e3ef;
  border-radius:22px;
  box-shadow:0 18px 44px rgba(15,23,42,.07);
  padding:18px;
  margin-bottom:16px;
}
.pmo-hero-card h2 { margin:6px 0 8px; font-size:24px; letter-spacing:-.035em; }
.pmo-hero-card p { color:#64748b; margin:0 0 14px; line-height:1.55; }
.pmo-structure-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.pmo-structure-grid span {
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:999px;
  padding:8px 11px;
  font-size:12px;
  font-weight:800;
  color:#334155;
}
.pmo-card-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}
.pmo-card-head h3 { margin:0; font-size:17px; }
.pmo-card-head span { color:#64748b; font-size:12px; font-weight:800; }
.meeting-list { display:grid; gap:12px; }
.meeting-item {
  background:#fbfdff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:14px;
}
.meeting-item strong { display:block; color:#0f172a; margin-bottom:4px; }
.meeting-item span { color:#64748b; font-size:12px; font-weight:700; }
.meeting-item p { color:#475569; line-height:1.5; margin:9px 0 0; font-size:13px; }
.meeting-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:10px; }
.meeting-actions a { color:#0f766e; font-weight:900; text-decoration:none; }
.meeting-pill {
  display:inline-flex;
  border-radius:999px;
  padding:5px 9px;
  font-size:11px;
  font-weight:900;
  background:#eef2ff;
  color:#3730a3;
}
.meeting-pill.completed,.meeting-pill.scheduled,.meeting-pill.teams-link-created { background:#dcfce7; color:#166534; }
.meeting-pill.draft,.meeting-pill.not-created { background:#fef3c7; color:#92400e; }
.scheduler-card .edit-field:nth-child(1),
.scheduler-card .edit-field:nth-child(6),
.scheduler-card .edit-field:nth-child(7),
.scheduler-card .edit-field:nth-child(8) { grid-column:span 2; }
.schedule-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.agenda-preview {
  margin-top:12px;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:16px;
  padding:13px 15px;
}
.agenda-preview strong { display:block; margin-bottom:8px; color:#0f172a; }
.agenda-preview ol { margin:0; padding-left:20px; color:#475569; line-height:1.55; }
.pmo-tracker-grid {
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
  margin-top:16px;
}
.pmo-track-card {
  background:#fff;
  border:1px solid #d9e3ef;
  border-radius:22px;
  box-shadow:0 14px 38px rgba(15,23,42,.06);
  overflow:hidden;
}
.pmo-track-title {
  padding:15px 18px;
  font-weight:900;
  background:linear-gradient(180deg,#fbfdff,#f1f7fd);
  border-bottom:1px solid #e2e8f0;
}
.pmo-mini-table-wrap { overflow:auto; }
.pmo-mini-table { width:100%; min-width:920px; border-collapse:collapse; }
.pmo-mini-table th { background:#f8fafc; color:#64748b; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.pmo-mini-table td,.pmo-mini-table th { padding:11px 12px; border-bottom:1px solid #eef2f7; vertical-align:top; }
.pmo-mini-table td { color:#0f172a; line-height:1.45; }
@media (max-width:1100px){
  .pmo-schedule-shell { grid-template-columns:1fr; }
  .scheduler-card .edit-field:nth-child(1),
  .scheduler-card .edit-field:nth-child(6),
  .scheduler-card .edit-field:nth-child(7),
  .scheduler-card .edit-field:nth-child(8) { grid-column:span 1; }
}
@media (max-width:760px){
  .pmo-structure-grid,.schedule-grid { grid-template-columns:1fr; }
}
