/* A. DESIGN TOKENS: shared colours and browser-wide defaults. */
@font-face {
  font-family: "Anek Telugu";
  font-style: normal;
  font-weight: 400;
  font-stretch: 90%;
  font-display: swap;
  src: url("/static/assets/anek-telugu.woff2") format("woff2");
  unicode-range: U+0951-0952, U+0964-0965, U+0B83, U+0C00-0C7F, U+1CD5-1CD6, U+1CD8, U+1CDA, U+1CF2, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Anek Devanagari";
  font-style: normal;
  font-weight: 400;
  font-stretch: 90%;
  font-display: swap;
  src: url("/static/assets/anek-devanagari.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B0A;
}

:root {
  color-scheme: light;
  --ink: #202b25;
  --muted: #78817a;
  --line: #e9ece6;
  --paper: #f7f8f4;
  --white: #fff;
  --green: #34694c;
  --green-dark: #28563d;
  --green-pale: #eaf2eb;
  --amber: #bd792d;
  --amber-pale: #fff3df;
  --blue: #587b93;
  --blue-pale: #eaf2f6;
  --red: #b94b40;
  --red-pale: #fff0eb;
  --shadow: 0 14px 42px rgba(36, 54, 42, .055);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); }
html:lang(hi) {
  font-family: "Anek Devanagari", "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", sans-serif;
  font-stretch: 90%;
  font-synthesis: weight;
}
html:lang(te) {
  font-family: "Anek Telugu", "Noto Sans Telugu", "Nirmala UI", "Segoe UI", sans-serif;
  font-stretch: 90%;
  font-synthesis: weight;
}
html:lang(hi) .help-card strong, html:lang(te) .help-card strong { font-family: inherit; }
html:lang(hi) body, html:lang(te) body { line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%);
}
.language-picker { display: inline-flex; align-items: center; gap: 7px; color: #78817a; font-size: 11px; }
.language-picker-compact { gap: 0; }
.language-select {
  min-width: 82px; min-height: 34px; padding: 5px 8px; color: var(--ink);
  background: #fff; border: 1px solid #e4e9e2; border-radius: 7px;
}
.language-select option:lang(hi) {
  font-family: "Anek Devanagari", "Noto Sans Devanagari", "Nirmala UI", "Segoe UI", sans-serif;
}
.language-select option:lang(te) {
  font-family: "Anek Telugu", "Noto Sans Telugu", "Nirmala UI", "Segoe UI", sans-serif;
}
.site-timezone-label { color: var(--muted); font-size: .8em; }

.app-shell { min-height: 100vh; }

/* B. SIGNED-IN APP FRAME: sidebar, navigation, and account area. */
.sidebar {
  position: fixed; z-index: 5; inset: 0 auto 0 0; display: flex; width: 254px;
  flex-direction: column; padding: 30px 18px 18px; background: #f5f8f3;
  border-right: 1px solid #dfe7dd;
}
.brand { display: inline-flex; align-items: center; gap: 8px; width: fit-content; margin: 0 0 48px 9px; text-decoration: none; color: var(--ink); }
.brand-mark { display: block; width: 34px; height: 34px; flex: 0 0 auto; object-fit: contain; background: #fff; border-radius: 8px; }
.brand-copy { display: flex; flex-direction: column; gap: 3px; }
.brand-name { color: var(--green-dark); font: 800 21px/1 "Trebuchet MS", "Segoe UI", sans-serif; letter-spacing: 1.1px; }
.brand-origin { color: #899189; font-size: 9px; font-weight: 600; letter-spacing: .2px; }
.workspace-label, .eyebrow { color: #98a198; font-size: 9px; font-weight: 700; letter-spacing: 1.4px; }
.workspace-label { margin: 0 10px 10px; }
.site-switcher-label { margin: 0 10px 6px; color: #899189; font-size: 11px; }
.site-select { width: 100%; padding: 11px 12px; color: var(--ink); background: #f8f9f6; border: 1px solid #eaede7; border-radius: 9px; outline-color: var(--green); font-size: 12px; font-weight: 600; }
.side-nav { display: grid; gap: 5px; margin-top: 31px; }
.nav-item { display: flex; min-height: 43px; align-items: center; gap: 12px; padding: 0 11px; color: #6e786f; background: transparent; border: 0; border-radius: 8px; text-align: left; font-size: 12px; font-weight: 600; cursor: pointer; transition: .18s ease; }
.nav-item:hover { color: var(--green); background: #edf3ec; }
.nav-item.is-active { color: var(--green-dark); background: #e6f0e5; }
.nav-item-audit { position: relative; margin-top: 8px; }
.nav-item-audit:before { position: absolute; top: -7px; right: 11px; left: 11px; border-top: 1px solid #e3e9e2; content: ""; }
.nav-icon { display: grid; width: 19px; height: 19px; place-items: center; }
.nav-icon svg, .metric-icon svg { width: 17px; height: 17px; }
.nav-count { margin-left: auto; color: #9d6b2c; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.help-card { position: relative; overflow: hidden; margin: 0 2px 19px; padding: 17px 15px; background: #f7f5ed; border: 1px solid #eeece2; border-radius: 11px; }
.help-card:after { position: absolute; right: -15px; bottom: -33px; width: 77px; height: 77px; border: 1px solid #e7e2d3; border-radius: 50%; content: ""; }
.help-spark { display: block; margin-bottom: 12px; color: #9b865d; font-size: 20px; }
.help-card strong { display: block; font: 700 12px Manrope, sans-serif; }
.help-card p { max-width: 145px; margin: 5px 0 0; color: #7d8379; font-size: 10px; line-height: 1.55; }
.profile-button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 4px 2px; background: transparent; border: 0; border-top: 1px solid #edf0eb; text-align: left; cursor: pointer; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: #5c745f; background: #e6ece3; border: 1px solid #dbe4d8; border-radius: 50%; font: 700 12px Manrope, sans-serif; }
.profile-copy { display: grid; gap: 3px; min-width: 0; }
.profile-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: #8b948b; font-size: 10px; text-transform: capitalize; }
.logout-glyph { margin-left: auto; color: #99a19a; font-size: 16px; }

/* C. PAGE HEADER AND CONTENT: breadcrumbs, buttons, and page spacing. */
.main-content {
  position: relative; isolation: isolate; min-height: 100vh; margin-left: 254px;
  background-color: #edf3ec;
}
.workspace-background-wave {
  --login-wave-sage: 52,105,76; --login-wave-sage-light: 52,105,76;
  --login-wave-earth: 189,121,45; --login-wave-earth-light: 189,121,45;
  position: fixed; z-index: -1; top: 27vh; left: 254px; display: block;
  width: calc(100vw - 254px); height: 72vh; opacity: .48; pointer-events: none;
}
.workspace-wave {
  --login-wave-sage: 52,105,76; --login-wave-sage-light: 255,255,255;
  --login-wave-earth: 189,121,45; --login-wave-earth-light: 189,121,45;
  position: absolute; z-index: 0; inset: 0; display: block;
  width: 100%; height: 100%; opacity: .42; pointer-events: none;
}
.topbar { position: sticky; z-index: 4; top: 0; display: flex; height: 67px; align-items: center; justify-content: space-between; padding: 0 46px; background: rgba(250,252,248,.94); border-bottom: 1px solid #dfe7dd; backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #718074; font-size: 11px; }
.breadcrumbs strong { color: #26352b; font-weight: 600; }
.crumb-slash { color: #aab5aa; }
.topbar-right { display: flex; align-items: center; gap: 19px; }
.mobile-logout-button { display: none; }
.mobile-site-picker { display: none; }
.live-status { display: flex; align-items: center; gap: 7px; color: #617267; font-size: 10px; }
.live-status i { width: 6px; height: 6px; background: #68a677; border-radius: 50%; box-shadow: 0 0 0 3px #e7f2e8; }
.live-status.is-offline { color: #93483e; }
.live-status.is-offline i { background: #c35649; box-shadow: 0 0 0 3px #f8e1dc; }
.topbar-date { color: #6d7b70; font-size: 10px; }
.avatar-small { width: 29px; height: 29px; font-size: 10px; }
.page-wrap { max-width: 1380px; margin: 0 auto; padding: 38px 46px 22px; }
.offline-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 11px 14px; color: #704b16; background: #fff4dc; border: 1px solid #ecd7ac; border-radius: 9px; font-size: 11px; }
.offline-banner p { margin: 0; line-height: 1.5; }
.offline-banner.is-offline { color: #843c32; background: #fff0eb; border-color: #efc9c0; }
.offline-banner.is-syncing { color: #395c73; background: #edf5f8; border-color: #cfe0e8; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 27px; }
.page-heading .eyebrow { margin: 0 0 10px; }
h1, h2, p { margin-top: 0; }
.page-heading .eyebrow { color: #5d805b; }
.page-heading h1 { margin: 0; color: #1e2c22; font: 700 clamp(25px, 2.2vw, 34px)/1.2 Manrope, sans-serif; letter-spacing: -1.6px; }
.page-heading h1 span { color: #547c43; }
.page-subtitle { margin: 8px 0 0; color: #66776a; font-size: 12px; }
.site-entitlement-status { margin: 6px 0 0; color: #55725c; font-size: 11px; font-weight: 600; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--green); box-shadow: 0 4px 9px rgba(52,105,76,.11); }
.button-primary:hover { background: var(--green-dark); }
.button-plus { font-size: 18px; font-weight: 400; line-height: 0; }
.button-quiet { color: #606a61; background: #f5f6f2; border-color: #e6e9e3; }
.button-quiet:hover { background: #edf0e9; }
.button-wide { width: 100%; min-height: 47px; justify-content: space-between; margin-top: 8px; padding: 0 17px; }

/* D. OVERVIEW CARDS: weekly checks, action count, certificates, safe rate. */
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .panel { background: var(--white); border: 1px solid #eaede7; border-radius: 11px; box-shadow: var(--shadow); }
.metric-card { min-height: 137px; padding: 17px 18px 14px; }
.metric-card-link { display: block; width: 100%; font: inherit; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.metric-card-link:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(36,54,42,.12); }
.metric-card-link:focus-visible { position: relative; z-index: 1; outline: 3px solid #76a878; outline-offset: 3px; }
.metric-primary {
  position: relative; overflow: hidden; isolation: isolate;
  color: #fff; border-color: #2e6445;
  background:
    radial-gradient(circle at 100% 0, rgba(184, 216, 169, .36), transparent 42%),
    linear-gradient(130deg, #1d4b35, #326c49 62%, #4c8058);
}
.metric-primary::after {
  position: absolute; z-index: -1; right: -34px; bottom: -74px;
  width: 168px; height: 168px; border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%; content: "";
}
.metric-primary .metric-top { color: #fff; }
.metric-primary .metric-icon { color: #f4fff1; background: rgba(255, 255, 255, .16); }
.metric-primary .metric-value { color: #fff; }
.metric-primary .metric-foot { color: #fff; }
.metric-primary .metric-go-arrow { color: #d7edbd; margin-left: auto; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #7b857c; font-size: 10px; font-weight: 600; }
.metric-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; }
.icon-green { color: #4b795a; background: #e3eee3; }
.icon-amber { color: #b27a36; background: #fbefdc; }
.icon-blue { color: #648198; background: #e8f0f4; }
.metric-value { margin-top: 12px; font: 700 30px/1 Manrope, sans-serif; letter-spacing: -1.5px; }
.metric-value small { margin-left: 2px; color: #879288; font: 600 15px "DM Sans", sans-serif; }
.metric-foot { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: #9aa19a; font-size: 9px; }
.metric-overdue { color: #a9473e; font-weight: 700; }
.metric-overdue.is-overdue { color: #a9473e; }
.metric-go-arrow { flex: 0 0 auto; margin-left: 7px; color: #78877c; font-size: 12px; transition: transform .15s; }
.metric-card-link:hover .metric-go-arrow { transform: translate(2px, -2px); }
.metric-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; }
.amber-dot { background: #d6a15e; }
.blue-dot { background: #87a4b6; }
.green-dot { background: #82aa7d; }

/* E. DASHBOARD PANELS: activity chart, alerts, and recent-check table. */
.daily-progress-panel { margin-top: 16px; }
.daily-progress-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.daily-progress-count { display: flex; align-items: baseline; gap: 7px; padding: 12px; background: linear-gradient(135deg, #f3f8f2, #fbfcfa); border: 1px solid #e4ede1; border-radius: 8px; }
.daily-progress-count strong { color: #435b48; font: 700 21px/1 Manrope, sans-serif; }
.daily-progress-count span { color: #7b857c; font-size: 10px; }
.inspection-ready { margin-top: 12px; padding: 12px; color: #3f6245; background: #eff6ed; border: 1px solid #dfeadd; border-radius: 8px; }
.inspection-ready strong { font: 700 12px Manrope, sans-serif; }
.inspection-ready p { margin: 5px 0 0; color: #69786b; font-size: 10px; line-height: 1.5; }
.audit-pack-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 20px; }
.audit-pack-form label { display: grid; gap: 6px; color: #78817a; font-size: 10px; font-weight: 700; }
.audit-pack-form input:not([type=checkbox]):not([type=radio]) { width: 100%; min-height: 44px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid #e3e8e0; border-radius: 8px; font: inherit; }
.audit-date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.audit-mode-options, .audit-layout-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; min-width: 0; margin: 0; padding: 0; border: 0; }
.audit-section-options { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.audit-mode-options legend, .audit-section-options legend, .audit-layout-options legend { grid-column: 1 / -1; margin-bottom: 1px; padding: 0; color: #56665a; font-size: 11px; font-weight: 700; }
.audit-pack-form .audit-mode-card { display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 62px; padding: 12px; color: #616c63; background: #fff; border: 1px solid #dfe7df; border-radius: 9px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.audit-pack-form .audit-mode-card.is-selected { background: #f8faf7; border-color: #c5d5c7; }
.audit-mode-card input[type=radio] { width: 16px; height: 16px; min-height: 16px; flex: 0 0 16px; margin: 2px 0 0; padding: 0; accent-color: var(--green); }
.audit-mode-card span { display: grid; gap: 4px; }
.audit-mode-card strong { color: #435b48; font-size: 11px; line-height: 1.4; }
.audit-mode-card small { color: #7e8a80; font-size: 10px; font-weight: 400; line-height: 1.45; }
.audit-mode-card:focus-within { outline: 2px solid #8eae93; outline-offset: 2px; }
.audit-section-card { display: flex !important; align-items: flex-start; gap: 10px !important; min-width: 0; min-height: 46px; padding: 10px 4px; color: #616c63 !important; background: transparent; border: 0; border-bottom: 1px solid #edf0ed; border-radius: 0; cursor: pointer; transition: background .15s; }
.audit-section-card:hover { background: #f8faf8; }
.audit-section-card input[type=checkbox] { width: 17px; min-height: 17px; flex: 0 0 auto; margin: 2px 0 0; padding: 0; accent-color: var(--green); }
.audit-section-card span { display: grid; gap: 4px; }
.audit-section-card strong { color: #59665c; font-size: 11px; line-height: 1.4; }
.audit-section-card.is-selected strong { color: #3e5543; }
.audit-section-card small { color: #7e8a80; font-size: 10px; font-weight: 400; line-height: 1.45; }
.audit-section-card:focus-within { outline: 2px solid #8eae93; outline-offset: 2px; }
.audit-section-note { margin: 9px 0 0; padding-top: 8px; color: #7e8a80; border-top: 1px solid #edf0ed; font-size: 10px; line-height: 1.5; }
.audit-photo-option { display: flex !important; align-items: flex-start; gap: 10px !important; padding: 12px; color: #616c63 !important; background: #f7f8f5; border: 1px solid #e6e9e3; border-radius: 9px; font-weight: 500 !important; line-height: 1.5; }
.audit-pack-form .audit-photo-option input[type=checkbox] { width: 17px; min-height: 17px; flex: 0 0 auto; margin: 2px 0 0; padding: 0; accent-color: var(--green); }
.audit-photo-option span { display: grid; gap: 3px; }
.audit-photo-option strong { color: #4a574c; font-size: 11px; }
.audit-photo-option small { color: #7e8a80; font-size: 10px; font-weight: 400; }
.audit-pack-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; padding-top: 4px; border-top: 1px solid #edf0eb; }
.audit-pack-actions .button { min-height: 44px; }
.audit-pack-form .form-error { margin: 0; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(300px, .88fr); gap: 15px; margin-top: 16px; }
.panel { padding: 21px 21px 18px; }
.panel.attention-panel {
  color: #3d3021;
  background:
    radial-gradient(ellipse at 0% 54%, rgba(189, 121, 45, .5), transparent 68%),
    radial-gradient(circle at 100% 0, rgba(249, 218, 164, .38), transparent 43%),
    linear-gradient(130deg, #f8e6c8 0%, #fbf2e3 58%, #fffaf3 100%);
  border-color: #e8d5b6;
}
.attention-panel .eyebrow { color: #61451f; }
.attention-panel .text-link { color: #5f3b0d; }
.attention-panel .attention-empty { color: #624c2a; }
.attention-panel .attention-empty strong { color: #3e321f; }
.attention-panel .attention-empty small { color: #65553e; }
.attention-panel .attention-empty .empty-check { color: #745321; background: rgba(255, 255, 255, .55); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-heading .eyebrow { margin: 0 0 6px; }
.panel h2, .dialog h2 { margin: 0; font: 700 16px/1.3 Manrope, sans-serif; letter-spacing: -.45px; }
.period-pill { display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px; color: #777f77; background: #fafbf9; border: 1px solid #edf0eb; border-radius: 7px; font-size: 9px; white-space: nowrap; }
.period-pill span { color: #a4aca4; }
.panel.activity-panel { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-color: #456b4e; background: radial-gradient(ellipse at 100% 62%, rgba(189, 121, 45, .24), transparent 44%), radial-gradient(ellipse at 44% 42%, rgba(151, 194, 141, .38), transparent 62%), radial-gradient(ellipse at 0% 100%, rgba(29, 75, 53, .68), transparent 58%), linear-gradient(135deg, #34694c 0%, #4f8057 48%, #28563d 100%); box-shadow: var(--shadow), 5px 0 16px -10px rgba(189, 121, 45, .22); }
.activity-panel > :not(.workspace-wave) { position: relative; z-index: 1; }
.activity-panel h2 { color: #fff; }
.activity-panel .eyebrow { color: rgba(255, 255, 255, .72); }
.activity-panel .period-pill { color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .2); }
.activity-panel .period-pill span { color: rgba(255, 255, 255, .7); }
.activity-range { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; padding: 3px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .24); border-radius: 999px; }
.activity-range-button { min-height: 28px; padding: 0 9px; color: rgba(255, 255, 255, .86); background: transparent; border: 0; border-radius: 999px; font: inherit; font-size: 9px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; }
.activity-range-button[aria-pressed="true"] { color: #36533c; background: rgba(255, 255, 255, .96); }
.activity-range-button:disabled { opacity: .55; cursor: not-allowed; }
.activity-range-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.activity-chart { display: flex; height: 145px; flex-direction: column; margin: 21px 4px 0; padding: 7px 8px 5px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)); }
.activity-chart[aria-busy="true"] { opacity: .65; }
.activity-line-chart { display: block; min-height: 0; flex: 1 1 auto; overflow: visible; }
.chart-grid-lines { fill: none; stroke: rgba(255, 255, 255, .2); stroke-width: 1; }
.chart-area { fill: url("#activity-area-gradient"); }
.chart-defined-line { fill: none; stroke: rgba(235, 245, 223, .86); stroke-dasharray: 6 5; stroke-linecap: round; stroke-width: 2.5; }
.chart-line { fill: none; stroke: url("#activity-line-gradient"); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; filter: drop-shadow(0 1px 2px rgba(24, 39, 29, .45)); }
.chart-point-muted { fill: rgba(255, 255, 255, .9); stroke: rgba(255, 255, 255, .75); stroke-width: 2; }
.chart-current-guide { stroke: rgba(255, 255, 255, .58); stroke-dasharray: 3 4; stroke-width: 1; }
.chart-current-halo { fill: rgba(189, 121, 45, .28); }
.chart-current-point { fill: #fff; stroke: #bd792d; stroke-width: 3; }
.chart-current-count-bg { fill: rgba(255, 255, 255, .96); stroke: rgba(189, 121, 45, .9); stroke-width: 1; }
.chart-current-count { fill: #37543c; font-family: inherit; font-size: 10px; font-weight: 700; text-anchor: middle; }
.chart-day-labels { position: relative; display: block; flex: 0 0 30px; padding: 0; }
.panel.activity-panel .chart-day-label { position: absolute; top: 0; display: grid; gap: 2px; color: rgba(255, 255, 255, .74); font-size: 9px; font-weight: 600; text-align: center; white-space: nowrap; transform: translateX(-50%); }
.panel.activity-panel .chart-day-label.is-today { color: #fff; font-weight: 700; }
.panel.activity-panel .chart-ratio-label { color: rgba(255, 255, 255, .96); font-size: 9px; font-weight: 700; }
.activity-panel .chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; color: rgba(255, 255, 255, .82); font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; background: var(--amber); border-radius: 50%; }
.legend-line { display: inline-block; width: 15px; flex: 0 0 15px; border-top: 2px dashed rgba(235, 245, 223, .86); }
.activity-panel .chart-total { color: #37543c; background: rgba(255, 255, 255, .92); }
.chart-total { margin-left: auto; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.text-link { padding: 4px 0; color: var(--green); background: none; border: 0; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.text-link span { margin-left: 3px; }
.attention-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; margin-top: 17px; }
.attention-item { display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 11px; background: #f7f8f4; border: 1px solid #e9ece6; border-radius: 8px; }
.attention-item-link { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.attention-item-link:hover { border-color: #b7c8b7; background: #f5f8f3; }
.attention-mark { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; color: #ad7b3b; background: #f9edda; border-radius: 7px; font-size: 11px; }
.attention-severity-critical { background: #fff0eb; border-color: #e7b6ab; }
.attention-severity-critical .attention-mark { color: #9e382f; background: #f8dcd5; }
.attention-severity-warning { background: #fff8eb; border-color: #eddbb9; }
.attention-severity-warning .attention-mark { color: #916019; background: #f8ebce; }
.attention-severity-label { font-weight: 700; }
.attention-severity-critical .attention-severity-label { color: #9e382f; }
.attention-severity-warning .attention-severity-label { color: #916019; }
.attention-copy { min-width: 0; flex: 1; }
.attention-copy strong { display: block; color: #545b52; font-size: 10px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.attention-copy small { display: block; margin-top: 4px; color: #82776b; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.attention-empty { display: flex; min-height: 132px; flex-direction: column; align-items: center; justify-content: center; color: #829284; text-align: center; }
.attention-empty .empty-check { display: grid; width: 35px; height: 35px; place-items: center; margin-bottom: 8px; color: var(--green); background: var(--green-pale); border-radius: 50%; }
.attention-empty strong { color: #59675b; font: 600 11px Manrope, sans-serif; }
.attention-empty small { max-width: 170px; margin-top: 5px; color: #9aa39a; font-size: 9px; line-height: 1.5; }
.compliance-overview-panel { margin-top: 16px; }
.compliance-overview-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.compliance-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.compliance-overview-section { display: flex; min-width: 0; flex-direction: column; gap: 5px; padding: 12px; color: #536157; background: #fafbf9; border: 1px solid #edf0eb; border-radius: 8px; text-align: left; cursor: pointer; }
.compliance-overview-section:hover { border-color: #b7c8b7; background: #f5f8f3; }
.compliance-overview-section strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compliance-overview-section span { color: #7d897f; font-size: 9px; }
.compliance-overview-section .compliance-section-count { color: var(--green); font: 700 18px/1.2 Manrope, sans-serif; }
.compliance-overview-section.is-critical { border-color: #e7b6ab; background: #fff0eb; }
.compliance-overview-section.is-critical .compliance-section-count { color: #9e382f; }
.compliance-overview-section.is-warning { border-color: #eddbb9; background: #fff8eb; }
.compliance-overview-section.is-warning .compliance-section-count { color: #916019; }
.compliance-overview-section.is-positive { border-color: #dcebdd; background: #f3f8f2; }
.compliance-overview-section .compliance-status-label { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 3px 6px; color: #68756a; background: #edf0eb; border-radius: 10px; font-size: 8px; font-weight: 700; }
.compliance-overview-section .compliance-status-label:before { width: 5px; height: 5px; flex: 0 0 5px; background: currentColor; border-radius: 50%; box-shadow: 0 0 6px currentColor; content: ""; }
.compliance-overview-section.is-critical .compliance-status-label { color: #8d3028; background: #f8dcd5; }
.compliance-overview-section.is-warning .compliance-status-label { color: #80530f; background: #f8ebce; }
.compliance-overview-section.is-positive .compliance-status-label { color: #356348; background: #e3efe3; }
.compliance-overview-section .compliance-due-label { overflow-wrap: anywhere; }
.recent-panel { margin-top: 16px; padding-bottom: 4px; }
.recent-panel .panel-heading { align-items: center; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 15px 10px 10px; color: #a0a8a0; border-bottom: 1px solid #edf0eb; font-size: 8px; font-weight: 700; letter-spacing: .65px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 10px; color: #69736b; border-bottom: 1px solid #f0f2ee; font-size: 10px; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.table-primary { color: #37443a !important; font-weight: 600; }
.table-secondary { display: block; margin-top: 3px; color: #a0a7a0; font-size: 9px; font-weight: 400; }
.correction-summary { display: block; margin-top: 4px; color: #7d7868; font-size: 9px; font-weight: 400; line-height: 1.45; white-space: normal; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; font-size: 8px; font-weight: 700; }
.status-pill:before { width: 5px; height: 5px; flex: 0 0 5px; background: currentColor; border-radius: 50%; box-shadow: 0 0 6px currentColor; content: ""; }
.status-good { color: #53805e; background: #eaf3e9; }
.status-open, .status-expiring { color: #aa762e; background: #fff3df; }
.status-closed, .status-valid { color: #657d69; background: #edf3ec; }
.status-failed, .status-expired { color: #ae5147; background: #fff0eb; }
.status-not_recorded { color: #727d73; background: #f0f3ef; }
.empty-row { padding: 30px 12px !important; color: #9ba49c !important; text-align: center; }

/* F. DETAIL PAGES: action items and certificate records. */
.full-panel { min-height: 350px; }
.panel-description { margin: 6px 0 0; color: #929a92; font-size: 10px; }
.full-panel > .table-wrap, .full-panel > .action-list, .full-panel > .certificate-grid { margin-top: 20px; }
.log-history-filters { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 10px; margin-top: 20px; padding: 14px; background: #f8f9f6; border: 1px solid #ecefe9; border-radius: 9px; }
.offline-pending-list, .offline-review-list { display: grid; gap: 9px; margin-top: 16px; }
.offline-pending-card, .offline-review-card { display: grid; gap: 9px; padding: 13px; background: #fff9eb; border: 1px solid #efdfbb; border-radius: 9px; }
.offline-pending-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.offline-pending-card strong, .offline-review-card strong { display: block; color: #414d44; font-size: 11px; }
.offline-pending-card small, .offline-review-card small { display: block; margin-top: 4px; color: #7d7567; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.offline-sync-error { color: #9c3d32 !important; }
.offline-review-card { background: #fff6f3; border-color: #efcfc6; }
.offline-review-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 8px; }
.offline-review-controls textarea { min-height: 38px; padding: 8px; border: 1px solid #e6ddd8; border-radius: 6px; font-size: 10px; resize: vertical; }
.offline-review-panel { margin: 20px 0; padding: 16px; background: #fffaf8; border: 1px solid #f0d7d0; border-radius: 10px; }
.offline-review-panel > .panel-heading { margin-bottom: 12px; }
.offline-review-panel .panel-heading h2 { font-size: 15px; }
.log-history-filters label { display: grid; gap: 5px; color: #78817a; font-size: 9px; font-weight: 700; }
.log-history-filters input, .log-history-filters select, .history-page-controls select { width: 100%; min-width: 0; min-height: 36px; padding: 0 9px; color: var(--ink); background: #fff; border: 1px solid #e3e8e0; border-radius: 6px; font-size: 10px; }
.log-history-filters .history-search { grid-column: span 2; }
.history-filter-actions { display: flex; align-items: flex-end; gap: 8px; }
.history-filter-actions .button { min-height: 36px; padding: 0 11px; font-size: 10px; }
.log-history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; color: #78817a; font-size: 10px; }
.list-view-toolbar, .history-week-toolbar, .panel-heading-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.list-view-toolbar, .history-week-toolbar { margin: 16px 0 12px; }
.history-week-navigation, .history-week-actions { display: flex; align-items: center; gap: 7px; }
.history-week-navigation > span { min-width: 190px; color: #647064; font-size: 10px; font-weight: 700; text-align: center; }
.view-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.view-filter-tab { min-height: 34px; padding: 0 11px; color: #69756b; background: #f7f9f6; border: 1px solid #e6ece3; border-radius: 7px; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.view-filter-tab[aria-pressed="true"] { color: #315d3a; background: #eaf3e9; border-color: #b8d0b9; }
.view-filter-tab:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.list-view-count { color: #78817a; font-size: 10px; }
.list-view-search { display: grid; min-width: min(250px, 100%); gap: 5px; color: #647064; font-size: 10px; font-weight: 700; }
.list-view-search input { width: 100%; min-width: 0; min-height: 38px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #e3e8e0; border-radius: 6px; font: inherit; }
.history-page-controls { display: flex; align-items: center; gap: 8px; }
.history-page-controls select { width: auto; min-height: 31px; }
.history-page-controls .button-small { min-height: 31px; }
.history-page-controls .button-small:disabled { opacity: .45; cursor: not-allowed; }
.action-list { display: grid; gap: 10px; }
.action-card { overflow: hidden; background: #fff; border: 1px solid #ecefe9; border-radius: 9px; }
.action-card.is-overdue { background: #fff8f6; border-color: #e8b8ad; }
.action-card-summary { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 24px; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.action-card-summary::-webkit-details-marker { display: none; }
.action-card-summary:focus-visible { outline: 2px solid var(--green); outline-offset: -3px; }
.action-card[open] .action-card-summary { border-bottom: 1px solid #f0f2ed; }
.action-symbol { display: grid; width: 34px; height: 34px; place-items: center; color: #b47b37; background: #fbf1e1; border-radius: 10px; }
.action-copy { display: block; min-width: 0; }
.action-card:not([open]) .action-copy strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.action-copy strong { display: block; color: #434e46; font-size: 11px; font-weight: 600; line-height: 1.5; }
.action-copy small { display: block; margin-top: 5px; color: #9aa39b; font-size: 9px; }
.action-expand-icon { display: grid; width: 24px; height: 24px; place-items: center; background: #f3f7f2; border-radius: 50%; }
.action-expand-icon:before { width: 7px; height: 7px; margin-top: -4px; border-right: 1.5px solid #526453; border-bottom: 1.5px solid #526453; content: ""; transform: rotate(45deg); transition: transform .15s ease, margin .15s ease; }
.action-card[open] .action-expand-icon:before { margin-top: 4px; transform: rotate(225deg); }
.action-card-details { display: grid; gap: 10px; padding: 12px 14px 14px; }
.action-card-details > small { color: #9aa39b; font-size: 9px; }
.action-controls { display: flex; align-items: center; gap: 8px; }
.action-tracking-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 8px; padding-top: 10px; border-top: 1px solid #f0f2ed; }
.action-tracking-field { display: grid; min-width: 0; gap: 4px; color: #647064; font-size: 10px; font-weight: 700; }
.action-tracking-field span { line-height: 1.3; }
.action-tracking-controls select, .action-tracking-controls input { width: 100%; min-width: 0; min-height: 40px; padding: 0 10px; color: var(--ink); background: #fff; border: 1px solid #e3e8e0; border-radius: 6px; font-size: 12px; }
.action-tracking-controls .button-small { min-height: 40px; padding: 0 12px; font-size: 11px; white-space: nowrap; }
.button-small { min-height: 31px; padding: 0 10px; color: var(--green); background: #f3f7f2; border: 1px solid #e5ece3; border-radius: 6px; font-size: 9px; font-weight: 700; cursor: pointer; }
.button-small:hover { background: #eaf2e9; }
.certificate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 420px)); justify-content: center; gap: 12px; }
.certificate-card { position: relative; display: flex; gap: 12px; padding: 15px; border: 1px solid #ecefe9; border-radius: 9px; }
.certificate-icon { display: grid; width: 35px; height: 38px; flex: 0 0 auto; place-items: center; color: #698398; background: #edf3f6; border-radius: 8px; }
.certificate-copy { min-width: 0; flex: 1; }
.certificate-copy strong { display: block; overflow: hidden; color: #414d44; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.certificate-copy small { display: block; margin-top: 4px; color: #929b92; font-size: 9px; }
.certificate-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: #89928a; font-size: 9px; }
.supplier-workspace { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.5fr); gap: 14px; margin-top: 20px; }
.supplier-workspace:not(.has-selected-supplier) .supplier-list-panel { grid-column: 1 / -1; }
.supplier-workspace:not(.has-selected-supplier) .supplier-detail { display: none; }
.supplier-list-panel { display: grid; align-content: start; gap: 8px; min-width: 0; }
.supplier-search { display: grid; gap: 5px; color: #647064; font-size: 10px; font-weight: 700; }
.supplier-search input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #e3e8e0; border-radius: 6px; font: inherit; }
.supplier-search-empty { margin: 0; padding: 12px; color: #89928a; background: #fff; border: 1px solid #edf0eb; border-radius: 8px; font-size: 10px; }
.supplier-list { display: grid; align-content: start; gap: 8px; min-width: 0; }
.supplier-list-panel > .view-filter-tabs { margin-bottom: 4px; }
.supplier-list-item { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; color: var(--ink); background: #fff; border: 1px solid #ecefe9; border-radius: 9px; text-align: left; cursor: pointer; }
.supplier-list-item:hover, .supplier-list-item.is-selected { border-color: #9db99e; background: #f5f9f4; }
.supplier-list-copy { display: grid; min-width: 0; gap: 4px; }
.supplier-list-copy strong { overflow: hidden; color: #414d44; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.supplier-list-copy small { color: #89928a; font-size: 9px; }
.supplier-status { flex: 0 0 auto; }
.status-approved { color: #3e7652; background: #eaf5ec; }
.status-pending { color: #8d692c; background: #fff6df; }
.status-suspended { color: #ae5147; background: #fff0eb; }
.supplier-detail { min-width: 0; padding: 16px; border: 1px solid #ecefe9; border-radius: 9px; background: #fcfdfc; scroll-margin-top: 80px; }
.supplier-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.supplier-detail-heading h3 { margin: 0 0 8px; color: #39443b; font-size: 17px; overflow-wrap: anywhere; }
.supplier-detail-back { display: none; }
.supplier-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.supplier-facts > div { min-width: 0; }
.supplier-facts dt { color: #929a92; font-size: 9px; font-weight: 700; }
.supplier-facts dd { margin: 4px 0 0; color: #414d44; font-size: 11px; overflow-wrap: anywhere; }
.supplier-fact-wide { grid-column: 1 / -1; }
.supplier-review-controls { display: grid; gap: 10px; padding: 13px; background: #f5f8f3; border: 1px solid #e5ece3; border-radius: 8px; }
.supplier-review-controls label { display: grid; gap: 5px; color: #647064; font-size: 10px; font-weight: 700; }
.supplier-review-controls input, .supplier-review-controls textarea { width: 100%; min-height: 38px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #e3e8e0; border-radius: 6px; font: inherit; }
.supplier-review-controls textarea { min-height: 64px; resize: vertical; }
.supplier-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.supplier-suspend-button { color: #a64e44; background: #fff2ef; border-color: #f0d7d0; }
.supplier-section { margin-top: 19px; }
.supplier-section h4 { margin: 0 0 9px; color: #526453; font-size: 11px; }
.supplier-certificate-list { display: grid; gap: 8px; }
.supplier-certificate { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid #edf0eb; border-radius: 7px; background: #fff; }
.supplier-certificate > div { min-width: 0; flex: 1; }
.supplier-certificate strong, .supplier-certificate small { display: block; overflow-wrap: anywhere; }
.supplier-certificate strong { color: #414d44; font-size: 10px; }
.supplier-certificate small, .supplier-muted { margin-top: 4px; color: #89928a; font-size: 9px; line-height: 1.5; }
.supplier-history { display: grid; gap: 10px; margin: 0; padding: 0 0 0 18px; }
.supplier-history li { padding-left: 3px; color: #526453; }
.supplier-history strong, .supplier-history small { display: block; }
.supplier-history strong { font-size: 10px; }
.supplier-history small, .supplier-history p { margin: 4px 0 0; color: #89928a; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.compliance-toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: #616c63; font-size: 10px; font-weight: 700; }
.compliance-toolbar select { min-height: 38px; padding: 8px 10px; color: #39443b; background: #fbfcfa; border: 1px solid #e4e9e2; border-radius: 7px; font-size: 10px; }
.compliance-toolbar span { margin-left: auto; color: #929a92; font-weight: 500; }
.compliance-record-list { display: grid; gap: 9px; }
.compliance-record { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #edf0eb; border-radius: 9px; background: #fcfdfc; }
.compliance-record-copy { min-width: 0; flex: 1; }
.compliance-record-copy strong { display: block; color: #39443b; font-size: 11px; }
.compliance-record-copy small { display: block; margin-top: 4px; color: #929a92; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.compliance-record-actions { display: flex; align-items: center; gap: 8px; }
.compliance-record-actions .status-pill { white-space: nowrap; }
.dialog-card label { color: #647064; font-size: 10px; font-weight: 700; }
.food-handler-list { display: grid; gap: 8px; margin-top: 16px; }
.food-handler-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #edf0eb; border-radius: 8px; background: #fcfdfc; }
.food-handler-copy { min-width: 0; }
.food-handler-copy strong, .food-handler-copy small { display: block; overflow-wrap: anywhere; }
.food-handler-copy strong { color: #39443b; font-size: 11px; }
.food-handler-copy small { margin-top: 4px; color: #89928a; font-size: 9px; line-height: 1.4; }
.food-handler-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.food-handler-badge { color: #45694a; font-weight: 700; }
.food-handler-badge.is-inactive { color: #8c594d; }
.checkbox-label { display: flex; align-items: center; gap: 9px; min-height: 36px; color: #536157; font-size: 11px; font-weight: 500; }
.checkbox-label input { width: 17px; min-width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.training-attendee-fieldset { display: grid; gap: 5px; margin: 0; padding: 10px 12px; border: 1px solid #e3e8e0; border-radius: 7px; }
.training-attendee-fieldset legend { padding: 0 4px; color: #647064; font-size: 10px; font-weight: 700; }
.training-attendee-fieldset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; }
.empty-state { display: flex; min-height: 220px; flex-direction: column; align-items: center; justify-content: center; color: #8d988e; text-align: center; }
.empty-state-icon { display: grid; width: 43px; height: 43px; place-items: center; margin-bottom: 12px; color: #65826a; background: #edf4eb; border-radius: 13px; font-size: 19px; }
.empty-state strong { color: #4d5b50; font: 600 12px Manrope, sans-serif; }
.empty-state p { max-width: 270px; margin: 6px 0 0; color: #9aa39a; font-size: 10px; line-height: 1.6; }
.page-footer { display: flex; justify-content: space-between; gap: 10px; padding: 22px 2px 5px; color: #68786c; font-size: 9px; }
.page-footer b { padding: 0 4px; color: #b39a6a; }

/* G. POP-UP FORMS, NOTIFICATIONS, AND SIGN-IN SCREEN. */
.dialog { width: min(460px, calc(100% - 28px)); max-height: min(90vh, 780px); padding: 0; overflow: auto; background: transparent; border: 0; }
.evidence-dialog { width: min(900px, calc(100% - 28px)); }
.evidence-image { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #f7f7f2; border-radius: 9px; }
.dialog::backdrop { background: rgba(32, 43, 37, .38); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; background: #fff; border: 1px solid #e7ebe5; border-radius: 14px; box-shadow: 0 24px 80px rgba(23, 39, 28, .2); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-heading .eyebrow { margin: 0 0 7px; }
.dialog-close { display: grid; width: 29px; height: 29px; place-items: center; color: #7d877e; background: #f5f7f3; border: 1px solid #edf0eb; border-radius: 50%; font-size: 20px; cursor: pointer; }
.dialog-intro { margin: 10px 0 19px; color: #8b958d; font-size: 10px; line-height: 1.6; }
.dialog-card label, .form-stack label { display: block; margin: 14px 0 7px; color: #616c63; font-size: 10px; font-weight: 700; }
.dialog-card input:not([type=file]), .dialog-card select, .dialog-card textarea, .form-stack input { width: 100%; min-height: 39px; padding: 10px 11px; color: #39443b; background: #fbfcfa; border: 1px solid #e4e9e2; border-radius: 7px; outline: none; font-size: 11px; }
.dialog-card input:focus, .dialog-card select:focus, .dialog-card textarea:focus, .form-stack input:focus { border-color: #82a68a; box-shadow: 0 0 0 3px rgba(91, 142, 101, .11); }
.dialog-card textarea { min-height: 74px; resize: vertical; }
.dialog-card input[type=file] { width: 100%; color: #7d887f; font-size: 10px; }
.input-with-unit { position: relative; }
.input-with-unit input { padding-right: 66px !important; }
.input-with-unit span { position: absolute; top: 50%; right: 12px; color: #a1a9a1; font-size: 10px; transform: translateY(-50%); }
.input-with-unit select { position: absolute; top: 50%; right: 7px; width: auto; min-height: 30px; padding: 4px 21px 4px 6px; color: #69776c; background: transparent; border: 0; font-size: 11px; transform: translateY(-50%); }
.optional-label { float: right; color: #a7afa7; font-size: 8px; font-weight: 600; letter-spacing: .55px; }
.field-hint { min-height: 15px; margin-top: 5px; color: #9da69e; font-size: 9px; }
.form-error { margin: 10px 0 0; padding: 9px 10px; color: #a9473e; background: #fff2ef; border-radius: 6px; font-size: 10px; line-height: 1.5; }
.form-success { margin: 10px 0 0; padding: 9px 10px; color: #276247; background: #edf7f0; border-radius: 6px; font-size: 10px; line-height: 1.5; }
.auth-text-button { justify-self: start; margin-top: 9px; padding: 5px 0; color: #527b5a; background: transparent; border: 0; font: 600 11px "DM Sans", sans-serif; text-decoration: underline; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 15px; border-top: 1px solid #eef0ec; }
.toast { position: fixed; z-index: 10; right: 24px; bottom: 23px; max-width: min(360px, calc(100% - 32px)); padding: 12px 15px; color: #fff; background: #273a2e; border-radius: 8px; box-shadow: 0 8px 26px rgba(0,0,0,.16); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .22s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.login-screen { position: relative; isolation: isolate; display: grid; min-height: 100vh; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); overflow: hidden; background: radial-gradient(ellipse at 2% 100%, rgba(193,211,183,.2), transparent 43%), #f7f6f0; }
.login-screen:before, .login-screen:after { position: absolute; z-index: 0; bottom: -155px; left: -9%; width: 61%; height: 245px; border: 1px solid rgba(148,174,137,.16); border-radius: 50%; content: ""; pointer-events: none; transform: rotate(-7deg); }
.login-screen:after { bottom: -172px; left: -4%; width: 59%; border-color: rgba(148,174,137,.11); }
.login-card { position: relative; z-index: 1; display: flex; width: min(420px, calc(100% - 48px)); flex-direction: column; justify-content: center; margin: auto; padding: 50px 0; }
.login-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 40px; }
.brand-login { margin: 0; }
.login-card .eyebrow { margin: 0 0 12px; }
.login-card h1 { margin: 0; font: 700 39px/1.2 Manrope, sans-serif; letter-spacing: -1.8px; }
.login-intro { max-width: 350px; margin: 12px 0 22px; color: #89938a; font-size: 12px; line-height: 1.7; }
.form-stack label { margin-top: 13px; }
.form-stack input { min-height: 43px; }
.form-stack .button-secondary { color: #527b5a; background: #eef4ef; border: 1px solid #dfe9df; }
.login-art { --login-wave-sage: 52,105,76; --login-wave-sage-light: 255,255,255; --login-wave-earth: 189,121,45; --login-wave-earth-light: 189,121,45; position: relative; z-index: 1; min-width: 0; min-height: 100vh; overflow: hidden; padding: 48px clamp(28px, 5.2vw, 78px); isolation: isolate; background: radial-gradient(ellipse at 69% 87%, rgba(var(--login-wave-sage),.24), transparent 41%), radial-gradient(ellipse at 100% 0%, rgba(var(--login-wave-earth),.16), transparent 38%), linear-gradient(145deg, #294a37, #1d382b 68%, #243f30); }
.login-art-heading { position: absolute; z-index: 2; top: 13%; left: clamp(28px, 5.2vw, 78px); max-width: 390px; margin: 0; color: rgba(255,255,255,.95); font-family: inherit; font-size: clamp(34px, 3.7vw, 48px); font-weight: 700; line-height: 1.16; letter-spacing: -.04em; }
.login-art-footer { position: absolute; z-index: 2; right: clamp(28px, 5.2vw, 78px); bottom: 9%; left: clamp(28px, 5.2vw, 78px); display: flex; align-items: flex-start; justify-content: flex-end; gap: 14px; }
.login-art-dash { flex: 0 0 24px; height: 1px; margin-top: .75em; background: var(--amber); }
.login-art-copy { max-width: 340px; margin: 0; color: rgba(255,255,255,.78); font-family: inherit; font-size: clamp(17px, 1.55vw, 20px); font-weight: 500; line-height: 1.5; text-align: right; }
.login-wave { position: absolute; z-index: 1; right: -5%; bottom: 17%; display: block; width: 110%; height: 60%; pointer-events: none; }

/* H. RESPONSIVE LAYOUT: adapt the desktop dashboard for tablets and phones. */
@media (max-width: 1080px) {
  .sidebar { width: 220px; }
  .main-content { margin-left: 220px; }
  .workspace-background-wave { left: 220px; width: calc(100vw - 220px); }
  .topbar { padding: 0 30px; }
  .page-wrap { padding: 32px 30px 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); }
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .supplier-workspace { grid-template-columns: minmax(0, 1fr); }
  .supplier-workspace.has-selected-supplier .supplier-list-panel { display: none; }
  .supplier-detail-back { display: inline-flex; min-height: 36px; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; color: var(--green); background: transparent; border: 0; font-size: 11px; font-weight: 700; cursor: pointer; }
  .log-history-filters { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
}
@media (max-width: 760px) {
  .workspace-background-wave { top: 29vh; left: 0; width: 100vw; height: 60vh; opacity: .38; }
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 64px; flex-direction: row; align-items: center; padding: 0 8px; border-top: 1px solid #dfe7dd; border-right: 0; box-shadow: 0 -6px 20px rgba(25,45,32,.04); }
  .sidebar > .brand, .workspace-label, .site-switcher-label, .site-select, .sidebar-bottom { display: none; }
  .side-nav { display: grid; width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin: 0; }
  .side-nav.has-six-items { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .side-nav.has-seven-items { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .nav-item { min-width: 0; min-height: 54px; flex-direction: column; justify-content: center; gap: 4px; padding: 4px 2px; border-radius: 7px; font-size: 8px; line-height: 1.25; text-align: center; }
  .nav-item > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
  .nav-icon { width: 19px; height: 19px; }
  .nav-count { position: absolute; margin: -26px 0 0 21px; font-size: 8px; }
  .main-content { margin-left: 0; padding-bottom: 65px; }
  .topbar { height: 56px; padding: 0 17px; }
  .breadcrumbs { display: none; }
  .topbar-right { width: 100%; justify-content: space-between; gap: 10px; }
  .mobile-site-picker { display: block; flex: 1 1 120px; min-width: 0; max-width: 40vw; }
  .mobile-site-select { width: 100%; min-width: 0; min-height: 32px; padding: 4px 7px; overflow: hidden; color: var(--ink); background: #fff; border: 1px solid #e4e9e2; border-radius: 7px; font-size: 10px; text-overflow: ellipsis; }
  .language-select { min-width: 72px; min-height: 32px; padding: 4px 5px; font-size: 10px; }
  #topbar-avatar { display: none; }
  .mobile-logout-button { display: inline-flex; min-height: 36px; align-items: center; padding: 0 10px; color: var(--green-dark); background: #edf4ee; border: 1px solid #dbe7dc; border-radius: 7px; font-size: 11px; font-weight: 700; cursor: pointer; }
  .live-status { font-size: 0; }
  .live-status i { width: 7px; height: 7px; }
  .topbar-date { font-size: 9px; }
  .button, .button-small, .mobile-logout-button { white-space: normal; line-height: 1.4; }
  .page-wrap { padding: 27px 17px 20px; }
  .offline-banner { align-items: flex-start; }
  .offline-review-controls { grid-template-columns: 1fr 1fr; }
  .offline-review-controls textarea { grid-column: 1 / -1; }
  .offline-review-controls .button-small { min-height: 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading .button { align-self: stretch; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 121px; padding: 13px; }
  .metric-top { gap: 4px; font-size: 9px; }
  .metric-icon { width: 26px; height: 26px; }
  .metric-value { font-size: 27px; }
  .metric-foot { font-size: 8px; }
  .content-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .compliance-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compliance-overview-actions { justify-content: flex-start; gap: 9px; }
  .panel { padding: 17px 15px 14px; }
  .activity-panel .panel-heading { flex-wrap: wrap; }
  .activity-range { margin-left: auto; }
  .activity-chart { margin-top: 19px; }
  .recent-panel { margin-top: 12px; }
  .data-table th { padding-right: 8px; padding-left: 8px; }
  .data-table td { padding: 11px 8px; }
  .log-history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-history-filters .history-search { grid-column: span 2; }
  .history-filter-actions { grid-column: span 2; }
  .log-history-pagination { align-items: flex-start; flex-direction: column; }
  .history-page-controls { width: 100%; flex-wrap: wrap; }
  .history-page-controls #history-page-label { margin-right: auto; }
  .history-week-toolbar { align-items: stretch; }
  .history-week-navigation, .history-week-actions { width: 100%; justify-content: space-between; }
  .history-week-navigation > span { min-width: 0; }
  .panel-heading-tools { width: 100%; align-items: flex-start; flex-direction: column; }
  .list-view-toolbar { align-items: flex-start; }
  .list-view-search { min-width: 100%; }
  .compliance-record { align-items: flex-start; flex-wrap: wrap; }
  .compliance-record-actions { width: 100%; justify-content: space-between; }
  .compliance-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .compliance-toolbar span { width: 100%; margin-left: 0; }
  .food-handler-row { align-items: flex-start; flex-direction: column; }
  .food-handler-actions { justify-content: flex-start; }
  .training-attendee-fieldset > div { grid-template-columns: minmax(0, 1fr); }
  .page-footer { flex-direction: column; padding-top: 17px; }
  .certificate-grid { grid-template-columns: 1fr; }
  .supplier-workspace { grid-template-columns: 1fr; }
  .supplier-facts { gap: 10px; }
  .supplier-certificate { align-items: flex-start; flex-wrap: wrap; }
  .supplier-certificate > div { flex-basis: calc(100% - 8px); }
  .action-card-summary { grid-template-columns: 28px minmax(0, 1fr) auto 24px; gap: 8px; padding: 10px 9px; }
  .action-symbol { width: 28px; height: 28px; }
  .action-card-details { gap: 9px; padding: 10px; }
  .action-tracking-controls { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .action-tracking-controls .button-small { grid-column: 1 / -1; }
  .action-controls { justify-content: flex-start; }
  .period-pill { padding: 7px 8px; font-size: 8px; }
  .audit-pack-form { grid-template-columns: minmax(0, 1fr); }
  .audit-date-range, .audit-mode-options, .audit-section-options, .audit-layout-options { grid-template-columns: 1fr; }
  .audit-pack-actions { display: grid; grid-template-columns: 1fr; }
  .audit-pack-form .button { width: 100%; }
  .nav-item-audit { margin-top: 0; }
  .nav-item-audit:before { display: none; }
  .dialog-card { padding: 20px 17px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-screen:before, .login-screen:after { width: 110%; left: -18%; }
  .login-card { min-height: 100vh; padding: 30px 0; }
  .login-art { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .metric-card-link, .metric-go-arrow, .action-expand-icon:before { transition: none; }
  .metric-card-link:hover, .metric-card-link:hover .metric-go-arrow { transform: none; }
}
@media (max-width: 390px) {
  .page-wrap { padding-right: 12px; padding-left: 12px; }
  .metric-card { padding: 11px; }
  .metric-top { font-size: 8px; }
  .topbar { padding: 0 12px; }
  .breadcrumbs { gap: 6px; font-size: 10px; }
  .activity-chart { padding-right: 6px; padding-left: 6px; }
}
@media (max-width: 420px) {
  .topbar-date { display: none; }
  .topbar-right { gap: 6px; }
  .live-status:not(.is-offline) { display: none; }
  .language-picker-compact .language-select { width: 88px; min-width: 0; }
  .mobile-logout-button { padding-right: 8px; padding-left: 8px; }
}
@media (max-width: 480px) {
  .login-header { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 34px; }
  .login-header .language-picker { align-self: flex-end; }
  .action-tracking-controls { grid-template-columns: minmax(0, 1fr); }
  .action-tracking-controls .button-small { grid-column: auto; }
}
@media (max-width: 340px) {
  body { min-width: 0; }
  .topbar { padding-right: 8px; padding-left: 8px; }
}

/* Indic scripts need larger text and looser spacing at small UI sizes. */
html:lang(hi) .eyebrow, html:lang(te) .eyebrow,
html:lang(hi) .workspace-label, html:lang(te) .workspace-label { font-size: 11px; letter-spacing: .35px; }
html:lang(hi) .language-picker, html:lang(te) .language-picker,
html:lang(hi) .site-switcher-label, html:lang(te) .site-switcher-label,
html:lang(hi) .breadcrumbs, html:lang(te) .breadcrumbs,
html:lang(hi) .live-status, html:lang(te) .live-status,
html:lang(hi) .topbar-date, html:lang(te) .topbar-date { font-size: 12px; }
html:lang(hi) .language-select, html:lang(te) .language-select,
html:lang(hi) .site-select, html:lang(te) .site-select { font-size: 14px; }
html:lang(hi) .nav-item, html:lang(te) .nav-item { font-size: 14px; line-height: 1.4; }
html:lang(hi) .nav-count, html:lang(te) .nav-count { font-size: 11px; }
html:lang(hi) .help-card strong, html:lang(te) .help-card strong,
html:lang(hi) .profile-copy strong, html:lang(te) .profile-copy strong { font-size: 13px; }
html:lang(hi) .help-card p, html:lang(te) .help-card p,
html:lang(hi) .profile-copy small, html:lang(te) .profile-copy small { color: #606c62; font-size: 12px; line-height: 1.6; }
html:lang(hi) .offline-banner, html:lang(te) .offline-banner { font-size: 13px; }
html:lang(hi) .page-subtitle, html:lang(te) .page-subtitle { color: #59665c; font-size: 15px; line-height: 1.55; }
html:lang(hi) .button, html:lang(te) .button { font-size: 13px; line-height: 1.5; }
html:lang(hi) .button-small, html:lang(te) .button-small,
html:lang(hi) .mobile-logout-button, html:lang(te) .mobile-logout-button { font-size: 12px; line-height: 1.45; }
html:lang(hi) .metric-top, html:lang(te) .metric-top,
html:lang(hi) .daily-progress-count span, html:lang(te) .daily-progress-count span,
html:lang(hi) .chart-legend, html:lang(te) .chart-legend { font-size: 12px; }
html:lang(hi) .metric-foot, html:lang(te) .metric-foot,
html:lang(hi) .chart-day-label, html:lang(te) .chart-day-label { color: #657166; font-size: 11px; }
html:lang(hi) .metric-primary .metric-foot,
html:lang(te) .metric-primary .metric-foot { color: #fff; }
html:lang(hi) .text-link, html:lang(te) .text-link { font-size: 13px; white-space: normal; }
html:lang(hi) .panel-description, html:lang(te) .panel-description { color: #667268; font-size: 13px; line-height: 1.55; }
html:lang(hi) .attention-copy strong, html:lang(te) .attention-copy strong,
html:lang(hi) .action-copy strong, html:lang(te) .action-copy strong,
html:lang(hi) .offline-pending-card strong, html:lang(te) .offline-pending-card strong,
html:lang(hi) .offline-review-card strong, html:lang(te) .offline-review-card strong,
html:lang(hi) .compliance-record-copy strong, html:lang(te) .compliance-record-copy strong { font-size: 13px; line-height: 1.55; }
html:lang(hi) .attention-copy small, html:lang(te) .attention-copy small,
html:lang(hi) .action-copy small, html:lang(te) .action-copy small,
html:lang(hi) .offline-pending-card small, html:lang(te) .offline-pending-card small,
html:lang(hi) .offline-review-card small, html:lang(te) .offline-review-card small,
html:lang(hi) .certificate-copy small, html:lang(te) .certificate-copy small,
html:lang(hi) .compliance-record-copy small, html:lang(te) .compliance-record-copy small { color: #667268; font-size: 11px; line-height: 1.55; }
html:lang(hi) .compliance-overview-section strong, html:lang(te) .compliance-overview-section strong {
  font-size: 13px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere;
}
html:lang(hi) .compliance-overview-section span, html:lang(te) .compliance-overview-section span { font-size: 11px; line-height: 1.45; }
html:lang(hi) .compliance-overview-section .compliance-status-label,
html:lang(te) .compliance-overview-section .compliance-status-label { font-size: 10px; }
html:lang(hi) .data-table th, html:lang(te) .data-table th { font-size: 10px; letter-spacing: 0; }
html:lang(hi) .data-table td, html:lang(te) .data-table td { font-size: 12px; }
html:lang(hi) .table-secondary, html:lang(te) .table-secondary,
html:lang(hi) .status-pill, html:lang(te) .status-pill { font-size: 10px; }
html:lang(hi) .certificate-copy strong, html:lang(te) .certificate-copy strong { font-size: 12px; }
html:lang(hi) .certificate-meta, html:lang(te) .certificate-meta,
html:lang(hi) .compliance-toolbar, html:lang(te) .compliance-toolbar,
html:lang(hi) .compliance-toolbar select, html:lang(te) .compliance-toolbar select { font-size: 12px; }
html:lang(hi) .empty-state strong, html:lang(te) .empty-state strong { font-size: 14px; }
html:lang(hi) .empty-state p, html:lang(te) .empty-state p { color: #667268; font-size: 12px; }
html:lang(hi) .page-footer, html:lang(te) .page-footer { color: #667268; font-size: 11px; line-height: 1.55; }
html:lang(hi) .dialog h2, html:lang(te) .dialog h2 { font-size: 18px; line-height: 1.4; }
html:lang(hi) .dialog-intro, html:lang(te) .dialog-intro { color: #667268; font-size: 13px; line-height: 1.6; }
html:lang(hi) .dialog-card label, html:lang(te) .dialog-card label,
html:lang(hi) .form-stack label, html:lang(te) .form-stack label { font-size: 13px; line-height: 1.5; }
html:lang(hi) .dialog-card input:not([type=file]), html:lang(te) .dialog-card input:not([type=file]),
html:lang(hi) .dialog-card select, html:lang(te) .dialog-card select,
html:lang(hi) .dialog-card textarea, html:lang(te) .dialog-card textarea,
html:lang(hi) .form-stack input, html:lang(te) .form-stack input { font-size: 14px; line-height: 1.5; }
html:lang(hi) .dialog-card input[type=file], html:lang(te) .dialog-card input[type=file],
html:lang(hi) .field-hint, html:lang(te) .field-hint { color: #667268; font-size: 11px; line-height: 1.5; }
html:lang(hi) .optional-label, html:lang(te) .optional-label { float: none; font-size: 10px; letter-spacing: 0; }
html:lang(hi) .form-error, html:lang(te) .form-error,
html:lang(hi) .form-success, html:lang(te) .form-success,
html:lang(hi) .toast, html:lang(te) .toast { font-size: 13px; line-height: 1.55; }
html:lang(hi) :is(.page-heading h1, .panel h2, .dialog h2, .metric-value,
  .daily-progress-count strong, .inspection-ready strong, .attention-empty strong,
  .compliance-overview-section .compliance-section-count, .avatar, .auth-text-button),
html:lang(te) :is(.page-heading h1, .panel h2, .dialog h2, .metric-value,
  .daily-progress-count strong, .inspection-ready strong, .attention-empty strong,
  .compliance-overview-section .compliance-section-count, .avatar, .auth-text-button) {
  font-family: inherit;
  letter-spacing: normal;
}
@media (max-width: 760px) {
  html:lang(hi) .nav-item, html:lang(te) .nav-item { min-height: 58px; font-size: 11px; line-height: 1.3; }
  html:lang(hi) .nav-count, html:lang(te) .nav-count { font-size: 10px; }
  html:lang(hi) .language-select, html:lang(te) .language-select { font-size: 12px; }
  html:lang(hi) .topbar-date, html:lang(te) .topbar-date { font-size: 10px; }
  html:lang(hi) .metric-top, html:lang(te) .metric-top,
  html:lang(hi) .metric-foot, html:lang(te) .metric-foot { font-size: 11px; }
  html:lang(hi) .period-pill, html:lang(te) .period-pill { font-size: 10px; white-space: normal; }
}
