@font-face {
    font-family: WeatherSerif;
    src: url('/fonts/weather-protect-serif.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}
:root {
    --rz-primary: #d92125;
    --rz-primary-dark: #b7191c;
    --rz-primary-light: #fbeeee;
    --rz-on-primary: #fff;
    --rz-text-font-family: 'Segoe UI', Arial, sans-serif;
    --rz-body-background-color: #f5f5f5;
    --rz-border-radius: 4px;
    --brand: #d92125;
    --brand-dark: #b7191c;
    --ink: #222;
    --muted: #666;
    --line: #e1e1e1;
    --paper: #fff;
    --bg: #f5f5f5;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand-dark); text-underline-offset: 4px; }
a:hover { color: #971114; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--brand); outline-offset: 4px;
}
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner {
    width: min(1200px, 100%); margin: 0 auto; padding: 8px 36px;
    display: flex; align-items: center; gap: 18px; min-height: 76px;
}
.brand { display: block; flex-shrink: 0; line-height: 0; }
.weather-logo { display: block; width: 48px; height: auto; }
.portal-identity { border-left: 1px solid var(--line); padding-left: 18px; }
.portal-identity span { display: block; font-size: 8px; letter-spacing: 1.2px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.portal-identity strong { font-family: WeatherSerif, Georgia, serif; font-size: 17px; line-height: 1.3; }
.rada-logo { display: block; width: 156px; height: auto; margin-left: auto; object-fit: contain; }
.site-nav {
    display: flex; gap: 30px; flex-wrap: wrap; align-items: center;
    width: min(1128px, calc(100% - 72px)); margin: 0 auto;
    border-top: 1px solid #eee; padding: 15px 0;
}
.site-nav a, .site-nav .link-button { color: #333; font-size: 13px; text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav .link-button:hover { color: var(--brand); text-decoration: underline; }
.nav-account-actions { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav .nav-account-actions form { margin: 0; }
.page-shell { width: min(1200px, 100%); margin: 0 auto; flex: 1; padding: 40px 36px 56px; }
.site-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 23px max(36px, calc((100vw - 1128px) / 2)); border-top: 1px solid var(--line);
    color: var(--muted); background: #fff; font-size: 11px; line-height: 1.5;
}
.site-footer > span:first-child { font-weight: 600; color: #444; }
.site-footer span[aria-hidden] { margin: 0 9px; color: var(--brand); }
.footer-user { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; max-width: 50%; }
.footer-user .rzi { font-size: 16px; flex-shrink: 0; }
.footer-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farmer-thumbnail { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; vertical-align: middle; }
.farmer-thumbnail-placeholder { display: inline-flex; align-items: center; justify-content: center; background: #eee; color: #777; }
.farmer-thumbnail-placeholder .rzi { font-size: 26px; }
.rz-dialog.farmer-details-modal { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border-radius: 8px; }
.farmer-details-modal .rz-dialog-content { overflow: auto; padding: 20px; }
.farmer-dialog-profile { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
.farmer-portrait { width: 180px; height: 220px; object-fit: contain; background: #f5f5f5; border: 1px solid var(--line); }
.farmer-portrait.farmer-thumbnail-placeholder .rzi { font-size: 72px; }
.farmer-dialog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.farmer-dialog-fields .rz-form-field { width: 100%; min-width: 0; }
@media (max-width: 650px) {
    .farmer-dialog-profile { grid-template-columns: 1fr; gap: 18px; }
    .farmer-portrait { justify-self: center; }
}
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: WeatherSerif, Georgia, serif; font-weight: 700; }
h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.2; letter-spacing: -.7px; margin-bottom: 13px; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 22px; }
h3 { font-size: 18px; line-height: 1.4; }
p { line-height: 1.65; }
.eyebrow { color: var(--brand); font-size: 10px; line-height: 1.5; letter-spacing: 1.9px; font-weight: 700; margin-bottom: 13px; }
.muted { color: var(--muted); font-size: 14px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.page-heading p:last-child { margin-bottom: 0; }
.workspace-tag { color: #555; background: #fff; border: 1px solid #ddd; padding: 9px 12px; border-radius: 4px; font-size: 10px; font-weight: 600; letter-spacing: 1.2px; }
.card { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: 0 5px 18px #00000003; }
.search-card { padding: 28px 30px; }
.search-tabs { display: flex; gap: 28px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.tab { color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 0 15px; margin-bottom: -1px; font-size: 14px; font-weight: 600; }
.tab.selected { color: var(--brand); border-bottom-color: var(--brand); }
input::placeholder { color: #888; font-size: 13px; }
select:disabled { background: #f4f4f4; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--brand); border-radius: 4px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.button:hover { color: #fff; background: var(--brand-dark); border-color: var(--brand-dark); }
.button.secondary { color: #333; background: #fff; border-color: #ccc; font-weight: 600; }
.button.secondary:hover { background: #f3f3f3; }
.link-button { padding: 0; border: 0; background: none; color: var(--brand-dark); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.full-width { width: 100%; margin-top: 26px; }
.portal-field { width: 100%; min-width: 0; }
.account-fields { display: flex; flex-direction: column; gap: 18px; }
.account-fields > .rz-button { align-self: flex-start; margin-top: 4px; }
.account-fields > .full-width { align-self: stretch; margin-top: 0; }
.account-fields .help-text { margin: 0; }
.portal-field .rz-textbox, .portal-field .rz-password, .portal-field .rz-dropdown { width: 100%; }
.password-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #555; cursor: pointer; }
.password-toggle:hover { background: #00000008; color: var(--brand); }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.login-card input::-ms-reveal, .change-password-dialog input::-ms-reveal { display: none; }
.rz-button { text-transform: none; letter-spacing: .1px; font-weight: 600; min-height: 42px; }
.rz-button.rz-variant-filled.rz-primary { background: var(--brand); color: #fff; }
.rz-button.rz-variant-filled.rz-primary:hover { background: var(--brand-dark); }
.rz-button .rz-button-box { gap: 8px; }
[data-sign-in-spinner][hidden], [data-sign-in-arrow][hidden] { display: none !important; }
.portal-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.portal-link .rzi { font-size: 19px; }
.status-control { display: flex; align-items: center; gap: 10px; padding: 12px; }
.status-control label { margin: 0; }
.rz-dialog.account-list-dialog, .rz-dialog.account-editor-dialog, .rz-dialog.account-delete-dialog { max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border-radius: 8px; }
.account-list-dialog .rz-dialog-content, .account-editor-dialog .rz-dialog-content, .account-delete-dialog .rz-dialog-content { overflow: auto; padding: 20px; }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.dialog-fields { display: grid; gap: 14px; }
.dialog-fields .rz-form-field { width: 100%; min-width: 0; }
.dialog-fields .help-text { margin: 0; }
.dialog-unlock { border-top: 1px solid var(--line); padding-top: 16px; }
.user-editor-dialog .rz-tabview-panel { padding: 16px 0 0; }
.row-actions { display: flex; gap: 4px; flex-wrap: nowrap; }
.row-actions .rz-button { min-height: 34px; }
.user-list-dialog .rz-badge { margin: 2px; }
.user-list-dialog .rz-alert, .user-editor-dialog .rz-alert, .delete-user-dialog .rz-alert { margin-bottom: 14px; }
.rz-data-grid { min-width: 0; max-width: 100%; }
.rz-data-grid .rz-badge { margin: 2px; }
.pagination-actions { display: flex; gap: 8px; }
.search-tabs .rz-button { padding: 10px 0; min-height: 44px; border-radius: 0; }
.search-tabs .rz-button.selected { color: var(--brand); border-bottom: 3px solid var(--brand); }
.site-nav .rz-button { min-height: 30px; padding: 0; font-weight: 500; font-size: 13px; color: #333; }
.login-card .account-fields { gap: 20px; }
.login-card .rz-button { min-height: 48px; }
.rz-form-field label { font-family: 'Segoe UI', Arial, sans-serif; }
.sign-in-button:disabled { opacity: 1; background: var(--brand-dark); border-color: var(--brand-dark); cursor: wait; }
.sign-in-spinner:not([hidden]) { display: inline-block; animation: sign-in-spin .7s linear infinite; }
@keyframes sign-in-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sign-in-spinner { animation: none !important; } }
.help-text { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 9px 0 0; }
.id-search { display: grid; grid-template-columns: minmax(200px, 520px) auto; align-items: end; justify-content: start; column-gap: 24px; row-gap: 9px; }
.id-search > .help-text { grid-column: 1; grid-row: 2; margin: 0; }
.id-search label, .search-fields label { margin-top: 0; }
.id-search > .rz-button { margin: 0; }
.search-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.search-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 23px; }
.search-footer .help-text { margin: 0; }
.result-card { margin-top: 26px; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.results-heading h2 { margin-bottom: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { padding: 14px 11px; border-top: 1px solid var(--line); background: #f5f5f5; color: #555; font-size: 11px; font-weight: 600; white-space: nowrap; }
td { padding: 17px 11px; border-bottom: 1px solid #eee; vertical-align: middle; }
tbody tr:hover { background: #fafafa; }
.nowrap { white-space: nowrap; }
.badge { display: inline-block; margin: 2px; padding: 3px 8px; color: #444; background: #f3f3f3; border: 1px solid #ddd; border-radius: 4px; font-size: 11px; }
.count { margin-left: 6px; color: var(--muted); font-family: 'Segoe UI', Arial, sans-serif; font-size: 13px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; }
.pagination .button { margin-left: 8px; padding: 8px 14px; min-height: 36px; font-size: 12px; }
.pagination .muted { font-size: 12px; }
.empty-state { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: #444; margin: 12px 0 8px; }
.empty-state p { font-size: 13px; }
.empty-icon { display: inline-grid; place-items: center; width: 55px; height: 55px; border: 1px solid #ead2d2; border-radius: 50%; background: #fbeeee; color: var(--brand); font-size: 35px; }
.back-link { display: inline-block; margin-bottom: 22px; font-size: 13px; }
.farmer-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin: 26px 0 5px; }
.farmer-details div { border-top: 1px solid var(--line); padding-top: 18px; }
.farmer-details dt { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.farmer-details dd { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.login-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 80px; align-items: center; max-width: 1060px; margin: 14px auto 0; }
body:has(.login-layout) { background: #fff; }
.login-intro { padding-top: 12px; }
.login-intro h1 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.16; letter-spacing: -.8px; margin: 16px 0 20px; }
.login-intro > p:not(.eyebrow) { color: #555; max-width: 420px; font-size: 15px; line-height: 1.75; margin-bottom: 24px; }
.login-visual { height: 238px; position: relative; background: #f0f0f0; border-radius: 6px; overflow: hidden; margin-top: 26px; }
.login-visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.login-card { padding: 34px 36px; border-top: 3px solid var(--brand); background: #fff; box-shadow: 0 12px 35px #00000006; }
.login-card h2 { font-size: 32px; margin-bottom: 9px; }
.login-card > .muted { margin-bottom: 26px; font-size: 13px; }
.login-help { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.login-help strong { font-size: 12px; font-weight: 600; }
.login-help p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.account-card { max-width: 530px; margin: 30px auto; }
.account-card .button { margin-top: 22px; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
.admin-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1000px; }
.admin-grid .button { margin-top: 22px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 24px 0; }
.checkbox-row input { width: 17px; height: 17px; }
hr { margin: 30px 0; border: 0; border-top: 1px solid var(--line); }
.notice { padding: 17px 20px; border: 1px solid #ddd; border-radius: 5px; margin: 23px 0; color: #444; background: #f3f3f3; font-size: 14px; }
.notice.error { color: #a42024; background: #fff2f2; border-color: #edc7c7; }
.notice .link-button { margin-left: 12px; }
.validation-summary { color: #a42024; font-size: 13px; }
.validation-summary ul { padding-left: 20px; line-height: 1.7; }
.validation-summary-valid { display: none; }
.input-validation-error, .invalid { border-color: #c72b2f !important; }
.validation-message { color: #a42024; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
#blazor-error-ui { display: none; background: #fff0d0; box-shadow: 0 -1px 2px #0002; bottom: 0; left: 0; padding: 15px 30px; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 14px; top: 15px; }
@media (max-width: 1050px) {
    .login-layout { gap: 40px; }
    .login-intro h1 { font-size: 39px; }
    .search-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
    .header-inner { padding: 8px 26px; gap: 16px; }
    .portal-identity { padding-left: 16px; }
    .portal-identity strong { font-size: 16px; }
    .portal-identity span { font-size: 8px; }
    .rada-logo { width: 148px; }
    .page-shell { padding: 32px 26px 44px; }
    .login-layout { gap: 30px; grid-template-columns: 1fr 1fr; }
    .login-visual { display: none; }
    .login-intro h1 { font-size: 35px; }
    .login-card { padding: 28px; }
    .farmer-details { grid-template-columns: repeat(2, 1fr); }
    .site-footer { padding: 22px 26px; }
}
@media (max-width: 650px) {
    .header-inner { padding: 8px 20px; gap: 16px; min-height: 70px; }
    .weather-logo { width: 44px; }
    .portal-identity { display: none; }
    .rada-logo { width: min(140px, 58%); }
    .site-nav { width: calc(100% - 40px); gap: 18px; row-gap: 14px; padding: 14px 0; }
    .site-nav a, .site-nav .link-button { font-size: 12px; }
    .nav-account-actions { gap: 18px; }
    .page-shell { padding: 28px 20px 40px; }
    .page-heading { margin-bottom: 23px; }
    .workspace-tag { display: none; }
    .card, .search-card { padding: 22px; }
    .search-fields, .admin-grid.equal, .farmer-details, .id-search, .login-layout { grid-template-columns: 1fr; }
    .login-layout { margin: 0 auto; gap: 24px; max-width: 440px; }
    .login-intro { padding: 0 3px; }
    .login-intro h1 { font-size: 32px; margin-bottom: 16px; }
    .login-intro > p:not(.eyebrow) { font-size: 14px; margin-bottom: 0; }
    .login-card { padding: 25px; }
    .login-card h2 { font-size: 30px; }
    .login-card > .muted { margin-bottom: 22px; }
    .search-footer, .pagination { align-items: flex-start; flex-direction: column; }
    .id-search { gap: 14px; }
    .id-search > .rz-button { grid-row: 3; justify-self: start; }
    .pagination .button { margin: 0 8px 0 0; }
    .search-tabs { gap: 22px; }
    .site-footer { padding: 21px 20px; font-size: 10px; flex-direction: column; align-items: flex-start; gap: 6px; }
    .account-card { margin-top: 0; }
}
/* Keep search controls and the initial prompt within shorter laptop screens. */
@media (min-width: 801px) and (max-height: 800px) {
    .page-shell:has(> .search-card) { padding-top: 12px; padding-bottom: 12px; }
    body:has(.search-card) .site-footer { padding-top: 10px; padding-bottom: 10px; }
    .search-card { padding: 20px 26px; }
    .search-card > h2 { margin-bottom: 12px; }
    .search-card .search-tabs { margin-bottom: 16px; }
    .search-card .search-footer { margin-top: 16px; }
    .page-shell:has(> .search-card) .empty-state {
        display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px;
        align-items: center; max-width: 540px; margin: 12px auto 0; padding: 10px 0; text-align: left;
    }
    .page-shell:has(> .search-card) .empty-icon { grid-row: 1 / 3; width: 44px; height: 44px; font-size: 26px; }
    .page-shell:has(> .search-card) .empty-state h2 { font-size: 20px; margin: 0 0 4px; }
    .page-shell:has(> .search-card) .empty-state p { margin: 0; }
}
/* Keep the full-size login photograph in view on shorter laptop screens. */
@media (min-width: 801px) and (max-height: 800px) {
    body:has(.login-layout) .page-shell { display: flex; align-items: center; padding-top: 8px; padding-bottom: 8px; }
    body:has(.login-layout) .site-footer { padding-top: 9px; padding-bottom: 9px; }
    .login-layout { width: 100%; margin-top: 0; }
    .login-intro { padding-top: 0; }
    .login-intro .eyebrow { margin-bottom: 0; }
    .login-intro h1 { font-size: 36px; margin: 8px 0 10px; }
    .login-intro > p:not(.eyebrow) { font-size: 14px; line-height: 1.6; margin-bottom: 0; }
    .login-visual { margin-top: 16px; }
    .login-card { padding: 16px 36px; }
    .login-card .eyebrow { margin-bottom: 6px; }
    .login-card h2 { font-size: 28px; margin-bottom: 6px; }
    .login-card > .muted { margin-bottom: 12px; }
    .login-card label { margin: 12px 0 6px; }
    .login-card label:first-of-type { margin-top: 0; }
    .login-card .full-width { margin-top: 16px; }
    .login-help { margin-top: 10px; padding-top: 8px; }
    .login-help p { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

