:root {
  color-scheme: light;
  font: 15px/1.5 system-ui, -apple-system, sans-serif;
  color: #192841;
  background: #f3f6fa;
  --navy: #122640;
  --accent: #126452;
  --line: #dce4ec;
  --muted: #4b5e73;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 12px clamp(16px, 3vw, 42px); background: var(--navy); color: white; }
.brand, #account { display: flex; align-items: center; gap: 13px; }
.brand-logo { display: flex; align-items: center; padding: 6px 8px; background: #fff; border-radius: 7px; }
.brand-logo img { display: block; width: 108px; height: auto; }
.brand strong { font-size: 1rem; }
#workspace { display: flex; align-items: stretch; min-height: calc(100vh - 66px); }
nav { background: #fff; flex: 0 0 218px; padding: 20px 12px; border-right: 1px solid var(--line); }
nav button { display: block; width: 100%; text-align: left; background: transparent; color: var(--navy); margin-bottom: 6px; }
nav button[aria-current] { background: #e3f2ed; color: #145a4c; }
main { flex: 1; min-width: 0; padding: clamp(16px, 3vw, 38px); }
h1, h2, h3, p { margin: 0 0 .75rem; }
h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.17; letter-spacing: -.035em; }
h2 { font-size: 1.16rem; }
p, small { color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: clamp(13px, 2vw, 22px); margin: 14px 0; scroll-margin-top: 1rem; }
.panel h2 { margin-bottom: .8rem; }
.panel h3 { margin-top: 1rem; font-size: 1rem; }
.empty-message { margin-bottom: 0; }
.setup-list { margin: 0; padding-left: 1.45rem; display: grid; gap: 1rem; }
.setup-list li::marker { color: var(--accent); font-weight: 750; }
.setup-list p { margin: .25rem 0 .55rem; }
.signed-out { display: grid; place-items: center; min-height: 100vh; background: #eaf0f5; }
body:has(.signed-out) .top { display: none; }
.signin-layout { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(300px, 1fr); width: min(100%, 1120px); overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 55px #132b4520; }
.signin-hero { min-height: 500px; padding: clamp(24px, 4vw, 47px); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 40px; color: #fff; background: linear-gradient(180deg, #091e3266 0%, #091e320d 35%, #071a2bf0 100%), #14334b url("/static/plant-mis-signin.webp") center / cover no-repeat; }
.signin-hero .brand-logo { padding: 9px 13px; }
.signin-hero .brand-logo img { width: 125px; }
.signin-hero h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); margin-bottom: .55rem; }
.signin-hero p { color: #e4eff9; max-width: 33ch; margin: 0; }
.signin-hero .signin-eyebrow { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 750; margin-bottom: .6rem; }
.signin { align-self: center; margin: 0; border: 0; padding: clamp(24px, 5vw, 55px); }
.signin h2 { font-size: 1.9rem; letter-spacing: -.03em; margin-bottom: .45rem; }
.signin .grid { grid-template-columns: minmax(0, 1fr); margin-top: 1.4rem; }
.signin .actions button { width: 100%; margin-top: .25rem; }
.report-bar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.report-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .8rem; margin: 0 0 .85rem; }
.report-bar .report-tools { margin-bottom: 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.report-tools .feedback { width: 100%; margin: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: 12px 15px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 650; font-size: .86rem; }
input, select, textarea, button { font: inherit; border-radius: 6px; }
input, select, textarea { width: 100%; color: inherit; border: 1px solid #aab8c8; background: white; padding: 8px 10px; min-height: 39px; }
input[readonly] { background: #f4f6f9; }
.percent-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.percent-input > span { color: var(--muted); }
textarea { resize: vertical; }
.full { grid-column: 1 / -1; }
button { border: 1px solid transparent; cursor: pointer; padding: 8px 11px; font-weight: 650; color: #fff; background: var(--accent); }
button.secondary { color: var(--navy); background: #fff; border-color: #aab8c8; }
button:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
:focus-visible { outline: 3px solid #2788b5; outline-offset: 2px; }
.feedback { margin: .7rem 0 0; }
.feedback:empty { display: none; }
.feedback.error { color: #9a241b; }
.feedback.success { color: #126452; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eef3f8; color: #334961; }
td.notes { min-width: 175px; max-width: 370px; overflow-wrap: anywhere; white-space: pre-wrap; }
tfoot td { font-weight: 750; background: #f2f6f9; }
.badge { display: inline-block; border-radius: 20px; padding: 2px 8px; font-weight: 700; white-space: nowrap; background: #eef2f6; color: #42546a; }
.badge.red, .badge.at-risk, .badge.overdue, td.kpi-breach.red, td.kpi-breach.at-risk { background: #ffe6e0; color: #912a23; }
.badge.amber, .badge.watch, td.kpi-breach.amber { background: #fff0cc; color: #6e4600; }
.badge.green, .badge.ready, .badge.on-track { background: #dff3e8; color: #145c48; }
.kpi-breach { font-weight: 750; }
.target-note { font-size: .86rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 10px; margin: 14px 0; }
.tile { padding: 12px; border: 1px solid var(--line); background: #fff; border-radius: 9px; }
.tile strong { display: block; font-size: 1.38rem; letter-spacing: -.02em; }
.grants { max-height: 260px; overflow: auto; display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grants label { border: 1px solid var(--line); padding: 9px; border-radius: 5px; }
@media (max-width: 750px) {
  #workspace { display: block; }
  nav { display: flex; overflow-x: auto; gap: 7px; padding: 8px; }
  nav button { white-space: nowrap; width: auto; margin: 0; }
  #account-name { display: none; }
  .signin-layout { grid-template-columns: 1fr; max-width: 500px; }
  .signin-hero { min-height: 252px; }
  .signin-hero .brand-logo img { width: 95px; }
}
@media (max-width: 420px) {
  .brand { gap: 8px; }
  .brand-logo img { width: 76px; }
  .brand strong { max-width: 11ch; line-height: 1.2; }
}
