:root {
    --bayer-forest-950: #00291b;
    --bayer-forest-900: #003b25;
    --bayer-forest-800: #07552f;
    --bayer-green-700: #267d1b;
    --bayer-green-600: #348f1d;
    --bayer-green-500: #58a91e;
    --bayer-lime-300: #bade72;
    --bayer-gold-500: #c99b16;
    --bayer-mint-100: #eaf5dc;
    --bayer-mint-50: #f6faef;
    --bayer-sky-50: #e9f8fc;
    --bayer-border: #d8e7cf;
    --bayer-ink: #153324;
    --bayer-muted: #5f7167;
}

body.bayer-theme {
    color: var(--bayer-ink);
    background-color: #f9fcf6 !important;
    background-image:
        radial-gradient(ellipse 24rem 32rem at -8rem 42%, rgba(186, 222, 114, 0.23), transparent 68%),
        radial-gradient(ellipse 21rem 27rem at calc(100% + 8rem) 18%, rgba(171, 226, 237, 0.25), transparent 70%),
        linear-gradient(180deg, #ffffff 0, #f8fbf5 42%, #ffffff 100%);
}

.bayer-theme ::selection {
    color: #fff;
    background: var(--bayer-green-700);
}

.bayer-theme .bg-gray-50,
.bayer-theme .bg-slate-100 {
    background-color: transparent !important;
}

.bayer-theme .bg-slate-50 {
    background-color: var(--bayer-mint-50) !important;
}

.bayer-theme .bg-blue-50 {
    background-color: #f0f8e8 !important;
}

.bayer-theme .bg-blue-100 {
    background-color: #e2f0d8 !important;
}

.bayer-theme .bg-blue-600,
.bayer-theme .bg-green-600 {
    background-color: var(--bayer-green-700) !important;
}

.bayer-theme .bg-blue-700,
.bayer-theme .bg-green-700,
.bayer-theme .hover\:bg-blue-700:hover,
.bayer-theme .hover\:bg-green-700:hover,
.bayer-theme .hover\:bg-blue-800:hover {
    background-color: var(--bayer-forest-800) !important;
}

.bayer-theme .text-blue-500,
.bayer-theme .text-blue-600,
.bayer-theme .text-blue-700,
.bayer-theme .text-green-600,
.bayer-theme .text-green-700,
.bayer-theme .hover\:text-blue-700:hover,
.bayer-theme .hover\:text-blue-900:hover {
    color: var(--bayer-green-700) !important;
}

.bayer-theme .text-blue-800,
.bayer-theme .text-green-800 {
    color: var(--bayer-forest-800) !important;
}

.bayer-theme .border-blue-100,
.bayer-theme .border-blue-200,
.bayer-theme .border-blue-600,
.bayer-theme .border-green-100,
.bayer-theme .border-green-200,
.bayer-theme .border-green-600 {
    border-color: var(--bayer-border) !important;
}

.bayer-theme .border-blue-600,
.bayer-theme .border-green-600 {
    border-color: var(--bayer-green-700) !important;
}

.bayer-theme .focus\:border-blue-500:focus,
.bayer-theme .focus-within\:border-blue-500:focus-within {
    border-color: var(--bayer-green-600) !important;
}

.bayer-theme .focus\:ring-blue-100:focus,
.bayer-theme .focus-within\:ring-blue-100:focus-within,
.bayer-theme .focus\:ring-blue-500:focus {
    --tw-ring-color: rgba(88, 169, 30, 0.18) !important;
}

.bayer-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.bayer-theme select,
.bayer-theme textarea {
    accent-color: var(--bayer-green-700);
}

.bayer-theme input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.bayer-theme select:focus,
.bayer-theme textarea:focus {
    border-color: var(--bayer-green-600) !important;
    box-shadow: 0 0 0 3px rgba(88, 169, 30, 0.15) !important;
}

.bayer-theme input[type="checkbox"],
.bayer-theme input[type="radio"] {
    accent-color: var(--bayer-green-700);
}

/* Public shell: dark Bayer header, light organic page surface and dark footer. */
.bayer-theme .public-header {
    position: relative;
    z-index: 20;
    border-color: rgba(186, 222, 114, 0.35) !important;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.04), transparent 32%),
        linear-gradient(110deg, var(--bayer-forest-950), var(--bayer-forest-900) 62%, #064a2d) !important;
    box-shadow: 0 8px 26px rgba(0, 41, 27, 0.18) !important;
}

.bayer-theme .public-header::after {
    position: absolute;
    right: 5%;
    bottom: -1px;
    width: 12rem;
    height: 3px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--bayer-lime-300));
}

.bayer-theme .public-header__title-text {
    color: #fff !important;
    letter-spacing: 0.015em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
}

.bayer-theme .public-header__brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 4rem;
    text-decoration: none;
}

.bayer-theme .public-header__brand-frame {
    display: flex;
    position: relative;
    flex: 0 0 4rem;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.bayer-theme .public-header__brand-mark {
    display: block;
    position: static;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    border-radius: 50%;
    object-position: center;
    transform: none;
}

.bayer-theme .public-header .bg-green-50 {
    color: #fff !important;
    border-color: rgba(186, 222, 114, 0.55) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

.bayer-theme .public-header .bg-green-500 {
    background: #8ed33c !important;
}

.bayer-theme .public-main {
    position: relative;
    z-index: 1;
    background-color: transparent !important;
}

.bayer-theme .public-main::before,
.bayer-theme .public-main::after {
    position: fixed;
    z-index: -1;
    content: "";
    pointer-events: none;
    transform: skewX(-13deg);
}

.bayer-theme .public-main::before {
    left: -4.5rem;
    top: 24%;
    width: 8rem;
    height: 22rem;
    border-radius: 0 0 5rem 0;
    background: rgba(218, 239, 179, 0.55);
}

.bayer-theme .public-main::after {
    right: -5.5rem;
    top: 10%;
    width: 10rem;
    height: 18rem;
    border-radius: 0 0 0 5rem;
    background: rgba(213, 242, 248, 0.56);
}

.bayer-theme .public-footer {
    position: relative;
    z-index: 10;
    color: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(186, 222, 114, 0.22) !important;
    background:
        radial-gradient(8rem 3rem at 20% 110%, rgba(88, 169, 30, 0.2), transparent 72%),
        linear-gradient(105deg, var(--bayer-forest-950), #02462b) !important;
}

.bayer-theme .public-footer__brand {
    color: #fff !important;
}

.bayer-theme .public-footer__copyright {
    color: rgba(255, 255, 255, 0.68) !important;
}

.bayer-theme .public-footer__tagline {
    color: rgba(255, 255, 255, 0.66) !important;
}

/* Home screen */
.bayer-theme .home-toolbar,
.bayer-theme .program-card,
.bayer-theme .home-empty {
    border-color: var(--bayer-border);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 9px 28px rgba(30, 83, 35, 0.08);
}

.bayer-theme .home-toolbar {
    position: relative;
    overflow: hidden;
}

.bayer-theme .home-toolbar::after {
    position: absolute;
    top: -3.25rem;
    right: -2rem;
    width: 13rem;
    height: 8rem;
    content: "";
    pointer-events: none;
    border-radius: 0 0 0 7rem;
    background: linear-gradient(135deg, transparent 15%, rgba(186, 222, 114, 0.22));
}

.bayer-theme .home-eyebrow,
.bayer-theme .program-card__label {
    color: var(--bayer-green-700);
}

.bayer-theme .home-title,
.bayer-theme .program-card__title {
    color: var(--bayer-forest-800);
}

.bayer-theme .home-search input,
.bayer-theme .home-sort select {
    position: relative;
    z-index: 1;
    border-color: #bfd8b5;
    color: var(--bayer-ink);
    background-color: #fff;
}

.bayer-theme .program-card:hover {
    border-color: #9ecb83;
    box-shadow: 0 16px 36px rgba(21, 80, 38, 0.13);
}

.bayer-theme .program-card__media {
    border-color: #e5efdf;
    background: var(--bayer-mint-100);
}

.bayer-theme .program-card__fallback {
    background:
        linear-gradient(135deg, rgba(0, 41, 27, 0.88), rgba(52, 143, 29, 0.88)),
        radial-gradient(circle at 20% 20%, var(--bayer-lime-300), transparent 45%);
}

.bayer-theme .program-card__logo {
    color: var(--bayer-green-700);
    border-color: #fff;
    box-shadow: 0 9px 22px rgba(0, 41, 27, 0.2);
}

.bayer-theme .program-card__button--ghost {
    color: var(--bayer-green-700);
    border-color: #abd094;
    background: #fff;
}

.bayer-theme .program-card__button--ghost:hover {
    color: var(--bayer-forest-800);
    border-color: var(--bayer-green-600);
    background: var(--bayer-mint-50);
}

.bayer-theme .program-card__button--primary {
    color: #fff;
    border-color: var(--bayer-green-700);
    background: linear-gradient(100deg, var(--bayer-green-700), #176b27);
    box-shadow: 0 6px 16px rgba(38, 125, 27, 0.17);
}

.bayer-theme .program-card__button--primary:hover {
    border-color: var(--bayer-forest-800);
    background: var(--bayer-forest-800);
}

.bayer-theme .program-viewport {
    scrollbar-color: var(--bayer-green-600) #e5f0df;
}

.bayer-theme .program-viewport::-webkit-scrollbar-track {
    background: #e5f0df;
}

.bayer-theme .program-viewport::-webkit-scrollbar-thumb {
    border-color: #e5f0df;
    background: var(--bayer-green-600);
}

/* Public detail cards and tabs */
.bayer-theme .public-main section.rounded-xl {
    border-color: var(--bayer-border) !important;
    box-shadow: 0 10px 30px rgba(30, 83, 35, 0.08) !important;
}

.bayer-theme .tab-button[aria-selected="true"],
.bayer-theme .tab-button.is-active,
.bayer-theme .tab-button.active {
    color: var(--bayer-forest-800) !important;
}

.bayer-theme .tab-button:hover {
    color: var(--bayer-green-700) !important;
    background: var(--bayer-mint-50) !important;
}

.bayer-theme table thead {
    color: var(--bayer-forest-800);
    background: var(--bayer-mint-50) !important;
}

/* Admin keeps the existing information architecture and adopts the same brand skin. */
.bayer-theme--admin > main {
    background:
        radial-gradient(ellipse 22rem 30rem at calc(100% + 8rem) 10%, rgba(203, 236, 244, 0.38), transparent 68%),
        linear-gradient(180deg, #fbfdf9, #f3f8ef) !important;
}

.bayer-theme--admin aside.w-64 {
    color: #fff;
    border-color: rgba(186, 222, 114, 0.25) !important;
    background:
        radial-gradient(13rem 9rem at 15% 100%, rgba(88, 169, 30, 0.2), transparent 72%),
        linear-gradient(165deg, var(--bayer-forest-950), #06482b) !important;
    box-shadow: 9px 0 28px rgba(0, 41, 27, 0.12);
}

.bayer-theme--admin aside.w-64 .border-slate-200 {
    border-color: rgba(255, 255, 255, 0.13) !important;
}

.bayer-theme--admin aside.w-64 h1,
.bayer-theme--admin aside.w-64 p,
.bayer-theme--admin aside.w-64 a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.bayer-theme--admin aside.w-64 nav a {
    border: 1px solid transparent;
}

.bayer-theme--admin aside.w-64 nav a:hover {
    background: rgba(255, 255, 255, 0.14) !important;
}

.bayer-theme--admin main header {
    border-color: var(--bayer-border) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.bayer-theme--admin main header h2,
.bayer-theme--admin main h1,
.bayer-theme--admin main h2,
.bayer-theme--admin main h3,
.bayer-theme--admin main h4 {
    color: var(--bayer-forest-800) !important;
}

.bayer-theme--admin .shadow-sm,
.bayer-theme--admin .shadow-xl {
    box-shadow: 0 10px 28px rgba(30, 83, 35, 0.09) !important;
}

.bayer-theme--admin .rounded-lg.border.bg-white,
.bayer-theme--admin .rounded-xl.border.bg-white,
.bayer-theme--admin table {
    border-color: var(--bayer-border) !important;
}

.bayer-theme--admin .ring-blue-100,
.bayer-theme--admin .ring-green-100 {
    --tw-ring-color: rgba(88, 169, 30, 0.16) !important;
}

@media (max-width: 767px) {
    .bayer-theme .public-header {
        background: linear-gradient(115deg, var(--bayer-forest-950), #07552f) !important;
    }

    .bayer-theme .public-header__brand {
        min-width: auto;
    }

    .bayer-theme .public-header__brand-frame {
        flex-basis: 3rem;
        width: 3rem;
        height: 3rem;
    }

    .bayer-theme .public-main::before {
        left: -6rem;
    }

    .bayer-theme .public-main::after {
        right: -7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bayer-theme *,
    .bayer-theme *::before,
    .bayer-theme *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
