/* MAG/N2Agro: shared identity for every route and the offline shell.
   Page styles own layout; this file owns brand colors and control contrast. */
html[data-mag-theme="n2agro"] {
  color-scheme: light;
  --n2-navy:#18354b; --n2-navy-hover:#254c66;
  --n2-green:#307b3c; --n2-green-hover:#24602e;
  --n2-background:#f3f6f9; --n2-surface:#ffffff;
  --n2-text:#233c50; --n2-muted:#526879; --n2-border:#d5e0e8;
  --n2-danger:#a62c2c; --n2-warning:#805500; --n2-focus:#3875a2;
  background:var(--n2-background); color:var(--n2-text);
}
html[data-mag-theme] body,
html[data-mag-theme] body :is(.mag-workspace,.review-page,.app-shell,.demo-workspace) {
  --mag-navy:var(--n2-navy); --mag-blue:var(--n2-navy-hover); --mag-text:var(--n2-text);
  --mag-muted:var(--n2-muted); --mag-line:var(--n2-border); --mag-surface:var(--n2-surface);
  font-family:Arial,Helvetica,sans-serif; background-color:var(--n2-background); color:var(--n2-text);
}
html[data-mag-theme] body :is(.workspace-sidebar,.sidebar,.standalone-navigation) {
  background:var(--n2-navy)!important; color:#eef4f7; border-color:var(--n2-navy);
  scrollbar-color:#94aeba var(--n2-navy); scrollbar-width:thin;
}
html[data-mag-theme] body :is(.workspace-sidebar,.sidebar,.standalone-navigation) :is(a,button,summary) {
  color:#edf3f7!important; font-size:14px; line-height:1.5;
}
html[data-mag-theme] body :is(.workspace-sidebar,.sidebar,.standalone-navigation) :is(a,button,summary):hover {
  background:var(--n2-navy-hover); color:#fff!important;
}
html[data-mag-theme] body :is(.workspace-sidebar,.sidebar,.standalone-navigation) :is(.active,[aria-current="page"]) {
  background:var(--n2-green)!important; color:white!important;
}
html[data-mag-theme] body :is(.workspace-signature,.sidebar-bottom) {color:#dbe7ed}
html[data-mag-theme] body :is(.workspace-signature,.sidebar-bottom) :is(small,span) {color:#c1d1dc}
html[data-mag-theme] body .primary:not(.danger):not(.mag-revoke-action),
html[data-mag-theme] body .mag-authorize-action {background:var(--n2-green)!important;border-color:var(--n2-green)!important;color:#fff!important;font-size:13px;min-height:42px}
html[data-mag-theme] body .primary:not(.danger):not(.mag-revoke-action):hover:not(:disabled),
html[data-mag-theme] body .mag-authorize-action:hover:not(:disabled) {background:var(--n2-green-hover)!important;border-color:var(--n2-green-hover)!important}
html[data-mag-theme] body .secondary:not(.danger):not(.mag-revoke-action) {background:var(--n2-surface)!important;color:var(--n2-navy)!important;border:1px solid var(--n2-border);font-size:13px;min-height:42px}
html[data-mag-theme] body .secondary:not(.danger):not(.mag-revoke-action):hover:not(:disabled) {background:#eaf0f5!important}
html[data-mag-theme] body .mag-revoke-action {background:var(--n2-danger)!important;color:#fff!important}
html[data-mag-theme] body :is(.panel,.metric,.workspace-metric,.registration-card,.screen-alerts) {border-color:var(--n2-border);background-color:var(--n2-surface)}
html[data-mag-theme] body :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]) {font:14px Arial,Helvetica,sans-serif;border-color:var(--n2-border);color:var(--n2-text);background-color:var(--n2-surface);min-height:42px}
html[data-mag-theme] body :is(input[type="checkbox"],input[type="radio"]) {accent-color:var(--n2-green)}
html[data-mag-theme] body :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid var(--n2-focus);outline-offset:3px}
html[data-mag-theme] body :is(.mag-workspace,.review-page) label {font-size:13px;color:var(--n2-muted)}
html[data-mag-theme] body :is(.mag-workspace,.review-page) :is(td,td strong) {font-size:13px;color:var(--n2-text)}
html[data-mag-theme] body :is(.mag-workspace,.review-page) th {font-size:12px;color:var(--n2-muted);background:#edf2f5}
html[data-mag-theme] body :is(.workspace-caption,.workspace-page-heading p,.section-title p,.muted,.review-hint) {color:var(--n2-muted)}
html[data-mag-theme] body :is(.mag-workspace,.review-page) td small {color:var(--n2-muted);font-size:12px}
html[data-mag-theme] body :is(.digital-paper-title,.measurement-heading) {background:var(--n2-navy);color:white}
html[data-mag-theme] body :is(.digital-paper-title,.measurement-heading) :is(h2,h3,p,span) {color:white}
html[data-mag-theme] body :is(.registration-tabs,.workspace-segmented) button[aria-selected="true"],
html[data-mag-theme] body .workspace-segmented button.active {background:#e8f3eb;color:#205b2a;border-color:var(--n2-green)}
html[data-mag-theme] body .review-status-tabs button[aria-selected="true"] {background:#e8f3eb;border-color:var(--n2-green);color:#205b2a}
html[data-mag-theme] body .info-note {background:#edf3f7;color:#36566d}
html[data-mag-theme] body .workspace-badge:is(.warning,.outside,.danger) {color:var(--n2-warning)}
html[data-mag-theme] body .workspace-badge:is(.outside,.danger) {color:var(--n2-danger)}
html[data-mag-theme] body .workspace-badge:is(.success,.ideal) {color:#205b2a}
html[data-mag-theme] body.mag-offline>header {background:var(--n2-navy)}
html[data-mag-theme] body.mag-offline button:not(.secondary) {background:var(--n2-green);color:white}
html[data-mag-theme] body.mag-offline :is(input,select,textarea) {width:100%;border-radius:8px;padding:12px}
html[data-mag-theme] body.mag-offline textarea {resize:vertical;min-height:90px}
html[data-mag-theme] .demo-workspace {display:block;min-height:100vh}
html[data-mag-theme] .demo-workspace main {width:100%;max-width:1500px;padding:28px}
.demo-notice{border:1px solid #adbfcd;border-left:5px solid #18354b;background:#eaf1f6;padding:18px;border-radius:10px;margin:20px 0;font-size:14px;line-height:1.7}
.demo-notice p{margin-top:7px}
.standalone-backdrop{display:none}
@media(max-width:900px){.standalone-shell.menu-open .standalone-backdrop{display:block;position:fixed;inset:54px 0 0;z-index:34;background:#102c4680}.standalone-shell.menu-open .standalone-navigation{z-index:35}.standalone-shell .standalone-toggle{z-index:42}.demo-workspace main{padding:16px!important}}
@media(prefers-reduced-motion:reduce){html[data-mag-theme] *,html[data-mag-theme] *:before,html[data-mag-theme] *:after{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important}}
@media print{html[data-mag-theme] body,html[data-mag-theme] body .mag-workspace{background:white!important}.demo-notice{border:2px solid #18354b;background:white}.standalone-backdrop{display:none!important}html[data-mag-theme] body :is(.mag-workspace,.review-page) :is(td,td strong,th){font-size:9px}}
