/* Mirror of Next.js CHED SPMS template (globals.css + Tailwind theme) */
:root {
  --ched-navy: #0b2f52;
  --ched-blue: #14477a;
  --ched-steel: #2c6591;
  --ched-gold: #b3822a;
  --ched-sand: #f6f3ec;
  --ched-ink: #1b1b1b;
  --font-formal: "Times New Roman", Times, Georgia, serif;
  --font-body: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f2f4f7;
  color: var(--ched-ink);
  font-family: var(--font-body);
  line-height: 1.45;
  overflow-x: hidden;
  max-width: 100vw;
}

a { color: var(--ched-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a.underline { text-decoration: underline; }

.formal { font-family: var(--font-formal); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Public header (landing / login / guide) ---------- */
.site-header {
  background: var(--ched-navy);
  color: #fff;
}
.site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}
.site-header-inner.wide {
  max-width: 1400px;
}
.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--ched-gold);
}
.site-header h1,
.site-header .title {
  margin: 0.25rem 0 0;
  font-family: var(--font-formal);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}
@media (min-width: 640px) {
  .site-header h1 { font-size: 1.875rem; }
}
.site-header-inner.guide-width { max-width: 64rem; }
.app-eyebrow { font-size: 10px !important; }
.site-header .subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: #e2e8f0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.brand-logo {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}
.brand-logo-lg {
  width: 4.5rem;
  height: 4.5rem;
}

/* App header (authenticated) */
.app-header {
  background: var(--ched-navy);
  color: #fff;
  border-bottom: 4px solid var(--ched-gold);
}
.app-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.app-header .eyebrow { font-size: 10px; }
.app-header .title {
  margin: 0;
  font-family: var(--font-formal);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}
.app-header .subtitle {
  margin: 0;
  font-size: 0.75rem;
  color: #cbd5e1;
}
.user-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.user-meta { text-align: right; font-size: 0.75rem; }
.user-meta .name { margin: 0; font-weight: 600; }
.user-meta .role { margin: 0; color: #cbd5e1; }
.user-meta .div { margin: 0; color: #94a3b8; }

/* Shell */
.app-shell {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
@media (min-width: 768px) {
  .app-shell { flex-direction: row; }
}
/* Authenticated shell: sidebar stays put; only main content scrolls */
@media (min-width: 768px) {
  body.app-layout {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }
  body.app-layout .app-shell {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
  }
  body.app-layout .main-app {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.side-nav {
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  border-bottom: 1px solid #cbd5e1;
  position: relative;
}
@media (min-width: 768px) {
  .side-nav {
    width: 16.5rem;
    border-bottom: 0;
    border-right: 1px solid #e2e8f0;
    background: #fff;
    position: relative;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
  }
  body.app-layout .side-nav {
    align-self: stretch;
    max-height: none;
    flex-shrink: 0;
  }
}
.side-nav-inner {
  display: flex;
  flex-direction: row;
  gap: 0;
  overflow-x: auto;
  padding: 0.5rem 0.75rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .side-nav-inner {
    flex-direction: column;
    overflow: visible;
    padding: 1rem 0.75rem 1.25rem;
    gap: 0.25rem;
  }
}
.side-nav-section {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
@media (min-width: 768px) {
  .side-nav-section {
    display: block;
    flex-shrink: 1;
    padding-top: 0.75rem;
  }
  .side-nav-section:first-child {
    padding-top: 0;
  }
}
.side-nav-section + .side-nav-section {
  border-left: 1px solid #e2e8f0;
  margin-left: 0.35rem;
  padding-left: 0.5rem;
}
@media (min-width: 768px) {
  .side-nav-section + .side-nav-section {
    border-left: 0;
    margin-left: 0;
    padding-left: 0;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
  }
}
.side-nav-section--admin .side-nav-heading {
  color: var(--ched-steel);
}
.side-nav-heading {
  margin: 0;
  padding: 0 0.5rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .side-nav-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}
.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}
@media (min-width: 768px) {
  .side-nav ul {
    display: block;
    gap: 0;
  }
}
.side-nav li {
  flex-shrink: 0;
}
.side-nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: #475569;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
@media (min-width: 768px) {
  .side-nav-link {
    padding: 0.55rem 0.75rem;
    border-radius: 0.375rem;
  }
}
.side-nav-link:hover {
  background: var(--ched-sand);
  color: var(--ched-navy);
  text-decoration: none;
}
.side-nav-link:focus-visible {
  outline: 2px solid var(--ched-steel);
  outline-offset: 2px;
}
.side-nav-link.active {
  background: linear-gradient(90deg, rgba(179, 130, 42, 0.14) 0%, var(--ched-sand) 55%);
  color: var(--ched-navy);
  font-weight: 600;
  border-color: rgba(179, 130, 42, 0.35);
  box-shadow: inset 3px 0 0 var(--ched-gold);
}
@media (max-width: 767px) {
  .side-nav-link.active {
    box-shadow: none;
    border-color: rgba(179, 130, 42, 0.45);
    background: var(--ched-sand);
  }
}
.side-nav-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #94a3b8;
  transition: color 0.15s ease;
}
.side-nav-link:hover .side-nav-icon,
.side-nav-link.active .side-nav-icon {
  color: var(--ched-gold);
}
.side-nav-svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}
.side-nav-label {
  flex: 1;
  min-width: 0;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.main-register {
  max-width: 80rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}
.main-app {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 1.5rem 1rem;
  margin: 0;
  overflow-x: hidden;
}
.main-guide { max-width: 64rem; }

/* ---------- Home (public landing) ---------- */
.main-home {
  max-width: none;
  padding: 0;
  margin: 0;
}

.home-hero {
  background: linear-gradient(145deg, var(--ched-navy) 0%, #0a3d6b 48%, var(--ched-blue) 100%);
  color: #fff;
  border-bottom: 4px solid var(--ched-gold);
}
.home-hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}
@media (min-width: 768px) {
  .home-hero-inner { padding: 3.25rem 1.5rem 3.75rem; }
}
.home-hero-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ched-gold);
}
.home-hero-title {
  margin: 0.75rem 0 0;
  max-width: 36rem;
  font-family: var(--font-formal);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}
@media (min-width: 640px) {
  .home-hero-title { font-size: 2.25rem; }
}
.home-hero-lead {
  margin: 1rem 0 0;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #e2e8f0;
}
.home-hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-top: 1.75rem;
  max-width: 48rem;
}
@media (min-width: 768px) {
  .home-hero-actions {
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    max-width: none;
  }
}
.home-hero-cta {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.25rem 1.125rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.5rem;
  backdrop-filter: blur(6px);
}
.home-hero-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.home-hero-cta-note {
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #cbd5e1;
}
.home-hero-cta-note strong {
  color: #f8fafc;
  font-weight: 600;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
}
.btn-hero-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ched-gold);
  color: var(--ched-navy) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-hero-gold:hover {
  background: #c49238;
  color: var(--ched-navy) !important;
}
.btn-hero-gold .btn-chevron {
  font-size: 1.125rem;
  line-height: 1;
  transition: transform 0.15s ease;
}
.btn-hero-gold:hover .btn-chevron { transform: translateX(3px); }

.btn-outline-light {
  background: transparent;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

.home-hero-guide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 1 auto;
  min-width: min(100%, 15.5rem);
  padding: 1.125rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
@media (min-width: 768px) {
  .home-hero-guide { flex: 0 0 17.5rem; }
}
.home-hero-guide:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--ched-gold);
  transform: translateY(-1px);
}
.home-hero-guide-kicker {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ched-gold);
}
.home-hero-guide-title {
  margin-top: 0.35rem;
  font-family: var(--font-formal);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.home-hero-guide-desc {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.home-hero-guide-more {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
}
.home-hero-guide:hover .home-hero-guide-more { color: var(--ched-gold); }

.home-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem 2.5rem;
}
@media (min-width: 768px) {
  .home-inner { padding: 2.5rem 1.5rem 3rem; }
}

.home-section + .home-section { margin-top: 2.5rem; }
.home-section-head { margin-bottom: 1.5rem; }
.home-section-lead {
  margin: 0.5rem 0 0;
  max-width: 48rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
}

.cascade-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .cascade-track {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    align-items: stretch;
  }
}
.cascade-step {
  margin: 0;
  position: relative;
}
@media (min-width: 768px) {
  .cascade-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 2.25rem;
    right: -0.5rem;
    width: 0.5rem;
    height: 2px;
    background: var(--ched-gold);
    z-index: 1;
  }
}

.form-tile {
  position: relative;
  height: 100%;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 1.25rem 1rem 1.25rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.form-tile:hover {
  border-color: var(--ched-steel);
  box-shadow: 0 8px 24px rgba(11, 47, 82, 0.1);
  transform: translateY(-2px);
}
.form-tile-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--ched-sand);
  border: 1px solid #e2d5b8;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.form-tile .form-num {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ched-gold);
}
.form-tile .form-name {
  margin: 0.35rem 0 0;
  font-family: var(--font-formal);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ched-navy);
}
.form-tile .form-scope {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #475569;
}

.home-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .home-highlights { grid-template-columns: repeat(3, 1fr); }
}
.highlight-card {
  background: var(--ched-sand);
  border: 1px solid #e2d5c8;
  border-radius: 0.375rem;
  padding: 1.25rem;
}
.highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 0.25rem;
  background: var(--ched-navy);
  color: var(--ched-gold);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.highlight-title {
  margin: 0.75rem 0 0;
  font-family: var(--font-formal);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.highlight-text {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #334155;
}

.home-privacy {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--ched-gold);
  border-radius: 0.25rem;
}
.home-privacy-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #475569;
}
.home-privacy-text strong { color: var(--ched-navy); }

.site-footer {
  border-top: 1px solid #cbd5e1;
  background: #fff;
}
.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
  font-size: 0.75rem;
  color: #475569;
}
.site-footer-inner.wide {
  max-width: 1400px;
  padding: 0.75rem 1rem;
  font-size: 11px;
}

/* Cards / panels (original: rounded border border-slate-300 bg-white) */
.card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card-sm { padding: 1rem; }
.card + .card { margin-top: 1.5rem; }
.card h2,
.section-title {
  margin: 0;
  font-family: var(--font-formal);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.card h1,
.page-title {
  margin: 0;
  font-family: var(--font-formal);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.muted { color: #475569; font-size: 0.875rem; }
.muted-xs { color: #64748b; font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.5; color: #334155; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.sand-card {
  background: var(--ched-sand);
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  padding: 1rem;
}
.sand-card .form-num {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ched-gold);
}
.sand-card .form-name {
  margin: 0.25rem 0 0;
  font-family: var(--font-formal);
  font-weight: 700;
  color: var(--ched-navy);
}
.sand-card .form-scope {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #334155;
}

.forms-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (min-width: 640px) {
  .forms-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .forms-grid { grid-template-columns: repeat(4, 1fr); }
}

.stats-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stat-card--metric {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.stat-card--attention {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 40%);
}
.stat-card--attention .value {
  color: #b45309;
}
a.stat-card {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.stat-card:hover {
  border-color: var(--ched-navy);
  box-shadow: 0 1px 4px rgba(15, 39, 68, 0.12);
}
a.stat-card:focus-visible {
  outline: 2px solid var(--ched-navy);
  outline-offset: 2px;
}
.stat-card .card-action {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ched-navy);
  text-decoration: underline;
}
.quarter-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.quarter-picker a {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ched-navy);
}
.quarter-picker a.is-active {
  background: var(--ched-navy);
  color: #fff;
  border-color: var(--ched-navy);
}
.quarter-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
}
.quarter-select-all {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.quarter-select-all input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}
.quarter-apply {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.quarter-apply input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
}
.quarter-target-field {
  width: 100%;
  max-width: 8rem;
  box-sizing: border-box;
}
.quarter-target-field.is-duplicate {
  border-color: #b91c1c;
  background: #fef2f2;
}
.year-target-figure {
  font-weight: 700;
}
tr.dpcr-has-target td {
  background: #fff7e6;
}
tr.dpcr-has-target td:first-child {
  box-shadow: inset 3px 0 0 #d97706;
}
td.dpcr-target-set {
  background: #fde68a !important;
}
.dpcr-target-badge {
  display: inline-block;
  margin-top: 0.3rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #422006;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.quarter-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  margin-top: 0.35rem;
}
.quarter-targets label {
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}
.quarter-targets input {
  width: 4.25rem;
  margin-top: 0.15rem;
}
.stat-card .label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.stat-card .value {
  margin: 0.5rem 0 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--ched-navy);
}

.two-col {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Buttons — match original */
.btn {
  display: inline-block;
  border-radius: 0.25rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: var(--ched-blue);
  color: #fff !important;
  text-decoration: none !important;
}
.btn:hover { background: var(--ched-steel); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: var(--ched-blue) !important;
  border: 1px solid var(--ched-blue);
}
.btn-outline:hover { background: var(--ched-sand); }
.btn-approve {
  background: #047857;
  border-color: #047857;
  color: #fff !important;
}
.btn-approve:hover { background: #065f46; }
.btn-return {
  background: #fff;
  border: 1px solid #b91c1c;
  color: #b91c1c !important;
}
.btn-return:hover { background: #fef2f2; }
.btn-finalize {
  background: var(--ched-navy);
  border-color: var(--ched-navy);
  color: #fff !important;
}
.gap-2 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.font-semibold { font-weight: 600; }
.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}
.btn-block { width: 100%; text-align: center; }
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff !important;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0.25rem;
  cursor: pointer;
  text-decoration: none !important;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.block { display: block; }
.text-navy { color: var(--ched-navy); }
.text-emerald { color: #047857; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-2xl { font-size: 1.5rem; }
.gap-4 { gap: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

.status-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.875rem;
}
.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #334155;
}
.pending-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.75rem;
}
.pending-list li { margin-top: 0.25rem; }

.progress-track {
  height: 0.75rem;
  width: 100%;
  overflow: hidden;
  border-radius: 0.25rem;
  background: #e2e8f0;
}
.progress-fill {
  height: 100%;
  background: var(--ched-blue);
}

.sep { margin: 0 0.25rem; color: #94a3b8; }

.badge-sample {
  margin-left: 0.5rem;
  background: #fef3c7;
  color: #92400e;
  border: none;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 10px;
  font-weight: 600;
}

.form-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
}
.form-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ched-gold);
}
.form-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.status-pill {
  display: inline-block;
  background: var(--ched-sand);
  color: var(--ched-navy);
  border-radius: 0.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.final-box {
  border: 1px solid var(--ched-gold);
  background: var(--ched-sand);
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
}
.final-number {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.tracking { letter-spacing: 0.05em; }

.section-sand td {
  background: var(--ched-sand) !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.25rem;
}
.score-lab {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0;
}
.score-lab select,
.score-lab .score-input {
  width: 2.75rem;
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ched-navy);
  padding: 0.25rem 0.15rem;
  border: 1px solid #94a3b8;
  border-radius: 0.25rem;
  background: #fff;
}
.score-lab .score-input {
  -moz-appearance: textfield;
  appearance: textfield;
}
.score-lab .score-input::-webkit-outer-spin-button,
.score-lab .score-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.avg-box {
  display: block;
  min-width: 2.75rem;
  border: 1px solid var(--ched-gold);
  background: var(--ched-sand);
  border-radius: 0.25rem;
  padding: 0.25rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ched-navy);
}

.sheet th.col-rating-rollup,
.sheet td.col-rating-rollup {
  min-width: 11.5rem;
  width: 11.5rem;
  vertical-align: top;
}

.line-rating-rollup {
  min-width: 10.5rem;
}

.score-row--rollup {
  align-items: flex-end;
  gap: 0.35rem;
}

.score-lab__letter {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  line-height: 1.2;
  text-align: center;
}

.line-rating-rollup--readonly .score-readout {
  cursor: default;
  user-select: none;
}

.score-readout {
  display: block;
  box-sizing: border-box;
  width: 2.85rem;
  margin: 0;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ched-navy);
  padding: 0.35rem 0.2rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #f1f5f9;
  line-height: 1.2;
}

.line-rating-rollup--readonly .score-readout {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: none;
}

.score-readout--avg {
  border-width: 1px;
  border-style: solid;
  font-weight: 800;
}

.score-readout--avg.rating-tone--excellent,
.score-readout--avg.rating-tone--strong,
.score-readout--avg.rating-tone--fair,
.score-readout--avg.rating-tone--low {
  color: inherit;
}

.line-rating-cell--editable {
  min-width: 10.5rem;
}

.rollup-rating-note--ref {
  font-style: italic;
  opacity: 0.92;
}

.rollup-rating-note {
  margin: 0.4rem 0 0;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #64748b;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.rollup-rating-note__icon {
  flex-shrink: 0;
  opacity: 0.75;
  font-size: 0.7rem;
  margin-top: 0.05rem;
}

.rollup-rating-empty {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.35rem;
  background: #f8fafc;
  max-width: 11rem;
}

.rollup-rating-empty__title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
}

.rollup-rating-empty__hint {
  font-size: 0.65rem;
  line-height: 1.35;
  color: #64748b;
}

.sheet th.col-accomplishment-rollup,
.sheet td.col-accomplishment-rollup {
  min-width: 14rem;
  width: 18%;
  max-width: 22rem;
  vertical-align: top;
}

.accomplishment-rollup {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 21rem;
}

.accomplishment-rollup__body {
  max-height: 9rem;
  overflow: auto;
  padding: 0.5rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.35rem;
  background: #f8fafc;
  line-height: 1.45;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.accomplishment-rollup__note {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.35;
  color: #64748b;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.accomplishment-rollup__icon {
  flex-shrink: 0;
  opacity: 0.75;
  font-size: 0.7rem;
  margin-top: 0.05rem;
}

.accomplishment-rollup-empty {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.35rem;
  background: #f8fafc;
  max-width: 14rem;
}

.accomplishment-rollup-empty__title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
}

.accomplishment-rollup-empty__hint {
  font-size: 0.65rem;
  line-height: 1.35;
  color: #64748b;
}

.sheet-wide { width: 100%; min-width: 0; }

.def-list {
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.def-card { margin: 0; }
.pillar-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.print-letterhead {
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
}
.print-letterhead p { margin: 0.15rem 0; }
.print-seal {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 0.35rem;
  object-fit: contain;
}
.print-commitment {
  border: 1px solid #000;
  padding: 0.5rem;
  font-size: 0.8125rem;
}

/* Forms */
label.field {
  display: block;
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
}
label.field:first-of-type { margin-top: 1rem; }
input[type=text],
input[type=email],
input[type=password],
input[type=url],
input[type=tel],
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  border: 1px solid #94a3b8;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  background: #fff;
  color: var(--ched-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--ched-steel);
  box-shadow: 0 0 0 3px rgba(44, 101, 145, 0.25);
}

.alert {
  margin-top: 0.75rem;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
}
.alert-error {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}
.alert-ok {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
}
.forms-row-highlight td {
  background: #f0fdf4;
  box-shadow: inset 3px 0 0 #166534;
}
.alert-warn {
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.alert-info {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

.demo-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.demo-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}
.demo-list li:last-child { border-bottom: 0; }
.demo-list .name { margin: 0; font-size: 0.875rem; font-weight: 600; color: #1e293b; }
.demo-list .role { margin: 0; font-size: 0.75rem; color: #475569; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Tables — fit within the content window (RIDE-style) */
.table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data th,
table.data td {
  border: 1px solid #cbd5e1;
  padding: 0.45rem 0.55rem;
  vertical-align: top;
  text-align: left;
}
table.data thead th {
  background: #e7ecf2;
  font-weight: 700;
}
table.data tbody tr:nth-child(even) { background: #fafbfc; }

.sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.sheet th,
.sheet td {
  border: 1px solid #6b7280;
  padding: 0.25rem 0.375rem;
  vertical-align: top;
}
.sheet thead th {
  background: #e7ecf2;
  font-weight: 700;
  text-align: center;
}
.sheet tbody tr:nth-child(even) { background: #fafbfc; }
.sheet .section-row {
  background: #dfe7f0;
  font-weight: 700;
}
.sheet input,
.sheet select,
.sheet textarea {
  margin: 0;
  width: 100%;
  min-width: 3rem;
  font-size: 0.8rem;
  padding: 0.2rem;
  border-color: #94a3b8;
}
.dpcr-unit-targets {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #f5d7a1;
  border-radius: 0.35rem;
  background: #fff7e6;
}
.dpcr-unit-targets .label {
  margin: 0 0 0.35rem;
}
.dpcr-unit-targets__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dpcr-unit-targets__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: baseline;
  padding: 0.2rem 0;
}
.dpcr-unit-targets__meta {
  font-size: 0.75rem;
  color: #92400e;
}
.dpcr-unit-ms {
  position: relative;
  min-width: 6.5rem;
}
.dpcr-unit-ms__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.35rem 0.45rem;
  border: 1px solid #94a3b8;
  border-radius: 0.25rem;
  background: #fff;
  color: var(--ched-ink);
  font: inherit;
  font-size: 0.6875rem;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}
.dpcr-unit-ms__toggle:hover {
  border-color: var(--ched-steel);
}
.dpcr-unit-ms.is-open .dpcr-unit-ms__toggle {
  border-color: var(--ched-steel);
  box-shadow: 0 0 0 2px rgba(44, 101, 145, 0.2);
}
.dpcr-unit-ms__summary {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}
.dpcr-unit-ms__caret {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.65rem;
  line-height: 1.4;
}
.dpcr-unit-ms__panel {
  margin: 0;
  padding: 0.35rem 0.25rem;
  border: 1px solid #94a3b8;
  border-radius: 0.25rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
  max-height: 14rem;
  overflow-y: auto;
}
.dpcr-unit-ms__panel[hidden] {
  display: none !important;
}
.card .table-wrap tr.dpcr-ms-row-open td {
  overflow: visible;
}
/* Floating panels are portaled to body; only non-plan table wraps need overflow visible. */
.card .table-wrap:not(.plan-table-wrap):has(.dpcr-unit-ms.is-open) {
  overflow: visible;
}
.dpcr-unit-ms__panel--floating {
  position: fixed;
  z-index: 1300;
  min-width: 12.5rem;
}
.dpcr-unit-ms__option {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.6875rem;
  line-height: 1.25;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  border-radius: 0.2rem;
}
.dpcr-unit-ms__option:hover {
  background: #f1f5f9;
}
.dpcr-unit-ms__option input[type="checkbox"] {
  width: auto;
  min-width: 0;
  margin: 0.12rem 0 0;
  flex-shrink: 0;
}
.dpcr-unit-ms__empty {
  margin: 0.25rem 0.35rem;
}

tr.ipcr-local-slot textarea.quarter-target-field {
  min-height: 3.5rem;
  resize: vertical;
}
.ipcr-local-remove {
  display: block;
  margin-top: 0.35rem;
}
tr.ipcr-basic-mis-row td {
  width: 100%;
}
.ipcr-basic-mis-text {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 0;
  font-size: 0.8125rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #94a3b8;
  border-radius: 0.25rem;
  background: #fff;
}
.ipcr-basic-mis-remove {
  display: inline-block;
  margin-top: 0.35rem;
  margin-left: 0.35rem;
}

.form5-closing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.form5-closing-heading {
  font-weight: 600;
  font-size: 0.8125rem;
  margin: 0 0 0.75rem;
}
.form5-closing-date {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
}
.form5-closing-sign-line {
  border-bottom: 1px solid #334155;
  min-height: 2rem;
  margin: 0.35rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  padding-bottom: 0.15rem;
}
@media (max-width: 768px) {
  .form5-closing-grid {
    grid-template-columns: 1fr;
  }
}

/* Spreadsheet-style table that fits the window (RIDE-like) */
.sheet.adjustable {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.sheet.adjustable thead th {
  position: relative;
  white-space: normal;
  font-size: 0.7rem;
  line-height: 1.25;
  padding: 0.3rem 0.25rem;
}
.sheet.adjustable td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
  font-size: 0.75rem;
}
.sheet.adjustable .col-resize {
  position: absolute;
  top: 0;
  right: -3px;
  z-index: 2;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
}
.sheet.adjustable .col-resize:hover,
.sheet.adjustable.is-resizing .col-resize {
  background: rgba(20, 71, 122, 0.25);
}
.sheet.adjustable.is-resizing {
  cursor: col-resize;
  user-select: none;
}
.sheet.adjustable textarea.field-text,
.sheet.adjustable .field-text {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 2.5rem;
  min-width: 0;
  resize: vertical;
  overflow: auto;
  line-height: 1.35;
  box-sizing: border-box;
  white-space: pre-wrap;
  font-size: 0.75rem;
}
.sheet.adjustable input[type="number"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.sheet.adjustable textarea.field-text {
  field-sizing: content;
}
.sheet.adjustable td.plan-divisions-col {
  overflow: visible;
  vertical-align: top;
  position: relative;
  min-width: 6.5rem;
}
.sheet.adjustable td.plan-divisions-col .dpcr-unit-ms {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.plan-sheet-card tr.dpcr-ms-row-open td {
  overflow: visible;
}
.plan-sheet-card tr.dpcr-ms-row-open td.plan-divisions-col {
  z-index: 25;
}
.plan-sheet-card .dpcr-unit-ms.is-open {
  position: relative;
  z-index: 26;
}
.plan-sheet-card .dpcr-unit-ms.is-open .dpcr-unit-ms__toggle {
  position: relative;
  z-index: 1;
  background: #fff;
}
.sheet.adjustable .plan-actions-col {
  width: 5.5rem;
  min-width: 5.5rem;
  max-width: 5.5rem;
  text-align: center;
  vertical-align: top;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  overflow: visible;
}
.sheet.adjustable .plan-delete-btn {
  display: inline-block;
  width: auto;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  padding: 0.2rem 0.5rem;
  line-height: 1.2;
}

/* Form 2 — Operational Plan sheet */
.plan-page { max-width: 100%; }
.plan-hero__main { flex: 1 1 18rem; min-width: 0; }
.plan-hero__fy { font-weight: 700; color: var(--ched-navy); }
.plan-hero__desc { margin: 0.35rem 0 0; max-width: 40rem; line-height: 1.45; }
.plan-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  flex: 0 1 auto;
}
.plan-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.plan-success-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0;
}
.plan-hero__stats {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.plan-help-trigger {
  margin-left: 0.35rem;
  vertical-align: middle;
  min-width: 1.75rem;
  padding: 0.1rem 0.45rem;
  font-weight: 700;
  line-height: 1.2;
}
.plan-demo-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  color: #78350f;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.25rem;
}
.plan-demo-notice[hidden] { display: none !important; }
.plan-demo-notice__dismiss {
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
  text-decoration: underline;
  cursor: pointer;
}
.plan-demo-notice__dismiss:hover { color: #78350f; }
.plan-dialog {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  max-width: 22rem;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
.plan-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.plan-dialog__inner {
  padding: 0.85rem 1rem 1rem;
  margin: 0;
  min-width: 16rem;
}
.plan-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.plan-dialog__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.plan-dialog__close {
  border: none;
  background: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.plan-dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.plan-muted-status { color: #475569; }
.plan-help__steps {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  line-height: 1.5;
}
.plan-help__steps li { margin: 0.15rem 0; }
.plan-help__extra { margin: 0; }
.plan-toolbar__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
}
.plan-filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 8rem;
}
.plan-filter__label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.plan-filter__input,
.plan-filter__select {
  font-size: 0.8125rem;
  min-width: 10rem;
  max-width: 16rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.25rem;
}
.plan-status-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  margin-left: 0.35rem;
  padding-left: 0.65rem;
  border-left: 1px solid #e2e8f0;
  vertical-align: middle;
}
.plan-status-legend .plan-row-status {
  display: inline-block;
  margin: 0 0.15rem 0 0;
  vertical-align: middle;
}
.plan-row--hidden { display: none !important; }
.plan-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}
.plan-help {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #f8fafc;
  padding: 0.35rem 0.75rem;
}
.plan-help__summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ched-navy);
  list-style-position: outside;
}
.plan-help__body {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}
.plan-help__body p {
  margin: 0 0 0.5rem;
}
.plan-help__body p:last-child {
  margin-bottom: 0;
}
.plan-catalog-ref {
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #fff;
  padding: 0.5rem 0.75rem 0.75rem;
}
.plan-catalog-ref__summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ched-navy);
  list-style-position: outside;
}
.plan-catalog-ref__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 0.35rem;
}
.plan-catalog-ref__lead {
  margin: 0.5rem 0 0.5rem;
}
.plan-catalog-ref__scroll {
  max-height: 16rem;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
}
.plan-catalog-ref__table {
  margin: 0;
  font-size: 0.75rem;
}
.plan-catalog-ref__table th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 1;
}
.plan-sheet-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.plan-btn-save {
  font-size: 0.8125rem;
  padding: 0.45rem 1rem;
  box-shadow: 0 1px 2px rgba(11, 47, 82, 0.12);
}
.plan-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.plan-period-picker {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 12rem;
  max-width: 20rem;
}
.plan-period-picker__label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.plan-period-picker__select {
  width: 100%;
  font-size: 0.875rem;
}
.plan-period-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
  flex: 1 1 16rem;
  min-width: min(100%, 18rem);
}
.plan-period-bar__cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
}
.plan-add-period {
  position: relative;
  min-width: 0;
}
.plan-add-period__trigger {
  list-style: none;
  white-space: nowrap;
}
.plan-add-period__trigger::-webkit-details-marker {
  display: none;
}
.plan-add-period .plan-add-period__form {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 14rem;
  max-width: 22rem;
  margin-top: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.plan-dialog .plan-add-period__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.plan-add-period[open] .plan-add-period__trigger {
  background: #f8fafc;
  border-color: var(--ched-navy);
  color: var(--ched-navy);
}
.plan-add-period__field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.plan-add-period__input {
  width: 100%;
  font-size: 0.875rem;
}
.plan-flow {
  font-weight: 600;
  color: var(--ched-navy);
}
.plan-scroll-hint {
  display: none;
  margin: 0;
  padding: 0.35rem 1rem;
  font-size: 0.6875rem;
  color: #475569;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}
.plan-scroll-hint.is-visible {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.plan-scroll-hint.is-hidden {
  display: none !important;
}
.plan-scroll-hint__icon {
  font-weight: 700;
  color: #b45309;
}
.plan-toolbar {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, #fff 85%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(11, 47, 82, 0.06);
}
.plan-toolbar__unsaved {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b45309;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
}
.plan-toolbar__unsaved[hidden] { display: none !important; }
.plan-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.plan-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}
.plan-toolbar__title {
  margin: 0;
  font-family: var(--font-formal);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.plan-toolbar__badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--ched-sand);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.plan-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}
.plan-toolbar__hint {
  margin: 0.35rem 0 0;
  max-width: 52rem;
  line-height: 1.4;
}
.plan-table-wrap {
  max-height: min(72vh, calc(100vh - 11rem));
  overflow: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
.plan-table-wrap.is-scrolled-x {
  box-shadow: inset 8px 0 10px -8px rgba(11, 47, 82, 0.15);
}
.plan-table-wrap:focus-visible {
  outline: 2px solid var(--ched-steel);
  outline-offset: -2px;
}
/* Text columns keep a real width and the sheet scrolls sideways.
   Percentage columns were collapsing to a few pixels beside the fixed quarter columns. */
.plan-sheet-card table.sheet.adjustable.plan-sheet {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
  max-width: none;
}
.plan-sheet {
  min-width: 58rem;
}
.plan-sheet .plan-col-rownum { width: 2.25rem; }
.plan-sheet .plan-col-indicator { width: 18rem; }
.plan-sheet .plan-col-baseline { width: 16rem; }
.plan-sheet .plan-col-quarter { width: 4.5rem; min-width: 4.25rem; }
.plan-sheet .plan-col-total { width: 4.75rem; min-width: 4.75rem; }
.plan-sheet .plan-col-ppa { width: 16rem; }
.plan-sheet .plan-col-budget { width: 8.75rem; min-width: 8.75rem; }
.plan-sheet .plan-col-divisions { width: 12rem; }
.plan-sheet .plan-col-remarks { width: 14rem; }
.plan-sheet .plan-col-actions { width: 5.5rem; }
.plan-sheet-card .plan-th-indicator,
.plan-sheet-card .plan-cell-indicator {
  width: 18rem;
  min-width: 18rem;
  max-width: 18rem;
}
.plan-sheet-card .plan-indicator-select {
  width: 18rem;
  min-width: 18rem;
  max-width: 18rem;
  field-sizing: fixed;
}
.plan-sheet-card .plan-indicator-preview,
.plan-sheet-card .plan-indicator-text,
.plan-sheet-card .plan-indicator-placeholder {
  max-width: 18rem;
  overflow-wrap: anywhere;
}
.plan-sheet-card .plan-indicator-meta {
  max-width: 18rem;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.plan-sheet-card .plan-th-total,
.plan-sheet-card td.plan-total-cell {
  width: 4.75rem;
  min-width: 4.75rem;
}
.plan-sheet-card .plan-th-divisions,
.plan-sheet-card td.plan-divisions-col {
  width: 12rem;
  min-width: 12rem;
  max-width: 12rem;
}
.plan-sheet-card td.plan-divisions-col .dpcr-unit-ms,
.plan-sheet-card td.plan-divisions-col .dpcr-unit-ms__toggle {
  width: 12rem;
  min-width: 0;
  max-width: 12rem;
}
.plan-sheet-card .plan-header-row th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #dfe7f0;
  box-shadow: 0 1px 0 #94a3b8;
  vertical-align: middle;
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 0.45rem 0.35rem !important;
}
.plan-th-quarterly-stack {
  padding: 0 !important;
  vertical-align: bottom;
  background: #c5d4e4 !important;
  border-left: 1px solid #94a3b8;
  border-right: 1px solid #94a3b8;
  overflow: visible;
}
.plan-th-quarterly-stack__title {
  display: block;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #334155;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #94a3b8;
  background: #c5d4e4;
  line-height: 1.2;
}
.plan-th-quarterly-stack__cols {
  display: grid;
  /* Match colgroup: 4× quarter + 1× total */
  grid-template-columns:
    minmax(4.25rem, 1fr)
    minmax(4.25rem, 1fr)
    minmax(4.25rem, 1fr)
    minmax(4.25rem, 1fr)
    minmax(4.75rem, 1.12fr);
  align-items: stretch;
  background: #e8f0f8;
  min-height: 2.15rem;
  overflow: visible;
}
.plan-th-quarterly-stack__cols > .plan-th-quarter,
.plan-th-quarterly-stack__cols > .plan-th-total {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.25rem !important;
  margin: 0;
  min-width: 2.5rem;
  font-size: 0.75rem !important;
  font-weight: 600;
  background: transparent !important;
  box-shadow: none !important;
  border-left: 1px solid #dbe4ee;
  text-align: center;
  overflow: visible;
  white-space: nowrap;
}
.plan-th-quarterly-stack__cols > .plan-th-quarter--lead {
  border-left: none;
}
.plan-th-quarterly-stack__cols > .plan-th-total {
  font-weight: 700;
  color: var(--ched-navy);
}
.plan-sheet-card .plan-cell-indicator {
  position: sticky;
  left: 2.25rem;
  z-index: 3;
  border-right: 2px solid #cbd5e1;
  background: #fff;
}
.plan-sheet-card .plan-header-row .plan-th-indicator {
  position: sticky;
  left: 2.25rem;
  top: 0;
  z-index: 9;
  border-right: 2px solid #cbd5e1;
  background: #dfe7f0;
  vertical-align: middle;
}
.plan-sheet-card .plan-cell-indicator {
  min-width: 12rem;
  max-width: 22rem;
}
.plan-sheet-card tbody .plan-data-row:nth-child(even) .plan-cell-indicator {
  background: #fafcfd;
}
.plan-sheet-card .plan-data-row:hover .plan-cell-indicator {
  background: #f0f7fc;
}
.plan-sheet-card .plan-th-quarter,
.plan-sheet-card td.plan-quarter-cell,
.plan-sheet-card .plan-th-total,
.plan-sheet-card td.plan-total-cell {
  border-left: 1px solid #dbe4ee;
  border-right: 1px solid #dbe4ee;
}
.plan-th-rownum,
.plan-cell-rownum {
  text-align: center;
  vertical-align: top;
  padding: 0.35rem 0.2rem !important;
  background: #f1f5f9;
  border-right: 1px solid #cbd5e1;
}
.plan-sheet-card .plan-th-rownum {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 10;
  min-width: 2.25rem;
  width: 2.25rem;
  background: #e8eef4;
  vertical-align: middle;
  box-shadow: 1px 0 0 #cbd5e1;
}
.plan-sheet-card .plan-cell-rownum {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #f8fafc;
}
.plan-row-num {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  line-height: 1.2;
}
.plan-data-row {
  border-left: 3px solid #cbd5e1;
}
.plan-data-row[data-plan-status="partial"] {
  border-left-color: #f59e0b;
}
.plan-data-row[data-plan-status="ready"] {
  border-left-color: #16a34a;
}
.plan-row-status {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  margin: 0.25rem auto 0;
  border-radius: 999px;
  background: #cbd5e1;
}
@media (min-width: 721px) {
  .plan-cell-rownum .plan-row-status {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .plan-cell-rownum { position: relative; }
}
.plan-row-status--partial {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}
.plan-row-status--ready {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}
.plan-micro-label {
  display: block;
  margin: 0 0 0.15rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.plan-field-gap {
  margin-top: 0.35rem;
}
.plan-indicator-preview {
  margin: 0.25rem 0 0;
}
.plan-indicator-preview__summary {
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ched-steel);
  list-style: none;
}
.plan-indicator-preview__summary::-webkit-details-marker {
  display: none;
}
.plan-indicator-preview__summary::before {
  content: "▸ ";
  font-size: 0.55rem;
}
.plan-indicator-preview[open] .plan-indicator-preview__summary::before {
  content: "▾ ";
}
.plan-indicator-text {
  margin-top: 0.25rem;
  max-height: 5.5rem;
  overflow-y: auto;
  font-size: 0.65rem;
  line-height: 1.35;
  white-space: pre-wrap;
}
.plan-indicator-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-indicator-placeholder {
  margin: 0.25rem 0 0;
  font-size: 0.65rem;
}
.plan-sheet-card .plan-data-row td {
  vertical-align: top;
}
.plan-sheet-card textarea.field-text {
  width: auto;
  min-width: 12rem;
  max-width: 22rem;
  max-height: 5.5rem;
  min-height: 2.75rem;
  field-sizing: fixed;
  box-sizing: border-box;
  resize: vertical;
  overflow-y: auto;
  line-height: 1.3;
}
.plan-sheet-card textarea.plan-ppa,
.plan-sheet-card textarea.plan-remarks {
  max-height: 5rem;
}
.plan-th-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6rem;
  font-weight: 500;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}
.plan-sheet thead .plan-th-quarter,
.plan-sheet thead .plan-th-total {
  min-width: 4.25rem;
  line-height: 1.2;
}
.plan-sheet-card td.plan-quarter-cell {
  text-align: right;
  vertical-align: top;
  padding-top: 0.4rem !important;
  background: #f8fafc;
}
.plan-th-quarter,
.plan-sheet-card td.plan-total-cell {
  text-align: right;
}
.plan-sheet-card .plan-quarter-target {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: auto;
  min-width: 3.25rem;
  max-width: 11rem;
  field-sizing: fixed;
  margin-left: auto;
  border-radius: 0.2rem;
  box-sizing: border-box;
}
.plan-sheet-card td.plan-budget-cell {
  text-align: right;
  vertical-align: top;
  padding-top: 0.4rem !important;
}
.plan-sheet-card .plan-budget-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0.25rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.35;
  box-sizing: border-box;
}
.plan-sheet-card .plan-quarter-target:focus,
.plan-sheet-card .plan-budget-input:focus,
.plan-sheet-card .plan-indicator-select:focus,
.plan-sheet-card textarea.field-text:focus {
  border-color: var(--ched-steel);
  box-shadow: 0 0 0 2px rgba(44, 101, 145, 0.2);
  outline: none;
}
.plan-sheet-card .plan-quarter-target:focus-visible,
.plan-sheet-card .plan-budget-input:focus-visible {
  outline: 2px solid var(--ched-steel);
  outline-offset: 1px;
}
.sheet.adjustable .plan-total-figure {
  text-align: right;
}
.plan-sheet-card tbody .plan-data-row:nth-child(even) {
  background: #fafcfd;
}
.plan-sheet-card .plan-data-row:hover {
  background: #f0f7fc;
}
.plan-sheet-card .plan-data-row:hover .plan-cell-rownum {
  background: #e8f0f8;
}
.plan-sheet-card .plan-data-row:hover .plan-quarter-cell {
  background: #e8f2fa;
}
.plan-cell-indicator .plan-indicator-select {
  border-radius: 0.25rem;
  padding: 0.35rem 0.4rem;
  font-size: 0.75rem;
}
.plan-sheet-card td.plan-total-cell {
  text-align: center;
  vertical-align: top;
  padding-top: 0.45rem !important;
  font-weight: 700;
  background: #e8f0fa;
  position: relative;
}
.sheet.adjustable .plan-total-figure {
  display: block;
  padding: 0.15rem 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  color: var(--ched-navy);
}
.plan-sticky-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.96);
  position: sticky;
  bottom: 0;
  z-index: 11;
  backdrop-filter: blur(6px);
  box-shadow: 0 -4px 14px rgba(11, 47, 82, 0.08);
}
.plan-sticky-footer[hidden] { display: none !important; }
.plan-empty-cell {
  text-align: center;
  padding: 2rem 1rem !important;
  background: #fafbfc;
}
.plan-empty-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
  color: var(--ched-navy);
}
.plan-empty-hint {
  margin: 0;
}

@media (max-width: 720px) {
  .plan-table-wrap {
    max-height: none;
    overflow: visible;
  }
  .plan-sheet {
    min-width: 0;
  }
  .plan-sheet-card .plan-header-row {
    display: none;
  }
  .plan-sheet-card .plan-data-row {
    display: block;
    margin: 0.65rem 0;
    padding: 0.65rem 0.75rem 0.75rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
  .plan-sheet-card .plan-data-row td {
    display: block;
    width: 100% !important;
    position: static !important;
    border: none !important;
    padding: 0.35rem 0 !important;
    text-align: left !important;
    background: transparent !important;
  }
  .plan-sheet-card .plan-data-row td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 0.15rem;
  }
  .plan-sheet-card .plan-cell-rownum::before {
    content: "Row";
  }
  .plan-sheet-card .plan-cell-indicator::before {
    content: "Indicator";
  }
  .plan-sheet-card .plan-cell-baseline::before {
    content: "Baseline / Gap";
  }
  .plan-sheet-card .plan-cell-rownum {
    padding-bottom: 0.25rem !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    margin-bottom: 0.35rem;
  }
  .plan-scroll-hint {
    display: none !important;
  }
  .plan-toolbar__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}
.rubric-table th,
.rubric-table td {
  border: 1px solid #6b7280;
  padding: 0.375rem 0.5rem;
  vertical-align: top;
}
.rubric-table thead th { background: #e7ecf2; }

.card-head {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.5rem 1rem;
  font-family: var(--font-formal);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.card-flush {
  padding: 0;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.card-flush .card-body { padding: 0; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: #e7ecf2;
  color: var(--ched-navy);
}
.badge-sample {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-correction_requested { background: #e0e7ff; color: #3730a3; }
.badge-suspended { background: #f1f5f9; color: #475569; }

.badge-status {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  white-space: nowrap;
}
.badge-status--draft { background: #f1f5f9; color: #475569; }
.badge-status--planning { background: #e0f2fe; color: #0369a1; }
.badge-status--committed { background: #dbeafe; color: #1d4ed8; }
.badge-status--approved { background: #dcfce7; color: #166534; }
.badge-status--rated { background: #e0e7ff; color: #3730a3; }
.badge-status--finalized { background: var(--ched-navy); color: #fff; }
.badge-status--returned { background: #fef3c7; color: #92400e; }
.badge-status--active { background: #dcfce7; color: #166534; }
.badge-status--review { background: #fef3c7; color: #92400e; }
.badge-status--closed { background: #f1f5f9; color: #64748b; }

.rating-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.2;
}
.rating-chip__adj {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.9;
}
.rating-tone--excellent { background: #ecfdf5; color: #047857; }
.rating-tone--strong { background: #e0f2fe; color: #0369a1; }
.rating-tone--fair { background: #fffbeb; color: #b45309; }
.rating-tone--low { background: #fef2f2; color: #b91c1c; }
.rating-tone--muted { background: #f1f5f9; color: #64748b; }

/* ---------- Dashboard ---------- */
.dashboard-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  border-left: 4px solid var(--ched-gold);
  background: linear-gradient(135deg, #fff 0%, var(--ched-sand) 120%);
}
.dashboard-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ched-gold);
}
.dashboard-lead { margin: 0.35rem 0 0; max-width: 42rem; }
.dashboard-period-chip {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ched-navy);
}
.dashboard-quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  max-width: 28rem;
}
.dashboard-quick-link {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ched-navy) !important;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.dashboard-quick-link:hover {
  background: var(--ched-sand);
  border-color: var(--ched-steel);
  text-decoration: none !important;
}
.dashboard-quick-link--muted {
  color: #64748b !important;
  background: transparent;
}
.dashboard-sample-notice { margin: 0; }
.dashboard-section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-formal);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.dashboard-section-head {
  margin-bottom: 0.75rem;
}
.dashboard-section-head .dashboard-section-title { margin-bottom: 0.25rem; }
.dashboard-kpi-grid {
  margin-top: 0;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}
@media (min-width: 1200px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1.05fr 1.25fr 0.92fr 0.92fr;
  }
}
.dashboard-kpi-grid .stat-card {
  padding: 1.15rem 1.25rem;
  border-radius: 0.375rem;
}
.stat-card--status-overview,
.stat-card--pending {
  min-height: 17rem;
}
.kpi-card-header {
  margin-bottom: 0.65rem;
}
.kpi-card-header--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.kpi-card-meta {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.kpi-card-foot {
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid #e2e8f0;
}
.kpi-card-foot--inline {
  border-top: none;
  padding-top: 0.35rem;
}
.kpi-card-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ched-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.kpi-card-link:hover {
  color: var(--ched-blue);
}
.kpi-card-link--cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  text-decoration: none;
  background: var(--ched-sand);
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
}
.kpi-card-link--cta:hover {
  background: #fff;
  border-color: var(--ched-navy);
}
.kpi-empty {
  margin-top: 0.5rem;
  padding: 0.75rem 0;
}
.kpi-empty--success .kpi-empty__title {
  color: #047857;
}
.kpi-empty__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.kpi-empty__text {
  margin: 0.35rem 0 0;
}
.kpi-pending-count {
  margin: 0;
  flex-shrink: 0;
}
.kpi-pending-count__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  color: #b45309;
  background: #fff;
  border: 2px solid #fcd34d;
  border-radius: 0.5rem;
}
.stat-card--attention .kpi-pending-count__num {
  color: #92400e;
}
.status-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}
.status-breakdown__row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.65rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.status-breakdown__row:last-child {
  border-bottom: none;
}
.status-breakdown__count {
  font-size: 1rem;
  color: var(--ched-navy);
  font-variant-numeric: tabular-nums;
}
.status-breakdown__bar {
  grid-column: 1 / -1;
  height: 0.35rem;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.status-breakdown__bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
  transition: width 0.35s ease;
}
.status-breakdown__bar-fill--draft { background: #94a3b8; }
.status-breakdown__bar-fill--committed { background: #3b82f6; }
.status-breakdown__bar-fill--approved { background: #22c55e; }
.status-breakdown__bar-fill--rated { background: #6366f1; }
.status-breakdown__bar-fill--finalized { background: var(--ched-navy); }
.status-breakdown__bar-fill--returned { background: #ef4444; }
.pending-action-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pending-action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.8125rem;
  color: inherit;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.pending-action-item:hover {
  background: #fff;
  border-color: var(--ched-steel);
  box-shadow: 0 1px 3px rgba(15, 39, 68, 0.08);
  text-decoration: none;
}
.pending-action-item:focus-visible {
  outline: 2px solid var(--ched-navy);
  outline-offset: 2px;
}
.pending-action-item__main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.pending-action-item__type {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.pending-action-item__title {
  font-weight: 600;
  color: var(--ched-navy);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pending-action-item__aside {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
}
.pending-action-item__aside .badge-status {
  font-size: 0.625rem;
  white-space: nowrap;
}
.pending-action-item__chevron {
  font-size: 1.125rem;
  line-height: 1;
  color: #94a3b8;
}
.pending-action-item:hover .pending-action-item__chevron {
  color: var(--ched-navy);
}
.stat-card--compact-metric .kpi-metric-value {
  margin-top: 0.35rem;
  font-size: 1.75rem;
}
.stat-card--compact-metric .kpi-metric-hint {
  margin: 0.5rem 0 0;
  line-height: 1.45;
}
.dashboard-status-breakdown li {
  align-items: center;
}
.pending-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.pending-list a {
  font-weight: 600;
  text-decoration: underline;
}
.dashboard-inline-actions { line-height: 1.6; }
.division-cards-grid {
  display: grid;
  gap: 0.75rem;
}
.division-cards-grid--multi {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .division-cards-grid--multi {
    grid-template-columns: repeat(2, 1fr);
  }
}
.division-target-card__name {
  margin: 0.35rem 0 0;
  font-family: var(--font-formal);
  font-weight: 700;
  color: var(--ched-navy);
  font-size: 1.05rem;
}
.division-target-card .value.rating-chip {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  flex-direction: row;
  align-items: baseline;
  gap: 0.35rem;
}
.dashboard-accomplish {
  border-bottom: 1px solid #e2e8f0;
}
.dashboard-progress-labels {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}
.dashboard-panels .section-hint { padding-bottom: 0.5rem; }
.sheet-link {
  font-weight: 600;
  text-decoration: underline;
}
.sheet--comfortable th,
.sheet--comfortable td {
  padding: 0.55rem 0.65rem;
}
.sheet--comfortable tbody tr:hover {
  background: #f8fafc;
}
.dashboard-empty { max-width: 36rem; }

.flex-between {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}

.filter-links { font-size: 0.875rem; }
.filter-links a { margin-right: 0.35rem; }

ol.rules {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: #334155;
}
ol.rules li + li { margin-top: 0.25rem; }

/* ---------- Register page ---------- */
.register-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1100px) {
  .register-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.85fr);
    gap: 1.75rem;
  }
}
.register-form {
  padding: 1.5rem 1.25rem;
}
@media (min-width: 640px) {
  .register-form { padding: 1.75rem 1.75rem 2rem; }
}
.register-form-head {
  margin-bottom: 0.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.register-form-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ched-gold);
}
.register-form-head h2 {
  margin-top: 0.35rem;
}
.register-lead {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
}
.register-alert { margin-top: 1rem; }
.form-section {
  margin: 0;
  padding: 1.25rem 0 0;
  border: 0;
  min-inline-size: 0;
}
.form-section + .form-section {
  margin-top: 0.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid #f1f5f9;
}
.form-section-title {
  display: block;
  width: 100%;
  margin: 0 0 0.65rem;
  padding: 0;
  border: 0;
  font-family: var(--font-formal);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ched-navy);
  text-transform: none;
  letter-spacing: normal;
}
.form-section-desc {
  margin: -0.25rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}
.form-section .field:first-of-type,
.form-section label.field:first-of-type { margin-top: 0; }
.field-grid {
  display: grid;
  gap: 0 1rem;
}
@media (min-width: 640px) {
  .field-grid { grid-template-columns: 1fr 1fr; }
  .field-grid .field { margin-top: 0.75rem; }
}
.field-grid .field:only-child,
.form-section > .field { grid-column: 1 / -1; }
.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #64748b;
  line-height: 1.45;
}
.field-hint-ok { color: #166534; }
.field-hint-warn { color: #b45309; }
.field-required {
  color: #b91c1c;
  font-weight: 700;
}
.field-optional {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 0.2rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f1f5f9;
  vertical-align: middle;
}
label.field .input-password-wrap,
.input-password-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
label.field .input-password-wrap input,
.input-password-wrap input {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}
label.field .password-strength {
  display: block;
}
.btn-password-toggle {
  flex-shrink: 0;
  align-self: stretch;
  padding: 0 0.75rem;
  border: 1px solid #94a3b8;
  border-radius: 0.25rem;
  background: #f8fafc;
  color: var(--ched-blue);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn-password-toggle:hover {
  background: var(--ched-sand);
}
.password-strength {
  margin-top: 0.4rem;
  height: 4px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.password-strength-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #94a3b8;
  transition: width 0.2s ease, background 0.2s ease;
}
.password-strength-bar[data-score="1"] { width: 25%; background: #f59e0b; }
.password-strength-bar[data-score="2"] { width: 50%; background: #eab308; }
.password-strength-bar[data-score="3"] { width: 75%; background: #84cc16; }
.password-strength-bar[data-score="4"] { width: 100%; background: #16a34a; }
.password-requirements {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.password-requirements li {
  font-size: 0.75rem;
  color: #64748b;
  padding-left: 1.15rem;
  position: relative;
}
.password-requirements li::before {
  content: "○";
  position: absolute;
  left: 0;
  color: #94a3b8;
}
.password-requirements li.met { color: #166534; }
.password-requirements li.met::before {
  content: "✓";
  color: #16a34a;
  font-weight: 700;
}
.register-form-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}
.register-signin {
  margin: 0.75rem 0 0;
  text-align: center;
}
.btn.is-loading {
  opacity: 0.85;
  cursor: wait;
}
.register-aside-card {
  padding: 1.25rem 1.25rem 1.5rem;
}
@media (min-width: 1100px) {
  .register-aside-card {
    position: sticky;
    top: 1rem;
  }
}
.register-timeline {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.register-timeline li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.65rem;
  padding-bottom: 1.1rem;
  position: relative;
}
.register-timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 2.1rem;
  bottom: 0.25rem;
  width: 2px;
  background: #e2e8f0;
}
.register-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--ched-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}
.register-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #475569;
}
.register-step-body strong {
  font-size: 0.875rem;
  color: #1e293b;
}
.register-aside-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ---------- Login page ---------- */
.main-login {
  max-width: 80rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}
.login-layout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 1100px) {
  .login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.1fr);
    gap: 1.75rem;
  }
}
.login-form {
  padding: 1.5rem 1.25rem;
  border-top: 3px solid var(--ched-gold);
}
@media (min-width: 640px) {
  .login-form { padding: 1.75rem 1.75rem 2rem; }
}
.login-form-head {
  margin-bottom: 0.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.login-form-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ched-gold);
}
.login-form-head h2 {
  margin-top: 0.35rem;
}
.login-lead {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
}
.login-alert { margin-top: 1rem; }
.login-fields {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.25rem;
}
.login-form-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}
.btn-login {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 0.9375rem;
}
.btn-login[aria-busy="true"] {
  opacity: 0.85;
  cursor: wait;
}
.login-register {
  margin: 0.75rem 0 0;
  text-align: center;
  line-height: 1.5;
}
.login-demo-card {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
@media (min-width: 640px) {
  .login-demo-card { padding: 1.5rem 1.5rem 1.75rem; }
}
.login-demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.login-demo-head h2 {
  margin: 0;
  font-size: 1.125rem;
}
.login-demo-search {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: #f8fafc;
}
.login-demo-search:focus {
  outline: none;
  border-color: var(--ched-steel);
  box-shadow: 0 0 0 3px rgba(44, 101, 145, 0.2);
  background: #fff;
}
.login-demo-list {
  margin-top: 0;
  max-height: min(22rem, 52vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.15rem;
  scrollbar-gutter: stable;
}
.login-demo-list .login-demo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  justify-content: unset;
  padding: 0.65rem 0.5rem;
  margin: 0 -0.5rem;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0.35rem;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.login-demo-list .login-demo-item:last-child {
  border-bottom: 0;
}
.login-demo-list .login-demo-item.is-hidden {
  display: none;
}
.login-demo-list .login-demo-item.is-selected {
  background: var(--ched-sand);
  box-shadow: inset 0 0 0 1px rgba(179, 130, 42, 0.35);
}
.login-demo-avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ched-navy);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.login-demo-body {
  flex: 1;
  min-width: 0;
}
.login-demo-email {
  margin: 0.2rem 0 0;
  font-size: 0.6875rem;
  color: #64748b;
  word-break: break-all;
}
.login-demo-list .use-account {
  align-self: center;
  flex-shrink: 0;
}
.login-demo-list .use-account[aria-pressed="true"] {
  background: var(--ched-blue);
  color: #fff !important;
  border-color: var(--ched-blue);
}
.login-demo-empty {
  margin: 0.5rem 0 0;
  text-align: center;
}
.login-demo-empty.hidden {
  display: none;
}
.login-aside-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
}
.login-aside-links {
  margin-bottom: 0;
  line-height: 1.6;
}

/* ---------- Super Admin ---------- */
.super-admin-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}
.super-admin-header .page-lead {
  max-width: 42rem;
}
.super-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.stat-card--link {
  display: block;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.stat-card--link:hover {
  border-color: var(--ched-steel);
  box-shadow: 0 4px 12px rgba(11, 47, 82, 0.08);
  transform: translateY(-1px);
}
.stat-card--link.is-active {
  border-color: var(--ched-blue);
  box-shadow: 0 0 0 1px var(--ched-blue);
}
.stat-card--link .value--warn { color: #b45309; }

.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
}
.tab-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  border-radius: 0.25rem;
  text-decoration: none !important;
  white-space: nowrap;
}
.tab-nav a:hover {
  background: var(--ched-sand);
  color: var(--ched-navy);
}
.tab-nav a.is-active {
  background: var(--ched-navy);
  color: #fff;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.list-toolbar .toolbar-search {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 22rem;
}
.list-toolbar input[type=search],
.list-toolbar select {
  width: 100%;
  font-size: 0.875rem;
}
.list-toolbar .toolbar-select {
  flex: 0 1 11rem;
  min-width: 9rem;
}
.list-toolbar .toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
}

.section-hint {
  margin: 0;
  padding: 0.75rem 1rem 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

.table-empty td {
  padding: 2rem 1rem !important;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

.sheet tbody tr.row-pending {
  background: #fffbeb;
}
.sheet tbody tr.row-pending:hover td {
  background: #fef3c7;
}

.btn-danger {
  background: #b91c1c !important;
  color: #fff !important;
}
.btn-danger:hover { background: #991b1b !important; }
.btn-outline-danger {
  background: #fff !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}
.btn-outline-danger:hover {
  background: #fef2f2 !important;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.table-actions form { display: inline; margin: 0; }

.review-panel { border-top: 4px solid var(--ched-gold); }
.review-panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #faf8f4 0%, #fff 100%);
}
.review-panel-body {
  padding: 1.25rem;
}
@media (min-width: 900px) {
  .review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
    gap: 1.5rem;
    align-items: start;
  }
}

.detail-list {
  margin: 0;
  display: grid;
  gap: 0.65rem 1rem;
  font-size: 0.875rem;
}
@media (min-width: 640px) {
  .detail-list {
    grid-template-columns: 9rem minmax(0, 1fr);
  }
}
.detail-list dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.detail-list dd { margin: 0; color: #1e293b; }

.review-actions {
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
}
.review-actions h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-formal);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.review-actions .field { margin-top: 0.65rem; }
.review-actions .field:first-of-type { margin-top: 0; }
.review-actions-stack > * + * {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.history-timeline {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  border-left: 2px solid #e2e8f0;
}
.history-timeline li {
  position: relative;
  padding: 0 0 0.85rem 1rem;
  font-size: 0.8125rem;
  color: #475569;
}
.history-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ched-steel);
}

.panel-add {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--ched-sand);
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
}
.panel-add h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-formal);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ched-navy);
}
.panel-add-form {
  display: grid;
  gap: 0.65rem;
  max-width: 36rem;
}
@media (min-width: 640px) {
  .panel-add-form--2 { grid-template-columns: 1fr 1fr; }
  .panel-add-form .span-full { grid-column: 1 / -1; }
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  color: #64748b;
}
.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ---------- IPCR list (Form 5) ---------- */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.ipcr-summary-grid {
  margin-bottom: 0.25rem;
}
@media (min-width: 900px) {
  .ipcr-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.ipcr-summary-chip .value {
  font-variant-numeric: tabular-nums;
}

.ipcr-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
}

.ipcr-quarter-picker {
  flex: 1 1 12rem;
}

.ipcr-toolbar__fy,
.ipcr-toolbar__status {
  flex: 0 1 auto;
}

.ipcr-toolbar__search {
  flex: 1 1 10rem;
  min-width: min(100%, 12rem);
}

.ipcr-select,
.ipcr-search-input {
  width: 100%;
  min-width: 8rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  font: inherit;
  font-size: 0.875rem;
  background: #fff;
  color: var(--ched-ink);
}

.ipcr-search-input:focus-visible,
.ipcr-select:focus-visible,
.quarter-picker a:focus-visible,
.ipcr-summary-chip:focus-visible,
.btn-icon:focus-visible,
.ipcr-list__employee-name:focus-visible {
  outline: 2px solid var(--ched-navy);
  outline-offset: 2px;
}

.ipcr-toolbar__clear {
  flex: 0 0 auto;
  font-weight: 600;
}

.badge-quarter {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #e2e8f0;
  color: #334155;
}

.ipcr-list__employee-name {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ched-navy);
  text-decoration: none;
}
.ipcr-list__employee-name:hover {
  text-decoration: underline;
}

.ipcr-list__title {
  display: block;
  margin-top: 0.15rem;
}

.ipcr-list__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.ipcr-list__rating {
  text-align: right;
  white-space: nowrap;
}

.ipcr-list__rating-num {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
}

.ipcr-list__rating-adj {
  display: block;
}

.ipcr-list__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.45rem;
  line-height: 0;
  position: relative;
}

.btn-icon[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 0.2rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
  background: #1e293b;
  border-radius: 0.2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.btn-icon[data-tip]:hover::after,
.btn-icon[data-tip]:focus-visible::after {
  opacity: 1;
}

.ipcr-group__head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #e7ecf2;
  border-bottom: 1px solid #cbd5e1;
}

.ipcr-group__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ched-navy);
}

.ipcr-group + .ipcr-group {
  margin-top: 0.5rem;
}

.ipcr-empty {
  padding: 1.5rem 1rem;
  text-align: center;
}

.ipcr-empty__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--ched-navy);
}

.ipcr-empty__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
}

.ipcr-continue-card {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--ched-gold);
  background: linear-gradient(90deg, #fffdf8 0%, #fff 55%);
}

.ipcr-continue-card__title {
  margin: 0.25rem 0 0.35rem;
  font-size: 1.125rem;
  color: var(--ched-navy);
}

.ipcr-continue-card__text {
  margin: 0 0 0.75rem;
}

.ipcr-list__mobile {
  display: none;
}

.ipcr-mobile-card {
  padding: 0.85rem 1rem;
}

.ipcr-mobile-card + .ipcr-mobile-card {
  margin-top: 0.65rem;
}

.ipcr-mobile-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.ipcr-mobile-card__rating {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.ipcr-mobile-card__actions {
  margin-top: 0.65rem;
}

@media (max-width: 767px) {
  .ipcr-list__desktop {
    display: none;
  }
  .ipcr-list__mobile {
    display: block;
  }
  .ipcr-toolbar__row {
    flex-direction: column;
    align-items: stretch;
  }
  .ipcr-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@page {
  size: A4 landscape;
  margin: 8mm;
}

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .main-app, .main { padding: 0; max-width: none; }
  .card { border: none; box-shadow: none; padding: 0; }
  .sheet th, .sheet td { border-color: #000; }
}
