@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    @apply bg-stone-100 text-slate-900;
  }
}

@layer components {
  .card {
    @apply rounded-xl border border-stone-200 bg-white shadow-sm;
  }

  .card-header {
    @apply border-b border-stone-200 px-5 py-4;
  }

  .card-body {
    @apply px-5 py-4;
  }

  .btn-primary {
    @apply inline-flex items-center rounded-md bg-emerald-700 px-4 py-2 text-sm font-medium text-white hover:bg-emerald-800;
  }

  .btn-secondary {
    @apply inline-flex items-center rounded-md border border-stone-300 bg-white px-4 py-2 text-sm font-medium text-slate-700 hover:bg-stone-50;
  }

  .input {
    @apply mt-1 block w-full rounded-md border-stone-300 text-sm shadow-sm focus:border-emerald-700 focus:ring-emerald-700;
  }

  .label {
    @apply text-sm font-medium text-slate-700;
  }

  .data-grid {
    @apply grid gap-4 md:grid-cols-2 xl:grid-cols-3;
  }
}
/*


 */

:root {
  --industrial-bg: #f7f9fb;
  --industrial-surface: #ffffff;
  --industrial-surface-low: #f2f4f6;
  --industrial-surface-mid: #eceef0;
  --industrial-surface-high: #e6e8ea;
  --industrial-border: #d7dee3;
  --industrial-border-strong: #bcc9c6;
  --industrial-text: #191c1e;
  --industrial-muted: #58636f;
  --industrial-muted-soft: #6d7a77;
  --industrial-primary: #00685f;
  --industrial-primary-strong: #005049;
  --industrial-primary-soft: #dff8f3;
  --industrial-primary-soft-2: #89f5e7;
  --industrial-secondary: #515f74;
  --industrial-danger: #ba1a1a;
  --industrial-danger-soft: #ffdad6;
  --industrial-warning: #a85b00;
  --industrial-warning-soft: #fff1db;
  --industrial-success: #0d7a42;
  --industrial-success-soft: #dff7e9;
  --industrial-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  --industrial-shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.08);
  --industrial-radius-sm: 0.25rem;
  --industrial-radius: 0.5rem;
  --industrial-radius-lg: 0.75rem;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--industrial-bg);
  color: var(--industrial-text);
  font-family: "Inter", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-size: 1.1rem;
  line-height: 1;
}

.min-w-0 {
  min-width: 0 !important;
}

.min-w-220 {
  min-width: 13.75rem;
}

.app-shell {
  background: var(--industrial-bg);
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 18rem;
  min-height: 100vh;
  padding: 1.5rem 1rem 1rem;
  background: var(--industrial-surface-low);
  border-right: 1px solid var(--industrial-border);
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.4rem 0.5rem 1.4rem;
}

.app-sidebar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--industrial-radius);
  background: linear-gradient(135deg, var(--industrial-primary) 0%, #008378 100%);
  box-shadow: var(--industrial-shadow);
}

.app-sidebar-logo {
  width: 2.15rem;
  height: 2.15rem;
  object-fit: cover;
  border-radius: 0.35rem;
}

.app-sidebar-kicker,
.app-sidebar-group-label,
.app-topbar-kicker,
.metric-label,
.dashboard-section-kicker,
.table thead th,
.app-user-role {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-sidebar-kicker {
  margin: 0;
  color: var(--industrial-muted-soft);
  font-size: 0.69rem;
  font-weight: 700;
}

.app-sidebar-title {
  color: var(--industrial-primary);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.app-sidebar-group {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0.35rem;
}

.app-sidebar-group-label {
  padding: 0 0.7rem 0.35rem;
  color: var(--industrial-muted-soft);
  font-size: 0.7rem;
  font-weight: 700;
}

.app-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.45rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid transparent;
  border-radius: var(--industrial-radius-lg);
  background: transparent;
  color: var(--industrial-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.app-sidebar-link:hover {
  background: var(--industrial-surface-high);
  border-color: var(--industrial-border);
  color: var(--industrial-primary);
  transform: translateX(1px);
}

.app-sidebar-link.active {
  background: var(--industrial-primary-soft);
  border-color: rgba(0, 104, 95, 0.18);
  color: var(--industrial-primary);
}

.app-sidebar-link .material-symbols-outlined {
  color: currentColor;
  font-size: 1.2rem;
}

.app-sidebar-section-toggle {
  cursor: pointer;
}

.app-sidebar-chevron {
  margin-left: auto;
  transition: transform 140ms ease;
}

.app-sidebar-section-toggle[aria-expanded="true"] .app-sidebar-chevron {
  transform: rotate(180deg);
}

.app-sidebar-subnav {
  margin: 0.2rem 0 0.35rem 2.1rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--industrial-border);
}

.app-sidebar-sublink {
  display: block;
  padding: 0.42rem 0.65rem;
  border-radius: 0.65rem;
  color: var(--industrial-muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.15;
  text-decoration: none;
}

.app-sidebar-sublink:hover {
  background: var(--industrial-surface-high);
  color: var(--industrial-primary);
}

.app-sidebar-sublink.active {
  background: rgba(0, 104, 95, 0.1);
  color: var(--industrial-primary);
}

.app-sidebar-footer {
  margin-top: 1rem;
  padding: 1rem 0.5rem 0;
  border-top: 1px solid var(--industrial-border);
}

.app-user-panel {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.app-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--industrial-primary);
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.app-user-name {
  color: var(--industrial-text);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-role {
  color: var(--industrial-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.app-workspace {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.9rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--industrial-border);
}

.app-topbar-kicker {
  color: var(--industrial-muted-soft);
  font-size: 0.69rem;
  font-weight: 700;
}

.app-topbar-title {
  color: var(--industrial-text);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.app-topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 20rem;
}

.app-topbar-search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--industrial-muted-soft);
}

.app-topbar-search-input {
  width: 100%;
  height: 2.75rem;
  padding: 0.65rem 0.95rem 0.65rem 2.6rem;
  border: 1px solid var(--industrial-border);
  border-radius: 999px;
  background: var(--industrial-surface-low);
  color: var(--industrial-text);
  font-size: 0.94rem;
}

.app-topbar-search-input:focus {
  outline: none;
  border-color: rgba(0, 104, 95, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 104, 95, 0.08);
}

.app-topbar-icon-button,
.app-mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--industrial-border);
  border-radius: 999px;
  background: var(--industrial-surface);
  color: var(--industrial-secondary);
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.app-topbar-icon-button:hover,
.app-mobile-menu-button:hover {
  background: var(--industrial-surface-low);
  color: var(--industrial-primary);
  border-color: var(--industrial-border-strong);
}

.app-mobile-nav-shell {
  padding: 0 1rem 1rem;
  background: transparent;
}

.app-mobile-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-top: 0;
  border-radius: 0 0 var(--industrial-radius-lg) var(--industrial-radius-lg);
  background: var(--industrial-surface);
}

.app-mobile-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 0.7rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface-low);
  color: var(--industrial-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.app-mobile-nav-link.active {
  background: var(--industrial-primary-soft);
  border-color: rgba(0, 104, 95, 0.18);
  color: var(--industrial-primary);
}

.card.section-card.farm-management-nav,
.farm-management-nav,
.farm-management-nav .card-body {
  overflow: visible;
}

.card.section-card.farm-management-nav {
  position: relative;
  z-index: 5;
}

.farm-more-menu {
  position: relative;
}

.farm-more-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.farm-more-menu summary::-webkit-details-marker {
  display: none;
}

.farm-more-menu summary .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 120ms ease;
}

.farm-more-menu[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}

.farm-more-menu-list {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 50;
  display: grid;
  min-width: 13rem;
  margin: 0;
  padding: 0.35rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface);
  list-style: none;
}

.farm-root-menu .farm-more-menu-list {
  right: auto;
  left: 0;
}

.farm-more-menu-link {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  color: var(--industrial-secondary);
  font-weight: 650;
  text-decoration: none;
}

.farm-more-menu-link:hover {
  background: var(--industrial-surface-high);
  color: var(--industrial-primary);
}

.farm-more-menu-link.active,
.farm-more-menu-link:active {
  background: var(--industrial-primary);
  color: #fff;
}

.shift-scroll-map-frame iframe {
  pointer-events: none;
}

body.shift-scroll-map-active .shift-scroll-map-frame:hover iframe {
  pointer-events: auto;
}

.app-main,
.app-auth-shell {
  padding: 1.5rem;
}

.app-main {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.app-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(137, 245, 231, 0.24), transparent 28%),
    linear-gradient(180deg, #f9fbfc 0%, var(--industrial-bg) 100%);
}

.app-flash-stack {
  position: sticky;
  top: 0.75rem;
  z-index: 1025;
}

.page-header {
  margin-bottom: 1.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.page-header h2,
.page-header .h2,
.page-header .h3 {
  color: var(--industrial-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-hero {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background:
    linear-gradient(135deg, rgba(137, 245, 231, 0.16), transparent 36%),
    linear-gradient(180deg, var(--industrial-surface) 0%, #fbfcfd 100%);
  box-shadow: var(--industrial-shadow-lg);
}

.hero-eyebrow,
.dashboard-section-kicker {
  color: var(--industrial-muted-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.section-card,
.card.section-card {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  overflow: hidden;
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.section-card .card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
}

.section-card .card-body {
  padding: 1.25rem;
}

.metric-card {
  position: relative;
  height: 100%;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.metric-card::before {
  content: none;
}

.metric-value {
  color: var(--industrial-text);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.dashboard-command-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 2rem;
  border-radius: var(--industrial-radius-lg);
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 18%, rgba(137, 245, 231, 0.25), transparent 25%),
    linear-gradient(135deg, #004a44 0%, var(--industrial-primary) 58%, #0b7665 100%);
  box-shadow: var(--industrial-shadow-lg);
}

.dashboard-command-hero::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  pointer-events: none;
}

.dashboard-command-copy,
.dashboard-date-block {
  position: relative;
  z-index: 1;
}

.dashboard-command-copy h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  font-weight: 750;
  letter-spacing: -0.04em;
}

.dashboard-command-copy p {
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.8);
}

.dashboard-command-hero .hero-eyebrow {
  color: #aaf7eb;
}

.dashboard-date-block {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.75rem;
  min-width: 12rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--industrial-radius);
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

.dashboard-date-block .material-symbols-outlined {
  font-size: 1.5rem;
}

.dashboard-date-block span:not(.material-symbols-outlined) {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
}

.dashboard-date-block .dashboard-date-day {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
}

.dashboard-search-card .card-body {
  padding: 1rem;
}

.dashboard-search-form {
  display: flex;
  gap: 0.65rem;
}

.dashboard-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
}

.dashboard-search-input-wrap > .material-symbols-outlined {
  position: absolute;
  top: 50%;
  left: 1rem;
  z-index: 2;
  color: var(--industrial-muted);
  font-size: 1.3rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.dashboard-search-input-wrap .form-control {
  padding-left: 3rem;
  border-color: var(--industrial-border-strong);
}

.dashboard-search-button {
  min-width: 7rem;
}

.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.dashboard-action-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 5.25rem;
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  color: var(--industrial-text);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.dashboard-action-card:hover,
.dashboard-action-card:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  box-shadow: var(--industrial-shadow-lg);
  transform: translateY(-2px);
}

.dashboard-action-icon,
.dashboard-work-icon,
.dashboard-recent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--industrial-radius);
  color: var(--industrial-primary);
  background: var(--industrial-primary-soft);
}

.dashboard-action-card--field .dashboard-action-icon {
  color: #17662e;
  background: #e4f5df;
}

.dashboard-action-card--service .dashboard-action-icon {
  color: #9a5100;
  background: var(--industrial-warning-soft);
}

.dashboard-action-card--office .dashboard-action-icon {
  color: var(--industrial-secondary);
  background: #e9edf4;
}

.dashboard-action-icon .material-symbols-outlined,
.dashboard-work-icon .material-symbols-outlined,
.dashboard-recent-icon .material-symbols-outlined {
  font-size: 1.35rem;
}

.dashboard-action-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.dashboard-action-text strong {
  line-height: 1.25;
}

.dashboard-action-text small {
  margin-top: 0.2rem;
  overflow: hidden;
  color: var(--industrial-muted);
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-action-arrow {
  color: var(--industrial-muted-soft);
}

.dashboard-attention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.dashboard-attention-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  color: var(--industrial-text);
  background: var(--industrial-surface);
  text-decoration: none;
}

.dashboard-attention-card:hover,
.dashboard-attention-card:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
}

.dashboard-attention-value {
  grid-row: 1 / span 2;
  min-width: 2.8rem;
  font-size: 2rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-attention-label {
  font-weight: 700;
  line-height: 1.25;
}

.dashboard-attention-detail {
  color: var(--industrial-muted);
  font-size: 0.78rem;
}

.dashboard-work-list {
  display: flex;
  flex-direction: column;
}

.dashboard-work-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--industrial-border);
  color: var(--industrial-text);
  text-decoration: none;
}

.dashboard-work-row:last-child {
  border-bottom: 0;
}

.dashboard-work-row:hover,
.dashboard-work-row:focus-visible {
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

.dashboard-work-copy,
.dashboard-work-side,
.dashboard-service-row > span,
.dashboard-stock-row > span,
.dashboard-recent-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-work-copy {
  flex: 1 1 auto;
}

.dashboard-work-copy small,
.dashboard-work-side small,
.dashboard-service-row small,
.dashboard-stock-row small,
.dashboard-recent-copy small {
  color: var(--industrial-muted);
}

.dashboard-work-side {
  align-items: flex-end;
  flex: 0 0 auto;
  gap: 0.35rem;
}

.dashboard-service-row,
.dashboard-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-text);
  text-decoration: none;
}

.dashboard-service-row:hover,
.dashboard-stock-row:hover {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

.dashboard-service-date {
  flex: 0 0 auto;
  color: var(--industrial-muted);
  font-size: 0.8rem;
}

.dashboard-recent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dashboard-recent-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-text);
  text-decoration: none;
}

.dashboard-recent-card:hover,
.dashboard-recent-card:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

.dashboard-recent-copy {
  flex: 1 1 auto;
}

.dashboard-recent-copy strong,
.dashboard-recent-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-type {
  color: var(--industrial-primary) !important;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-browse-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface-low);
}

.dashboard-browse-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-browse-links a {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--industrial-border-strong);
  border-radius: 999px;
  color: var(--industrial-secondary);
  background: var(--industrial-surface);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.dashboard-browse-links a:hover,
.dashboard-browse-links a:focus-visible {
  border-color: var(--industrial-primary);
  color: var(--industrial-primary-strong);
  background: var(--industrial-primary-soft);
}

@media (max-width: 1199.98px) {
  .dashboard-action-grid,
  .dashboard-attention-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .dashboard-command-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 1.35rem;
  }

  .dashboard-date-block {
    min-width: 0;
  }

  .dashboard-search-form,
  .dashboard-browse-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-search-button {
    min-width: 0;
  }

  .dashboard-work-row {
    align-items: flex-start;
    padding: 0.9rem 1rem;
  }

  .dashboard-work-side {
    align-items: flex-end;
  }

  .dashboard-recent-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-browse-links {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .dashboard-action-grid,
  .dashboard-attention-grid {
    gap: 0.65rem;
  }

  .dashboard-action-card {
    align-items: flex-start;
    flex-direction: column;
    min-height: 8.2rem;
  }

  .dashboard-action-text small {
    white-space: normal;
  }

  .dashboard-action-arrow {
    display: none;
  }

  .dashboard-attention-card {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 7.4rem;
  }

  .dashboard-attention-value {
    min-width: 0;
    font-size: 1.75rem;
  }

  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-work-icon {
    display: none;
  }

  .dashboard-work-side {
    max-width: 7rem;
  }
}

.empty-state {
  border: 1px dashed var(--industrial-border-strong);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface-low);
}

.detail-label {
  color: var(--industrial-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.well-visual-card {
  max-width: 430px;
  margin: 0 auto;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background:
    radial-gradient(circle at 18% 12%, rgba(137, 245, 231, 0.16), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  box-shadow: var(--industrial-shadow);
  overflow: hidden;
}

.well-visual-shell {
  display: flex;
  justify-content: center;
}

.well-visual {
  width: 100%;
  height: auto;
}

.well-visual-title,
.well-visual-gpm,
.well-visual-label,
.well-visual-label-small {
  fill: #06285f;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-weight: 800;
}

.well-visual-title {
  font-size: 64px;
  letter-spacing: 0.04em;
}

.well-visual-gpm-box {
  fill: #ffffff;
  stroke: #06285f;
  stroke-width: 4;
}

.well-visual-gpm {
  font-size: 52px;
}

.well-visual-label {
  font-size: 24px;
}

.well-visual-label-small {
  font-size: 21px;
}

.well-visual-measure-line,
.well-visual-reference-line {
  stroke: #06285f;
  stroke-width: 4;
}

.well-visual-reference-line {
  stroke: #172033;
  stroke-width: 3;
}

.well-visual-arrow {
  stroke: #06285f;
  stroke-width: 5;
}

.well-visual-arrow-head {
  fill: #06285f;
}

.map-marker {
  align-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 72, 75, 0.35);
  color: #ffffff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 800;
  justify-content: center;
}

.map-marker span {
  line-height: 1;
}

.map-marker-pin {
  background: #015f64;
}

.map-marker-irrigation {
  background: #07757a;
}

.map-marker-issue {
  background: #ca630b;
}

.map-marker-scout {
  background: #0d7a42;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(15, 23, 42, 0.018);
  --bs-table-hover-bg: rgba(0, 104, 95, 0.05);
  margin-bottom: 0;
}

.table thead th {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  background: var(--industrial-surface-low);
  color: var(--industrial-muted-soft);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  border-bottom-width: 1px;
}

.table > :not(caption) > * > * {
  border-color: var(--industrial-border);
  padding: 0.95rem 1rem;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 104, 95, 0.045);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:focus-visible,
.clickable-card:focus-visible {
  outline: 2px solid rgba(0, 104, 95, 0.4);
  outline-offset: -2px;
}

a {
  color: var(--industrial-primary);
}

a:hover {
  color: var(--industrial-primary-strong);
}

.btn {
  border-radius: var(--industrial-radius);
  font-weight: 600;
}

.btn-success {
  --bs-btn-bg: var(--industrial-primary);
  --bs-btn-border-color: var(--industrial-primary);
  --bs-btn-hover-bg: var(--industrial-primary-strong);
  --bs-btn-hover-border-color: var(--industrial-primary-strong);
  --bs-btn-active-bg: var(--industrial-primary-strong);
  --bs-btn-active-border-color: var(--industrial-primary-strong);
  --bs-btn-disabled-bg: #67b7ae;
  --bs-btn-disabled-border-color: #67b7ae;
}

.btn-outline-secondary {
  --bs-btn-color: var(--industrial-secondary);
  --bs-btn-border-color: var(--industrial-border-strong);
  --bs-btn-hover-color: var(--industrial-primary);
  --bs-btn-hover-bg: var(--industrial-surface-low);
  --bs-btn-hover-border-color: var(--industrial-primary-soft-2);
  --bs-btn-active-color: var(--industrial-primary);
  --bs-btn-active-bg: var(--industrial-primary-soft);
  --bs-btn-active-border-color: rgba(0, 104, 95, 0.2);
}

.form-control,
.form-select,
.form-check-input {
  border-color: var(--industrial-border-strong);
  border-radius: var(--industrial-radius);
  background-color: var(--industrial-surface);
  color: var(--industrial-text);
}

.form-control::placeholder {
  color: #8a9499;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(0, 104, 95, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(0, 104, 95, 0.12);
}

.form-check-input:checked {
  background-color: var(--industrial-primary);
  border-color: var(--industrial-primary);
}

.alert-success {
  --bs-alert-bg: var(--industrial-success-soft);
  --bs-alert-border-color: #b9eacb;
  --bs-alert-color: #0b5931;
}

.alert-danger {
  --bs-alert-bg: var(--industrial-danger-soft);
  --bs-alert-border-color: #f0b7b0;
  --bs-alert-color: #8c1717;
}

.text-bg-success {
  background-color: var(--industrial-success) !important;
}

.text-bg-secondary {
  background-color: var(--industrial-secondary) !important;
}

.bg-warning-subtle {
  background-color: var(--industrial-warning-soft) !important;
}

.table-warning {
  --bs-table-bg: var(--industrial-warning-soft);
  --bs-table-hover-bg: #ffe6c4;
}

.badge-soft-success {
  background: var(--industrial-success-soft);
  color: var(--industrial-success);
}

.badge-soft-secondary {
  background: var(--industrial-surface-mid);
  color: var(--industrial-secondary);
}

.asset-command-card {
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow-lg);
}

.asset-command-card .card-header {
  background: var(--industrial-surface-low);
}

.asset-category-panel {
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
}

.asset-category-panel-header {
  border-bottom: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
}

.asset-panel-kicker {
  color: var(--industrial-muted-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.asset-row-card {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.asset-row-card:hover {
  border-color: rgba(0, 104, 95, 0.25);
  box-shadow: var(--industrial-shadow);
  transform: translateY(-1px);
}

.clickable-card {
  cursor: pointer;
}

.asset-unit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: var(--industrial-primary-soft);
  color: var(--industrial-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.asset-unit-pill:hover {
  background: var(--industrial-primary-soft-2);
  color: var(--industrial-primary-strong);
}

.asset-title-link {
  color: var(--industrial-text);
  font-weight: 700;
  text-decoration: none;
}

.asset-title-link:hover {
  color: var(--industrial-primary);
}

.asset-status-pill {
  border: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
  color: var(--industrial-secondary);
}

.asset-meta-line,
.mobile-card-meta {
  color: var(--industrial-muted);
}

.mobile-record-list {
  display: grid;
  gap: 1rem;
}

.mobile-record-card {
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.mobile-record-card .card-body {
  padding: 1rem;
}

.spray-workflow {
  padding: 0.85rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: var(--industrial-surface);
  box-shadow: var(--industrial-shadow);
}

.spray-workflow-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0.35rem 0.65rem;
}

.spray-workflow-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.spray-workflow-step {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-secondary);
  text-decoration: none;
}

.spray-workflow-step:hover,
.spray-workflow-step.complete {
  border-color: rgba(0, 104, 95, 0.3);
  background: var(--industrial-primary-soft);
  color: var(--industrial-primary);
}

.spray-workflow-step.active {
  border-color: var(--industrial-primary);
  background: var(--industrial-primary);
  color: #fff;
}

.spray-workflow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
}

.spray-workflow-label,
.spray-workflow-detail {
  display: block;
}

.spray-workflow-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.spray-workflow-detail {
  margin-top: 0.1rem;
  color: var(--industrial-muted);
  font-size: 0.75rem;
}

.spray-workflow-step.active .spray-workflow-detail {
  color: rgba(255, 255, 255, 0.78);
}

.treatment-scout-photo {
  width: 120px;
  height: 100px;
  flex: 0 0 auto;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  object-fit: cover;
}

.treatment-selected-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(0, 104, 95, 0.3);
  border-radius: var(--industrial-radius);
  background: var(--industrial-primary-soft);
}

.treatment-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.treatment-option-card {
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: var(--industrial-surface);
}

.treatment-option-card.selected {
  border-color: var(--industrial-primary);
  box-shadow: inset 0 0 0 1px var(--industrial-primary);
}

.mobile-card-photo,
.mobile-card-photo-placeholder {
  width: 78px;
  height: 78px;
  border-radius: var(--industrial-radius);
  border: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
}

.mobile-card-photo {
  object-fit: cover;
}

.mobile-card-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--industrial-muted);
  font-size: 0.75rem;
}

.equipment-list-table {
  table-layout: fixed;
}

.equipment-list-table .equipment-unit-col {
  width: 6rem;
}

.equipment-list-table .equipment-image-col {
  width: 5.5rem;
}

.equipment-unit-column {
  width: 6rem;
  white-space: nowrap;
}

.equipment-image-column {
  width: 5.5rem;
  text-align: center;
}

.equipment-list-thumb {
  width: 4.5rem;
  height: 3.25rem;
  border-radius: var(--industrial-radius);
  object-fit: cover;
  border: 1px solid var(--industrial-border);
  background: var(--industrial-surface-low);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--industrial-muted);
  font-size: 0.72rem;
  text-align: center;
}

.equipment-list-thumb-placeholder {
  background: var(--industrial-surface-low);
}

.detail-photo {
  width: 180px;
  height: 140px;
  object-fit: cover;
}

.collapse-desktop-show {
  display: none;
}

@media (min-width: 992px) {
  .collapse.collapse-desktop-show {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }
}

@media (max-width: 1199.98px) {
  .app-topbar-search {
    min-width: 15rem;
  }
}

@media (max-width: 991.98px) {
  .app-main,
  .app-auth-shell {
    padding: 1rem;
  }

  .app-topbar {
    padding: 0.85rem 1rem;
  }

  .page-header {
    padding: 1.1rem;
    margin-bottom: 1rem;
  }

  .page-header h2,
  .page-header .h2 {
    font-size: 1.5rem;
  }

  .section-card .card-header,
  .section-card .card-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .form-control,
  .form-select,
  .btn {
    min-height: 48px;
    font-size: 1rem;
  }

  .btn-sm {
    min-height: 40px;
  }

  .mobile-card-actions .btn,
  .page-header .btn,
  .card-header .btn {
    flex: 1 1 auto;
  }

  .detail-photo {
    width: 100%;
    max-width: 100%;
    height: 190px;
  }

  .spray-workflow-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spray-workflow-detail {
    display: none;
  }

  .treatment-option-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .spray-workflow-heading {
    display: block;
  }

  .spray-workflow-heading .small {
    display: block;
    margin-top: 0.2rem;
  }

  .spray-workflow-step {
    padding: 0.6rem;
  }

  .spray-workflow-label {
    font-size: 0.8rem;
  }

  .treatment-scout-photo {
    width: 88px;
    height: 88px;
  }
}

.farm-booklet {
  color: #16202a;
}

.booklet-page {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: #fff;
  box-shadow: var(--industrial-shadow);
}

.booklet-cover {
  min-height: 70vh;
}

.booklet-cover-heading {
  margin-bottom: 1.25rem;
  text-align: center;
}

.booklet-cover-heading h1 {
  margin: 0;
  color: #003f43;
  font-size: clamp(2.25rem, 7vw, 5.25rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.booklet-cover-heading h2,
.booklet-page-header h2 {
  margin: 0;
  color: #005f64;
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 850;
}

.booklet-kicker,
.booklet-label,
.booklet-section-title {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booklet-kicker {
  margin-bottom: 0.35rem;
  color: #66737d;
  font-size: 0.82rem;
  font-weight: 800;
}

.booklet-muted {
  color: #5e6b75;
  font-size: 0.9rem;
}

.booklet-map-card {
  overflow: hidden;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: #f8fafb;
}

.booklet-section-title {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--industrial-border);
  color: #005f64;
  font-size: 0.82rem;
  font-weight: 800;
}

.booklet-map {
  height: 540px;
  background: #dbe4e8;
}

.booklet-map-short {
  height: 360px;
}

.booklet-field-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.booklet-field-map-card {
  overflow: hidden;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius-lg);
  background: #fff;
}

.booklet-field-map-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--industrial-border);
  background: #f8fbfb;
}

.booklet-field-map-heading h3 {
  margin: 0;
  color: #003f43;
  font-size: 1.25rem;
  font-weight: 850;
}

.booklet-field-map {
  height: 320px;
}

.booklet-field-map-meta {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem 1rem;
  color: #33414b;
  font-size: 0.88rem;
}

.booklet-summary-grid,
.booklet-notes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.booklet-summary-grid > div,
.booklet-note-box {
  padding: 1rem;
  border: 1px solid var(--industrial-border);
  border-radius: var(--industrial-radius);
  background: #f9fbfb;
}

.booklet-label {
  color: #66737d;
  font-size: 0.72rem;
  font-weight: 800;
}

.booklet-value {
  margin-top: 0.25rem;
  color: #172026;
  font-size: 1.05rem;
  font-weight: 800;
}

.booklet-page-header {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #d8efec;
}

.booklet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.booklet-table th,
.booklet-table td {
  padding: 0.55rem 0.6rem;
  border: 1px solid #d7dee3;
  vertical-align: top;
}

.booklet-table th {
  background: #e8f5f3;
  color: #00484b;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.booklet-empty {
  margin: 0;
  padding: 1rem;
  border: 1px dashed var(--industrial-border);
  border-radius: var(--industrial-radius);
  color: var(--industrial-muted);
}

.booklet-note-box {
  min-height: 12rem;
}

.booklet-note-box h3 {
  color: #005f64;
  font-size: 1.1rem;
  font-weight: 850;
}

@media print {
  @page {
    size: letter landscape;
    margin: 0.45in;
  }

  html,
  body {
    background: #fff !important;
  }

  .app-sidebar,
  .app-topbar,
  .farm-booklet-controls,
  .no-print {
    display: none !important;
  }

  .app-layout,
  .app-workspace,
  .app-main {
    display: block !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  .farm-booklet {
    width: 100%;
  }

  .booklet-page {
    break-after: page;
    page-break-after: always;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .booklet-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .booklet-cover {
    min-height: 0;
  }

  .booklet-cover-heading h1 {
    font-size: 3.8rem;
  }

  .booklet-cover-heading h2,
  .booklet-page-header h2 {
    font-size: 2rem;
  }

  .booklet-map {
    height: 4.9in;
  }

  .booklet-map-short {
    height: 3.2in;
  }

  .booklet-field-map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2in;
  }

  .booklet-field-map-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .booklet-field-map-heading {
    padding: 0.12in 0.15in;
  }

  .booklet-field-map-heading h3 {
    font-size: 0.98rem;
  }

  .booklet-field-map {
    height: 2.35in;
  }

  .booklet-field-map-meta {
    padding: 0.1in 0.15in;
    font-size: 0.68rem;
  }

  .booklet-summary-grid,
  .booklet-notes-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .booklet-table {
    font-size: 0.74rem;
  }

  .booklet-table th,
  .booklet-table td {
    padding: 0.33rem 0.38rem;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}
