:root {
    color-scheme: light;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: #172a21;
    background: #f3f7f3;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --green-950: #123b2b;
    --green-800: #17583b;
    --green-700: #1d7049;
    --green-100: #e8f3eb;
    --muted: #718078;
    --border: #e3ebe5;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at 85% 0, #e6f1e8 0, transparent 30rem),
        #f6f8f6;
}

a {
    color: var(--green-700);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #82c99e;
    outline-offset: 3px;
}

.site-header {
    background: var(--green-950);
    color: white;
    box-shadow: 0 4px 18px #123b2b20;
}

.header-inner {
    width: min(1200px, 100%);
    min-height: 82px;
    margin: 0 auto;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-mark {
    width: 96px;
    height: 96px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-copy {
    display: grid;
    gap: 3px;
}

.brand-copy strong {
    font-size: 15px;
    letter-spacing: .02em;
}

.brand-copy small {
    color: #c0d3c7;
    font-size: 11px;
}

nav {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 5px;
}

nav a {
    padding: 9px 11px;
    border-radius: 8px;
    color: #e0ebe4;
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

nav a:hover,
nav a:focus-visible {
    background: #ffffff18;
    color: white;
}

.site-main {
    width: min(1150px, 100%);
    flex: 1;
    margin: 0 auto;
    padding: 46px 28px 64px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    color: #172a21;
    font-size: clamp(28px, 4vw, 36px);
    letter-spacing: -.04em;
    line-height: 1.15;
}

h2 {
    color: #1b3326;
    letter-spacing: -.02em;
}

.dashboard-heading {
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--green-700);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.page-description {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 15px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
}

.stat-card {
    min-height: 212px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 16px #163c2610;
    transition: transform .18s ease, box-shadow .18s ease;
}

.stat-card:hover,
.shortcut-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px #163c2616;
}

.stat-heading {
    display: flex;
    align-items: center;
    gap: 11px;
}

.stat-icon,
.shortcut-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-100);
    color: var(--green-800);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.stat-label {
    color: #59685f;
    font-size: 13px;
    font-weight: 650;
}

.stat-value {
    margin: 19px 0 2px;
    color: #183c2a;
    font-size: clamp(29px, 4vw, 36px);
    font-weight: 750;
    letter-spacing: -.04em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.stat-description {
    margin-bottom: 15px;
    color: var(--muted);
    font-size: 13px;
}

.card-link {
    margin-top: auto;
    color: var(--green-700);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.card-link:hover {
    color: var(--green-950);
    text-decoration: underline;
}

.quick-actions {
    margin-top: 46px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin-bottom: 6px;
    font-size: 21px;
}

.section-heading p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    gap: 14px;
}

.shortcut-card {
    min-height: 90px;
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 3px 12px #163c260a;
    transition: transform .18s ease, box-shadow .18s ease;
}

.shortcut-card strong,
.shortcut-card small {
    display: block;
}

.shortcut-card strong {
    margin-bottom: 4px;
    color: #1c3427;
    font-size: 14px;
}

.shortcut-card small {
    color: var(--muted);
    font-size: 12px;
}

.btn,
a.btn,
button {
    min-height: 42px;
    padding: 11px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green-700);
    border-radius: 9px;
    background: var(--green-700);
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}

.btn:hover,
a.btn:hover,
button:hover {
    transform: translateY(-1px);
    background: var(--green-800);
}

form {
    max-width: 620px;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    box-shadow: 0 5px 18px #163c260d;
}

label {
    display: block;
    margin: 15px 0;
    color: #293d31;
    font-size: 13px;
    font-weight: 650;
}

input,
select {
    width: 100%;
    min-height: 43px;
    margin-top: 7px;
    padding: 10px 12px;
    border: 1px solid #d5dfd8;
    border-radius: 8px;
    background: #fff;
    color: #172a21;
    font: inherit;
    font-size: 14px;
}

input:focus,
select:focus {
    border-color: #57a477;
}

.cancel {
    margin-left: 14px;
}

.error,
span[data-valmsg-for] {
    color: #a12222;
}

.tablewrap {
    overflow: auto;
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    box-shadow: 0 5px 18px #163c260d;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9efea;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #f0f6f1;
    color: #375142;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

td {
    color: #34443a;
    font-size: 13px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #f8fbf8;
}

.site-footer {
    padding: 22px 28px;
    display: flex;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.site-footer span+span::before {
    content: "·";
    margin-right: 8px;
    color: #a0ada4;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d6e5db;
    font-size: 12px;
    white-space: nowrap;
}

.account-actions form {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.logout-button {
    min-height: 36px;
    padding: 8px 12px;
    border-color: #ffffff45;
    background: #ffffff12;
    font-size: 12px;
}

.logout-button:hover {
    background: #ffffff25;
}

.auth-shell {
    background:
        radial-gradient(ellipse at 86% 9%, #dff0fd 0, transparent 34rem),
        #f2f7fb;
}

.auth-main {
    width: 100%;
    flex: 1;
    display: grid;
    place-items: center;
    padding: 30px 24px;
}

.access-page {
    width: min(1120px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.06fr .94fr;
    overflow: hidden;
    border: 1px solid #e1e9ed;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 28px 80px #173a2621;
}

.access-showcase {
    position: relative;
    min-width: 0;
    padding: 32px 38px 205px;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 16% 5%, #e8f6ff 0, transparent 47%),
        linear-gradient(145deg, #fbfdff 0%, #edf7fc 63%, #e1f1f8 100%);
    color: #122d6d;
}

.access-institution {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 94px;
}

.access-institution img {
    width: 74px;
    height: 94px;
    object-fit: contain;
}

.access-institution-divider {
    width: 3px;
    height: 63px;
    border-radius: 3px;
    background: #2c963f;
}

.access-institution strong,
.access-institution small {
    display: block;
}

.access-institution strong {
    margin-bottom: 5px;
    color: #102865;
    font-size: clamp(16px, 2vw, 23px);
    letter-spacing: -.025em;
}

.access-institution small {
    color: #19366f;
    font-size: clamp(12px, 1.45vw, 16px);
    line-height: 1.3;
}

.access-intro {
    position: relative;
    z-index: 1;
    margin-top: 24px;
}

.access-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 5px 18px;
    border-radius: 999px;
    background: linear-gradient(100deg, #158b26, #38a51a);
    box-shadow: 0 4px 10px #237d2829;
    color: #fff;
    font-size: 16px;
    font-weight: 750;
}

.access-intro h1 {
    margin: 7px 0 5px;
    color: #102765;
    font-size: clamp(29px, 3.55vw, 43px);
    font-weight: 850;
    letter-spacing: -.06em;
    line-height: 1.04;
    white-space: nowrap;
}

.access-subtitle {
    width: fit-content;
    margin: 0;
    padding: 5px 15px;
    border: 2px solid #57ae33;
    border-radius: 999px;
    background: #ffffffeb;
    color: #183871;
    font-size: clamp(13px, 1.55vw, 17px);
    font-weight: 650;
}

.access-features {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 19px;
}

.access-feature {
    width: 112px;
    min-height: 83px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 1px solid #cce4e4;
    border-radius: 17px;
    background: #ffffffed;
    box-shadow: 0 3px 10px #173a2610;
    color: #16356e;
    font-size: 14px;
}

.access-feature svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: #258f20;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.access-feature-divider {
    width: 2px;
    height: 48px;
    border-radius: 2px;
    background: #6bb14b;
}

.access-photo {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 190px;
    background:
        linear-gradient(180deg, #f1f8f8 0%, #f1f8f800 24%),
        url("/images/dairy-products-photo.png") center 48% / cover no-repeat;
}

.access-panel {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 38px clamp(28px, 5vw, 58px) 92px;
    background:
        radial-gradient(ellipse at 50% 10%, #f7fbff 0, #fff 58%);
}

.access-panel-content {
    position: relative;
    z-index: 1;
    width: min(390px, 100%);
    text-align: center;
}

.access-dairy-mark {
    width: 178px;
    height: 112px;
    margin: 0 auto 2px;
}

.access-dairy-mark svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.access-dairy-mark path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
}

.access-dairy-mark .dairy-orbit,
.access-dairy-mark .dairy-grass {
    stroke: #58ae21;
}

.access-dairy-mark .dairy-grass {
    fill: #a5d737;
    stroke-width: 2;
}

.access-dairy-mark .dairy-cow {
    fill: #fff;
    stroke: #143b71;
}

.access-dairy-mark .dairy-detail {
    stroke: #173a69;
    stroke-width: 4;
}

.access-dairy-mark .dairy-blue {
    stroke: #1694a4;
}

.access-dairy-mark .dairy-cheese {
    fill: #ffd447;
    stroke: #e8ad00;
}

.access-panel h2 {
    margin: 0;
    color: #102b62;
    font-size: clamp(23px, 2.6vw, 31px);
    font-weight: 800;
    letter-spacing: -.04em;
}

.access-panel-subtitle {
    margin: 4px 0 22px;
    color: #234478;
    font-size: 16px;
}

.access-login-form {
    width: 100%;
    max-width: none;
    display: grid;
    gap: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
}

.access-login-form .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.access-error {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #efb6b6;
    border-radius: 10px;
    background: #fff7f7;
    color: #a12222;
    font-size: 13px;
}

.access-error.validation-summary-valid {
    display: none;
}

.access-error ul {
    margin: 0;
    padding-left: 18px;
}

.access-field {
    position: relative;
}

.access-field > svg {
    position: absolute;
    top: 50%;
    left: 17px;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    fill: none;
    stroke: #184276;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.access-field input {
    width: 100%;
    height: 50px;
    min-height: 50px;
    margin: 0;
    padding: 0 46px;
    border: 1px solid #dce4ec;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 3px 9px #19334a18;
    color: #193b6c;
    font-size: 15px;
}

.access-field input::placeholder {
    color: #858b94;
}

.access-field input:focus {
    border-color: #77bd35;
    outline: 3px solid #77bd352b;
}

.access-field .field-error {
    display: block;
    margin: 5px 14px 0;
    color: #a12222;
    font-size: 12px;
}

.access-field .field-error:not(:empty) {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    clip-path: none;
}

.access-field .field-validation-valid {
    display: none;
}

.access-password input {
    padding-right: 50px;
}

.access-password-toggle {
    position: absolute;
    top: 0;
    right: 8px;
    width: 38px;
    height: 50px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #74808a;
    cursor: pointer;
}

.access-password-toggle:hover {
    transform: none;
    background: transparent;
    color: #183e6f;
}

.access-password-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.access-password-toggle[aria-pressed="true"] .access-eye-slash {
    display: none;
}

.access-submit {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 0 18px;
    border: 1px solid #29900d;
    border-radius: 999px;
    background: linear-gradient(100deg, #70bb00, #27880b);
    box-shadow: 0 6px 14px #367d2030;
    color: #fff;
    font-size: 15px;
    font-weight: 750;
}

.access-submit:hover {
    transform: translateY(-1px);
    background: linear-gradient(100deg, #62a900, #217608);
}

.access-submit svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.access-farm {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 76px;
    overflow: hidden;
    color: #54a721;
    pointer-events: none;
}

.access-farm svg {
    width: 100%;
    height: 100%;
}

.access-farm path:first-child {
    fill: #d9efaa;
}

.access-farm path:not(:first-child) {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

@media (max-width: 780px) {
    .access-page {
        grid-template-columns: 1fr;
        width: min(560px, 100%);
    }

    .access-showcase {
        min-height: 570px;
        padding: 28px 34px 205px;
    }

    .access-panel {
        min-height: 590px;
    }
}

@media (max-width: 540px) {
    .auth-main {
        padding: 14px;
    }

    .access-page {
        width: 100%;
        border-radius: 22px;
    }

    .access-showcase {
        min-height: 510px;
        padding: 24px 20px 174px;
    }

    .access-institution {
        gap: 10px;
    }

    .access-institution img {
        width: 61px;
        height: 82px;
    }

    .access-institution-divider {
        height: 52px;
    }

    .access-institution strong {
        font-size: 16px;
    }

    .access-institution small {
        font-size: 12px;
    }

    .access-intro {
        margin-top: 23px;
    }

    .access-kicker {
        min-height: 31px;
        padding: 5px 13px;
        font-size: 14px;
    }

    .access-intro h1 {
        margin-top: 10px;
        font-size: clamp(26px, 8vw, 36px);
        white-space: normal;
    }

    .access-subtitle {
        padding: 5px 10px;
        font-size: 12px;
    }

    .access-features {
        gap: 7px;
        margin-top: 17px;
    }

    .access-feature {
        width: min(29%, 104px);
        min-height: 74px;
        border-radius: 14px;
        font-size: 12px;
    }

    .access-feature svg {
        width: 29px;
        height: 29px;
    }

    .access-feature-divider {
        height: 40px;
    }

    .access-photo {
        height: 155px;
    }

    .access-panel {
        min-height: 530px;
        padding: 35px 24px 90px;
    }

    .access-dairy-mark {
        width: 158px;
        height: 100px;
    }

    .access-panel h2 {
        font-size: 26px;
    }

    .access-panel-subtitle {
        margin-bottom: 21px;
        font-size: 14px;
    }

    .access-login-form {
        gap: 13px;
    }

    .access-field input {
        height: 52px;
        min-height: 52px;
    }

    .access-password-toggle {
        height: 52px;
    }

    .access-submit {
        height: 52px;
    }
}

@media (max-width: 780px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    nav {
        justify-content: flex-start;
    }

    .site-main {
        padding-top: 34px;
    }

    .account-actions {
        align-self: stretch;
        justify-content: space-between;
    }

}

@media (max-width: 540px) {
    .header-inner {
        padding: 13px 18px;
    }

    nav {
        width: 100%;
        gap: 2px;
    }

    nav a {
        padding: 8px 9px;
        font-size: 12px;
    }

    .site-main {
        padding: 30px 18px 46px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-heading .btn {
        width: 100%;
    }

    .stat-card {
        min-height: 190px;
    }

    .site-footer {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .site-footer span+span::before {
        content: none;
    }

    .auth-main {
        padding: 16px;
        place-items: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
