/* Final semantic light palette. Loaded only by the internal light configuration.
   Original geometry, typography and images; decorative motion respects reduced motion. */
:root {
    color-scheme: light;
    --mx-bg: #f5f8f6;
    --mx-surface: #ffffff;
    --mx-surface-l: #edf3ef;
    --mx-green: #087a48;
    --mx-green-dim: rgba(8,122,72,.08);
    --mx-green-glow: rgba(8,122,72,.14);
    --mx-purple: #6142a6;
    --mx-danger: #b42318;
    --mx-warn: #8a5700;
    --mx-text: #15231d;
    --mx-text-mid: #43564d;
    --mx-text-dim: #52655a;
    --mx-border: #dce5df;
    --mx-border-h: #7e8f84;
    --mx-glass-bg: rgba(255,255,255,.94);
    --app-brand-color: #15231d;
    --app-brand-accent: #087a48;
    --app-analysis-detail-color: #43564d;
    --app-control-text-color: #15231d;
    --app-control-placeholder-color: #5f7067;
    --app-control-bg: linear-gradient(165deg,#ffffff,#f7faf8);
    --app-control-bg-focus: linear-gradient(165deg,#ffffff,#f2f8f4);
    --app-glass-card-bg: rgba(255,255,255,.9);
    --app-glass-card-border: #cbded2;
    --app-glass-card-border-soft: #cbd8cf;
    --app-glass-card-shadow: 0 16px 32px rgba(15,82,49,.09), 0 1px 0 rgba(255,255,255,.9) inset, 0 -10px 18px rgba(8,122,72,.035) inset;
    --app-ui-focus-ring: 0 0 0 2px rgba(8,122,72,.5);
    --ac-bg: #f5f8f6;
    --ac-surface: #ffffff;
    --ac-surface-2: #edf3ef;
    --ac-border: #dce5df;
    --ac-border-strong: #7e8f84;
    --ac-text: #15231d;
    --ac-muted: #43564d;
    --ac-ok: #087a48;
    --ac-warn: #8a5700;
    --ac-bad: #b42318;
    --ac-shadow: 0 14px 42px rgba(21,35,29,.07);
    --adm-bg: #f5f8f6;
    --adm-surface: #ffffff;
    --adm-surface-2: #edf3ef;
    --adm-border: #dce5df;
    --adm-text: #15231d;
    --adm-muted: #43564d;
    --adm-primary: #087a48;
    --adm-primary-2: #006b3c;
    --adm-danger: #b42318;
    --adm-warning: #8a5700;
    --adm-ok: #087a48;
    --adm-neutral: #5f7067;
    --adm-shadow: 0 14px 38px rgba(21,35,29,.07);
}

/* Foreground and fill must change together for solid actions. */
html:root body.has-app-toolbar :is(.mx-cta--primary,.mx-search-btn,.mx-dispute-search-btn,.mx-contact-btn,.mx-classify-btn,.mx-track-lookup__btn,.mx-track-screen__btn,.mx-track-screen__mini-btn--primary,.mx-user-login-btn--primary,.sv-checkout,.sv-floating-cart__btn,.mnh-cookie-consent__btn--primary,.j-nav-btn--primary,.co-action:not(.co-action--ghost),.ac-btn--primary,.adm-btn--primary,.mk-btn--primary,.j-btn--primary,.app-usage-limit__form button) {
    background: #087a48 !important;
    color: #ffffff !important;
    border-color: #087a48 !important;
}
html:root body.has-app-toolbar :is(.mx-cta--primary,.mx-search-btn,.mx-dispute-search-btn,.mx-contact-btn,.mx-classify-btn,.mx-track-lookup__btn,.mx-track-screen__btn,.mx-track-screen__mini-btn--primary,.mx-user-login-btn--primary,.sv-checkout,.sv-floating-cart__btn,.mnh-cookie-consent__btn--primary,.j-nav-btn--primary,.co-action:not(.co-action--ghost),.ac-btn--primary,.adm-btn--primary,.mk-btn--primary,.j-btn--primary,.app-usage-limit__form button):hover:not(:disabled) {
    background: #006b3c !important;
    border-color: #006b3c !important;
    color: #ffffff !important;
}
html body :is(.mx-cta--ghost,.co-action--ghost,.ac-btn--ghost,.adm-btn--ghost,.mk-btn--ghost) { color: var(--mx-text-mid) !important; }
html body :is(.mx-cta--ghost,.co-action--ghost,.ac-btn--ghost,.adm-btn--ghost,.mk-btn--ghost):hover { color: var(--mx-text) !important; background-color: #edf3ef !important; }
html body .mx-cta--wa { color: #087a48 !important; border-color: rgba(8,122,72,.3) !important; background: rgba(8,122,72,.07) !important; }
html body :is(.sv-toggle:has(input:checked),.mx-classify-ai-btn,.app-service-detail-link,.mx-service-detail-link) { color: #087a48 !important; }
html body .sv-toggle__track { background: #dce5df; }
html body .sv-toggle__track span { background: #7e8f84; }
html body .sv-toggle input:checked + .sv-toggle__track { background: rgba(8,122,72,.18); }
html body .sv-toggle input:checked + .sv-toggle__track span { background: #087a48; }
html body :is(.sv-badge,.co-doc-chip) { color: #006b3c; }
html body .adm-btn--danger { background: #fef3f2 !important; color: #b42318 !important; border-color: #b42318 !important; }

html:root body :is(.mk-alert--ok,.mk-badge--ok,.ac-alert--ok,.ac-badge--done,.adm-alert--ok,.mx-verdict-badge--ok,.mx-verdict-status--ok,.mx-verdict-mini-badge--ok) {
    color: #087a48 !important; background: #eaf7ef !important; border-color: rgba(8,122,72,.3) !important;
}
html:root body :is(.mk-alert--err,.mk-badge--bad,.ac-alert--err,.ac-badge--failed,.adm-alert--error,.mx-verdict-badge--bad,.mx-verdict-status--bad,.mx-verdict-mini-badge--bad) {
    color: #b42318 !important; background: #fef3f2 !important; border-color: rgba(180,35,24,.3) !important;
}
html:root body :is(.mk-badge--warn,.ac-badge--processing,.mx-verdict-badge--warn,.mx-verdict-status--warn,.mx-verdict-mini-badge--warn) {
    color: #8a5700 !important; background: #fff8e8 !important; border-color: rgba(138,87,0,.3) !important;
}
html:root body.has-app-toolbar :is(.co-flow-status--info,.mx-flow-status--info) { color: #2563a6 !important; background: #eff6fc !important; border-color: rgba(37,99,166,.3) !important; }
html:root body.has-app-toolbar :is(.co-flow-status--pending,.mx-flow-status--pending) { color: #8a5700 !important; background: #fff8e8 !important; border-color: rgba(138,87,0,.3) !important; }
html:root body.has-app-toolbar :is(.co-flow-status--ok,.mx-flow-status--ok) { color: #087a48 !important; background: #eaf7ef !important; border-color: rgba(8,122,72,.3) !important; }
html:root body.has-app-toolbar :is(.co-flow-status--error,.mx-flow-status--error) { color: #b42318 !important; background: #fef3f2 !important; border-color: rgba(180,35,24,.3) !important; }

/* Form state colors, including browser-filled text. Keep all control metrics. */
html:root body.has-app-toolbar :is(input,select,textarea):not(.co-brick *):not(.mx-brick *):where(:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=submit]):not([type=button]):not([type=color])) {
    border-color: #7e8f84 !important;
}
html:root body.has-app-toolbar :is(input,select,textarea):not(.co-brick *):not(.mx-brick *):focus {
    border-color: #087a48 !important;
}
html:root body.has-app-toolbar :is(input,select,textarea):not(.co-brick *):not(.mx-brick *)[aria-invalid=true] { border-color: #b42318 !important; }
html:root body.has-app-toolbar .ac-form :is(input,select,textarea):invalid:focus { border-color: #b42318 !important; }
html:root body.has-app-toolbar :is(input,select,textarea):not(.co-brick *):not(.mx-brick *)::placeholder { color: #5f7067 !important; }
html:root body.has-app-toolbar input:not(.co-brick *):not(.mx-brick *):-webkit-autofill,
html:root body.has-app-toolbar input:not(.co-brick *):not(.mx-brick *):-webkit-autofill:hover,
html:root body.has-app-toolbar input:not(.co-brick *):not(.mx-brick *):-webkit-autofill:focus {
    -webkit-text-fill-color: #15231d !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    caret-color: #15231d;
}
html body :is(button,a,input,select,textarea):focus-visible { outline-color: #087a48 !important; }

/* Dialog content stays light while the surroundings recede. */
html body :is(.app-service-dialog,.app-usage-limit) { background: rgba(255,255,255,.97); color: #15231d; }
html body :is(.app-service-dialog,.app-usage-limit)::backdrop { background: rgba(21,35,29,.38); }

/* QR codes, logos and photos retain their source colors; never invert media. */
html body #pixQrImage { background-color: #ffffff; }
html body .legal-meta { color: var(--mx-text-mid); }

/* A later background shorthand resets clipping; retain the original text mask. */
html body .mx-gradient {
    background-image: linear-gradient(135deg,#087a48,#005f47);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Brand atmosphere: mint at the edges, a quiet light center for reading.
   Existing page/background layers retain their dimensions and stacking. */
html:root body,
html:root body .mx-bg {
    background:
        radial-gradient(ellipse 78% 64% at 100% 0%,rgba(0,166,88,.22) 0%,rgba(0,166,88,.07) 43%,transparent 74%),
        radial-gradient(ellipse 62% 48% at 0% 76%,rgba(8,122,72,.13) 0%,transparent 72%),
        linear-gradient(120deg,#f0f8f3 0%,#fcfefd 44%,#eef8f2 100%) !important;
}
html:root body .mx-blur--1 { background: rgba(0,166,88,.32); }
html:root body .mx-blur--2 { background: rgba(8,122,72,.2); }

html:root body .app-toolbar.app-toolbar--glass::before {
    background: linear-gradient(180deg,rgba(224,243,232,.94) 0%,rgba(241,250,245,.78) 54%,rgba(241,250,245,0) 100%);
}
html:root body .app-toolbar.app-toolbar--glass::after {
    background: radial-gradient(100% 110% at 80% 0%,rgba(0,166,88,.24),rgba(255,255,255,0) 72%);
}

/* White faces and a green reflected edge give existing glass panels depth. */
html:root body.has-app-toolbar :is(
    .mx-glass,.mx-plan,.mx-ctx-card,.mx-done-card,.mx-edu-card,.mx-step-card,
    .sv-service,.sv-summary,.sv-empty,
    .ac-card,.ac-login-card,.ac-kpi,.ac-order,
    .adm-card,.adm-login-card,.adm-ai-card,.adm-exec-card,.adm-kpi,.aff-focus-card,
    .mk-card,.mk-stat,.mk-filters,.co-block,.co-success,.co-success__next
):not(:where([aria-invalid=true],.is-error,.is-invalid,.is-warn,.is-bad,.is-ok,.is-selected,.co-flow-status,.mx-flow-status,.adm-alert,.ac-alert,.mk-alert)) {
    background: linear-gradient(145deg,rgba(255,255,255,.98) 8%,rgba(255,255,255,.94) 54%,rgba(231,246,237,.92) 100%) !important;
    border-color: var(--app-glass-card-border) !important;
    box-shadow: var(--app-glass-card-shadow) !important;
}
html:root body.has-app-toolbar :is(.mx-plan,.sv-service,.ac-order,.mk-card):not(:where([aria-invalid=true],.is-error,.is-invalid,.is-warn,.is-bad,.is-ok,.is-selected)):is(:hover,:focus-within) {
    border-color: rgba(8,122,72,.42) !important;
    box-shadow: 0 16px 32px rgba(15,82,49,.13),0 1px 0 rgba(255,255,255,.94) inset,0 -10px 18px rgba(8,122,72,.045) inset !important;
}
html:root body.has-app-toolbar .mx-plan.is-selected {
    background: linear-gradient(145deg,#f7fcf9 8%,#e1f3e8 100%) !important;
    border-color: #087a48 !important;
    box-shadow: 0 16px 32px rgba(15,82,49,.12),0 0 0 1px rgba(8,122,72,.24) inset !important;
}

html:root body :is(.mx-stats-strip,.mx-sla-strip,.mx-trust-strip) {
    background: linear-gradient(110deg,#e3f3e9 0%,#f5fbf7 48%,#deefe5 100%) !important;
    border-color: #c4ddce !important;
}
html:root body.has-app-toolbar .mnh-table th {
    background: linear-gradient(180deg,#e0f0e6,#edf7f1) !important;
    border-color: #c4ddce !important;
}
html:root body.has-app-toolbar .mnh-table tbody tr:hover { background-color: rgba(8,122,72,.045); }

html:root body .mx-footer {
    background: linear-gradient(180deg,#f0f8f3 0%,#e7f4ec 44%,#daeee2 100%);
}
html:root body .mx-footer::before {
    background: linear-gradient(90deg,transparent 0%,rgba(8,122,72,.18) 22%,rgba(8,122,72,.32) 50%,rgba(8,122,72,.18) 78%,transparent 100%);
}
html:root body .mx-footer::after {
    background: radial-gradient(72% 86% at 50% 100%,rgba(0,166,88,.18) 0%,rgba(8,122,72,.07) 45%,rgba(8,122,72,0) 82%);
}

/* One brief reveal on decorative layers only; no loop or content movement. */
@media (prefers-reduced-motion: no-preference) {
    html:root body .mx-blur { animation: app-light-glow-reveal 600ms ease-out both; }
    html:root body .mx-footer::after { animation: app-light-footer-reveal 600ms ease-out both; }
    html:root body :is(.sv-service,.ac-order,.mk-card) { transition: border-color 180ms ease,box-shadow 180ms ease,background-color 180ms ease; }
}
@keyframes app-light-glow-reveal { from { opacity: .08; } to { opacity: .3; } }
@keyframes app-light-footer-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    html:root body .mx-blur,
    html:root body .mx-footer::after { animation: none; }
    html:root body :is(.sv-service,.ac-order,.mk-card) { transition: none; }
}
