@import url("/ui/theme.css?v=20261104-1");
/* Existing shell, colors and layout retained. Strong scope wins legacy inline
   stylesheet rules; no runtime DOM rewriting or device/user-agent detection. */
html body .main #content { font-size: 16px; line-height: 1.65; }
html body .main #content :is(p, .tbl td, .tbl th, .feReportFixedPanel table, .feReportHealth) { font-size: 14px !important; }
html body .main #content :is(small, .stat span, .field span, .head p, .pt small, .status, .placeholder span, .mapHint, .satNotice, .feReportFixedFilters label, .feReportFixedCard span) { font-size: 14px !important; line-height: 1.65; }
html body .main #content :is(.pt b, .atop b, .placeholder b) { font-size: 16px !important; }
html body .main #content :is(small, .stat span, .field span, .head p, .pt small, .placeholder span, .mapHint) { color: #53685c !important; }
html body .main #content :is(button, input, select, textarea),
html body :is(.side, .top) :is(button, select, a),
html body #feAuth :is(button, input, select) { min-height: 48px !important; font-size: 16px !important; line-height: 1.5 !important; }
html body .main #content :is(button, select), html body .top button,
html body .side .feNavCloseV10 { min-width: 48px !important; }
html body :is(.side, .top) :is(small, .demo, .crumb b, .farm span, .farm b) { font-size: 14px !important; line-height: 1.5; }
html body .main #content .tbl :is(th, td) { padding: 12px; }
html body .main #content .rowbtn { flex-wrap: wrap; gap: 8px; }
html body .main #content .form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
html body .main #content .form > * { min-width: 0; }
html body .main #content .form :is(input, select, textarea) { width: 100%; max-width: 100%; min-width: 0; }
html body .main #content .feInventoryValue b { font-size: 20px; overflow-wrap: anywhere; }
html body .main #content .wrap { overscroll-behavior-inline: contain; }
html body :is(button, a, input, select, textarea):focus-visible { outline: 3px solid #9d7a2a !important; outline-offset: 3px; }
html body .top { height: auto !important; min-height: 64px; padding-block: 8px; flex-wrap: wrap; }
html body .main { padding-bottom: env(safe-area-inset-bottom); }

/* Today: overview, direct schedule controls, priorities, then the weekly calendar. */
html.fePublicClean body .main #content .feTodayHero { padding: 16px 20px; }
html.fePublicClean body .main #content .feTodayHero h1 { font-size: 22px; }
html.fePublicClean body .main #content .feTodayHero p { font-size: 14px; }
html.fePublicClean body .main #content .feTodayReview { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0; padding: 16px; border: 1px solid #d9e6de; border-radius: 16px; background: #fff; }
html.fePublicClean body .main #content .feTodayReview > div { min-width: 0; }
html.fePublicClean body .main #content .feTodayReview h2 { margin: 0 0 4px; font-size: 18px; }
html.fePublicClean body .main #content .feTodayReview p { margin: 0; color: #53685c; line-height: 1.7; }
html.fePublicClean body .main #content .feTodayReviewActions { display: flex; gap: 8px; flex-shrink: 0; }
html.fePublicClean body .main #content .feTodayScheduleLink { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 48px; box-sizing: border-box; padding: 10px 16px; border-radius: 10px; border: 0; cursor: pointer; background: #176148; color: #fff; text-decoration: none; font-size: 16px; font-weight: 700; }
@media (max-width: 800px) {
  html.fePublicClean body .main #content .feTodayHero { flex-direction: row; align-items: center; padding: 14px; gap: 10px; }
  html.fePublicClean body .main #content .feTodayHeroActions { width: auto; flex-shrink: 0; }
  html.fePublicClean body .main #content .feTodayHeroActions button { font-size: 14px !important; padding: 8px; }
  html.fePublicClean body .main #content .feTodayReview { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
  html.fePublicClean body .main #content .feTodayReviewActions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.fePublicClean body .main #content .feTodayScheduleLink { width: 100%; padding-inline: 8px; }
}

/* User home: compact introduction, visible actions, then farm artwork. */
html.fePublicClean body .main #content .feDashboardV10 { padding: 16px 20px !important; gap: 16px; }
html.fePublicClean body .main #content .feDashboardV10 h1 { font-size: 24px; margin: 4px 0; }
html.fePublicClean body .main #content .feDashboardV10 .hero { padding: 8px 12px; }
html.fePublicClean body .main #content .feActionRailItems { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; overflow: visible; }
html.fePublicClean body .main #content .feActionItem { min-width: 0; min-height: 84px; padding: 10px 6px; flex: initial; }
html.fePublicClean body .main #content .feActionItem span { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
html.fePublicClean body .main #content #feOwnerFarmVisual { max-width: 100%; margin: 16px 0; padding: 16px; }
@media (max-width: 800px) {
  html.fePublicClean body .main #content .feActionRailItems { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.fePublicClean body .main #content .feDashboardV10 .hero { display: none; }
  html.fePublicClean body .main #content .feTodayPreviewItems { grid-template-columns: minmax(0, 1fr); }
}

/* The same brand asset stays visible in the header on every screen. */
html.fePublicClean body .top .feTopLogo { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; border-radius: 10px; background: #fff; }
html.fePublicClean body .top .crumb { min-width: 0; }
html.fePublicClean body .top .crumb b { overflow-wrap: anywhere; }
html.fePublicClean body .side .feNavGroup { min-height: 48px; margin: 12px 0 4px; padding: 8px 10px; font-size: 14px !important; letter-spacing: 0; }
html.fePublicClean body .side .feNavGroupLabel { white-space: normal; }
html.fePublicClean body .side .nav button[data-p] { min-height: 48px !important; gap: 8px; }
html.fePublicClean body .side .nav button[data-p] span { overflow-wrap: anywhere; }
html.fePublicClean body .side .feDrawerActions { display: none; }
html.fePublicClean body .main #content .feDashboardAgentRoster { margin: 12px 0; padding: 14px; }
html.fePublicClean body .main #content .feDashboardAgentRoster header { margin-bottom: 10px; }
html.fePublicClean body .main #content .feDashboardAgentRoster h4 { margin: 0 0 4px; font-size: 18px; }
html.fePublicClean body .main #content .feDashboardAgentRoster header p { font-size: 14px !important; }
html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarCard { min-height: 0; padding: 12px; }
html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarArt { width: 48px; height: 48px; }
html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarCopy strong { font-size: 16px; }
html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarCopy small { min-height: 0; margin-top: 2px; }
html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarAction { margin-top: 4px; font-size: 12px; }
@media (max-width: 800px) {
  /* Keep logout directly reachable alongside the menu, logo and notifications.
     The auth shell still controls its display; farm selectors keep their own row. */
  html.fePublicClean body .top { display: grid; grid-template-columns: 48px 40px minmax(0, 1fr) 48px; align-items: center; gap: 8px; padding: 8px 12px; }
  html.fePublicClean body:not(.feSimpleInterface) .top { grid-template-columns: 48px 40px minmax(0, 1fr) 48px auto; }
  html.fePublicClean body .top #menu { grid-column: 1; grid-row: 1; }
  html.fePublicClean body .top .feTopLogo { grid-column: 2; grid-row: 1; }
  html.fePublicClean body .top .crumb { grid-column: 3; grid-row: 1; min-width: 0; }
  html.fePublicClean body .top .crumb :is(small, b) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 20px; }
  html.fePublicClean body .top #feNotifyBtn { grid-column: 4; grid-row: 1; }
  html.fePublicClean body .top :is(#menu, #feNotifyBtn) { width: 48px; min-width: 48px; height: 48px; min-height: 48px !important; margin: 0; padding: 0; border-radius: 12px; }
  html.fePublicClean body .top #feNotifyBtn svg { width: 20px; height: 20px; }
  html.fePublicClean body .top #feLogout { grid-column: 5; grid-row: 1; min-width: 64px; min-height: 48px; margin: 0; padding: 8px; white-space: nowrap; }
  html.fePublicClean body .top :is(#refresh, #logoutBtn, #userBadge, #feUser, #sessionBadge) { display: none !important; }
  html.fePublicClean body .top .feConnectionPill { display: none; }
  html.fePublicClean body .top .feWorkspace { grid-column: 1 / -1; grid-row: 2; width: 100%; min-width: 0; gap: 8px; flex-wrap: wrap; overflow: visible; }
  html.fePublicClean body .top .feWorkspace select { width: 0; min-width: 0 !important; max-width: 100%; flex: 1 1 130px; overflow: hidden; text-overflow: ellipsis; }
  html.fePublicClean body .top .feWorkspace button { min-width: 48px; max-width: 100%; }
  html.fePublicClean body .main #content { padding: 16px !important; }
  html.fePublicClean body .main #content .feDashboardV10 { padding: 14px 16px !important; }
  html.fePublicClean body .main #content .feDashboardV10 h1 { font-size: 22px; line-height: 1.45; }
  html.fePublicClean body .main #content .feActionRail { padding: 12px; }
  html.fePublicClean body .main #content .feActionItem { min-height: 68px; flex-direction: row; gap: 8px; padding: 10px 8px; }
  html.fePublicClean body .main #content .feActionItem span { font-size: 14px; }
  html.fePublicClean body .main #content .feActionItem i { flex: 0 0 28px; }
  html.fePublicClean body .main #content .feActionRailHead small { display: none; }
  html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarGrid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarCard { flex-direction: row; gap: 12px; text-align: right; }
  html.fePublicClean body .main #content .feDashboardAgentRoster .feAgentAvatarCopy { align-items: flex-start; }
  html.fePublicClean body .side .brand { padding-inline: 12px 58px !important; }
  html.fePublicClean body .side .brand img { width: 44px; height: 44px; flex: 0 0 44px; }
  html.fePublicClean body .side .feNavCloseV10 { width: 48px; height: 48px; }
  html.fePublicClean body .side .feNavCloseV10 span:before, html.fePublicClean body .side .feNavCloseV10 span:after { left: 12px; top: 20px; width: 20px; }
  html.fePublicClean body .side > :is(.brand, .farm, .feDrawerActions) { flex-shrink: 0; }
  html.fePublicClean body .side .nav { min-height: 0; flex: 1 1 0; overflow-y: auto; overflow-x: hidden; }
  html.fePublicClean body .side .feDrawerActions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; flex: 0 0 auto; padding: 12px 10px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #ffffff24; background: #0d3b2c; }
  html.fePublicClean body .side .feDrawerActions button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 48px !important; margin: 0; padding: 8px 6px; border: 1px solid #ffffff30; border-radius: 12px; background: #ffffff0d; color: #fff; font-size: 14px !important; line-height: 1.45 !important; }
  html.fePublicClean body .side .feDrawerActions button span { min-width: 0; overflow-wrap: anywhere; }
  html.fePublicClean body .side .feDrawerActions button svg { display: block; width: 18px; height: 18px; min-width: 18px; max-width: 18px; max-height: 18px; flex: 0 0 18px; margin: 0; }
  html.fePublicClean body .side .feDrawerActions button[hidden] { display: none !important; }
  html.fePublicClean body.feMobileDockReady .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  html.fePublicClean body .feMobileDock { bottom: calc(8px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  html.fePublicClean body .main #content .feDashboardV10 { padding: 14px 16px !important; }
  html.fePublicClean body .main #content .feDashboardV10 h1 { font-size: 20px; }
  html.fePublicClean body .main #content .feActionRailItems { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.fePublicClean body .main #content .feActionItem { min-height: 76px; flex-direction: row; gap: 8px; }
  html.fePublicClean body .main #content #feOwnerFarmVisual { padding: 12px; }
}
/* Keep the manager launcher above the mobile dock, while dialogs and the
   navigation drawer retain their own focus and stacking order. */
@media (max-width: 800px) {
  html body #farmAgent { z-index: 9991; }
  html body.feMobileDockReady #farmAgent { bottom: calc(96px + env(safe-area-inset-bottom)); }
  html body.feDrawerOpen #farmAgent { visibility: hidden; }
}
@media (max-width: 800px) {
  html body .main #content :is(.head, .pt) { flex-wrap: wrap; gap: 10px; }
  html body .main #content .quick { flex-wrap: wrap; }
  html body .main #content :is(.form, .form.ops, .form.finance) { grid-template-columns: minmax(0, 1fr); }
  html body .main #content .field.wide { grid-column: auto; }
  html body .main #content :is(input, select, textarea) { max-width: 100%; min-width: 0; }
  html body .main #content .moduleStats { grid-template-columns: minmax(0, 1fr); }
}
/* Figma Sprint 04 Nov: visual treatment of the existing, permission-aware UI. */
html.fePublicClean body { background: var(--fe-ui-background); color: var(--fe-ui-text); }
html.fePublicClean body .main #content :is(.panel, .stat, .feActionRail, .feTodayReview, .feTodayPreview, .feProgCard) {
  border: 1px solid var(--fe-ui-line);
  border-radius: var(--fe-ui-radius);
  background: var(--fe-ui-surface);
  box-shadow: none;
}
html.fePublicClean body .main #content :is(.welcome, .feTodayHero) {
  background: var(--fe-ui-tint);
  border: 1px solid var(--fe-ui-line);
  border-radius: var(--fe-ui-radius);
  box-shadow: none;
  color: var(--fe-ui-text);
}
html.fePublicClean body .main #content :is(.welcome, .feTodayHero) :is(h1, h2) { color: var(--fe-ui-brand); }
html.fePublicClean body .main #content :is(.grid, .stats) { gap: var(--fe-ui-space); }
html.fePublicClean body .main #content :is(.panel, .stat) { padding: var(--fe-ui-space); min-width: 0; }
html.fePublicClean body .main #content :is(.feActionRailHead b, .feTodayPreviewHead b) { font-size: 16px; }
html.fePublicClean body .main #content .feActionItem {
  background: var(--fe-ui-surface);
  border-color: var(--fe-ui-line);
  border-radius: var(--fe-ui-control-radius);
  box-shadow: none;
  color: var(--fe-ui-brand);
  transition: background-color .15s ease, border-color .15s ease;
}
html.fePublicClean body .main #content .feActionItem:hover {
  background: var(--fe-ui-tint); border-color: var(--fe-ui-brand); transform: none; box-shadow: none;
}
html.fePublicClean body .main #content :is(button, input:not([type=checkbox]):not([type=radio]), select, textarea) {
  border-radius: var(--fe-ui-control-radius);
}
html.fePublicClean body .main #content :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  background: var(--fe-ui-surface); color: var(--fe-ui-text); border-color: var(--fe-ui-line);
}
html.fePublicClean body .main #content :is(input[type=checkbox], input[type=radio]) {
  min-height: 20px !important; min-width: 20px !important; width: 20px; height: 20px; flex: 0 0 20px;
  accent-color: var(--fe-ui-brand);
}
html.fePublicClean body .main #content label:has(> :is(input[type=checkbox], input[type=radio])) {
  min-height: var(--fe-ui-touch); align-items: center; cursor: pointer;
}
html.fePublicClean body .main #content button:disabled { cursor: not-allowed; }
html.fePublicClean body .main #content :is(p, .pt, .head, .field, .feTodayItem) { overflow-wrap: anywhere; }
html.fePublicClean body :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--fe-ui-focus) !important; outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html.fePublicClean body .main #content .feActionItem { transition: none; }
}
/* The Today module injects compact !important controls; retain readable targets. */
html.fePublicClean body .main #content:is(.feTodayReorganized, .feDashboardReorganized) :is(button, select, input:not([type=checkbox]):not([type=radio]), textarea) {
  min-height: var(--fe-ui-touch) !important;
}
html.fePublicClean body .main #content:is(.feTodayReorganized, .feDashboardReorganized) button { min-width: var(--fe-ui-touch) !important; }
html.fePublicClean body .main #content.feTodayReorganized .feTodayHero {
  background: var(--fe-ui-tint) !important; color: var(--fe-ui-text) !important;
  border-radius: var(--fe-ui-radius) !important; box-shadow: none !important;
}
html.fePublicClean body .main #content.feTodayReorganized .feTodayHero h1 { color: var(--fe-ui-brand) !important; }
html.fePublicClean body .main #content.feTodayReorganized .feTodayHero p { color: var(--fe-ui-muted) !important; font-size: 14px !important; line-height: 1.65 !important; }
html.fePublicClean body .main #content.feDashboardReorganized > #feTodayPreview { box-shadow: none !important; border-radius: var(--fe-ui-radius) !important; }
html.fePublicClean body .main #content.feTodayReorganized .feTodayFarmContext {
  color: var(--fe-ui-text); background: var(--fe-ui-surface); border-color: var(--fe-ui-line);
}
html.fePublicClean body .main #content.feTodayReorganized .feTodayFarmContext span { color: var(--fe-ui-muted); }
html.fePublicClean body .main #content.feTodayReorganized :is(.feTodayFarmContext, .feTodayHeroActions) button {
  color: var(--fe-ui-brand); background: var(--fe-ui-surface); border-color: var(--fe-ui-line);
}
html.fePublicClean body .main #content.feTodayReorganized .feTodayDate {
  color: var(--fe-ui-muted); border-color: var(--fe-ui-line); background: var(--fe-ui-surface); font-size: 14px;
}
