:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --ink: #142033;
  --muted: #5c6b80;
  --line: #d8e1ee;
  --blue: #2f6fed;
  --navy: #16324f;
  --steel: #6f8298;
  --green: #17876c;
  --amber: #d18a09;
  --red: #c84a4a;
  --purple: #7557d9;
  --soft-blue: #eaf1ff;
  --soft-green: #e8f8f1;
  --soft-amber: #fff5df;
  --soft-red: #ffebeb;
  --soft-purple: #f0ebff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(47, 111, 237, 0.1), transparent 24%),
    linear-gradient(180deg, #edf2f8 0%, var(--bg) 22%, #f7fafe 100%);
  color: var(--ink);
}

.auth-page-body {
  min-height: 100vh;
}

.app-shell-auth {
  display: block;
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.22s ease;
}

.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.drawer-open {
  grid-template-columns: 280px minmax(0, 1fr);
}

.main-shell {
  width: 100%;
  min-width: 0;
}

.sidebar-backdrop {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  height: 100vh;
  padding: 24px 18px;
  background: linear-gradient(180deg, #11253b, #173350 55%, #1f4062);
  color: #f3f7fb;
  overflow: hidden;
}

.sidebar-top .eyebrow,
.sidebar-top .brand,
.sidebar-nav a,
.sidebar-footer a,
.sidebar-footer .user-chip {
  color: #f3f7fb;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.sidebar-subnav {
  display: grid;
  gap: 6px;
  margin: -2px 0 6px 18px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  color: rgba(243, 247, 251, 0.74);
  font-size: 0.92rem;
  font-weight: 600;
}

.sidebar-subnav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-subnav-link-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  color: rgba(243, 247, 251, 0.86);
  background: rgba(255, 255, 255, 0.02);
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
}

.sidebar-user {
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216, 225, 238, 0.8);
}

.header-shell,
.page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 20px;
  padding-right: 20px;
}

.header-title-stack {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  box-shadow: none;
}

.header-user-chip {
  display: none;
}

.eyebrow,
.section-label {
  margin: 0 0 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.latin-uppercase {
  text-transform: none;
}

.brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
}

.header-links a {
  font-weight: 600;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
}

.page-shell {
  padding: 30px 0 56px;
}

.breadcrumb-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--steel);
  font-size: 0.92rem;
}

.breadcrumb-link {
  color: var(--steel);
  font-weight: 600;
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 700;
}

.breadcrumb-separator {
  color: #99a8bc;
}

.page-shell-auth {
  width: min(1320px, calc(100% - 48px));
  padding: 44px 0 60px;
}

.auth-stage {
  min-height: calc(100vh - 96px);
  display: grid;
  align-items: center;
  justify-items: center;
}

.auth-card {
  width: min(1180px, 100%);
}

.auth-form-card {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 32px;
  border: 1px solid rgba(216, 225, 238, 0.95);
  box-shadow: 0 24px 54px rgba(16, 39, 63, 0.12);
}

.auth-banner {
  display: grid;
  gap: 14px;
  padding: 40px 46px;
  border-radius: 24px;
  background: linear-gradient(145deg, #10273f 0%, #173a5d 52%, #275784 100%);
  color: #f3f7fb;
}

.auth-kicker {
  color: rgba(255, 255, 255, 0.88);
}

.auth-banner h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4.6vw, 4.8rem);
  line-height: 1.02;
}

.auth-banner-copy {
  margin: 0;
  color: rgba(243, 247, 251, 0.84);
  line-height: 1.55;
  max-width: 48ch;
  font-size: 1.05rem;
}

.auth-form-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.22fr);
  gap: 44px;
  align-items: start;
}

.auth-form-intro {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 8px;
}

.auth-form-intro h2 {
  margin: 0;
  font-size: clamp(2.3rem, 3.2vw, 3.4rem);
}

.auth-form-shell {
  display: grid;
  gap: 16px;
}

.captcha-actions {
  display: flex;
  justify-content: flex-start;
}

.captcha-refresh-button {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: none;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

.login-field input {
  min-height: 50px;
}

.login-form .form-actions {
  margin-top: 4px;
}

.auth-error {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft-red);
  color: var(--red);
  font-weight: 600;
}

.captcha-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  border: 1px solid var(--line);
}

.captcha-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.captcha-image {
  width: 220px;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.hero,
.detail-header {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}

.hero h1,
.detail-header h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  line-height: 1.05;
}

.lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.executive-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 20px;
  margin-bottom: 24px;
}

.hero-board {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #10273f 0%, #183d60 50%, #25527f 100%);
  color: #f3f7fb;
  box-shadow: 0 24px 48px rgba(16, 39, 63, 0.22);
}

.hero-board::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-board h1 {
  margin: 0 0 14px;
  font-size: clamp(2.15rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.hero-board .lead {
  color: rgba(243, 247, 251, 0.86);
  max-width: 760px;
}

.hero-inline-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.hero-inline-metrics div {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metric-link {
  display: block;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f3f7fb;
  transition: transform 0.18s ease, background 0.18s ease;
}

.hero-metric-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.hero-inline-metrics span {
  display: block;
  margin-bottom: 8px;
  color: rgba(243, 247, 251, 0.78);
  font-size: 0.9rem;
}

.hero-inline-metrics strong {
  font-size: 1.15rem;
}

.hero-brief {
  display: grid;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f5f8fc);
  border: 1px solid rgba(216, 225, 238, 0.92);
  box-shadow: 0 18px 40px rgba(17, 36, 68, 0.07);
}

.brief-header,
.brief-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.brief-label {
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brief-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-note,
.panel,
.summary-card {
  background: var(--panel);
  border: 1px solid rgba(216, 225, 238, 0.9);
  border-radius: 24px;
  box-shadow: 0 16px 34px rgba(17, 36, 68, 0.055);
}

.hero-note {
  padding: 22px;
}

.hero-note ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.executive-grid .summary-card {
  border-radius: 24px;
}

.summary-card-link,
.ribbon-link,
.segment-link,
.priority-card-link {
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.summary-card-link:hover,
.ribbon-link:hover,
.segment-link:hover,
.priority-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(17, 36, 68, 0.08);
}

.summary-card {
  padding: 22px 20px;
}

.summary-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.summary-card strong {
  font-size: 2rem;
  line-height: 1;
}

.accent-blue {
  background: linear-gradient(180deg, var(--soft-blue), #fff);
}

.accent-green {
  background: linear-gradient(180deg, var(--soft-green), #fff);
}

.accent-amber {
  background: linear-gradient(180deg, var(--soft-amber), #fff);
}

.accent-red {
  background: linear-gradient(180deg, var(--soft-red), #fff);
}

.accent-purple {
  background: linear-gradient(180deg, var(--soft-purple), #fff);
}

.accent-sky {
  background: linear-gradient(180deg, #e8f7ff, #fff);
}

.two-column {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
}

.single-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.portfolio-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.chart-grid-tight {
  grid-template-columns: 1.2fr 0.8fr;
}

.chart-stack,
.segment-list {
  display: grid;
  gap: 14px;
}

.chart-row {
  display: grid;
  gap: 8px;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.chart-labels span {
  color: var(--muted);
  font-size: 0.92rem;
}

.chart-track,
.mini-track,
.segment-progress {
  overflow: hidden;
  width: 100%;
  border-radius: 999px;
  background: #e7eef7;
}

.chart-track,
.segment-progress {
  height: 12px;
}

.mini-track {
  height: 10px;
}

.chart-fill,
.mini-fill,
.segment-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, #1c4d82, #2f6fed);
}

.status-fill {
  background: linear-gradient(135deg, #173a5f, #2f6fed);
}

.segment-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f7fafe);
  border: 1px solid rgba(216, 225, 238, 0.9);
}

.segment-card p {
  margin: 10px 0;
  color: var(--ink);
  line-height: 1.5;
}

.priority-mix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 260px;
}

.trend-column {
  display: grid;
  gap: 8px;
  align-items: end;
  text-align: center;
}

.trend-bar-wrap {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 170px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f5f9ff, #eef4fb);
}

.trend-bar {
  width: 100%;
  min-height: 20px;
  border-radius: 16px 16px 8px 8px;
  background: linear-gradient(180deg, #2f6fed, #16324f);
  box-shadow: 0 14px 24px rgba(47, 111, 237, 0.18);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.heat-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(216, 225, 238, 0.9);
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.heat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(17, 36, 68, 0.08);
}

.heat-card p {
  margin: 0;
  line-height: 1.5;
}

.heat-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.heat-1,
.heat-2 {
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
}

.heat-3,
.heat-4 {
  background: linear-gradient(180deg, #fffdf4, #fff7e0);
}

.heat-5,
.heat-6,
.heat-7 {
  background: linear-gradient(180deg, #fff5f2, #ffe6de);
}

.sponsor-fill {
  background: linear-gradient(135deg, #17876c, #2f6fed);
}

.priority-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f6f9fd);
  border: 1px solid rgba(216, 225, 238, 0.9);
}

.priority-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.priority-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.ribbon-card {
  padding: 22px 24px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f6f9fd);
  border: 1px solid rgba(216, 225, 238, 0.9);
  box-shadow: 0 16px 34px rgba(17, 36, 68, 0.05);
}

.ribbon-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ribbon-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.08rem;
}

.ribbon-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.active-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.export-actions,
.tab-row,
.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-row {
  margin-bottom: 14px;
}

.tab-link,
.quick-filter-link,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  background: #f6f9fd;
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: none;
}

.tab-link-active {
  background: linear-gradient(135deg, #16324f, #2f6fed);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(36, 79, 215, 0.16);
}

.table-caption {
  margin-bottom: 16px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.page-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-size-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
}

.page-size-link-active {
  background: linear-gradient(135deg, #16324f, #2f6fed);
  border-color: transparent;
  color: #fff;
}

.detail-columns {
  align-items: start;
}

.stack {
  display: grid;
  gap: 20px;
}

body.drawer-lock {
  overflow: hidden;
}

.panel {
  padding: 30px 32px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.panel-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.2rem);
  line-height: 1.05;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8f0ff, #f7fbff);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 700;
}

.filter-row,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.filter-row {
  align-items: end;
  margin-bottom: 20px;
}

.filter-row button {
  min-height: 46px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  color: var(--ink);
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

button {
  border: none;
  border-radius: 16px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #244fd7, var(--blue));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(36, 79, 215, 0.18);
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.project-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  border: 0;
  padding: 0;
  background: rgba(8, 20, 34, 0.38);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.project-modal-backdrop-visible {
  opacity: 1;
  visibility: visible;
}

.project-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 40;
  width: min(860px, calc(100vw - 40px));
  max-height: min(88vh, 920px);
  padding: 28px;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid rgba(216, 225, 238, 0.96);
  border-radius: 28px;
  box-shadow: 0 28px 64px rgba(16, 39, 63, 0.18);
  transform: translate(-50%, calc(-50% + 24px));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.22s ease, opacity 0.18s ease, visibility 0.18s ease;
}

.project-modal-open {
  transform: translate(-50%, -50%);
  opacity: 1;
  visibility: visible;
}

.project-modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin: -28px -28px 18px;
  padding: 24px 28px 16px;
  position: sticky;
  top: -28px;
  z-index: 2;
  background: rgba(247, 251, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(216, 225, 238, 0.72);
}

.project-modal-header h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.drawer-close-button {
  border: 1px solid rgba(216, 225, 238, 0.96);
  background: #fff;
  color: var(--navy);
  box-shadow: none;
}

.drawer-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.drawer-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid rgba(216, 225, 238, 0.9);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}

.drawer-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(22, 50, 79, 0.1);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.drawer-tab-pill-active {
  background: linear-gradient(135deg, #16324f, #2f6fed);
  border-color: transparent;
  color: #fff;
}

.drawer-tab-pill-active .drawer-step-index {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.drawer-tab-pill-ghost {
  background: #fff;
}

.drawer-form {
  display: grid;
  gap: 18px;
}

.drawer-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid rgba(216, 225, 238, 0.9);
}

.drawer-section-hidden {
  display: none;
}

.drawer-section-header h3 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.drawer-section-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.drawer-form-actions {
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: -28px;
  margin-top: 4px;
  padding: 18px 0 6px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0), rgba(247, 251, 255, 0.94) 28%, rgba(247, 251, 255, 0.98));
}

.table-wrapper {
  overflow-x: auto;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pagination-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-drawer {
  padding: 0;
  overflow: hidden;
}

.ops-drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.ops-drawer-summary::-webkit-details-marker {
  display: none;
}

.ops-drawer-summary strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy);
}

.ops-drawer-meta {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 700;
}

.ops-drawer-content {
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table-row-highlight {
  background: linear-gradient(180deg, #f4f8ff, #fbfdff);
}

th {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-weight: inherit;
}

.sort-indicator {
  font-size: 0.72rem;
  color: var(--blue);
}

.table-link {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 4px;
}

.subtle {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.compact-list,
.card-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compact-list li,
.card-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.compact-list li:last-child,
.card-item:last-child {
  border-bottom: none;
}

.compact-list span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-item p {
  margin: 10px 0 8px;
  color: var(--ink);
  line-height: 1.6;
}

.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.error {
  color: var(--red);
  font-size: 0.88rem;
}

.success-banner {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(23, 135, 108, 0.18);
  background: linear-gradient(180deg, #eefaf5, #f9fffc);
  color: #0f5c49;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.success-banner-copy {
  display: grid;
  gap: 4px;
}

.success-banner-copy strong,
.success-banner-copy span {
  display: block;
}

.success-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.success-banner-actions .secondary-button {
  background: #fff;
  border-color: rgba(23, 135, 108, 0.24);
  color: #0f5c49;
}

.sort-default-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f6f9fd, #ffffff);
  border: 1px solid rgba(216, 225, 238, 0.9);
  color: var(--muted);
  line-height: 1.55;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sort-default-note strong {
  color: var(--navy);
}

.sort-reset-link {
  color: var(--blue);
  font-weight: 700;
  white-space: nowrap;
}

.detail-meta {
  display: grid;
  gap: 12px;
  background: var(--panel);
  border: 1px solid rgba(216, 225, 238, 0.9);
  border-radius: 22px;
  padding: 20px;
}

.detail-meta div {
  display: grid;
  gap: 4px;
}

.danger-panel {
  margin-bottom: 24px;
  background: linear-gradient(180deg, var(--soft-red), #fff);
}

.panel-spacing {
  margin-bottom: 28px;
}

.metric-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-stack span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.inline-form label {
  min-width: 220px;
}

.inline-form button {
  min-height: 46px;
}

.panel-inline-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7fbff;
  border: 1px solid var(--line);
}

.panel-inline-action .subtle {
  margin: 0;
  flex: 1 1 320px;
}

.user-admin-layout {
  align-items: start;
  margin-bottom: 24px;
}

.user-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.user-card {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(216, 225, 238, 0.9);
}

.user-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.user-inline-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .app-shell,
  .sidebar-collapsed,
  .drawer-open {
    grid-template-columns: 1fr;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 28;
    border: 0;
    padding: 0;
    background: rgba(10, 24, 40, 0.32);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
  }

  .drawer-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    width: min(320px, calc(100vw - 28px));
    height: 100vh;
    border-radius: 0 24px 24px 0;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
  }

  .drawer-open .sidebar {
    transform: translateX(0);
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-hero,
  .chart-grid,
  .portfolio-ribbon,
  .hero,
  .detail-header,
  .two-column {
    grid-template-columns: 1fr;
  }

  .auth-content-grid {
    grid-template-columns: 1fr;
  }

  .breadcrumb-row {
    margin-top: 4px;
  }

  .user-card-grid {
    grid-template-columns: 1fr;
  }

  .heatmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-modal {
    width: min(760px, calc(100vw - 28px));
    max-height: min(90vh, 920px);
    padding: 24px;
  }

  .project-modal-header {
    margin: -24px -24px 18px;
    padding: 20px 24px 14px;
    top: -24px;
  }

  .drawer-form-actions {
    bottom: -24px;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .header-shell {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }

  .summary-grid,
  .hero-inline-metrics,
  .priority-mix,
  .trend-chart,
  .heatmap-grid,
  .portfolio-ribbon,
  .filter-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .header-shell {
    padding: 10px 0;
    align-items: start;
    gap: 12px;
    flex-direction: column;
  }

  .header-links {
    width: 100%;
  }

  .breadcrumb-row {
    font-size: 0.88rem;
  }

  .project-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 18px;
    border-radius: 22px;
  }

  .project-modal-header {
    margin: -18px -18px 16px;
    padding: 18px 18px 12px;
    top: -18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .drawer-section {
    padding: 16px;
  }

  .drawer-form-actions {
    bottom: -18px;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .drawer-form-actions button,
  .drawer-close-button {
    width: 100%;
  }
}
