/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --vrp-bg: #eef3f6;
  --vrp-panel: #ffffff;
  --vrp-panel-soft: #f7fafb;
  --vrp-text: #172126;
  --vrp-muted: #637078;
  --vrp-line: #d9e2e7;
  --vrp-primary: #598f40;
  --vrp-primary-dark: #598f40;
  --vrp-accent: #5d8c92;
  --vrp-danger: #b42318;
  --vrp-shadow: 0 18px 45px rgba(23, 33, 38, 0.10);
}

:root[data-theme="dark"] {
  --vrp-bg: #12181b;
  --vrp-panel: #1d262b;
  --vrp-panel-soft: #243036;
  --vrp-text: #eef5f7;
  --vrp-muted: #a9bac1;
  --vrp-line: #34444c;
  --vrp-primary: #8fc568;
  --vrp-primary-dark: #8fc568;
  --vrp-accent: #80b7bd;
  --vrp-danger: #ff8a7f;
  --vrp-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

.dashboard-section,
.training-dashboard-section,
.vrp-list-section,
.approval-progress-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

.target-weekly-village-mode .target-weekly-table th:last-child {
  display: none;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--vrp-text);
  background: var(--vrp-bg);
  overflow-x: hidden;
}

a {
  color: inherit;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  background: var(--vrp-bg);
}

.mobile-menu-bar,
.mobile-sidebar-backdrop {
  display: none;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 12px 16px 22px;
  background: var(--vrp-panel);
  color: var(--vrp-text);
  border-right: 1px solid var(--vrp-line);
  display: flex;
  flex-direction: column;
}

.app-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vrp-text);
  text-decoration: none;
  padding: 12px 8px 20px;
  border-bottom: 1px solid var(--vrp-line);
}

:root[data-theme="dark"] .app-main,
:root[data-theme="dark"] .dashboard-page,
:root[data-theme="dark"] .module-page {
  color: var(--vrp-text);
}

:root[data-theme="dark"] .module-card,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .module-hero,
:root[data-theme="dark"] .dashboard-topbar,
:root[data-theme="dark"] .list-controls,
:root[data-theme="dark"] .training-dashboard-row,
:root[data-theme="dark"] .training-row-panel,
:root[data-theme="dark"] .training-summary-pill,
:root[data-theme="dark"] .table-shell,
:root[data-theme="dark"] .language-switcher,
:root[data-theme="dark"] .theme-toggle {
  background: var(--vrp-panel);
  border-color: var(--vrp-line);
  color: var(--vrp-text);
}

:root[data-theme="dark"] .module-hero *,
:root[data-theme="dark"] .dashboard-topbar *,
:root[data-theme="dark"] .module-card h1,
:root[data-theme="dark"] .module-card h2,
:root[data-theme="dark"] .module-card h3,
:root[data-theme="dark"] .module-card h4,
:root[data-theme="dark"] .module-card p,
:root[data-theme="dark"] .module-card label,
:root[data-theme="dark"] .module-card label span,
:root[data-theme="dark"] .module-card small,
:root[data-theme="dark"] .record-count,
:root[data-theme="dark"] .column-filter-label,
:root[data-theme="dark"] .list-search span,
:root[data-theme="dark"] .side-link,
:root[data-theme="dark"] .side-sub-link,
:root[data-theme="dark"] .side-module > summary,
:root[data-theme="dark"] .nav-kicker {
  color: var(--vrp-text);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] .chip-multi-control,
:root[data-theme="dark"] .chip-multi-dropdown,
:root[data-theme="dark"] .module-table td,
:root[data-theme="dark"] .module-table th {
  background-color: #182126;
  border-color: var(--vrp-line);
  color: var(--vrp-text);
}

:root[data-theme="dark"] .module-table th,
:root[data-theme="dark"] .column-filter-panel {
  background: #223039;
}

:root[data-theme="dark"] .module-table tbody tr:hover td,
:root[data-theme="dark"] .training-mini-grid span,
:root[data-theme="dark"] .training-report-list span,
:root[data-theme="dark"] .jeevika-bill-summary input,
:root[data-theme="dark"] .bill-detail-summary,
:root[data-theme="dark"] .bill-detail-summary > div {
  background: var(--vrp-panel-soft);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #d7e3e7;
}

:root[data-theme="dark"] .module-hero {
  box-shadow: none;
}

:root[data-theme="dark"] .module-hero h1,
:root[data-theme="dark"] .dashboard-topbar h1 {
  color: #ffffff;
}

:root[data-theme="dark"] .module-hero p,
:root[data-theme="dark"] .dashboard-topbar p {
  color: #dce8ec;
}

:root[data-theme="dark"] .btn-secondary,
:root[data-theme="dark"] .table-action {
  background: #243036;
  border-color: var(--vrp-line);
  color: #ffffff;
}

:root[data-theme="dark"] .side-link:hover,
:root[data-theme="dark"] .side-link.active,
:root[data-theme="dark"] .side-module[open] > summary {
  background: rgba(143, 197, 104, 0.16);
  color: var(--vrp-primary);
}

.app-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vrp-text);
  text-decoration: none;
  padding: 12px 8px 20px;
  border-bottom: 1px solid var(--vrp-line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 250px;
  height: 70px;
  border-radius: 8px;
  background: transparent;
  color: var(--vrp-primary);
  font-weight: 900;
  overflow: hidden;
}

.brand-mark img {
  max-width: 240px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.app-brand strong {
  display: block;
  font-size: 1.05rem;
}

.app-brand small {
  display: block;
  margin-top: 2px;
  color: var(--vrp-muted);
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.side-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--vrp-line);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(127, 183, 102, 0.12);
}

.side-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(102, 162, 170, 0.16);
  color: var(--vrp-primary-dark);
  font-weight: 900;
  text-transform: uppercase;
}

.side-user strong,
.side-user small {
  display: block;
}

.side-user strong {
  font-size: 0.92rem;
}

.side-user small {
  margin-top: 2px;
  color: var(--vrp-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.side-vrp-link {
  display: block;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--vrp-line);
  border-radius: 4px;
  color: var(--vrp-primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  word-break: break-all;
}

.side-vrp-link:hover {
  background: rgba(127, 183, 102, 0.12);
}

.logout-link {
  width: 230px;
  min-height: 30px;
  margin: 0 auto;
  padding: 7px 12px;
  border-radius: 4px;
  background: #598f40;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 204, 44, 0.24);
  font-size: 0.82rem;
  font-weight: 850;
}

.logout-link .side-icon {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  color: #ffffff;
  background: transparent;
  font-size: 1rem;
}

.logout-link:hover,
.logout-link.active {
  background: #e93434;
  color: #ffffff;
}

.side-group {
  margin: 18px 10px 6px;
  color: var(--vrp-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 8px;
  color: #34444b;
  text-decoration: none;
  padding: 10px 12px;
  font-weight: 750;
}

.side-link:hover,
.side-link.active {
  background: rgba(127, 183, 102, 0.20);
  color: var(--vrp-text);
}

.side-link.logout-link {
  color: #ffffff;
}

.side-link.active {
  box-shadow: none;
}

.side-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(102, 162, 170, 0.12);
  color: var(--vrp-accent);
  font-size: 0.82rem;
  font-weight: 900;
}

.side-module {
  display: grid;
  gap: 8px;
}

.side-module summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 6px;
  color: #34444b;
  font-weight: 850;
  list-style: none;
  padding: 10px 12px;
  cursor: pointer;
}

.side-module summary::-webkit-details-marker {
  display: none;
}

.side-module summary::after {
  content: "⌄";
  margin-left: auto;
  color: #9ba8ad;
  font-size: 0.95rem;
  line-height: 1;
}

.side-module[open] > summary,
.side-module summary:hover {
  background: rgba(127, 183, 102, 0.20);
  color: #17342e;
}

.side-module[open] > summary .side-icon {
  background: rgba(102, 162, 170, 0.22);
}

.side-subnav {
  display: grid;
  gap: 2px;
  padding: 2px 0 8px 44px;
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}

.side-sub-link {
  position: relative;
  min-height: 32px;
  color: #64727a;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  padding: 7px 8px 7px 14px;
}

.side-sub-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b2bdc2;
  transform: translateY(-50%);
}

.side-sub-link:hover,
.side-sub-link.active {
  color: var(--vrp-primary);
}

.side-sub-link.active::before {
  background: var(--vrp-primary);
}

.app-main {
  min-width: 0;
  padding: 24px 28px 36px;
}

.app-language-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.agreement-language-bar {
  margin-bottom: 12px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 33, 38, 0.08);
}

.language-switcher span {
  padding: 0 8px;
  color: var(--vrp-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.language-switcher button {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--vrp-muted);
  cursor: pointer;
  font-weight: 900;
  padding: 6px 10px;
}

.language-switcher button.active {
  background: var(--vrp-primary);
  color: #fff;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  padding: 7px 11px;
  background: #fff;
  color: var(--vrp-muted);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(23, 33, 38, 0.08);
  font-weight: 900;
}

.theme-toggle span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(89, 143, 64, 0.12);
  color: var(--vrp-primary);
}

.google-translate-holder,
.goog-te-banner-frame,
.goog-te-gadget,
.skiptranslate {
  display: none !important;
}

body {
  top: 0 !important;
}

@media (max-width: 720px) {
  .app-language-bar {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .language-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
  }
}

.nav-kicker {
  margin: 0 0 4px;
  color: var(--vrp-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-notice {
  margin-bottom: 16px;
  border: 1px solid #b8ddd4;
  border-radius: 8px;
  background: #effbf8;
  color: var(--vrp-primary-dark);
  padding: 12px 14px;
  font-weight: 700;
}

.app-alert {
  margin-bottom: 16px;
  border: 1px solid #f3b4ae;
  border-radius: 8px;
  background: #fff5f3;
  color: var(--vrp-danger);
  padding: 12px 14px;
  font-weight: 700;
}

.module-page {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.module-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(217, 226, 231, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 251, 0.96)),
    #fff;
  box-shadow: 0 12px 30px rgba(23, 33, 38, 0.08);
}

.module-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.1;
}

.module-hero p:last-child {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--vrp-muted);
  line-height: 1.6;
}

.module-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
}

.module-hero-actions form {
  margin: 0;
}

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

.dashboard-page {
  display: grid;
  gap: 20px;
}

/* Keep the training dashboard sections in their reporting workflow order. */
.dashboard-page > #dashboard_summary_boxes { order: 1; }
.dashboard-page > .dashboard-training-primary-summaries { order: 1; }
.dashboard-page > .training-status-panel { order: 2; }
.dashboard-page > #demonstration_method_boxes { order: 3; }
.dashboard-page > #other_major_work_indicator_boxes {
  order: 4;
  position: relative;
  overflow: visible !important;
}

.dashboard-page > #other_major_work_indicator_boxes:hover,
.dashboard-page > #other_major_work_indicator_boxes:focus-within {
  z-index: 150 !important;
}

.dashboard-summary-panel {
  overflow: visible;
}

.dashboard-summary-box {
  position: relative;
}

.dashboard-summary-box:hover {
  z-index: 200 !important;
}

.dashboard-card-hover-popup {
  z-index: 99999 !important;
}
.dashboard-page > #dashboard_activity_overview {
  display: none;
}
.dashboard-page > #dashboard_weekly_target_boxes { order: 5; }
.dashboard-page > #dashboard_ics_farmer_report { order: 6; }
.dashboard-page > .dashboard-training-secondary-summaries { order: 7; }

.vrp-compact-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
}

.vrp-work-overview {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.vrp-work-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--vrp-line);
  background: linear-gradient(120deg, rgba(89, 143, 64, 0.12), rgba(93, 140, 146, 0.08), var(--vrp-panel));
}

.vrp-work-overview-header h2,
.vrp-work-overview-header p {
  margin: 0;
}

.vrp-work-overview-header h2 {
  font-size: 1.05rem;
}

.vrp-work-overview-header p,
.vrp-work-overview-header > span {
  margin-top: 3px;
  color: var(--vrp-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.vrp-work-overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  padding: 12px;
}

/* JJ dashboard Work Overview uses the same colours as the admin dashboard
   summary cards: soft tinted background + a coloured 4px left accent bar,
   cycling through the shared 6-colour palette. */
.vrp-work-overview-metrics a {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-height: 104px;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.vrp-work-overview-metrics a::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--summary-accent, #6b9aa4);
}

.vrp-work-overview-metrics a:hover {
  background: var(--vrp-panel-soft);
}

.vrp-work-overview-metrics span {
  color: #365563;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.vrp-work-overview-metrics strong {
  margin: 6px 0;
  color: #15262f;
  font-size: 1.8rem;
  line-height: 1;
}

.vrp-work-overview-metrics small {
  color: #667984;
  font-size: 0.65rem;
  line-height: 1.25;
}

/* Shared 6-colour palette from the admin dashboard summary boxes, with a bit
   more depth: darker tinted backgrounds, accent bars and borders. */
.vrp-work-overview-metrics a:nth-child(6n + 1) { --summary-accent: #55848e; background: #e2f0f1; border-color: rgba(85, 132, 142, 0.42); }
.vrp-work-overview-metrics a:nth-child(6n + 2) { --summary-accent: #66925a; background: #e6f2df; border-color: rgba(102, 146, 90, 0.42); }
.vrp-work-overview-metrics a:nth-child(6n + 3) { --summary-accent: #6480b0; background: #e5ecf6; border-color: rgba(100, 128, 176, 0.42); }
.vrp-work-overview-metrics a:nth-child(6n + 4) { --summary-accent: #b0863f; background: #f5ead1; border-color: rgba(176, 134, 63, 0.45); }
.vrp-work-overview-metrics a:nth-child(6n + 5) { --summary-accent: #79709f; background: #eae6f3; border-color: rgba(121, 112, 159, 0.42); }
.vrp-work-overview-metrics a:nth-child(6n)     { --summary-accent: #a86660; background: #f3e0dd; border-color: rgba(168, 102, 96, 0.42); }

.activity-overview-boxes {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.activity-overview-boxes .red-farmers { border-color: #dc6969; }
.activity-overview-boxes .green-farmers { border-color: #65a85c; }
.activity-overview-boxes .yellow-farmers,
.activity-overview-boxes .pending-farmers,
.activity-overview-boxes .pending-target-map { border-color: #dda23c; }

@media (max-width: 1180px) {
  .activity-overview-boxes { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 680px) {
  .activity-overview-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .vrp-work-overview-metrics { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .vrp-work-overview-metrics a { border-bottom: 1px solid var(--vrp-line); }
}

@media (max-width: 680px) {
  .vrp-work-overview-header { align-items: flex-start; flex-direction: column; }
  .vrp-work-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.vrp-compact-summary-card {
  display: grid;
  gap: 14px;
  padding: 0;
  overflow: hidden;
}

.vrp-compact-summary-heading {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--vrp-line);
  background: linear-gradient(135deg, rgba(93, 140, 146, 0.12), var(--vrp-panel));
}

.vrp-compact-summary-card.target .vrp-compact-summary-heading {
  background: linear-gradient(135deg, rgba(89, 143, 64, 0.14), var(--vrp-panel));
}

.vrp-compact-summary-heading span,
.vrp-compact-summary-heading small {
  display: block;
}

.vrp-compact-summary-heading span {
  font-size: 1rem;
  font-weight: 900;
}

.vrp-compact-summary-heading small {
  margin-top: 3px;
  color: var(--vrp-muted);
  font-weight: 650;
}

.vrp-compact-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 14px;
}

.vrp-compact-metrics.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vrp-compact-metrics a {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  background: var(--vrp-panel-soft);
  box-shadow: inset 0 3px 0 rgba(93, 140, 146, 0.42);
}

.vrp-compact-summary-card.target .vrp-compact-metrics a {
  box-shadow: inset 0 3px 0 rgba(89, 143, 64, 0.48);
}

.vrp-compact-metrics a:hover {
  border-color: var(--vrp-accent);
  transform: translateY(-1px);
}

.vrp-compact-metrics strong {
  color: var(--vrp-accent);
  font-size: 1.7rem;
  line-height: 1;
}

.vrp-compact-metrics span {
  color: var(--vrp-text);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
}

.dashboard-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(217, 226, 231, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(23, 33, 38, 0.08);
  overflow: hidden;
}

.dashboard-topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: #5d8c92;
}

.dashboard-topbar h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.dashboard-topbar p:last-child {
  margin: 8px 0 0;
  color: var(--vrp-muted);
}

.dashboard-header-clock {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 176px;
  padding: 9px 13px;
  border: 1px solid rgba(93, 140, 146, 0.28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(93, 140, 146, 0.12), var(--vrp-panel));
  text-align: right;
  box-shadow: 0 5px 14px rgba(23, 33, 38, 0.06);
}

.dashboard-header-clock span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--vrp-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-header-clock strong {
  margin-left: auto;
  font-size: 0.9rem;
  line-height: 1;
}

.dashboard-header-clock small {
  color: var(--vrp-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.weekly-plan-header p {
  margin: 4px 0 0;
  color: var(--vrp-muted);
  font-size: 0.82rem;
}

.weekly-plan-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weekly-plan-filter label {
  color: var(--vrp-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.weekly-plan-filter select {
  min-width: 130px;
  min-height: 38px;
  border: 1px solid var(--vrp-line);
  border-radius: 7px;
  background: var(--vrp-panel);
  color: var(--vrp-text);
  padding: 7px 28px 7px 10px;
}

.dashboard-actions,
.list-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-actions {
  justify-content: flex-end;
  max-width: 560px;
}

.dashboard-actions .list-search {
  flex: 1 1 280px;
}

.dashboard-actions .btn,
.dashboard-actions .import-btn {
  flex: 0 0 auto;
}

.list-controls {
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #f8fbfc;
}

.list-control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.lg-directory-card {
  padding: 0;
  overflow: hidden;
}

.lg-directory-card .module-card-header {
  align-items: flex-start;
  padding: 14px 18px;
  border-bottom: 1px solid var(--vrp-line);
}

.lg-directory-upload {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.lg-directory-filter {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(180px, 240px) auto;
  align-items: end;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  border-bottom: 1px solid var(--vrp-line);
}

.lg-directory-filter label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.lg-directory-filter select,
.lg-directory-filter input {
  min-height: 44px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  font: inherit;
}

.lg-directory-table-shell {
  max-height: 460px;
}

.lg-directory-actions {
  justify-content: flex-start;
  padding: 12px 18px;
  border-bottom: 1px solid var(--vrp-line);
}

.lg-directory-actions .list-btn {
  text-decoration: none;
}

.list-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: min(320px, 100%);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 999px;
  background: #fff;
}

.list-search.compact {
  min-width: min(260px, 100%);
}

.list-search input {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  background: transparent;
}

.import-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--vrp-accent);
  border-radius: 999px;
  color: var(--vrp-accent);
  background: #fff;
  font-weight: 800;
  padding: 8px 18px;
  cursor: pointer;
}

.dashboard-grid.premium .metric-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  min-height: 130px;
  padding: 20px;
}

.metric-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.metric-card-link:hover .metric-card {
  transform: translateY(-3px);
  border-color: rgba(102, 162, 170, 0.45);
  box-shadow: 0 16px 32px rgba(23, 33, 38, 0.12);
}

.metric-card-link:hover .metric-card b {
  background: var(--vrp-accent);
  border-color: var(--vrp-accent);
  color: #fff;
}

.dashboard-grid.premium .metric-card-group {
  display: flex !important;
  flex-direction: column;
  min-height: 140px;
  padding: 12px;
  overflow: hidden;
  border-top: 0;
  background: #fff;
}

.dashboard-grid.premium .metric-card-group-assignment {
  background: #fff;
}

.dashboard-grid.premium .metric-card-group-billing {
  background: #fff;
}

.dashboard-grid.premium .metric-card-group-fco {
  background: #fff;
}

.metric-card-group-title {
  align-self: stretch;
  width: auto;
  margin: -16px -16px 14px;
  padding: 12px 16px;
  color: #fff !important;
  background: linear-gradient(120deg, #4f8739, #6aa34f);
  font-size: 0.86rem;
  font-weight: 850;
}

.metric-card-group-assignment .metric-card-group-title {
  background: linear-gradient(120deg, #397f8b, #579ba6);
}

.metric-card-group-billing .metric-card-group-title {
  background: linear-gradient(120deg, #b8791f, #d99b3f);
}

.metric-card-group-fco .metric-card-group-title {
  background: linear-gradient(120deg, #72549b, #9474b9);
}

.dashboard-grid.premium .metric-card-group > .metric-card-group-items {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 0;
  flex: 1;
}

.dashboard-grid.premium .metric-card-group-registration > .metric-card-group-items,
.dashboard-grid.premium .metric-card-group-fco > .metric-card-group-items {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 6px !important;
}

.dashboard-grid.premium .metric-card-group-billing .metric-card-group-item-level-2-users {
  grid-column: 1 / -1;
  min-height: 48px;
  background: linear-gradient(120deg, #fff8eb, #fffdf8);
  border-color: rgba(205, 145, 52, 0.3);
}

.metric-card-group-item {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid rgba(210, 222, 226, 0.9);
  border-radius: 8px;
  color: inherit;
  background: #f7faf8;
  text-decoration: none;
}

.metric-card-group-item:first-child {
  padding-left: 10px;
  border-left: 1px solid rgba(210, 222, 226, 0.9);
}

.metric-card-group-item strong {
  color: #182329;
  font-size: 1.6rem;
}

.metric-card-group-item span {
  padding-right: 0;
  color: #627079;
  font-size: 0.72rem;
}

.metric-card-group-item b {
  display: none !important;
}

.metric-card-group-item:hover {
  border-color: rgba(89, 143, 64, 0.5);
  background: #eef6eb;
  transform: translateY(-1px);
}

.metric-card-group-fco .metric-card-group-item strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

/* Training dashboard: the administration summaries are deliberately short,
   two-panel rows instead of four narrow cards with unused space. */
.dashboard-grid.premium.dashboard-training-primary-summaries,
.dashboard-grid.premium.dashboard-training-secondary-summaries {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-grid.premium.dashboard-training-secondary-summaries {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid.premium.dashboard-training-primary-summaries .metric-card-group,
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group {
  min-height: 140px;
  height: 100%;
  border: 1px solid rgba(204, 218, 222, 0.9);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.08);
}

.dashboard-training-primary-summaries .metric-card-group-title,
.dashboard-training-secondary-summaries .metric-card-group-title {
  margin-bottom: 12px;
  padding: 10px 14px;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.dashboard-training-primary-summaries .metric-card-group-billing > .metric-card-group-items,
.dashboard-training-secondary-summaries .metric-card-group-billing > .metric-card-group-items,
.dashboard-training-primary-summaries .metric-card-group-fco > .metric-card-group-items,
.dashboard-training-secondary-summaries .metric-card-group-fco > .metric-card-group-items {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.dashboard-training-primary-summaries .metric-card-group-billing .metric-card-group-item-level-2-users,
.dashboard-training-secondary-summaries .metric-card-group-billing .metric-card-group-item-level-2-users {
  grid-column: auto;
  min-height: 0;
}

.dashboard-training-primary-summaries .metric-card-group-item,
.dashboard-training-secondary-summaries .metric-card-group-item {
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 8px;
}

.dashboard-training-primary-summaries .metric-card-group-item strong,
.dashboard-training-secondary-summaries .metric-card-group-item strong {
  font-size: 1.2rem;
  line-height: 1;
}

.dashboard-training-secondary-summaries .metric-card-group-fco .metric-card-group-item span {
  font-size: 0.68rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .dashboard-grid.premium.dashboard-training-primary-summaries,
  .dashboard-grid.premium.dashboard-training-secondary-summaries {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dashboard-training-primary-summaries .metric-card-group-billing > .metric-card-group-items,
  .dashboard-training-secondary-summaries .metric-card-group-billing > .metric-card-group-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .dashboard-grid.premium.dashboard-training-secondary-summaries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.upload-report-table {
  min-width: 1780px;
  table-layout: auto;
}

.weekly-upload-report-table {
  min-width: 2200px;
}

.upload-report-table .upload-report-column {
  min-width: 180px;
  width: 180px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  vertical-align: middle;
}

.upload-report-table th.upload-report-column {
  line-height: 1.3;
}

.upload-report-table td.upload-report-column .grid-view-link {
  display: inline-flex;
  margin: 2px 5px 2px 0;
  white-space: nowrap;
}

.dashboard-grid.premium .metric-card > div {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.metric-card.featured {
  background: #598f40;
  color: #fff;
}

.metric-card.featured span,
.metric-card.featured small {
  color: rgba(255, 255, 255, 0.78);
}

.metric-card b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.7fr);
  gap: 16px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 190px;
  padding: 18px 8px 8px;
}

.bar-chart span {
  display: block;
  height: var(--bar-height);
  min-height: 54px;
  border-radius: 999px 999px 8px 8px;
  background: repeating-linear-gradient(135deg, #d6dedb 0 4px, #fff 4px 8px);
}

.bar-chart span:nth-child(even) {
  background: #5d8c92;
}

.progress-card {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#5d8c92 var(--progress), #dce8e4 0);
  position: relative;
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: #fff;
}

.progress-ring strong,
.progress-ring span {
  position: relative;
}

.progress-ring strong {
  font-size: 2.2rem;
}

.progress-ring span {
  color: var(--vrp-muted);
  font-weight: 800;
}

.dashboard-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.report-card {
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.report-card h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.dashboard-report-details {
  display: grid;
  gap: 12px;
}

.dashboard-report-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.dashboard-report-summary::-webkit-details-marker {
  display: none;
}

.dashboard-report-summary h3 {
  margin: 0;
  font-size: 1rem;
}

.dashboard-report-summary span {
  color: var(--vrp-muted);
  font-size: 1.1rem;
  transition: transform 0.18s ease;
}

.dashboard-report-details[open] .dashboard-report-summary span {
  transform: rotate(180deg);
}

.dashboard-report-body {
  margin-top: 6px;
}

.farmer-followup-count {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(89, 143, 64, 0.20);
  border-radius: 8px;
  background: rgba(89, 143, 64, 0.08);
}

.farmer-followup-count strong {
  color: var(--vrp-primary-dark);
  font-size: 1.7rem;
  line-height: 1;
}

.farmer-followup-count span {
  color: var(--vrp-muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.training-participation-card {
  display: grid;
  gap: 16px;
}

.training-dashboard-card {
  display: grid;
  gap: 18px;
  overflow: hidden;
}

.training-dashboard-header {
  align-items: start;
}

.training-dashboard-header-actions {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: end;
}

.training-dashboard-filter-group {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.training-dashboard-header p {
  margin: 6px 0 0;
  color: var(--vrp-muted);
  font-weight: 650;
}

.training-dashboard-total {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 108px;
  padding: 10px 12px;
  border: 1px solid rgba(82, 144, 67, 0.20);
  border-radius: 8px;
  background: rgba(82, 144, 67, 0.08);
  color: var(--vrp-green);
}

.training-dashboard-total span,
.training-summary-pill span {
  color: var(--vrp-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.training-dashboard-total strong {
  font-size: 1.8rem;
  line-height: 1;
}

.training-dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.training-summary-pill {
  display: grid;
  gap: 8px;
  min-height: 94px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.training-summary-link {
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.training-summary-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(23, 33, 38, 0.10);
}

.training-summary-pill strong {
  font-size: 1.55rem;
  line-height: 1;
}

.training-summary-pill small {
  color: var(--vrp-muted);
  font-weight: 700;
  line-height: 1.35;
}

.training-summary-pill.green {
  border-color: rgba(56, 142, 60, 0.22);
  background: rgba(56, 142, 60, 0.08);
  color: #1b5e20;
}

.training-summary-pill.yellow {
  border-color: rgba(245, 168, 0, 0.26);
  background: rgba(245, 168, 0, 0.12);
  color: #7a4b00;
}

.training-summary-pill.red {
  border-color: rgba(211, 47, 47, 0.22);
  background: rgba(211, 47, 47, 0.08);
  color: #9b1c1c;
}

.training-summary-pill.neutral {
  border-color: rgba(46, 113, 135, 0.20);
  background: rgba(46, 113, 135, 0.08);
  color: #1c5f72;
}

.training-dashboard-grid {
  display: grid;
  gap: 14px;
}

.training-activity-table {
  min-width: 1860px;
}

.dashboard-month-filter {
  display: flex;
  align-items: end;
}

.dashboard-month-select {
  display: grid;
  gap: 6px;
  min-width: 280px;
  color: var(--vrp-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-month-select span {
  line-height: 1;
}

.dashboard-month-select select {
  min-width: 280px;
  min-height: 42px;
  padding-inline: 12px;
  font-size: 0.96rem;
}

.training-dashboard-row {
  display: grid;
  gap: 14px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
  box-shadow: 0 10px 24px rgba(13, 31, 39, 0.06);
}

.training-row-heading,
.training-row-meta,
.training-row-panels,
.training-report-list,
.training-heatmap-pills {
  display: grid;
  gap: 10px;
}

.training-row-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.training-row-toggle {
  display: inline-flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.training-row-toggle strong,
.training-row-toggle small {
  display: block;
}

.training-row-toggle strong {
  font-size: 1.02rem;
  line-height: 1.25;
}

.training-row-toggle small {
  margin-top: 4px;
  color: var(--vrp-muted);
  font-weight: 850;
}

.training-row-toggle i {
  margin-top: 2px;
  font-style: normal;
  color: var(--vrp-muted);
  transition: transform 0.18s ease;
}

.training-row-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.training-row-heading h3,
.training-row-heading p,
.training-row-panel h4 {
  margin: 0;
}

.training-row-heading h3 {
  font-size: 1.02rem;
  line-height: 1.25;
}

.training-row-heading p {
  margin-top: 4px;
  color: var(--vrp-muted);
  font-weight: 850;
}

.training-row-heading > span {
  border: 1px solid rgba(82, 144, 67, 0.20);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(82, 144, 67, 0.08);
  color: var(--vrp-green);
  font-weight: 900;
  white-space: nowrap;
}

.training-row-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.training-row-meta span {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-left: 3px solid rgba(82, 144, 67, 0.34);
  padding-left: 10px;
  color: #18252d;
  font-weight: 800;
}

.training-row-meta strong,
.training-row-panel h4 {
  color: var(--vrp-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.training-row-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.training-row-details {
  margin-top: 14px;
  border-top: 1px dashed var(--vrp-line);
  padding-top: 14px;
}

.training-row-details-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.training-row-details-header h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.training-row-details-header p {
  margin: 4px 0 0;
  color: var(--vrp-muted);
  font-weight: 800;
  line-height: 1.4;
}

.training-row-farmer-table {
  margin-top: 12px;
}

.training-row-details .module-card-header {
  margin-bottom: 10px;
}

.training-row-details[hidden] {
  display: none;
}

.training-row-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(207, 220, 226, 0.84);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.approval-level-stack {
  display: grid;
  gap: 10px;
}

.approval-level-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(207, 220, 226, 0.84);
  border-radius: 8px;
  background: #f8fbfc;
}

.approval-level-item strong {
  font-size: 0.92rem;
}

.approval-level-item small {
  color: var(--vrp-muted);
  font-weight: 700;
  line-height: 1.35;
}

.training-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.training-mini-grid span,
.training-report-list span {
  display: grid;
  gap: 3px;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f3f7f8;
  color: var(--vrp-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.training-mini-grid b,
.training-report-list strong {
  color: #0e1b22;
  font-size: 1.02rem;
}

.training-row-panel small {
  color: var(--vrp-muted);
  font-weight: 750;
  line-height: 1.35;
}

.training-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff2;
}

.training-progress.compact {
  margin-bottom: 4px;
}

.training-progress div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4d8f3d, #92b95d);
}

.training-row-panel.heatmap {
  justify-items: start;
}

.training-heatmap-pills {
  grid-template-columns: repeat(3, auto);
}

.training-empty-state {
  border: 1px dashed var(--vrp-line);
  border-radius: 8px;
  padding: 18px;
  color: var(--vrp-muted);
  font-weight: 800;
  text-align: center;
  background: #fbfdfe;
}

.training-status-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.training-participation-status-card {
  display: grid;
  gap: 14px;
}

.dashboard-status-panel {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.dashboard-status-panel > .training-participation-status-header {
  padding: 15px 16px;
  color: #18343b;
  border-left: 4px solid #438996;
  border-bottom: 1px solid rgba(67, 137, 150, 0.2);
  background: linear-gradient(120deg, #f2f8f9, #fff 72%);
}

.weekly-status-panel > .training-participation-status-header {
  color: #294b22;
  border-left-color: #5b9347;
  border-bottom-color: rgba(91, 147, 71, 0.2);
  background: linear-gradient(120deg, #f3f8f0, #fff 72%);
}

.dashboard-summary-panel > .training-participation-status-header {
  color: #23425f;
  border-left-color: #4f7ea8;
  border-bottom-color: rgba(79, 126, 168, 0.22);
  background: linear-gradient(120deg, #f1f6fb, #fff 72%);
}

.dashboard-status-panel > .training-participation-status-header h2,
.dashboard-status-panel > .training-participation-status-header p,
.dashboard-status-panel > .training-participation-status-header label,
.dashboard-status-panel > .training-participation-status-header span {
  color: inherit;
}

.dashboard-status-panel > .training-participation-status-header p {
  color: var(--vrp-muted);
  opacity: 1;
}

.dashboard-status-panel > .training-participation-status-header .list-btn {
  border-color: rgba(67, 137, 150, 0.42);
  color: #244d55;
  background: #fff;
}

.weekly-status-panel > .training-participation-status-header .list-btn {
  border-color: rgba(91, 147, 71, 0.42);
  color: #3f7130;
}

.dashboard-status-panel > .training-participation-boxes {
  padding: 16px;
  background: #fff;
}

.training-participation-status-header {
  align-items: start;
}

.training-participation-status-header p {
  margin: 6px 0 0;
  color: var(--vrp-muted);
  font-weight: 650;
}

.training-participation-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.training-participation-boxes.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.training-participation-boxes.dashboard-summary-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  overflow: visible;
}

.training-participation-boxes.demonstration-method-boxes {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.dashboard-summary-boxes .dashboard-summary-box {
  min-width: 0;
  min-height: 150px;
  padding: 14px;
  gap: 8px;
  border-top-width: 0;
  border-radius: 8px;
  position: relative;
  overflow: visible;
}

.dashboard-summary-boxes .dashboard-summary-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--summary-accent, #6b9aa4);
}

.dashboard-summary-boxes .dashboard-summary-box span {
  min-height: 32px;
  color: #365563;
  font-size: 0.72rem;
  line-height: 1.28;
  text-transform: none;
}

.dashboard-summary-boxes .dashboard-summary-box strong {
  color: #15262f;
  font-size: 1.85rem;
  letter-spacing: 0;
}

.dashboard-summary-boxes .dashboard-summary-box small {
  color: #667984;
  font-size: 0.74rem;
  line-height: 1.3;
}

.dashboard-summary-boxes .dashboard-summary-box:nth-child(6n + 1) {
  --summary-accent: #6b9aa4;
  background: #f6fbfb;
  border-color: rgba(107, 154, 164, 0.28);
}

.dashboard-summary-boxes .dashboard-summary-box:nth-child(6n + 2) {
  --summary-accent: #7aa36b;
  background: #f7fbf5;
  border-color: rgba(122, 163, 107, 0.28);
}

.dashboard-summary-boxes .dashboard-summary-box:nth-child(6n + 3) {
  --summary-accent: #7892bd;
  background: #f6f8fc;
  border-color: rgba(120, 146, 189, 0.28);
}

.dashboard-summary-boxes .dashboard-summary-box:nth-child(6n + 4) {
  --summary-accent: #c39a57;
  background: #fcfaf4;
  border-color: rgba(195, 154, 87, 0.3);
}

.dashboard-summary-boxes .dashboard-summary-box:nth-child(6n + 5) {
  --summary-accent: #8d85b4;
  background: #f8f7fc;
  border-color: rgba(141, 133, 180, 0.28);
}

.dashboard-summary-boxes .dashboard-summary-box:nth-child(6n) {
  --summary-accent: #bd7b75;
  background: #fcf7f6;
  border-color: rgba(189, 123, 117, 0.28);
}

.dashboard-summary-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.dashboard-summary-actions .table-action {
  flex: 1;
  min-width: 0;
  min-height: 30px;
  padding: 7px 10px;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.2;
  border: 1px solid rgba(95, 148, 132, 0.15);
  border-radius: 6px;
  background: rgba(226, 244, 239, 0.72);
  color: #3f7f32;
}

.dashboard-summary-action-popover {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
}

.dashboard-card-hover-popup {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 30;
  display: none;
  min-width: 240px;
  max-width: 300px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #9db6bd transparent;
  padding: 8px 10px;
  border: 1px solid rgba(68, 121, 135, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(31, 57, 67, 0.18);
  color: #254654;
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.dashboard-card-hover-popup::-webkit-scrollbar {
  width: 8px;
}

.dashboard-card-hover-popup::-webkit-scrollbar-thumb {
  background: #9db6bd;
  border-radius: 8px;
}

.dashboard-card-hover-popup::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-card-hover-popup span {
  display: block;
  min-height: 0;
}

.dashboard-card-hover-popup span + span {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(68, 121, 135, 0.12);
}

/* Red popup compact breakdown */
.red-popup-breakdown {
  min-width: 200px;
  max-width: 280px;
  max-height: 240px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.red-popup-breakdown .popup-fco-header {
  padding: 3px 0 2px;
  border-bottom: 1px solid rgba(68, 121, 135, 0.15);
  margin-bottom: 2px;
}

.red-popup-breakdown .popup-fco-header strong {
  font-size: 0.85rem !important;
  font-weight: 800;
  color: #1e3a42;
  line-height: 1.3;
}

.red-popup-breakdown .popup-subitem {
  padding: 1px 0;
  border: none !important;
  margin: 0 !important;
}

.red-popup-breakdown .popup-sublink {
  color: #2e6376;
  text-decoration: none;
  font-size: 0.88rem !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  line-height: 1.6;
}

/* Force number size = label text size (block parent strong override) */
.dashboard-card-hover-popup strong,
.red-popup-breakdown strong {
  font-size: 1em !important;
  font-weight: 800;
}

.red-popup-breakdown .popup-sublink strong {
  font-size: 1em !important;
  font-weight: 800;
  color: #17303a;
  white-space: nowrap;
}

.red-popup-breakdown .popup-sublink:hover {
  text-decoration: underline;
  color: #135168;
}

.dashboard-summary-box:hover .dashboard-card-hover-popup,
.dashboard-summary-action-popover:hover .dashboard-card-hover-popup,
.dashboard-summary-action-popover:focus-within .dashboard-card-hover-popup {
  display: block;
}

.dashboard-summary-actions .table-action.export {
  border-color: rgba(67, 137, 150, 0.35);
  color: #255a64;
  background: rgba(67, 137, 150, 0.08);
}

/* The Farmer Training Participation Status card holds hover popups (Pending / red
   breakdown) that open upward; the panel's overflow:hidden was clipping them.
   Allow this panel to overflow so the full popup data is visible. */
.training-participation-status-card.training-status-panel {
  overflow: visible;
}

.training-participation-boxes.compact .training-participation-box {
  position: relative;
  min-height: 96px;
  padding: 12px 14px 12px 18px;
  gap: 5px;
}

/* Coloured left accent bar, matching the Work Overview / summary cards.
   No overflow:hidden on the box so the hover popup is not clipped; the bar's
   left corners are rounded to follow the card's 8px radius. */
.training-participation-boxes.compact .training-participation-box::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 8px 0 0 8px;
  background: var(--participation-accent, #6b9aa4);
}

.training-participation-boxes.compact .training-participation-box.total { --participation-accent: #55848e; }
.training-participation-boxes.compact .training-participation-box.red,
.training-participation-boxes.compact .training-participation-box.pending { --participation-accent: #c26060; }
.training-participation-boxes.compact .training-participation-box.yellow { --participation-accent: #c0902f; }
.training-participation-boxes.compact .training-participation-box.green,
.training-participation-boxes.compact .training-participation-box.completed { --participation-accent: #4f8a63; }

.training-participation-boxes.compact .training-participation-box strong {
  font-size: 1.65rem;
}

.training-participation-boxes.compact .training-participation-box small {
  font-size: 0.72rem;
}

.training-participation-boxes.compact .training-participation-box b {
  margin-top: auto;
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .vrp-compact-summary-grid { grid-template-columns: 1fr; }
  .training-participation-boxes.dashboard-summary-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .training-participation-boxes.demonstration-method-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .vrp-compact-metrics,
  .vrp-compact-metrics.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .training-participation-boxes.dashboard-summary-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-summary-boxes .dashboard-summary-box {
    min-height: 140px;
  }
}

@media (max-width: 420px) {
  .training-participation-boxes.dashboard-summary-boxes { grid-template-columns: 1fr; }
  .training-participation-boxes.demonstration-method-boxes { grid-template-columns: 1fr; }
}

.training-participation-box {
  display: grid;
  gap: 8px;
  min-height: 138px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-status-panel .training-participation-box {
  min-height: 118px;
  border-top-width: 4px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(23, 33, 38, 0.06);
}

.dashboard-status-panel .training-participation-box strong {
  color: #17242a;
  font-size: 1.7rem;
}

.dashboard-status-panel .training-participation-box b {
  color: currentColor;
  text-decoration: none;
}

.dashboard-status-panel .training-participation-box.total {
  border-top-color: #397f8b;
  background: linear-gradient(180deg, rgba(57, 127, 139, 0.07), #fff 48%);
}

.dashboard-status-panel .training-participation-box.green {
  border-top-color: #4f963e;
  background: linear-gradient(180deg, rgba(79, 150, 62, 0.08), #fff 48%);
}

.dashboard-status-panel .training-participation-box.yellow {
  border-top-color: #d99b2f;
  background: #fdf3d6; /* light yellow */
}

.dashboard-status-panel .training-participation-box.red {
  border-top-color: #cf5a5a;
  background: #fbe4e4; /* light red */
}

.dashboard-status-panel .training-participation-box.pending {
  border-top-color: #758891;
  background: linear-gradient(180deg, rgba(117, 136, 145, 0.08), #fff 48%);
}

.dashboard-status-panel .training-participation-box.completed {
  border-top-color: #3f6fb5;
  background: linear-gradient(180deg, rgba(63, 111, 181, 0.08), #fff 48%);
}

.training-participation-box:hover,
.training-participation-box.is-active {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(23, 33, 38, 0.10);
}

.training-participation-box.is-active {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.training-participation-box span {
  color: currentColor;
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.training-participation-box strong {
  font-size: 2.25rem;
  line-height: 1;
}

.training-participation-box small {
  color: var(--vrp-muted);
  font-weight: 700;
  line-height: 1.35;
}

.training-participation-box b {
  justify-self: start;
  font-size: 0.82rem;
  font-weight: 850;
}

.training-participation-box.total {
  border-color: rgba(22, 99, 118, 0.24);
  background: rgba(22, 99, 118, 0.08);
  color: #164f5f;
}

.training-participation-box.green {
  border-color: rgba(56, 142, 60, 0.26);
  background: rgba(56, 142, 60, 0.10);
  color: #1b5e20;
}

.training-participation-box.yellow {
  border-color: rgba(245, 168, 0, 0.32);
  background: rgba(245, 168, 0, 0.14);
  color: #7a4b00;
}

.training-participation-box.red {
  border-color: rgba(211, 47, 47, 0.26);
  background: rgba(211, 47, 47, 0.10);
  color: #9b1c1c;
}

.training-participation-box.pending {
  border-color: rgba(46, 113, 135, 0.24);
  background: rgba(46, 113, 135, 0.08);
  color: #20586a;
}

.training-participation-box.completed {
  border-color: rgba(63, 111, 181, 0.26);
  background: rgba(63, 111, 181, 0.10);
  color: #254f8f;
}

.training-participation-table {
  min-width: 1640px;
}

.training-target-status-table {
  min-width: 1420px;
}

@media (max-width: 1180px) {
  .training-row-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .training-dashboard-header,
  .training-row-heading,
  .training-row-meta,
  .training-dashboard-summary,
  .training-participation-boxes,
  .training-participation-boxes.compact {
    grid-template-columns: 1fr;
  }

  .training-dashboard-total {
    justify-items: start;
  }

  .training-mini-grid {
    grid-template-columns: 1fr;
  }
}

.training-status-box {
  display: grid;
  gap: 4px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.training-status-box strong {
  font-size: 1.8rem;
  line-height: 1;
}

.training-status-box span {
  font-weight: 800;
}

.training-status-box small {
  color: var(--vrp-muted);
  font-weight: 700;
}

.training-status-box.green,
.training-status-pill.green {
  border-color: rgba(56, 142, 60, 0.28);
  background: rgba(56, 142, 60, 0.10);
  color: #1b5e20;
}

.training-status-box.yellow,
.training-status-pill.yellow {
  border-color: rgba(245, 168, 0, 0.32);
  background: rgba(245, 168, 0, 0.14);
  color: #7a4b00;
}

.training-status-box.red,
.training-status-pill.red {
  border-color: rgba(211, 47, 47, 0.28);
  background: rgba(211, 47, 47, 0.10);
  color: #9b1c1c;
}

.training-status-box.pending,
.training-status-pill.pending {
  border-color: rgba(46, 113, 135, 0.28);
  background: rgba(46, 113, 135, 0.10);
  color: #20586a;
}

.training-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 850;
}

.weekly-progress-breakdown {
  display: inline-grid;
  grid-template-columns: 1fr;
  width: 76px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: #fff;
}

.weekly-progress-breakdown > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  text-align: left;
}

.weekly-progress-breakdown > span + span {
  border-top: 1px solid rgba(100, 116, 139, 0.22);
}

.weekly-progress-breakdown small {
  color: #64748b;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

.weekly-progress-breakdown strong {
  flex: 0 0 auto;
  color: #17232b;
  font-size: 0.9rem;
  line-height: 1.15;
}

.weekly-progress-breakdown.green { border-color: #7ebf82; background: #f3faf3; }
.weekly-progress-breakdown.yellow { border-color: #e8bb5d; background: #fff9eb; }
.weekly-progress-breakdown.red { border-color: #e7a0a0; background: #fff7f7; }
.weekly-progress-breakdown.pending { border-color: #91b7c3; background: #f4fafc; }

.training-village-panel {
  display: none;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfe;
}

.training-village-panel:target {
  display: block;
}

.compact-header {
  margin-bottom: 10px;
}

.clock-report-card {
  display: grid;
  align-content: space-between;
  min-height: 160px;
  position: relative;
  overflow: hidden;
  border-color: rgba(83, 126, 96, 0.32);
  background:
    radial-gradient(circle at 50% 38%, rgba(239, 194, 88, 0.16) 0 18%, transparent 42%),
    linear-gradient(135deg, rgba(247, 250, 246, 0.98) 0%, rgba(229, 240, 224, 0.94) 48%, rgba(255, 255, 255, 0.98) 100%),
    #fff;
  box-shadow: 0 14px 30px rgba(23, 33, 38, 0.09);
}

.dashboard-clock-face {
  display: grid;
  gap: 8px;
  min-height: 112px;
  align-content: center;
  position: relative;
  z-index: 1;
}

.clock-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  gap: 16px;
  min-height: 92px;
}

.clock-info {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.clock-hud-panel {
  display: grid;
  place-items: center;
  width: 118px;
  min-height: 92px;
  padding: 0;
  background: transparent;
}

.clock-hud-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(83, 126, 96, 0.12);
  color: #537e60;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.clock-info strong {
  color: var(--vrp-text);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.clock-info small {
  color: var(--vrp-muted);
  font-weight: 800;
  line-height: 1.35;
}

.clock-dial {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(83, 126, 96, 0.95) 0 3deg, transparent 3deg 16deg),
    conic-gradient(#efc258 0 25%, rgba(83, 126, 96, 0.24) 25% 100%);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.84), 0 10px 24px rgba(23, 33, 38, 0.12);
}

.clock-dial::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(83, 126, 96, 0.22);
}

.clock-dial i {
  position: absolute;
  width: 36px;
  height: 2px;
  transform: rotate(218deg) translateX(16px);
  transform-origin: left center;
  border-radius: 999px;
  background: #537e60;
  z-index: 1;
}

.clock-dial i::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -4px;
  width: 10px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #efc258;
  box-shadow: 0 0 0 4px rgba(239, 194, 88, 0.22);
}

.clock-dial span {
  position: absolute;
  width: 12px;
  aspect-ratio: 1;
  z-index: 2;
  border-radius: 50%;
  background: #537e60;
  box-shadow: 0 0 0 5px rgba(83, 126, 96, 0.12);
}

.clock-card-footer {
  display: grid;
  justify-items: start;
  text-align: left;
}

.clock-card-footer small {
  color: #537e60;
  font-weight: 800;
}

.compact-scroll {
  max-height: 260px;
  overflow: auto;
}

.training-row-panel .compact-scroll {
  max-height: none;
}

.training-row-panel .table-shell.compact-scroll {
  max-height: none;
}

.compact-table th,
.compact-table td {
  padding: 9px 8px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(217, 226, 231, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric-card span {
  color: var(--vrp-muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.metric-card strong {
  font-size: 2.05rem;
  line-height: 1;
  display: block;
}

.metric-card small {
  color: var(--vrp-muted);
  line-height: 1.45;
}

.module-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.module-grid.two {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.module-card {
  min-width: 0;
  border: 1px solid rgba(217, 226, 231, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.07);
  padding: 18px;
}

.module-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vrp-line);
}

.training-edit-decision-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.training-edit-decision-actions form {
  margin: 0;
}

.module-card-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.module-subtitle {
  margin: 6px 0 0;
  color: var(--vrp-muted);
  font-size: 0.9rem;
}

.approval-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.approval-action-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.approval-action-form label {
  font-weight: 700;
}

.approval-action-form textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}

.approval-progress-section {
  display: grid;
  gap: 16px;
}

.approval-progress-section h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.approval-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 350px));
  gap: 16px;
}

.approval-progress-card {
  border: 1px solid #d8e1e7;
  border-radius: 6px;
  background: #fff;
  padding: 18px;
  text-align: center;
}

.approval-progress-card h3 {
  margin: 0 0 12px;
  color: #1c3551;
  font-size: 1rem;
}

.approval-progress-card p {
  margin: 10px 0 0;
}

.approval-card-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.approval-progress-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #e6edf0;
  color: #60717d;
  font-size: 1.8rem;
  font-weight: 800;
}

.approval-progress-card.approved .approval-progress-icon {
  background: #bfe9c5;
  color: #218f3d;
}

.approval-progress-card.rejected .approval-progress-icon {
  background: #ffe1e5;
  color: #d9364e;
}

.approval-progress-card.current .approval-progress-icon {
  background: #dff3ec;
  color: var(--vrp-primary);
}

.approval-mini-btn {
  min-width: 92px;
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.approval-mini-btn.approve {
  background: #0b8a57;
}

.approval-mini-btn.reject {
  background: #d9364e;
}

.approval-remarks-modal {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(16, 28, 35, 0.28);
}

.approval-remarks-modal::backdrop {
  background: rgba(15, 24, 31, 0.52);
}

.approval-modal-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.approval-modal-header,
.approval-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.approval-modal-header {
  border-bottom: 1px solid var(--vrp-line);
  padding-bottom: 12px;
}

.approval-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.approval-modal-header button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #eef4f6;
  cursor: pointer;
  font-size: 1.2rem;
}

.approval-modal-form label {
  font-weight: 800;
}

.approval-modal-form textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}

.vrp-bill-card {
  display: grid;
  gap: 18px;
}

.bill-activity-shell {
  overflow-x: auto;
  border-top: 1px solid var(--vrp-line);
  padding-top: 16px;
}

.bill-activity-table {
  min-width: 1180px;
}

.jeevika-bill-card {
  display: grid;
  gap: 18px;
}

.jeevika-bill-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
}

.jeevika-bill-summary label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.jeevika-bill-summary input {
  min-height: 42px;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #f7fafb;
}

.jeevika-bill-table {
  min-width: 1320px;
}

.jeevika-bill-table input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
}

.jeevika-bill-table th:nth-child(8),
.jeevika-bill-table th:nth-child(9),
.jeevika-bill-table td:nth-child(8),
.jeevika-bill-table td:nth-child(9) {
  min-width: 150px;
}

.jeevika-bill-table input[data-jeevika-rate],
.jeevika-bill-table input[data-jeevika-amount] {
  min-width: 140px;
  min-height: 44px;
  padding-inline: 12px;
}

.jeevika-bill-payment-total {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #d5e0e6;
  padding-top: 14px;
}

.jeevika-bill-payment-total label {
  display: grid;
  width: min(100%, 280px);
  gap: 7px;
  font-weight: 800;
}

.jeevika-bill-payment-total input {
  min-height: 46px;
  border: 1px solid #b7cbd4;
  border-radius: 6px;
  background: #f7fafb;
  padding: 9px 12px;
  font: inherit;
  font-weight: 800;
  text-align: right;
}

.jeevika-farmer-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--vrp-green);
  white-space: nowrap;
}

.jeevika-farmer-detail {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}

.jeevika-farmer-row > td {
  background: #f8fbfc;
  padding: 12px;
}

.jeevika-farmer-detail .module-table {
  min-width: 980px;
}

.jeevika-farmer-empty {
  margin-top: 8px;
  color: #6d7c86;
  white-space: nowrap;
}

.jeevika-bill-detail-card {
  display: grid;
  gap: 18px;
}

.jeevika-payment-detail-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 18px;
  background: #fff;
}

.jeevika-payment-detail-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.jeevika-payment-selector {
  display: grid;
  gap: 12px;
}

.jeevika-payment-select-table {
  min-width: 980px;
}

.jeevika-payment-select-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.payment-select-all-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.jeevika-payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
}

.jeevika-payment-summary-grid label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.jeevika-payment-summary-grid input,
.jeevika-payment-summary-grid select {
  min-height: 42px;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.jeevika-payment-summary-grid input[readonly] {
  background: #f7fafb;
  font-weight: 800;
}

.bill-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1px;
  border: 1px solid var(--vrp-line);
  background: var(--vrp-line);
}

.bill-detail-summary > div {
  display: grid;
  gap: 6px;
  background: #fff;
  padding: 12px;
}

.bill-detail-summary strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #52646f;
}

.bill-print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--vrp-line);
  padding-bottom: 14px;
}

.bill-print-sheet {
  width: min(100%, 794px);
  min-height: 1123px;
  margin: 0 auto;
  padding: 64px 48px 42px;
  background: #fff;
  color: #101820;
  box-shadow: 0 18px 42px rgba(16, 24, 32, 0.16);
  font-size: 0.72rem;
}

.bill-print-body {
  margin: 0;
  background: #202020;
}

.bill-print-page {
  padding: 28px 24px 56px;
}

.bill-print-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: #2f2f2f;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bill-print-toolbar strong {
  font-size: 0.92rem;
}

.bill-print-toolbar button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  background: #4d8f3d;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.bill-print-logo {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
}

.bill-print-stakeholder {
  display: grid;
  gap: 3px;
  max-width: 360px;
  text-align: right;
  font-size: 0.82rem;
}

.bill-print-profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
  margin: 12px 0 24px;
}

.bill-print-vrp-block {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.bill-print-vrp-block p,
.bill-print-meta p {
  margin: 0;
  line-height: 1.45;
}

.bill-print-meta {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.bill-print-vrp-photo {
  width: 92px;
  height: 112px;
  object-fit: contain;
  border: 1px solid var(--vrp-line);
  border-radius: 4px;
  background: #fff;
}

.bill-print-section-title {
  margin: 0 0 8px;
  font-size: 0.84rem;
}

.bill-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.bill-print-table th,
.bill-print-table td {
  border: 1px solid #cfd5d9;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.bill-print-table th {
  background: #f0f0f0;
  font-weight: 850;
  text-transform: none;
}

.bill-print-total-label,
.bill-print-total-value {
  font-weight: 900;
  text-align: right;
}

.bill-print-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 34px;
}

.bill-print-approved {
  display: grid;
  gap: 5px;
  text-align: left;
}

.bill-approved-stamp {
  width: 90px;
  height: auto;
  justify-self: start;
}

.bill-print-approved span {
  display: block;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: -0.15px;
  break-inside: avoid;
}

.bill-final-approved {
  justify-self: start;
  min-width: 124px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border: 2px solid #22a140;
  border-radius: 4px;
  background: rgba(34, 161, 64, 0.10);
  color: #15912d;
  font-weight: 950;
  text-transform: uppercase;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.icon-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media print {
  .app-sidebar,
  .mobile-menu-bar,
  .language-switcher,
  .module-hero,
  .no-print {
    display: none !important;
  }

  .app-shell,
  .app-main {
    display: block;
  }

  .module-page {
    padding: 0;
  }

  .module-card {
    box-shadow: none;
    border: 0;
  }

  .bill-print-body {
    background: #fff;
  }

  .bill-print-sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 34px 38px;
    box-shadow: none;
  }

  .bill-print-page {
    padding: 0;
  }
}

.bill-activity-table input,
.bill-activity-table select,
.tci-entry-table input,
.tci-entry-table select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d5e0e6;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

.chip-source-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.chip-multi-control {
  position: relative;
  min-height: 44px;
  border: 1px solid #cfdbe3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.chip-multi-control.open {
  z-index: 2100;
}

.location-multi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.location-select-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #172126;
  font-weight: 500;
  white-space: nowrap;
}

.location-select-all input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.chip-multi-control.disabled {
  background: #f4f7f8;
  color: #7b8b98;
  cursor: not-allowed;
}

.chip-multi-values {
  display: flex;
  min-height: 48px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 7px 34px 7px 10px;
}

.chip-multi-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #475866;
  transform: translateY(-50%);
}

.chip-placeholder {
  color: #7b8b98;
}

.chip-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #aeb8bf;
  border-radius: 5px;
  background: #e8e8e8;
  color: #26333b;
  padding: 4px 8px;
  font: inherit;
  cursor: pointer;
}

.chip-token strong {
  font-size: 0.9rem;
  line-height: 1;
}

.chip-selection-summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #eaf4e7;
  color: #376c2d;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 750;
}

.chip-multi-dropdown {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #cfdbe3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 28, 35, 0.16);
}

.target-mapping-card,
.target-mapping-card .module-entry-form,
.target-mapping-card .module-form-grid,
.target-mapping-card .module-form-grid label {
  overflow: visible;
}

.chip-multi-control.open .chip-multi-dropdown {
  display: grid;
}

.chip-search-input {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-bottom: 1px solid #d5e0e6;
  border-radius: 6px 6px 0 0;
  background: #fff;
  color: #172126;
  padding: 8px 12px;
  font: inherit;
  outline: none;
}

.chip-search-input:focus {
  box-shadow: inset 0 0 0 2px rgba(89, 143, 64, 0.18);
}

.chip-select-all-option {
  position: sticky;
  top: 38px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #d5e0e6;
  background: #f5faf7;
  color: #254d36;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}

.chip-select-all-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--vrp-primary);
}

.chip-option {
  border: 0;
  background: #fff;
  color: #172126;
  text-align: left;
  padding: 9px 12px;
  font: inherit;
  cursor: pointer;
}

.chip-option:hover,
.chip-option[data-selected="true"] {
  background: #eaf7f2;
  color: var(--vrp-primary);
}

.tci-open-btn {
  min-width: 46px;
  min-height: 34px;
  border: 1px solid #2b73ff;
  border-radius: 5px;
  background: #fff;
  color: #2b73ff;
  font-weight: 800;
  cursor: pointer;
}

.bill-save-actions {
  justify-content: center;
}

.tci-modal {
  width: min(880px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(16, 28, 35, 0.28);
}

.tci-modal::backdrop {
  background: rgba(15, 24, 31, 0.52);
}

.tci-modal-inner {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.tci-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tci-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.tci-modal-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef4f6;
  font-size: 1.4rem;
  cursor: pointer;
}

.tci-entry-table {
  min-width: 820px;
}

/* Delete/bulk-action confirmation. A <dialog> instead of window.confirm() --
   a native confirm() blocks the whole tab and some browsers let a person
   silently suppress every future one after a page fires several, which made
   Delete look like it did nothing. */
.vrp-confirm-dialog {
  width: min(360px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(16, 28, 35, 0.28);
}

.vrp-confirm-dialog::backdrop {
  background: rgba(15, 24, 31, 0.52);
}

.vrp-confirm-dialog p {
  margin: 0 0 18px;
  font-size: 1.05rem;
}

.vrp-confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.module-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.module-form-grid.user-registration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-entry-form {
  display: grid;
  gap: 18px;
}

.compact-filter-form {
  max-width: 360px;
  margin-bottom: 12px;
}

.compact-filter-form.compact-filter-form-multi {
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-filter-form label {
  display: grid;
  gap: 7px;
  color: #2b373d;
  font-size: 0.86rem;
  font-weight: 800;
}

.compact-filter-form select {
  min-height: 42px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.module-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--vrp-line);
}

.module-form-actions.inline-actions {
  align-items: center;
  padding-top: 0;
  border-top: 0;
}

.module-form-grid label {
  display: grid;
  gap: 7px;
  color: #2b373d;
  font-size: 0.86rem;
  font-weight: 800;
}

.module-form-grid .target-village-field {
  display: grid;
  gap: 7px;
  color: #2b373d;
  font-size: 0.86rem;
  font-weight: 800;
}

.module-form-grid input,
.module-form-grid select,
.module-form-grid textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--vrp-line);
  border-radius: 10px;
  background: #fbfdfd;
  color: var(--vrp-text);
  font: inherit;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.module-form-grid textarea {
  resize: vertical;
}

/* Nicer interactive states for the module entry forms (UI only). */
.module-form-grid input:hover,
.module-form-grid select:hover,
.module-form-grid textarea:hover {
  border-color: #b6c6cc;
  background: #ffffff;
}

.module-form-grid input:focus,
.module-form-grid select:focus,
.module-form-grid textarea:focus {
  border-color: var(--vrp-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(93, 140, 146, 0.16);
}

.module-form-grid input::placeholder,
.module-form-grid textarea::placeholder {
  color: #9aa9b0;
}

.module-form-grid label {
  letter-spacing: 0.01em;
}

.module-form-grid label span {
  color: #4a5a62;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.module-form-grid label span em {
  color: #c26060;
  font-style: normal;
}

.approval-channel-card {
  padding: 18px;
}

.approval-levels {
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f4f9ff;
  padding: 16px;
}

.approval-level-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.approval-levels h2 {
  margin: 0 0 14px;
  color: #516580;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.approval-level-table {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 160px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.user-hierarchy-table {
  grid-template-columns: 130px minmax(260px, 1fr) 140px;
}

.approval-level-head {
  background: #747f8a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 14px 16px;
  text-transform: uppercase;
}

.approval-level-cell {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 112px;
  border-top: 1px solid var(--vrp-line);
  padding: 16px 18px;
}

.approval-level-cell:not(:nth-child(3n + 1)) {
  border-left: 1px solid var(--vrp-line);
}

.user-hierarchy-table .approval-level-cell:not(:nth-child(3n + 1)) {
  border-left: 1px solid var(--vrp-line);
}

.approval-level-cell strong {
  width: fit-content;
  border: 1px solid #ffce9b;
  border-radius: 999px;
  background: #fff7ed;
  color: #c24514;
  font-size: 0.78rem;
  padding: 6px 12px;
  text-transform: uppercase;
}

.approval-level-cell small {
  color: #34445c;
}

.approval-level-cell select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--vrp-line);
  border-radius: 12px;
  background: #fff;
  color: var(--vrp-text);
  font: inherit;
  padding: 10px 14px;
}

.level-3-user-list {
  display: grid;
  gap: 10px;
}

.level-3-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stacked-list-cell {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, max-content));
  gap: 6px 10px;
  min-width: 560px;
  white-space: normal;
}

.stacked-list-cell span {
  display: block;
  max-width: 160px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.remove-level-btn {
  width: fit-content;
  min-height: 44px;
  border: 1px solid #ffc3cb;
  border-radius: 12px;
  background: #fff2f4;
  color: #e21d3d;
  font: inherit;
  font-weight: 900;
  padding: 8px 18px;
  cursor: pointer;
}

.add-level-btn {
  min-height: 38px;
  border: 1px solid #bed8c8;
  border-radius: 8px;
  background: #eef8f0;
  color: var(--vrp-primary);
  font: inherit;
  font-weight: 900;
  padding: 8px 16px;
  cursor: pointer;
}

.add-level-btn.compact,
.remove-level-btn.compact {
  min-height: 38px;
  border-radius: 10px;
  padding: 7px 12px;
  white-space: nowrap;
}

.access-control-card {
  padding: 24px;
}

.access-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--vrp-line);
}

.access-top-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 800;
}

.access-top-grid em {
  color: #d22f45;
  font-style: normal;
}

.access-top-grid input,
.access-top-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--vrp-text);
  font: inherit;
  padding: 9px 12px;
}

.access-table-shell {
  overflow-x: auto;
}

.access-table {
  min-width: 980px;
}

.access-table th:first-child,
.access-table td:first-child {
  width: 190px;
}

.access-menu-check,
.access-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.access-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.access-check {
  white-space: nowrap;
  font-weight: 700;
}

.access-menu-check input,
.access-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.access-actions {
  margin-top: 4px;
}

.table-shell {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 4px 0;
  color: var(--vrp-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.ics-exit-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: 18px;
  align-items: start;
}

.ics-exit-form-card,
.ics-exit-preview-card {
  min-height: 100%;
}

.ics-exit-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ics-exit-form-grid label {
  display: grid;
  gap: 7px;
  color: #2b373d;
  font-size: 0.86rem;
  font-weight: 800;
}

.ics-exit-form-grid .full-span {
  grid-column: 1 / -1;
}

.ics-exit-form-grid input,
.ics-exit-form-grid select,
.ics-exit-form-grid textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--vrp-text);
  font: inherit;
  padding: 9px 11px;
  outline: none;
}

.ics-exit-form-grid textarea {
  resize: vertical;
}

.ics-exit-form-grid input:focus,
.ics-exit-form-grid select:focus,
.ics-exit-form-grid textarea:focus {
  border-color: var(--vrp-primary);
  box-shadow: 0 0 0 3px rgba(89, 143, 64, 0.14);
}

.ics-exit-preview-card {
  position: sticky;
  top: 18px;
}

.ics-exit-declaration-card {
  overflow-x: auto;
}

.ics-exit-declaration-sheet {
  width: min(100%, 880px);
  margin: 0 auto;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdf9);
  color: var(--vrp-text);
  font-size: 1rem;
  line-height: 1.75;
  padding: 30px;
}

.ics-exit-declaration-sheet.compact {
  padding: 22px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.ics-exit-declaration-sheet h2 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 1.18rem;
  text-transform: uppercase;
}

.declaration-block,
.declaration-letter {
  margin-bottom: 20px;
}

.declaration-block p,
.declaration-letter p,
.declaration-signature-grid p {
  margin: 0 0 12px;
}

.declaration-line {
  display: inline-block;
  width: min(420px, 100%);
  min-height: 1.35em;
  border-bottom: 1px solid currentColor;
  vertical-align: text-bottom;
  white-space: pre-wrap;
}

.grower-group-line,
.certification-body-line {
  width: min(520px, 100%);
}

.short-line {
  width: 180px;
}

.signature-line {
  width: 280px;
}

.declaration-reason-lines {
  display: grid;
  gap: 22px;
  margin: 10px 0 20px;
}

.declaration-reason-lines span {
  display: block;
  min-height: 1.35em;
  border-bottom: 1px solid currentColor;
}

.declaration-preview-reason,
.declaration-filled-reason {
  min-height: 92px;
  margin: 10px 0 20px;
  border-bottom: 1px solid currentColor;
  white-space: pre-wrap;
}

.declaration-filled-reason p {
  margin: 0 0 8px;
}

.declaration-signature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
  margin-top: 28px;
}

.table-pagination button,
.table-pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: #fff;
  color: var(--vrp-text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.table-pagination button:disabled,
.table-pagination .page-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.module-table th,
.module-table td {
  border-bottom: 1px solid var(--vrp-line);
  padding: 12px 10px;
  text-align: left;
  white-space: nowrap;
}

.module-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: var(--vrp-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.module-table th.column-filter-header {
  overflow: visible;
  padding-right: 32px;
}

.column-filter-label {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}

.column-filter-trigger {
  position: absolute;
  right: 8px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--vrp-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  transform: translateY(-50%);
  cursor: pointer;
}

.column-filter-header:hover .column-filter-trigger,
.column-filter-header.filtered .column-filter-trigger,
.column-filter-trigger:focus {
  opacity: 1;
}

.column-filter-header.filtered .column-filter-trigger {
  color: var(--vrp-primary);
}

.column-filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 8px;
  z-index: 20;
  display: none;
  width: 220px;
  padding: 10px;
  border: 1px solid #c8d1d6;
  border-radius: 4px;
  background: #f8fbfc;
  box-shadow: 0 8px 20px rgba(17, 31, 38, 0.16);
}

.column-filter-panel.open {
  display: grid;
  gap: 8px;
}

.column-filter-panel select,
.column-filter-panel input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #c8d1d6;
  border-radius: 4px;
  background: #fff;
  color: var(--vrp-text);
  font: inherit;
  font-size: 0.86rem;
  padding: 5px 8px;
  outline: 0;
  text-transform: none;
}

.column-filter-panel input:focus {
  border-color: #6eb7ff;
  box-shadow: 0 0 0 3px rgba(75, 156, 255, 0.22);
}

.table-action {
  border: 0;
  border-radius: 8px;
  background: #effbf8;
  color: var(--vrp-primary-dark);
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
  cursor: pointer;
}

.table-action.danger {
  background: #fff5f3;
  color: var(--vrp-danger);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions form {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-pill.active {
  background: #effbf8;
  color: var(--vrp-primary-dark);
}

.status-pill.inactive {
  background: #fff5f3;
  color: var(--vrp-danger);
}

.field-hint {
  color: var(--vrp-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.record-count {
  color: var(--vrp-muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  color: var(--vrp-text);
  text-decoration: none;
  padding: 13px 14px;
}

.report-row:hover {
  border-color: var(--vrp-primary);
  background: #f6fbfa;
}

.report-row small {
  color: var(--vrp-primary);
  font-weight: 900;
}

.workflow-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.workflow-list li {
  padding: 10px 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel-soft);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list span {
  border: 1px solid var(--vrp-line);
  border-radius: 999px;
  background: var(--vrp-panel-soft);
  padding: 8px 12px;
  font-weight: 800;
}

.vrp-page {
  min-height: auto;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(31, 122, 104, 0.10), rgba(238, 243, 246, 0) 260px),
    var(--vrp-bg);
}

.vrp-shell {
  width: 100%;
  margin: 0;
}

.vrp-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.vrp-eyebrow {
  margin: 0 0 6px;
  color: var(--vrp-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vrp-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.1;
}

.vrp-card {
  background: var(--vrp-panel);
  border: 1px solid rgba(217, 226, 231, 0.9);
  border-radius: 8px;
  box-shadow: var(--vrp-shadow);
  padding: 28px;
}

.vrp-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
}

.vrp-form-grid::before,
.vrp-form-grid::after {
  display: none;
}

.vrp-form-grid > [class*="col-"] {
  width: auto;
  max-width: none;
  padding: 0;
  margin: 0;
}

.vrp-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--vrp-accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vrp-section-title:first-child {
  margin-top: 0;
}

.vrp-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--vrp-line);
}

.vrp-page .form-label,
.login-page .form-label {
  display: block;
  margin-bottom: 7px;
  color: #2b373d;
  font-size: 0.86rem;
  font-weight: 700;
}

.vrp-page .required::after {
  content: " *";
  color: var(--vrp-danger);
}

.vrp-page .form-control,
.vrp-page .form-select,
.vrp-page input[type="text"],
.vrp-page input[type="email"],
.vrp-page input[type="number"],
.vrp-page input[type="date"],
.vrp-page input[type="file"],
.vrp-page select,
.login-page .form-control,
.login-page input[type="text"],
.login-page input[type="password"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--vrp-text);
  font: inherit;
  font-size: 0.94rem;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.vrp-page select[multiple] {
  min-height: 132px;
  overflow: auto;
  padding: 9px 11px;
}

.vrp-page input[type="file"] {
  min-height: 46px;
  padding: 9px;
  background: var(--vrp-panel-soft);
}

.vrp-page .form-control:focus,
.vrp-page .form-select:focus,
.vrp-page input:focus,
.vrp-page select:focus,
.login-page .form-control:focus,
.login-page input:focus {
  border-color: var(--vrp-primary);
  box-shadow: 0 0 0 4px rgba(31, 122, 104, 0.14);
}

.vrp-page input::placeholder,
.login-page input::placeholder {
  color: #87939a;
}

.vrp-page .btn,
.app-frame .btn,
.login-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
}

.vrp-page .btn-primary,
.app-frame .btn-primary,
.login-page .btn-primary {
  background: var(--vrp-primary);
  color: #fff;
}

.vrp-page .btn-primary:hover,
.app-frame .btn-primary:hover,
.login-page .btn-primary:hover {
  background: var(--vrp-primary-dark);
}

.vrp-page .btn-secondary,
.app-frame .btn-secondary,
.login-page .btn-secondary {
  background: #fff;
  color: var(--vrp-primary-dark);
  border-color: var(--vrp-line);
}

.vrp-page .btn-secondary:hover,
.app-frame .btn-secondary:hover,
.login-page .btn-secondary:hover {
  border-color: var(--vrp-primary);
  background: #f4fbf9;
}

.vrp-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--vrp-line);
}

.vrp-list-page {
  min-height: auto;
}

.vrp-list-shell {
  display: grid;
  gap: 18px;
}

.vrp-list-header h1 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.vrp-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.list-btn {
  min-height: 36px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 18px;
  cursor: pointer;
}

.list-btn.send {
  min-width: 176px;
  background: #598f40;
}

.list-btn.active {
  background: #5d8c92;
}

.list-btn.deactive,
.list-btn.delete {
  background: #d9364e;
}

.list-btn.edit {
  background: #ffbf00;
  color: #172126;
}

.list-btn.export {
  background: var(--vrp-primary);
}

.list-btn.upload {
  background: var(--vrp-primary);
}

.vrp-list-card {
  border: 1px solid #c8d1d6;
  background: #fff;
  overflow: hidden;
}

.import-report-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 12px 12px;
  padding: 10px 12px;
  border: 1px solid #f1c46b;
  border-radius: 6px;
  background: #fff8e7;
  color: #644200;
  font-size: 0.9rem;
  font-weight: 700;
}

.vrp-ics-card {
  padding: 18px;
}

.vrp-ics-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.vrp-ics-farmer-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: #f8fbfc;
  padding: 12px;
}

.vrp-ics-farmer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vrp-ics-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--vrp-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.vrp-ics-farmer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  color: #5c6a72;
  font-size: 0.9rem;
}

.training-farmer-panel {
  grid-column: 1 / -1;
  border: 1px solid #d9e4e8;
  border-radius: 6px;
  background: #f8fbfc;
  padding: 12px;
}

.inline-upload-hint {
  display: inline;
  margin-left: 8px;
  font-weight: 700;
}

.training-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.vrp-ics-farmer-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #d9e4e8;
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.vrp-ics-farmer-item[hidden] {
  display: none;
}

.vrp-ics-farmer-item input {
  margin-top: 3px;
}

.vrp-ics-farmer-item strong,
.vrp-ics-farmer-item small {
  display: block;
}

.vrp-ics-farmer-item strong {
  color: var(--vrp-text);
  font-size: 0.92rem;
}

.vrp-ics-farmer-item small {
  margin-top: 4px;
  color: #667780;
  font-size: 0.78rem;
  line-height: 1.35;
}

.vrp-ics-farmer-item.disabled {
  opacity: 0.62;
  background: #f3f5f6;
}

.vrp-ics-farmer-item.already-mapped {
  border-color: #72b783;
  background: #e8f7ec;
  box-shadow: inset 4px 0 0 #3f9655;
}

.vrp-ics-farmer-item.already-included {
  border-color: #78b887;
  background: #eef9f1;
  box-shadow: inset 4px 0 0 #4b985e;
}

.vrp-ics-farmer-item .training-included-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  border-radius: 999px;
  background: #d9f0df;
  color: #246b36;
  padding: 3px 7px;
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
}

.target-mapping-card {
  padding: 18px;
}

#target_mapping_list .target-activity-column {
  min-width: 10rem;
}

/* This list has up to twenty columns. Let it use horizontal scrolling instead
   of squeezing the identifying columns until every word breaks per letter. */
#target_mapping_list {
  width: max-content;
  min-width: 100%;
}

#target_mapping_list th,
#target_mapping_list td {
  min-width: 7rem;
}

#target_mapping_list th:nth-child(1),
#target_mapping_list td:nth-child(1) {
  min-width: 10rem;
}

#target_mapping_list th:nth-child(4),
#target_mapping_list td:nth-child(4) {
  min-width: 9rem;
}

#target_mapping_list th:nth-child(6),
#target_mapping_list td:nth-child(6) {
  min-width: 8rem;
}

#target_mapping_list th:nth-child(-n + 6),
#target_mapping_list td:nth-child(-n + 6) {
  overflow-wrap: normal;
  word-break: normal;
}

#target_mapping_list .target-training-column {
  min-width: 7.5rem;
  white-space: normal;
  line-height: 1.25;
}

#target_mapping_list .target-farmer-view-column,
#target_mapping_list .target-farmer-view-cell {
  min-width: 7rem;
  text-align: center;
  white-space: nowrap;
}

#target_mapping_list .target-count-column,
#target_mapping_list .target-count-cell {
  min-width: 7rem;
  text-align: center;
  white-space: nowrap;
}

#target_mapping_list .target-farmer-view-cell .table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#target_mapping_list .target-no-farmers {
  color: #87969e;
}

.participation-filter-card {
  position: relative;
  z-index: 20;
  overflow: visible;
  padding: 16px;
}

.participation-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 14px;
  align-items: end;
}

.participation-filter-form label {
  display: grid;
  gap: 6px;
  color: var(--vrp-text);
  font-size: 0.84rem;
  font-weight: 800;
}

.participation-filter-form input,
.participation-filter-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--vrp-text);
  padding: 8px 10px;
  font: inherit;
}

.participation-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.participation-filter-warning {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  border: 1px solid #e4b64f;
  border-radius: 6px;
  background: #fff8df;
  color: #684b00;
  padding: 10px 12px;
  font-weight: 800;
}

.participation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.participation-summary-grid article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.participation-summary-grid span {
  color: #667780;
  font-size: 0.8rem;
  font-weight: 800;
}

.participation-summary-grid strong {
  color: var(--vrp-primary);
  font-size: 1.55rem;
}

#farmer_participation_list th,
#farmer_participation_list td {
  min-width: 8rem;
  white-space: normal;
  vertical-align: top;
}

#farmer_participation_list .participation-count {
  color: var(--vrp-primary);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 900px) {
  .participation-filter-form,
  .participation-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .participation-filter-form,
  .participation-summary-grid {
    grid-template-columns: 1fr;
  }
}

#target_mapping_list .target-activity-text {
  min-width: 10rem;
  max-width: 15rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.target-mapping-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: #f8fbfc;
  padding: 12px;
}

.target-training-fields {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.35rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, #edf6ef);
}

.target-training-fields[hidden] {
  display: none !important;
}

.target-training-fields .target-mapping-toolbar {
  margin-bottom: 0.15rem;
}

.target-farmer-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: #f8fbfc;
  padding: 12px;
}

.target-farmer-panel[hidden] {
  display: none;
}

.target-mapping-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--vrp-text);
}

.seed-farmer-search {
  width: min(360px, 100%);
}

.seed-farmer-search input,
.target-farmer-search input {
  width: 100%;
}

.target-farmer-search {
  width: min(360px, 100%);
}

.target-mapping-toolbar span {
  color: var(--vrp-primary);
  font-weight: 900;
}

[data-target-registered-count] {
  color: var(--vrp-primary);
  font-weight: 900;
}

.target-mapping-table {
  min-width: 860px;
}

.target-farmer-list {
  max-height: 320px;
}

.target-weekly-summary {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 12px;
}

.target-weekly-summary[hidden] {
  display: none;
}

.target-weekly-table-shell {
  border-radius: 6px;
}

.target-weekly-table {
  min-width: 760px;
}

.target-weekly-table th,
.target-weekly-table td {
  vertical-align: middle !important;
}

.training-sub-activity-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.training-sub-activity-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  background: #fff;
}

.training-sub-activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 9px 7px 12px;
  border: 1px solid #9bc9a0;
  border-radius: 999px;
  background: #edf8ee;
  color: #245d2d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.training-sub-activity-remove {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d9eedc;
  color: #245d2d;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.training-sub-activity-remove:hover,
.training-sub-activity-remove:focus-visible {
  background: #beddc2;
  outline: 2px solid #4f914e;
  outline-offset: 1px;
}

.training-sub-activity-empty {
  color: var(--vrp-muted);
  font-size: 12px;
}

.training-list-sub-activities {
  display: grid;
  gap: 7px;
  min-width: 320px;
  white-space: normal;
}

.training-list-main-activities {
  display: grid;
  gap: 7px;
  min-width: 180px;
}

.training-list-main-activities > strong {
  color: #2f7237;
  font-size: 11px;
}

.training-list-main-activities > span {
  padding: 6px 9px;
  border-radius: 6px;
  background: #eef5f0;
  font-weight: 700;
}

.training-list-sub-activities > strong {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e5f3e7;
  color: #2f7237;
  font-size: 11px;
}

.training-list-sub-activities > span {
  display: block;
  padding: 7px 9px;
  border-left: 3px solid #70ad72;
  border-radius: 4px;
  background: #f3f8f4;
  line-height: 1.35;
}

.target-weekly-table th:first-child,
.target-weekly-table td:first-child {
  width: 30%;
  min-width: 240px;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.target-weekly-activity {
  display: grid;
  gap: 10px;
  line-height: 1.35;
  justify-items: center;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.target-weekly-activity strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e7f0f4;
  color: #143b52;
}

.target-weekly-subactivities {
  display: grid;
  gap: 8px;
  width: 100%;
}

.target-weekly-subactivity {
  display: flex;
  justify-content: center;
}

.target-weekly-activity span {
  color: var(--vrp-muted);
  display: inline-block;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f1f5f7;
}

.target-weekly-table td:not(:first-child),
.target-weekly-table th:not(:first-child) {
  text-align: center;
}

.target-weekly-table td:not(:first-child) {
  padding-top: 18px;
  padding-bottom: 18px;
}

.target-weekly-cell-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  width: 100%;
}

.target-weekly-input {
  width: 86px;
  min-height: 36px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--vrp-text);
  font: inherit;
  font-weight: 800;
  text-align: center;
  margin: 0 auto;
}

.target-weekly-input:focus {
  outline: 2px solid color-mix(in srgb, var(--vrp-primary) 35%, transparent);
  outline-offset: 1px;
}

.target-farmer-dialog {
  width: min(920px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(16, 28, 35, 0.28);
}

.target-farmer-dialog::backdrop {
  background: rgba(15, 24, 31, 0.52);
}

.target-farmer-dialog-inner {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  color: var(--vrp-text);
}

.target-farmer-dialog-header,
.target-farmer-dialog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.target-farmer-dialog-header > div {
  display: grid;
  gap: 4px;
}

.target-farmer-dialog-header span {
  color: var(--vrp-primary);
  font-size: 0.9rem;
  font-weight: 900;
}

.target-farmer-dialog-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef4f6;
  color: var(--vrp-text);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.target-dialog-farmer-list {
  max-height: min(54vh, 460px);
  overflow: auto;
}

.target-farmer-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--vrp-line);
}

.target-farmer-dialog-footer span {
  margin-right: auto;
  color: var(--vrp-muted);
  font-size: 0.88rem;
}

@media (max-width: 1180px) {
  .vrp-ics-grid,
  .vrp-ics-farmer-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .vrp-ics-grid,
  .vrp-ics-farmer-list {
    grid-template-columns: 1fr;
  }

  .vrp-ics-farmer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .target-mapping-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .seed-farmer-search {
    width: 100%;
  }

  .target-farmer-search {
    width: 100%;
  }

  .target-farmer-dialog-header,
  .target-farmer-dialog-tools,
  .target-farmer-dialog-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

.vrp-list-grid {
  width: 100%;
  height: 450px;
}

.grid-view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 30px;
  border-radius: 999px;
  background: #eaf7ff;
  color: #006fb8;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  text-decoration: none;
}

.eye-link span {
  font-size: 0.88rem;
  line-height: 1;
}

.grid-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  padding: 4px 8px;
}

.grid-status.approved {
  background: #08864f;
}

.grid-status.submitted {
  background: #6b7680;
}

.grid-status.pending {
  background: #d89a00;
}

.grid-status.rejected {
  background: #c72f45;
}

.user-list-table {
  min-width: 1780px;
}

.detail-table {
  min-width: 980px;
}

.detail-table th {
  color: var(--vrp-text);
  text-transform: none;
  background: #f7fafb;
}

.mt-4 {
  margin-top: 24px;
}

.attachment-table {
  min-width: 760px;
}

.attachment-thumb {
  width: 110px;
  height: 82px;
  object-fit: contain;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: #fff;
}

.attachment-view {
  width: 84px;
  min-height: 34px;
  padding: 7px 14px;
}

.vrp-detail-page {
  display: grid;
  gap: 18px;
}

.vrp-detail-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(31, 122, 104, 0.09), rgba(255, 255, 255, 0.98)),
    #fff;
}

.vrp-detail-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  line-height: 1.1;
}

.vrp-detail-hero p:last-child {
  margin: 8px 0 0;
  color: var(--vrp-muted);
}

.vrp-detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.vrp-detail-card {
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.06);
  padding: 18px;
}

.vrp-detail-card h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.profile-card {
  display: grid;
  justify-items: center;
  align-content: start;
  text-align: center;
}

.profile-card h2 {
  margin: 12px 0 4px;
}

.profile-card p {
  margin: 0;
  color: var(--vrp-muted);
}

.vrp-photo-frame {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel-soft);
  overflow: hidden;
}

.vrp-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vrp-photo-frame span {
  color: var(--vrp-primary);
  font-size: 3rem;
  font-weight: 900;
}

.detail-pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.detail-pill-row span {
  border-radius: 999px;
  background: #effbf8;
  color: var(--vrp-primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 7px 10px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-list div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.detail-list .wide {
  grid-column: 1 / -1;
}

.detail-list span {
  color: var(--vrp-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.document-card {
  display: grid;
  gap: 14px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.document-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel-soft);
  padding: 12px;
}

.document-preview h3 {
  margin: 0;
  font-size: 0.95rem;
}

.document-preview img,
.empty-document {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #fff;
}

.document-preview img {
  object-fit: contain;
}

.empty-document {
  display: grid;
  place-items: center;
  color: var(--vrp-muted);
  font-weight: 800;
}

.vrp-alert {
  margin-bottom: 18px;
  border: 1px solid #f3b4ae;
  border-radius: 8px;
  background: #fff5f3;
  color: var(--vrp-danger);
  padding: 14px 16px;
}

.vrp-alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.vrp-page #aadhar_error,
.vrp-page #ifsc_error,
.vrp-page #mobile_no_error,
.vrp-page #email_error {
  margin-top: 6px;
  color: var(--vrp-danger) !important;
  font-size: 0.82rem;
  line-height: 1.3;
}

.modal {
  display: none;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 24px;
  background: rgba(23, 33, 38, 0.56);
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 48px 20px;
  background: #fff;
}

.login-panel {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(730px, calc(100vw - 40px));
  aspect-ratio: 1;
  border-radius: 50%;
}

.login-panel::before,
.login-panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.login-panel::before {
  top: -1%;
  left: 2%;
  background: #96b18b;
  box-shadow: 0 5px 11px rgba(87, 120, 75, 0.18);
}

.login-panel::after {
  top: 15%;
  left: 12%;
  background: #79989c;
  box-shadow: 0 5px 11px rgba(58, 125, 135, 0.16);
}

.login-surface {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 85%;
  aspect-ratio: 1;
  padding: clamp(66px, 7vw, 96px);
  border: 1px solid rgba(24, 32, 38, 0.16);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 9px 18px rgba(23, 33, 38, 0.14);
}

.login-surface h1 {
  margin: 0 0 54px;
  color: #565d62;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1;
}

.login-copy {
  margin: 0 0 26px;
  color: var(--vrp-muted);
  line-height: 1.6;
}

.login-form {
  width: min(100%, 470px);
  display: grid;
  gap: 38px;
}

.login-page .form-label {
  margin: 0 0 10px;
  color: #5b6166;
  font-size: 1rem;
  font-weight: 800;
}

.login-page .form-control,
.login-page input[type="text"],
.login-page input[type="password"] {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid #d0d0d0;
  border-radius: 0;
  background: transparent;
  color: #2b3035;
  padding: 8px 0;
  box-shadow: none;
}

.login-password-field,
.password-field {
  position: relative;
}

.login-password-field .form-control,
.password-field input {
  padding-right: 42px;
}

.password-eye-btn {
  position: absolute;
  right: 0;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #5b6166;
  font-size: 1rem;
  cursor: pointer;
}

.password-eye-btn:hover,
.password-eye-btn:focus {
  color: #79989c;
  outline: none;
}

.login-page .form-control:focus,
.login-page input:focus {
  border-color: #79989c;
  box-shadow: none;
}

.login-options {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: #555b60;
  font-size: 1.18rem;
}

.login-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-options a {
  color: var(--vrp-primary);
  font-weight: 800;
  text-decoration: none;
}

.login-page .login-submit {
  justify-self: center;
  width: 102px;
  height: 102px;
  min-height: 102px;
  margin-top: 20px;
  border-radius: 50%;
  background: #79989c;
  color: #fff;
  border-color: #79989c;
  box-shadow: 0 4px 0 rgba(18, 93, 107, 0.24);
  font-size: 1.04rem;
}

.login-page .login-submit:hover,
.login-page .login-submit:focus {
  background: #96b18b;
  box-shadow: 0 5px 0 rgba(18, 93, 107, 0.26);
}

.login-notice {
  width: min(100%, 410px);
  margin: -22px 0 24px;
  border: 1px solid #b8ddd4;
  border-radius: 999px;
  background: #effbf8;
  color: var(--vrp-primary-dark);
  padding: 10px 16px;
  text-align: center;
  font-weight: 700;
}

.login-notice.alert {
  border-color: #f1c4bd;
  background: #fff4f2;
  color: #9a2f1c;
}

.forgot-password-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  justify-items: center;
  overflow: hidden;
  padding: 48px 20px;
  background: #fff;
}

.forgot-password-card {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(730px, calc(100vw - 40px));
  aspect-ratio: 1;
  border-radius: 50%;
}

.forgot-password-card::before,
.forgot-password-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 86%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.forgot-password-card::before {
  top: -1%;
  left: 2%;
  background: #96b18b;
  box-shadow: 0 5px 11px rgba(87, 120, 75, 0.18);
}

.forgot-password-card::after {
  top: 15%;
  left: 12%;
  background: #79989c;
  box-shadow: 0 5px 11px rgba(58, 125, 135, 0.16);
}

.forgot-password-card-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: stretch;
  width: 85%;
  aspect-ratio: 1;
  border: 1px solid rgba(24, 32, 38, 0.16);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 9px 18px rgba(23, 33, 38, 0.14);
  padding: clamp(82px, 8vw, 112px);
}

.forgot-password-card-inner h1 {
  width: min(100%, 402px);
  justify-self: center;
  margin: 0 0 20px;
  color: #1f2b44;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.2;
}

.forgot-password-form {
  width: min(100%, 402px);
  justify-self: center;
  display: grid;
  gap: 14px;
}

.forgot-password-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7dde3;
  border-radius: 5px;
  background: #fff;
  color: #26313f;
  font: inherit;
  padding: 10px 13px;
  outline: none;
}

.forgot-password-input:focus {
  border-color: #79989c;
  box-shadow: 0 0 0 3px rgba(121, 152, 156, 0.18);
}

.forgot-otp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 138px;
  gap: 14px;
}

.forgot-password-btn {
  min-height: 46px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 18px;
}

.forgot-password-btn.primary,
.forgot-password-btn.secondary {
  background: #79989c;
}

.forgot-password-btn:hover,
.forgot-password-btn:focus {
  background: #96b18b;
}

.forgot-password-footer {
  width: min(100%, 402px);
  justify-self: center;
  display: flex;
  justify-content: flex-end;
  padding-top: 24px;
}

.forgot-password-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #5b6067;
  font-weight: 600;
}

.forgot-password-footer span {
  font-size: 1.35rem;
  line-height: 1;
}

.forgot-password-copy {
  position: absolute;
  z-index: 2;
  bottom: 11%;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #111827;
  font-size: 0.86rem;
  white-space: nowrap;
}

.agreement-login-page {
  place-items: start center;
  overflow: visible;
  padding: 26px 20px 40px;
}

.agreement-panel {
  width: min(960px, 100%);
}

.agreement-surface {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 26px;
  border: 1px solid rgba(24, 32, 38, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 33, 38, 0.13);
}

.agreement-surface .login-notice {
  width: 100%;
  margin: 0;
  border-radius: 8px;
}

.agreement-header {
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--vrp-line);
  padding-bottom: 14px;
}

.agreement-header h1 {
  margin: 0;
  color: var(--vrp-text);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  line-height: 1.35;
}

.agreement-document {
  min-height: 260px;
  overflow: visible;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #fbfdfc;
  color: #26343b;
  padding: 22px;
  line-height: 1.75;
}

.agreement-document h2 {
  margin: 24px 0 8px;
  color: var(--vrp-primary-dark);
  font-size: 1.02rem;
}

.agreement-document h2:first-of-type {
  margin-top: 0;
}

.agreement-document p {
  margin: 0 0 12px;
}

.agreement-intro {
  font-weight: 700;
}

.agreement-bullets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 22px;
  margin: 8px 0 14px;
  padding-left: 22px;
}

.agreement-signature-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  gap: 16px;
  margin: 18px 0 16px;
  align-items: start;
}

.agreement-identity-stack,
.agreement-details-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(52, 83, 67, 0.16);
  border-radius: 8px;
  background: #fff;
}

.agreement-identity-stack div,
.agreement-details-grid div {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(52, 83, 67, 0.08);
}

.agreement-identity-stack div:last-child,
.agreement-details-grid div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.agreement-identity-stack span,
.agreement-details-grid span {
  color: var(--vrp-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.agreement-identity-stack strong,
.agreement-details-grid strong {
  font-size: 1rem;
  word-break: break-word;
}

.agreement-signature-shell {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--vrp-line);
}

.agreement-signature-layout .agreement-signature-shell {
  margin-top: 0;
  padding: 14px;
  border: 1px solid rgba(52, 83, 67, 0.16);
  border-radius: 8px;
  background: #fff;
}

.agreement-signature-header {
  display: grid;
  gap: 3px;
}

.agreement-signature-header strong {
  font-size: 0.98rem;
}

.agreement-signature-header small {
  color: var(--vrp-muted);
  font-weight: 700;
}

.agreement-signature-pad {
  width: 100%;
  height: 170px;
  border: 1px solid rgba(43, 61, 47, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
  cursor: crosshair;
}

.agreement-signature-actions {
  display: flex;
  justify-content: flex-end;
}

.agreement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--vrp-line);
  padding-top: 16px;
}

.agreement-actions .btn {
  min-width: 132px;
}

.agreement-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.agreement-decline {
  color: #8a291d;
}

.agreement-archive-page {
  display: grid;
  gap: 20px;
}

.agreement-archive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.agreement-archive-toolbar h1,
.agreement-detail-hero h1 {
  margin: 0;
  color: var(--vrp-text);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.2;
}

.agreement-archive-toolbar p,
.agreement-detail-hero p {
  margin: 6px 0 0;
  color: var(--vrp-muted);
}

.agreement-archive-table td small {
  display: block;
  margin-top: 4px;
  color: var(--vrp-muted);
}

.agreement-pdf-body {
  margin: 0;
  background: var(--vrp-bg);
}

.agreement-pdf-page {
  min-height: 100vh;
  padding: 28px;
}

.agreement-detail-page {
  display: grid;
  gap: 18px;
  width: min(1100px, 100%);
  margin: 0 auto;
}

.agreement-detail-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(24, 32, 38, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(23, 33, 38, 0.13);
}

.agreement-detail-hero {
  display: grid;
  gap: 6px;
}

.agreement-detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.agreement-signature-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(52, 83, 67, 0.16);
  border-radius: 8px;
  background: #fff;
}

.agreement-signature-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid rgba(43, 61, 47, 0.16);
  border-radius: 8px;
  background: #fbfdfc;
}

.agreement-signature-preview .agreement-signature-header {
  margin: 0;
}

.agreement-signature-empty {
  min-height: 220px;
  border: 1px solid rgba(43, 61, 47, 0.16);
  border-radius: 8px;
  background: #fbfdfc;
}

.agreement-signature-layout--detail {
  margin-top: 14px;
}

.modal-dialog {
  width: min(920px, 100%);
}

.modal-content {
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--vrp-line);
}

.modal-title {
  margin: 0;
  font-size: 1rem;
}

.modal-body {
  padding: 18px;
}

.btn-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #f0f4f6;
  cursor: pointer;
}

.btn-close::before {
  content: "x";
  color: var(--vrp-text);
  font-size: 1rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .app-brand {
    padding-bottom: 14px;
  }

  .side-nav {
    display: grid;
    overflow-x: visible;
    margin-top: 14px;
    padding-bottom: 4px;
  }

  .side-group {
    display: none;
  }

  .side-link {
    flex: none;
  }

  .app-main {
    padding: 18px;
  }

  .vrp-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .module-grid.two,
  .vrp-detail-grid,
  .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-form-grid.user-registration-grid,
  .jeevika-payment-summary-grid,
  .access-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-actions {
    max-width: none;
    justify-content: flex-start;
  }

  .lg-directory-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .login-page {
    padding: 34px 16px;
  }

  .login-panel::before,
  .login-panel::after {
    width: 84%;
  }
}

@media (max-width: 680px) {
  .vrp-page {
    padding: 0;
  }

  .vrp-header {
    align-items: stretch;
    flex-direction: column;
  }

  .vrp-card {
    padding: 18px;
  }

  .vrp-form-grid {
    grid-template-columns: 1fr;
  }

  .module-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-grid,
  .dashboard-report-grid,
  .dashboard-panels,
  .module-grid.two,
  .module-form-grid,
  .module-form-grid.user-registration-grid,
  .jeevika-payment-summary-grid,
  .access-top-grid,
  .vrp-detail-grid,
  .document-grid,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .vrp-detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .module-form-actions {
    flex-direction: column;
  }

  .module-form-actions .btn {
    width: 100%;
  }

  .lg-directory-card .module-card-header,
  .lg-directory-upload {
    align-items: stretch;
    flex-direction: column;
  }

  .lg-directory-filter {
    grid-template-columns: 1fr;
  }

  .vrp-actions {
    justify-content: stretch;
  }

  .vrp-actions .btn {
    width: 100%;
  }

  .login-panel {
    width: min(500px, calc(100vw - 24px));
  }

  .login-surface {
    width: 86%;
    padding: 52px 38px;
  }

  .login-panel::after {
    top: 18%;
    left: 13%;
  }

  .login-options {
    font-size: 0.94rem;
  }

  .login-page .login-submit {
    width: 88px;
    height: 88px;
    min-height: 88px;
  }

  .agreement-login-page {
    padding: 16px;
  }

  .agreement-surface {
    max-height: none;
    padding: 18px;
  }

  .agreement-document {
    padding: 16px;
  }

  .agreement-document ul {
    grid-template-columns: 1fr;
  }

  .agreement-signature-layout {
    grid-template-columns: 1fr;
  }

  .agreement-actions {
    flex-direction: column-reverse;
  }

  .agreement-actions .btn {
    width: 100%;
  }
}

@media (max-width: 680px) {
  body {
    overflow-x: hidden;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .app-frame {
    display: block;
    min-height: 100vh;
    padding-top: 56px;
  }

  .mobile-menu-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 56px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--vrp-line);
    background: #fff;
    box-shadow: 0 8px 20px rgba(23, 33, 38, 0.12);
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    background: var(--vrp-primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 8px 12px;
  }

  .mobile-menu-toggle span {
    font-size: 1.15rem;
    line-height: 1;
  }

  .mobile-menu-title {
    min-width: 0;
    overflow: hidden;
    color: var(--vrp-text);
    font-size: 0.92rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: block;
    border: 0;
    background: rgba(23, 33, 38, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  body.mobile-menu-open .mobile-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(318px, 86vw);
    height: auto;
    max-height: 100svh;
    padding: 12px 14px 18px;
    border-right: 1px solid var(--vrp-line);
    border-bottom: 0;
    box-shadow: 18px 0 45px rgba(23, 33, 38, 0.22);
    overflow: hidden;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    will-change: transform;
  }

  body.mobile-menu-open .app-sidebar {
    transform: translateX(0);
  }

  .app-brand {
    padding: 6px 0 10px;
  }

  .brand-mark {
    width: min(210px, 70vw);
    height: 54px;
  }

  .brand-mark img {
    max-width: 100%;
    max-height: 50px;
  }

  .side-nav {
    display: grid;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 4px 6px 0;
  }

  .side-nav > .side-link,
  .side-module {
    flex: none;
  }

  .side-module summary,
  .side-link {
    min-height: 42px;
  }

  .side-module > summary {
    cursor: pointer;
    user-select: none;
  }

  .side-subnav {
    max-height: none;
    overflow: visible;
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
  }

  .side-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    flex: 0 0 auto;
    gap: 8px;
    align-items: stretch;
    margin-top: 10px;
    padding-top: 10px;
  }

  .side-user {
    min-width: 0;
    margin-bottom: 0;
  }

  .side-vrp-link {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .logout-link {
    width: auto;
    min-width: 112px;
    margin: 0;
    justify-content: center;
  }

  .app-main {
    padding: 14px 12px 24px;
  }

  .app-language-bar {
    justify-content: stretch;
  }

  .language-switcher {
    width: 100%;
  }

  .module-page,
  .vrp-list-shell,
  .dashboard-page {
    gap: 14px;
  }

  .module-hero,
  .dashboard-topbar,
  .vrp-header,
  .vrp-list-header,
  .module-card,
  .vrp-card,
  .vrp-list-card {
    border-radius: 6px;
  }

  .module-hero,
  .dashboard-topbar {
    padding: 16px;
  }

  .module-card,
  .vrp-card {
    padding: 14px;
  }

  .module-form-grid,
  .module-form-grid.user-registration-grid,
  .vrp-form-grid,
  .access-top-grid,
  .lg-directory-filter,
  .dashboard-grid,
  .dashboard-report-grid,
  .dashboard-panels,
  .module-grid,
  .module-grid.two,
  .vrp-detail-grid,
  .document-grid,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .module-form-grid input,
  .module-form-grid select,
  .module-form-grid textarea,
  .vrp-form-grid input,
  .vrp-form-grid select,
  .vrp-form-grid textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .module-form-actions,
  .vrp-actions,
  .agreement-actions,
  .dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .module-form-actions .btn,
  .module-form-actions .list-btn,
  .vrp-actions .btn,
  .dashboard-actions .list-btn,
  .dashboard-actions .import-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .module-form-actions.inline-actions {
    align-items: stretch;
  }

  .ics-exit-workspace {
    grid-template-columns: 1fr;
  }

  .ics-exit-preview-card {
    position: static;
  }

  .ics-exit-form-grid {
    grid-template-columns: 1fr;
  }

  .ics-exit-form-grid input,
  .ics-exit-form-grid select,
  .ics-exit-form-grid textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .ics-exit-declaration-sheet {
    font-size: 0.94rem;
    line-height: 1.65;
    padding: 16px;
  }

  .declaration-line {
    display: block;
    width: 100%;
    margin-top: 4px;
  }

  .declaration-signature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .list-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .vrp-list-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .vrp-list-toolbar .list-btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  .vrp-list-toolbar .list-btn.send {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .list-control-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-left: 0;
  }

  .list-control-actions .list-search {
    grid-column: 1 / -1;
  }

  .list-control-actions .import-btn,
  .list-control-actions .list-btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.15;
    padding: 8px 10px;
    white-space: normal;
  }

  .list-search,
  .list-search.compact {
    width: 100%;
  }

  .list-search input {
    min-width: 0;
    width: 100%;
    font-size: 16px;
  }

  .table-shell {
    max-height: min(62vh, 520px);
    border: 1px solid var(--vrp-line);
    border-radius: 6px;
  }

  .module-table {
    min-width: 760px;
  }

  .target-mapping-table,
  .bill-activity-table,
  .tci-entry-table {
    min-width: 820px;
  }

  .table-pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .approval-levels {
    overflow-x: auto;
  }

  .approval-level-table {
    min-width: 680px;
  }
}

@media (max-width: 540px) {
  .login-page {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    overflow-y: auto;
  }

  .login-panel {
    width: 100%;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .login-panel::before,
  .login-panel::after {
    width: 260px;
    opacity: 0.18;
  }

  .login-panel::before {
    top: -70px;
    left: -96px;
  }

  .login-panel::after {
    top: auto;
    right: -105px;
    bottom: -76px;
    left: auto;
  }

  .login-surface {
    width: 100%;
    max-width: 420px;
    min-height: auto;
    aspect-ratio: auto;
    align-content: start;
    justify-items: stretch;
    padding: 24px 18px;
    border-radius: 8px;
  }

  .login-surface h1 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 2rem;
  }

  .login-form {
    width: 100%;
    gap: 20px;
  }

  .login-page .form-control,
  .login-page input[type="text"],
  .login-page input[type="password"] {
    min-height: 48px;
    font-size: 16px;
  }

  .login-options {
    justify-content: flex-start;
    font-size: 0.92rem;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-page .login-submit {
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin-top: 4px;
    border-radius: 6px;
  }

  .login-notice {
    width: 100%;
    margin: -8px 0 18px;
  }

  .forgot-password-page {
    min-height: 100svh;
    align-content: center;
    overflow-y: auto;
    padding: 22px 12px;
  }

  .forgot-password-card {
    width: 100%;
    max-width: 420px;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .forgot-password-card::before,
  .forgot-password-card::after {
    width: 260px;
    opacity: 0.18;
  }

  .forgot-password-card::before {
    top: -70px;
    left: -96px;
  }

  .forgot-password-card::after {
    top: auto;
    right: -105px;
    bottom: -76px;
    left: auto;
  }

  .forgot-password-card-inner {
    width: 100%;
    max-width: 420px;
    aspect-ratio: auto;
    align-content: start;
    border-radius: 8px;
    padding: 24px 18px;
  }

  .forgot-password-card-inner h1 {
    margin-bottom: 20px;
    font-size: 1.55rem;
  }

  .forgot-password-copy {
    position: static;
    transform: none;
    margin-top: 16px;
    text-align: center;
    white-space: normal;
  }

  .forgot-otp-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .side-footer {
    grid-template-columns: 1fr;
  }

  .logout-link {
    width: 100%;
  }

  .module-hero h1,
  .dashboard-topbar h1 {
    font-size: 1.45rem;
  }

  .vrp-list-header h1 {
    font-size: 1.12rem;
  }

  .module-table {
    min-width: 680px;
  }
}

/* ─── Dashboard Filter Bar ───────────────────────────────────────────────── */

.dashboard-filter-bar {
  padding: 18px 22px;
  border: 1px solid var(--vrp-line);
  border-radius: 10px;
  background: var(--vrp-panel);
  box-shadow: 0 4px 16px rgba(23, 33, 38, 0.06);
}

.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: end;
}

.dashboard-filter-field {
  display: grid;
  gap: 5px;
}

.dashboard-filter-field label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--vrp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-filter-input,
.dashboard-filter-select {
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-text);
  font: inherit;
  font-size: 0.96rem;
  width: 100%;
  transition: border-color 0.18s;
}

.dashboard-filter-input:focus,
.dashboard-filter-select:focus {
  outline: none;
  border-color: var(--vrp-primary);
  box-shadow: 0 0 0 3px rgba(89, 143, 64, 0.14);
}

.dashboard-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-filter-field--activity {
  grid-column: span 2;
  min-width: 240px;
}

.dashboard-activity-picker {
  position: relative;
}

.dashboard-activity-picker-summary {
  list-style: none;
  cursor: pointer;
  min-height: 38px;
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-text);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
}

.dashboard-activity-picker-summary::-webkit-details-marker {
  display: none;
}

.dashboard-activity-picker-summary::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 10px;
  color: var(--vrp-muted);
}

.dashboard-activity-picker-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel);
  box-shadow: 0 10px 28px rgba(23, 33, 38, 0.14);
}

.dashboard-activity-option {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--vrp-text);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: normal;
  word-break: break-word;
  cursor: pointer;
}

.dashboard-activity-option:hover,
.dashboard-activity-option.is-selected {
  background: rgba(89, 143, 64, 0.12);
}

.dashboard-activity-cell {
  max-width: 280px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

/* Shared overflow protection for every report/list table. Database labels can
   contain long comma-separated activities or unbroken identifiers; keep them
   inside their own cell instead of allowing visible overflow into neighbours. */
.table-shell .module-table th,
.table-shell .module-table td {
  box-sizing: border-box;
  max-width: 320px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  vertical-align: top;
}

.table-shell .module-table td > a,
.table-shell .module-table td > span,
.table-shell .module-table td > div {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.table-shell .module-table input,
.table-shell .module-table select,
.table-shell .module-table textarea {
  box-sizing: border-box;
  max-width: 100%;
}

.table-shell .module-table .table-action,
.table-shell .module-table .list-btn,
.table-shell .module-table .grid-status,
.table-shell .module-table .training-status-pill {
  white-space: nowrap;
}

/* Keep list headings readable. Wide tables must use the table shell's
   horizontal scrollbar instead of shrinking headers to one character per
   line. Body values may still wrap inside their capped-width cells. */
.table-shell .module-table {
  width: max-content;
  min-width: 100%;
}

.table-shell .module-table th {
  max-width: none;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

/* Weekly report has several descriptive columns. Give every column a stable
   width and allow long activity names to grow the row instead of painting over
   the neighbouring cells. */
#weekly_activity_target_report_table {
  width: 2360px;
  min-width: 2360px;
  table-layout: fixed;
}

#weekly_activity_target_report_table th,
#weekly_activity_target_report_table td {
  box-sizing: border-box;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal;
}

#weekly_activity_target_report_table th:nth-child(1),
#weekly_activity_target_report_table td:nth-child(1) { width: 180px; }
#weekly_activity_target_report_table th:nth-child(2),
#weekly_activity_target_report_table td:nth-child(2) { width: 85px; }
#weekly_activity_target_report_table th:nth-child(3),
#weekly_activity_target_report_table td:nth-child(3) { width: 125px; }
#weekly_activity_target_report_table th:nth-child(4),
#weekly_activity_target_report_table td:nth-child(4) { width: 150px; }
#weekly_activity_target_report_table th:nth-child(5),
#weekly_activity_target_report_table td:nth-child(5) { width: 250px; }
#weekly_activity_target_report_table th:nth-child(6),
#weekly_activity_target_report_table td:nth-child(6) { width: 350px; }
#weekly_activity_target_report_table th:nth-child(7),
#weekly_activity_target_report_table td:nth-child(7) { width: 140px; }
#weekly_activity_target_report_table th:nth-child(8),
#weekly_activity_target_report_table td:nth-child(8) { width: 150px; }
#weekly_activity_target_report_table th:nth-child(9),
#weekly_activity_target_report_table td:nth-child(9) { width: 110px; }
#weekly_activity_target_report_table th:nth-child(10),
#weekly_activity_target_report_table td:nth-child(10) { width: 80px; }
#weekly_activity_target_report_table th:nth-child(11),
#weekly_activity_target_report_table td:nth-child(11),
#weekly_activity_target_report_table th:nth-child(12),
#weekly_activity_target_report_table td:nth-child(12),
#weekly_activity_target_report_table th:nth-child(13),
#weekly_activity_target_report_table td:nth-child(13),
#weekly_activity_target_report_table th:nth-child(14),
#weekly_activity_target_report_table td:nth-child(14) { width: 115px; }
#weekly_activity_target_report_table th:nth-child(15),
#weekly_activity_target_report_table td:nth-child(15),
#weekly_activity_target_report_table th:nth-child(16),
#weekly_activity_target_report_table td:nth-child(16) { width: 90px; }
#weekly_activity_target_report_table th:nth-child(17),
#weekly_activity_target_report_table td:nth-child(17) { width: 100px; }

#weekly_activity_target_report_table td:nth-child(10),
#weekly_activity_target_report_table td:nth-child(11),
#weekly_activity_target_report_table td:nth-child(12),
#weekly_activity_target_report_table td:nth-child(13),
#weekly_activity_target_report_table td:nth-child(14),
#weekly_activity_target_report_table td:nth-child(15),
#weekly_activity_target_report_table td:nth-child(16),
#weekly_activity_target_report_table td:nth-child(17) {
  white-space: nowrap;
}

/* ─── Active Filter Chips ─────────────────────────────────────────────────── */

.dashboard-filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: rgba(89, 143, 64, 0.06);
}

.filter-chips-label {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--vrp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(89, 143, 64, 0.14);
  color: var(--vrp-primary-dark);
  font-size: 0.8rem;
  font-weight: 750;
  border: 1px solid rgba(89, 143, 64, 0.22);
}

.filter-chip-clear {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--vrp-danger);
  text-decoration: none;
}

.filter-chip-clear:hover {
  text-decoration: underline;
}

/* ─── VRP Status Cards ────────────────────────────────────────────────────── */

.vrp-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  padding: 16px 20px 20px;
}

.vrp-status-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--vrp-line);
  border-radius: 10px;
  background: var(--vrp-panel-soft);
  transition: box-shadow 0.18s;
}

.vrp-status-card:hover {
  box-shadow: 0 6px 18px rgba(23, 33, 38, 0.1);
}

.vrp-status-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vrp-status-name a {
  font-weight: 800;
  font-size: 0.97rem;
  color: var(--vrp-primary-dark);
  text-decoration: none;
}

.vrp-status-name a:hover {
  text-decoration: underline;
}

.vrp-status-role {
  font-size: 0.74rem;
  color: var(--vrp-muted);
  font-weight: 700;
}

.vrp-status-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.vrp-status-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--vrp-line);
  background: var(--vrp-panel);
}

.vrp-status-box.status-approved {
  background: rgba(89, 143, 64, 0.10);
  border-color: rgba(89, 143, 64, 0.28);
}

.vrp-status-box.status-rejected {
  background: rgba(180, 35, 24, 0.09);
  border-color: rgba(180, 35, 24, 0.26);
}

.vrp-status-box.status-pending {
  background: rgba(217, 148, 0, 0.09);
  border-color: rgba(217, 148, 0, 0.26);
}

.vrp-status-box.status-submitted {
  background: rgba(93, 140, 146, 0.09);
  border-color: rgba(93, 140, 146, 0.26);
}

.status-box-label {
  font-size: 0.71rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vrp-muted);
}

.status-box-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--vrp-text);
  line-height: 1.3;
}

.vrp-status-box.status-approved .status-box-value { color: var(--vrp-primary-dark); }
.vrp-status-box.status-rejected .status-box-value { color: var(--vrp-danger); }
.vrp-status-box.status-pending  .status-box-value { color: #b07800; }

/* Dark mode overrides for filter & status */

:root[data-theme="dark"] .dashboard-filter-bar,
:root[data-theme="dark"] .dashboard-filter-chips,
:root[data-theme="dark"] .vrp-status-card {
  background: var(--vrp-panel);
  border-color: var(--vrp-line);
}

:root[data-theme="dark"] .dashboard-filter-input,
:root[data-theme="dark"] .dashboard-filter-select {
  background: var(--vrp-panel-soft);
  border-color: var(--vrp-line);
  color: var(--vrp-text);
}

@media (max-width: 900px) {
  .dashboard-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .vrp-status-grid {
    grid-template-columns: 1fr;
  }

  .vrp-status-row {
    grid-template-columns: 1fr;
  }
}
.module-upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.module-upload-thumbnail {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color, #d7dce2);
}

.module-gallery-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 0;
  cursor: pointer;
}

.module-gallery-trigger small {
  font-weight: 700;
}

.module-gallery-modal {
  width: min(960px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--vrp-panel);
  color: var(--vrp-text);
  box-shadow: var(--vrp-shadow);
}

.module-gallery-modal::backdrop {
  background: rgba(15, 23, 42, 0.72);
}

.module-gallery-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--vrp-line);
  background: var(--vrp-panel);
}

.module-gallery-header h2,
.module-gallery-header p {
  margin: 0;
}

.module-gallery-header p {
  color: var(--vrp-muted);
}

.module-gallery-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.module-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}

.module-gallery-item {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--vrp-panel-soft);
}

.module-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.upload-thumbnail-link {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  vertical-align: middle;
}

.upload-thumbnail {
  width: 64px;
  height: 48px;
  display: block;
  object-fit: cover;
  border: 1px solid #cbd9dd;
  border-radius: 6px;
  background: #f4f7f8;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.upload-thumbnail-link:hover .upload-thumbnail {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(31, 55, 65, 0.16);
}
.target-activity-grouped-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.target-activity-grouped-list span {
  display: block;
  line-height: 1.4;
  padding: 2px 0;
}

/* Small trigger box on each summary card that opens its detail in a popup. */
.dashboard-training-secondary-summaries .metric-card-group {
  position: relative;
}
.metric-card-popup-trigger {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.metric-card-popup-trigger:hover {
  background: rgba(255, 255, 255, 0.4);
}
.metric-card-popup {
  width: min(92vw, 520px);
  border: 1px solid var(--vrp-line);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(16, 24, 32, 0.28);
}
.metric-card-popup::backdrop {
  background: rgba(16, 24, 32, 0.45);
}
.metric-card-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--vrp-line);
  font-size: 1rem;
}
.metric-card-popup-close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}
.metric-card-popup-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}
.metric-card-popup-body .metric-card-group-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.metric-card-popup-body .metric-card-group-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  min-height: 60px;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: #f7faf8;
  color: inherit;
  text-decoration: none;
}

.dashboard-grid.premium.dashboard-training-secondary-summaries {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1200px) {
  .dashboard-grid.premium.dashboard-training-secondary-summaries {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group > .metric-card-group-items,
.dashboard-grid.premium.dashboard-training-secondary-summaries .cc-jj-work-status .cc-jj-status-groups,
.dashboard-grid.premium.dashboard-training-secondary-summaries .cc-jj-work-status > .table-action,
.dashboard-grid.premium.dashboard-training-secondary-summaries .cc-target-status .cc-jj-status-groups {
  display: none !important;
}
/* Heading-only cards: a clean, rounded colored tile with no empty body. */
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group {
  min-height: 0;
  height: auto;
  padding: 0 !important;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(23, 33, 38, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 33, 38, 0.2);
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group-title {
  margin: 0 !important;
  padding: 16px 48px 16px 18px !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  min-height: 58px;
  font-size: 0.95rem;
  font-weight: 800;
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-popup-trigger {
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.95rem;
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-popup-trigger:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* Keep work-status labels compact so adjacent dashboard cards do not stretch. */
.cc-jj-status-groups {
  display: grid;
  gap: 14px;
}
.cc-jj-status-fco-row {
  display: grid;
  gap: 6px;
}
.cc-jj-status-fco-name {
  font-size: 0.85rem;
  font-weight: 800;
}
/* One FCO's 4 boxes (Red CC/JJ + Completed CC/JJ) fill the full card width in one line. */
.cc-jj-status-fco-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cc-jj-status-fco-groups .cc-jj-status-group {
  min-width: 0;
}
.cc-jj-status-fco-groups .cc-jj-status-group .metric-card-group-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* CC TARGET STATUS: 4 groups (Target | Red | Yellow | Green) per FCO row */
.cc-target-fco-groups {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cc-jj-status-target .metric-card-group-item {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}
.cc-jj-status-target .metric-card-group-item strong {
  color: #2563eb;
}
.cc-jj-status-group > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
}
/* Colour the CC/JJ boxes (not the label): Red status boxes red, Completed boxes green. */
.cc-jj-status-red .metric-card-group-item {
  border-color: #d64545;
  background: rgba(214, 69, 69, 0.1);
}
.cc-jj-status-red .metric-card-group-item strong {
  color: #c0392b;
}
.cc-jj-status-yellow .metric-card-group-item {
  border-color: #d99400;
  background: rgba(217, 148, 0, 0.1);
}
.cc-jj-status-yellow .metric-card-group-item strong {
  color: #b07800;
}
.cc-jj-status-green .metric-card-group-item,
.cc-jj-status-completed .metric-card-group-item {
  border-color: #1a8a34;
  background: rgba(26, 138, 52, 0.1);
}
.cc-jj-status-green .metric-card-group-item strong,
.cc-jj-status-completed .metric-card-group-item strong {
  color: #1a8a34;
}

/* Meaningful colours for the summary detail boxes (shown in the popup):
   Required = blue, Active/Approved = green, Vacant/Pending = amber, Male = blue, Female = pink. */
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-required"] {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-required"] strong {
  color: #2563eb;
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-active"],
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-approved"] {
  border-color: #1a8a34;
  background: rgba(26, 138, 52, 0.1);
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-active"] strong,
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-approved"] strong {
  color: #1a8a34;
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-vacant"],
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-pending"] {
  border-color: #e0a800;
  background: rgba(224, 168, 0, 0.14);
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-vacant"] strong,
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-pending"] strong {
  color: #b8860b;
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-male"] {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-male"] strong {
  color: #2563eb;
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-female"] {
  border-color: #db2777;
  background: rgba(219, 39, 119, 0.1);
}
.dashboard-training-secondary-summaries .metric-card-group-item[class*="-female"] strong {
  color: #db2777;
}
.cc-jj-status-group .metric-card-group-items {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dashboard-grid.premium.dashboard-training-secondary-summaries {
  align-items: start;
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group {
  height: auto;
}

.dashboard-grid.premium .cc-jj-work-status .cc-jj-status-group > strong {
  font-size: 0.8rem;
  line-height: 1.35;
  margin: 0 0 6px;
}
.dashboard-grid.premium .cc-jj-work-status .cc-jj-status-group .metric-card-group-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-grid.premium.dashboard-training-secondary-summaries {
  align-items: stretch;
}
.dashboard-grid.premium.dashboard-training-secondary-summaries .metric-card-group {
  height: 100%;
  box-sizing: border-box;
}
.dashboard-grid.premium .cc-jj-work-status .cc-jj-status-group .metric-card-group-items {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Make the CC/JJ boxes fill the full card width and give them a bigger size. */
.dashboard-grid.premium .cc-jj-work-status .cc-jj-status-fco-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}
.dashboard-grid.premium .cc-jj-work-status .cc-jj-status-fco-groups .metric-card-group-items {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px;
  width: 100%;
  justify-items: stretch;
}
.dashboard-grid.premium .cc-jj-work-status .metric-card-group-item {
  width: 100%;
  justify-self: stretch;
  min-height: 64px;
  padding: 10px 12px;
}
.dashboard-grid.premium .cc-jj-work-status .metric-card-group-item > strong {
  font-size: 1.2rem;
}

/* Dashboard visual refresh: scoped to dashboard; no changes to report behavior. */
.dashboard-page {
  --dashboard-ink: #29394b;
  --dashboard-accent: #466a7e;
  --dashboard-border: #e1e7ec;
  gap: 24px;
}
.dashboard-page .dashboard-topbar {
  position: relative;
  padding: 22px 28px;
  border: 1px solid #e1e7ec;
  border-radius: 16px;
  border-left-width: 1px;
  background: linear-gradient(110deg, #ffffff 35%, #f3f7fa 75%, #f0f6f1 100%);
  box-shadow: 0 4px 18px #263b5006;
  color: #29394b;
  gap: 20px;
}
.dashboard-page .dashboard-topbar h1 {
  color: #29394b;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.2;
  margin: 5px 0 7px;
}
.dashboard-page .dashboard-topbar p { color: #72808d; line-height: 1.6; }
.dashboard-page .dashboard-topbar .vrp-eyebrow {
  color: #6c8a79;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  font-weight: 750;
}
.dashboard-page .dashboard-header-clock {
  border: 1px solid #e0e8e6;
  border-radius: 12px;
  background: #ffffffb3;
  box-shadow: none;
  padding: 10px 14px;
  color: #fff;
}
.dashboard-page .dashboard-header-clock strong,
.dashboard-page .dashboard-header-clock small { color: #516577; }
.dashboard-page .dashboard-header-clock span { background: #e3eee5; color: #477359; }
.dashboard-page .dashboard-actions .list-search {
  border-radius: 10px;
  border: 1px solid #dfe6eb;
  background: #fff;
  color: #344e42;
  min-height: 42px;
}
.dashboard-page .dashboard-actions .list-search input { color: #243e31; background: transparent; }
.dashboard-page .dashboard-filter-bar {
  padding: 22px 24px;
  background: var(--vrp-panel);
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  box-shadow: 0 3px 12px #183e3205;
}
.dashboard-page .dashboard-filter-grid { gap: 16px; }
.dashboard-page .dashboard-filter-field label {
  font-size: 0.68rem;
  line-height: 1.5;
  letter-spacing: 0.07em;
  font-weight: 700;
}
.dashboard-page .dashboard-filter-select {
  min-height: 44px;
  border-radius: 9px;
  border-color: var(--dashboard-border);
  background: var(--vrp-panel-soft);
  font-size: 0.84rem;
}
.dashboard-page .dashboard-filter-actions .list-btn.active {
  min-height: 44px;
  padding: 10px 19px;
  border-radius: 9px;
  border: 1px solid #c9dcd1;
  background: #e5efe8;
  color: #355c46;
  box-shadow: none;
}
.dashboard-page .module-card {
  border: 1px solid var(--dashboard-border);
  border-radius: 16px;
  background: var(--vrp-panel);
  box-shadow: 0 4px 18px #153d2e06;
}
.dashboard-page .dashboard-status-panel > .training-participation-status-header {
  border-left: 0;
  border-bottom: 1px solid var(--dashboard-border);
  padding: 17px 24px;
  background: transparent;
  color: var(--vrp-text);
}
.dashboard-page .module-card-header h2 {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.025em;
}
.dashboard-page .dashboard-status-panel > .training-participation-boxes {
  padding: 22px 24px;
  gap: 16px;
  background: transparent;
}
.dashboard-page .training-participation-box {
  border: 1px solid var(--dashboard-border);
  border-top: 1px solid var(--dashboard-border);
  border-radius: 12px;
  padding: 18px;
  background: var(--vrp-panel-soft);
  box-shadow: none;
  min-width: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.dashboard-page .training-participation-box > span {
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.5;
  color: var(--vrp-muted);
  letter-spacing: 0.01em;
}
.dashboard-page .training-participation-box > strong {
  display: block;
  margin: 10px 0 14px;
  color: var(--vrp-text);
  font-size: clamp(1.65rem, 2vw, 2.15rem);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.dashboard-page .training-participation-box.red { border-top-color: #d36767; }
.dashboard-page .training-participation-box.yellow { border-top-color: #d69a35; }
.dashboard-page .training-participation-box.green { border-top-color: #54976b; }
.dashboard-page .training-participation-box.red > strong { color: #b64242; }
.dashboard-page .training-participation-box.yellow > strong { color: #98600d; }
.dashboard-page .training-participation-box.green > strong { color: #287549; }
.dashboard-page .training-participation-box .table-action {
  padding: 8px 12px;
  min-height: 34px;
  border-radius: 7px;
  border: 1px solid var(--dashboard-border);
  background: var(--vrp-panel);
  color: var(--dashboard-accent);
  font-size: 0.73rem;
  font-weight: 700;
}
.dashboard-page .training-participation-box .table-action:hover {
  background: #e7f2eb;
  border-color: #95bea5;
}
.dashboard-page .training-participation-box:hover {
  box-shadow: 0 6px 16px #183e320a;
}
.dashboard-page .filter-chip {
  border-radius: 7px;
  background: #e8f2eb;
  border-color: #cadfce;
  color: #286042;
  padding: 6px 12px;
}
.dashboard-page .metric-card-group { border-radius: 14px; }
.dashboard-page .metric-card-group-header { padding: 16px 18px; }
.dashboard-page :is(a, button, input, select):focus-visible {
  outline: 3px solid #84ad66;
  outline-offset: 3px;
}
:root[data-theme="dark"] .dashboard-page {
  --dashboard-border: #384b43;
  --dashboard-accent: #a2d1b4;
}
:root[data-theme="dark"] .dashboard-page .training-participation-box.red > strong { color: #f09b99; }
:root[data-theme="dark"] .dashboard-page .training-participation-box.yellow > strong { color: #efc279; }
:root[data-theme="dark"] .dashboard-page .training-participation-box.green > strong { color: #a0d6ad; }
:root[data-theme="dark"] .dashboard-page .training-participation-box .table-action:hover { background: #304b3b; }
@media (max-width: 900px) {
  .dashboard-page .dashboard-topbar { padding: 24px; flex-wrap: wrap; }
  .dashboard-page .dashboard-actions { width: 100%; flex-wrap: wrap; }
  .dashboard-page .dashboard-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-page .dashboard-filter-field--activity { grid-column: auto; min-width: 0; }
  .dashboard-page .dashboard-summary-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .dashboard-page { gap: 16px; }
  .dashboard-page .dashboard-topbar { padding: 22px 18px; border-radius: 14px; }
  .dashboard-page .dashboard-filter-bar { padding: 18px; }
  .dashboard-page .dashboard-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-page .dashboard-status-panel > .training-participation-status-header { padding: 16px; }
  .dashboard-page .dashboard-status-panel > .training-participation-boxes { padding: 16px; gap: 10px; }
  .dashboard-page .training-participation-box { padding: 14px; }
  .dashboard-page .dashboard-header-clock { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-page .training-participation-box { transition: none; }
}

/* Soft dashboard palette: quiet surfaces with restrained status accents. */
:root:not([data-theme="dark"]) .dashboard-page .dashboard-summary-boxes > .training-participation-box:nth-child(5n + 1) {
  background: #e2edf7; border-color: #bfd2e4;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-summary-boxes > .training-participation-box:nth-child(5n + 2) {
  background: #e5eee1; border-color: #c4d5bc;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-summary-boxes > .training-participation-box:nth-child(5n + 3) {
  background: #eae4f5; border-color: #cfc2e3;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-summary-boxes > .training-participation-box:nth-child(5n + 4) {
  background: #f5ead6; border-color: #e0cba4;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-summary-boxes > .training-participation-box:nth-child(5n + 5) {
  background: #dfefeb; border-color: #b8d5ce;
}
:root:not([data-theme="dark"]) .dashboard-page .training-participation-box.red { background: #f6bcbc; border-color: #e59a9a; } /* red */
:root:not([data-theme="dark"]) .dashboard-page .training-participation-box.yellow { background: #f4dd8a; border-color: #e0c766; } /* yellow */
:root:not([data-theme="dark"]) .dashboard-page .training-participation-box.green { background: #e3efe5; border-color: #bbd4c0; }
.dashboard-page .dashboard-summary-boxes > .training-participation-box {
  border-left-width: 1px;
  border-top-width: 1px;
}
.dashboard-page .training-participation-box .table-action {
  background: transparent;
  border-color: transparent;
  border-top: 1px solid var(--dashboard-border);
  border-radius: 0;
  text-align: left;
  padding: 10px 0 0;
}
.dashboard-page .training-participation-box .table-action::after {
  content: "\2192";
  margin-left: 10px;
}
.dashboard-page .training-participation-box .table-action:hover {
  background: transparent;
  color: #284c65;
  border-color: transparent;
  border-top-color: #afc3cf;
}
.dashboard-page .metric-card-group .metric-card-group-title {
  color: #496358 !important;
  background: #eaf2ed;
  font-weight: 700;
}
.dashboard-page .metric-card-group-fco .metric-card-group-title { background: #efebf6; color: #66567e !important; }
.dashboard-page .metric-card-group-billing .metric-card-group-title { background: #f7efdf; color: #806538 !important; }
.dashboard-page .metric-card-group-assignment .metric-card-group-title { background: #eaf1f7; color: #49657c !important; }
.dashboard-page .metric-card-popup-trigger {
  background: #ffffff80;
  border-color: #a9b9b7;
  color: #566878;
}
:root[data-theme="dark"] .dashboard-page .dashboard-topbar {
  background: linear-gradient(110deg, #25313a, #293c37);
  border-color: #40524b;
}
:root[data-theme="dark"] .dashboard-page .dashboard-topbar h1 { color: #eef3f5; }
:root[data-theme="dark"] .dashboard-page .dashboard-topbar p { color: #b4c1c8; }
:root[data-theme="dark"] .dashboard-page .dashboard-header-clock { background: #24342e; border-color: #40524b; }
:root[data-theme="dark"] .dashboard-page .dashboard-header-clock strong,
:root[data-theme="dark"] .dashboard-page .dashboard-header-clock small { color: #d2dfd8; }

/* Four detail launchers: readable cards rather than heading-only strips. */
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries {
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group {
  --detail-accent: #356558;
  --detail-tint: #e6efe9;
  position: relative;
  min-height: 172px;
  padding: 20px !important;
  border: 1px solid #cbd8d5;
  border-top: 4px solid var(--detail-accent);
  border-radius: 12px;
  background: var(--vrp-panel);
  box-shadow: 0 4px 12px #2437480a;
  transition: box-shadow 160ms ease;
}
.dashboard-page .dashboard-training-secondary-summaries .metric-card-group-fco {
  --detail-accent: #655389;
  --detail-tint: #eee8f6;
}
.dashboard-page .dashboard-training-secondary-summaries .metric-card-group-billing {
  --detail-accent: #91631f;
  --detail-tint: #f7eddb;
}
.dashboard-page .dashboard-training-secondary-summaries .metric-card-group:nth-child(3) {
  --detail-accent: #436e94;
  --detail-tint: #e6eef7;
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group-title {
  display: block;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0;
  background: transparent;
  color: var(--vrp-text) !important;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 750;
  letter-spacing: -0.015em;
}
.dashboard-page .dashboard-training-secondary-summaries .metric-card-group-title::after {
  content: "";
  display: block;
  margin-top: 9px;
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 450;
  letter-spacing: 0;
  color: var(--vrp-muted);
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-popup-trigger {
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  height: auto;
  min-height: 38px;
  margin-top: auto;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--detail-tint);
  color: var(--detail-accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-popup-trigger:hover {
  border-color: var(--detail-accent);
  background: var(--detail-tint);
}
.dashboard-page .training-participation-box > span {
  color: var(--vrp-text);
  font-size: 0.82rem;
  font-weight: 600;
}
.dashboard-page .module-card-header h2 { font-size: 1.1rem; }
.dashboard-page .training-participation-box .table-action { font-size: 0.8rem; font-weight: 700; }
:root[data-theme="dark"] .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group {
  border-color: #53616d;
  border-top-color: var(--detail-accent);
}
@media (max-width: 1100px) {
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group { transition: none; }
}

/* Black dashboard text in light mode. */
:root:not([data-theme="dark"]) .dashboard-page .training-participation-box > span,
:root:not([data-theme="dark"]) .dashboard-page .training-participation-box > strong,
:root:not([data-theme="dark"]) .dashboard-page .training-participation-box .table-action,
:root:not([data-theme="dark"]) .dashboard-page .dashboard-training-secondary-summaries .metric-card-group-title::after,
:root:not([data-theme="dark"]) .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-popup-trigger {
  color: #111;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group-title {
  color: #111 !important;
}

/* Distinct colors for the four report cards, matching the summary palette. */
:root:not([data-theme="dark"]) .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group:nth-child(1) {
  background: #eae4f5;
  border-color: #cfc2e3;
  border-top-color: #9a80bc;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group:nth-child(2) {
  background: #f5ead6;
  border-color: #e0cba4;
  border-top-color: #c19a57;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group:nth-child(3) {
  background: #e2edf7;
  border-color: #bfd2e4;
  border-top-color: #7c9fc0;
}
:root:not([data-theme="dark"]) .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group:nth-child(4) {
  background: #dfefeb;
  border-color: #b8d5ce;
  border-top-color: #77a598;
}
:root:not([data-theme="dark"]) .dashboard-page .training-status-panel .training-participation-box.total {
  background: #e2edf7;
  border-color: #bfd2e4;
}

/* Compact right-aligned detail icon; keeps the existing dialog trigger. */
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group {
  min-height: 126px;
  padding-right: 76px !important;
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-popup-trigger {
  position: absolute;
  top: 20px;
  right: 18px;
  transform: none;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 9px;
  margin: 0;
  justify-content: center;
  border: 1px solid #9faeaa;
  border-radius: 9px;
  background: var(--vrp-panel);
  color: var(--vrp-text);
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-popup-trigger:hover {
  background: var(--vrp-panel-soft);
  border-color: #56776a;
}
.dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-popup-trigger:focus-visible {
  outline: 3px solid #56776a;
  outline-offset: 3px;
}

/* Short, one-time dashboard entrance; no timers or extra data requests. */
@keyframes dashboard-arrive {
  from { opacity: 0.65; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .dashboard-page > .dashboard-topbar,
  .dashboard-page > .dashboard-filter-bar,
  .dashboard-page > .dashboard-status-panel {
    animation: dashboard-arrive 360ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
  .dashboard-page > .dashboard-filter-bar { animation-delay: 40ms; }
  .dashboard-page > #dashboard_summary_boxes { animation-delay: 80ms; }
  .dashboard-page > .training-status-panel { animation-delay: 120ms; }
  .dashboard-page > #demonstration_method_boxes { animation-delay: 160ms; }
  .dashboard-page .training-participation-box,
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  }
  .dashboard-page .table-action,
  .dashboard-page .list-btn,
  .dashboard-page .metric-card-popup-trigger {
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }
  .dashboard-page .table-action::after,
  .dashboard-page .metric-card-popup-trigger svg {
    transition: transform 180ms ease;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .dashboard-page .training-participation-box:hover,
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 16px #263c5014;
  }
  .dashboard-page .table-action:hover::after { transform: translateX(3px); }
  .dashboard-page .metric-card-popup-trigger:hover svg { transform: translate(1px, -1px); }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-page > *,
  .dashboard-page .training-participation-box,
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group,
  .dashboard-page .table-action,
  .dashboard-page .list-btn,
  .dashboard-page .metric-card-popup-trigger,
  .dashboard-page .table-action::after,
  .dashboard-page .metric-card-popup-trigger svg {
    animation: none;
    transition: none;
  }
  .dashboard-page .training-participation-box:hover,
  .dashboard-page .dashboard-grid.dashboard-training-secondary-summaries .metric-card-group:hover {
    transform: none;
  }
}
/* Bill Process: retain rate/amount inputs for existing calculations and saves. */
.jeevika-bill-table > thead > tr > th:nth-child(8),
.jeevika-bill-table > thead > tr > th:nth-child(9),
.jeevika-bill-table > tbody > tr:not(.jeevika-farmer-row) > td:nth-child(8),
.jeevika-bill-table > tbody > tr:not(.jeevika-farmer-row) > td:nth-child(9) {
  display: none;
}

/* Keep each method's target and achievement together, with explicit labels. */
.demonstration-metric-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}
.demonstration-metric-pair > div {
  padding: 10px;
  border: 1px solid rgba(31, 77, 58, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .75);
}
.demonstration-metric-pair > div > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #455b53;
}
.demonstration-metric-pair > div > strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.2;
}
.demonstration-metric-pair .demonstration-metric-achievement { background: #effaf3; }
.demonstration-method-table { overflow-x: auto; }
.demonstration-method-table .demonstration-metric-pair { min-width: 185px; margin: 0; }
.demonstration-method-table .demonstration-metric-pair strong { font-size: 20px; }
.demonstration-method-table th { white-space: nowrap; }

/* Training entry form: presentation scoped to the existing training form hook. */
#module-form[data-training-target-form] {
  border: 1px solid var(--vrp-line);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: var(--vrp-panel);
  box-shadow: 0 8px 28px rgba(23, 33, 38, 0.06);
}
#module-form[data-training-target-form] > .module-card-header {
  padding: 28px 32px;
  margin: 0;
  border-bottom: 1px solid var(--vrp-line);
  border-top: 4px solid var(--vrp-primary);
  background: var(--vrp-panel-soft);
  flex-wrap: wrap;
  gap: 18px;
}
#module-form[data-training-target-form] .training-form-eyebrow {
  color: var(--vrp-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
#module-form[data-training-target-form] .training-form-intro h2 {
  margin: 8px 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  color: var(--vrp-text);
  letter-spacing: -0.025em;
}
#module-form[data-training-target-form] .training-form-intro p,
#module-form[data-training-target-form] .training-section-heading p {
  margin: 4px 0 0;
  color: var(--vrp-muted);
  font-size: 0.86rem;
  line-height: 1.6;
}
#module-form[data-training-target-form] > .module-entry-form { padding: 8px 32px 28px; gap: 28px; }
#module-form[data-training-target-form] .module-form-grid { gap: 20px 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  #module-form[data-training-target-form] .module-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  #module-form[data-training-target-form] .module-form-grid { grid-template-columns: 1fr; }
}
#module-form[data-training-target-form] .training-section-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid var(--vrp-line);
}
#module-form[data-training-target-form] .training-section-heading:first-child { border-top: 0; margin-top: 0; }
#module-form[data-training-target-form] .training-section-number {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border: 1px solid var(--vrp-line);
  border-radius: 10px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-primary);
  font-size: 0.8rem;
  font-weight: 800;
}
#module-form[data-training-target-form] .training-section-heading h3 {
  margin: 0;
  color: var(--vrp-text);
  font-size: 1rem;
  line-height: 1.5;
}
#module-form[data-training-target-form] .training-field { min-width: 0; align-content: start; gap: 9px; }
#module-form[data-training-target-form] .training-field > span {
  color: var(--vrp-text);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
#module-form[data-training-target-form] .training-field :is(input, select, textarea),
#module-form[data-training-target-form] [data-training-farmer-search] {
  background: var(--vrp-panel);
  border: 1px solid var(--vrp-line);
  border-radius: 9px;
  min-height: 46px;
  min-width: 0;
  max-width: 100%;
  color: var(--vrp-text);
  font-size: 0.9rem;
  font-weight: 400;
}
#module-form[data-training-target-form] .training-field input[readonly] { background: var(--vrp-panel-soft); color: var(--vrp-muted); }
#module-form[data-training-target-form] :is(input, select, textarea, button, a):focus-visible {
  outline: 2px solid var(--vrp-primary);
  outline-offset: 3px;
}
#module-form[data-training-target-form] .training-field--training_description { grid-column: 1 / -1; }
#module-form[data-training-target-form] .training-field textarea { min-height: 110px; }
#module-form[data-training-target-form] .training-field:has(input[type="file"]) {
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--vrp-panel-soft);
}
#module-form[data-training-target-form] .training-field input[type="file"] { padding: 8px; font-size: 0.8rem; }
#module-form[data-training-target-form] input[type="file"]::file-selector-button {
  border: 1px solid var(--vrp-line);
  border-radius: 6px;
  padding: 8px 12px;
  margin-right: 10px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
#module-form[data-training-target-form] .field-hint { color: var(--vrp-muted); font-weight: 400; line-height: 1.5; }
#module-form[data-training-target-form] .training-farmer-panel {
  grid-column: 1 / -1;
  padding: 20px;
  border: 1px solid var(--vrp-line);
  border-radius: 12px;
  background: var(--vrp-panel-soft);
  min-width: 0;
}
#module-form[data-training-target-form] .target-mapping-toolbar { flex-wrap: wrap; gap: 12px; color: var(--vrp-text); }
#module-form[data-training-target-form] [data-training-farmer-count] {
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid var(--vrp-line);
  border-radius: 20px;
  color: var(--vrp-text);
  background: var(--vrp-panel);
  font-size: 0.78rem;
}
#module-form[data-training-target-form] .farmer-search-toolbar { margin: 16px 0; }
#module-form[data-training-target-form] .vrp-ics-farmer-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; color: var(--vrp-muted); }
#module-form[data-training-target-form] .vrp-ics-farmer-item { background: var(--vrp-panel); border-color: var(--vrp-line); border-radius: 9px; padding: 12px; }
#module-form[data-training-target-form] .vrp-ics-farmer-item:has(input:checked) { border-color: var(--vrp-primary); box-shadow: inset 3px 0 var(--vrp-primary); }
#module-form[data-training-target-form] .vrp-ics-farmer-item input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--vrp-primary); }
#module-form[data-training-target-form] .vrp-ics-farmer-item span { text-transform: none; letter-spacing: 0; }
#module-form[data-training-target-form] .vrp-ics-farmer-item small { color: var(--vrp-muted); overflow-wrap: anywhere; }
#module-form[data-training-target-form] .module-form-actions { padding-top: 22px; }
#module-form[data-training-target-form] .module-form-actions .btn { min-width: 120px; min-height: 44px; border-radius: 9px; }
@media (max-width: 680px) {
  #module-form[data-training-target-form] > .module-card-header { padding: 22px 18px; }
  #module-form[data-training-target-form] > .module-entry-form { padding: 0 18px 20px; }
  #module-form[data-training-target-form] .module-form-grid,
  #module-form[data-training-target-form] .vrp-ics-farmer-list { grid-template-columns: minmax(0, 1fr); }
  #module-form[data-training-target-form] .training-farmer-panel { padding: 14px; }
  #module-form[data-training-target-form] [data-training-farmer-count] { margin-left: 0; }
  #module-form[data-training-target-form] .module-form-actions .btn { flex: 1; min-width: 0; }
}

/* Target Mapping: aligned fields and clear planning sections. */
.target-mapping-card .target-form-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--vrp-line);
  background: var(--vrp-panel-soft);
  border-radius: 12px 12px 0 0;
}
.target-mapping-card .target-form-intro h2 { margin: 0; font-size: 1.2rem; color: var(--vrp-text); }
.target-mapping-card .target-form-intro p,
.target-mapping-card .target-section-heading p { margin: 6px 0 0; color: var(--vrp-muted); font-size: .85rem; line-height: 1.5; font-weight: 400; }
.target-mapping-card .target-required-note { color: var(--vrp-muted); font-size: .78rem; }
.target-mapping-card > .module-entry-form { padding: 24px 28px; gap: 24px; }
.target-mapping-card .module-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; align-items: start; }
.target-mapping-card .target-section-heading { grid-column: 1 / -1; }
.target-mapping-card .target-section-heading h3 { margin: 0; color: var(--vrp-text); font-size: .98rem; font-weight: 700; }
.target-mapping-card .target-section-divider { border-top: 1px solid var(--vrp-line); padding-top: 24px; margin-top: 4px; }
.target-mapping-card .module-form-grid > label,
.target-mapping-card .target-village-field { min-width: 0; align-content: start; gap: 8px; color: var(--vrp-text); }
.target-mapping-card .module-form-grid > label > span,
.target-mapping-card .location-multi-label { min-height: 22px; font-size: .8rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--vrp-text); }
.target-mapping-card .module-form-grid :is(input:not([type="checkbox"]):not([type="hidden"]), select:not([multiple])) { height: 44px; min-height: 44px; border-radius: 8px; background: var(--vrp-panel); font-weight: 500; }
.target-mapping-card .module-form-grid input[readonly] { background: var(--vrp-panel-soft); color: var(--vrp-primary); font-weight: 700; }
.target-mapping-card .location-select-all { font-size: .75rem; color: var(--vrp-muted); }
.target-mapping-card .location-select-all input { width: 14px; height: 14px; min-height: 14px; padding: 0; accent-color: var(--vrp-primary); }
.target-mapping-card .chip-multi-control { min-height: 44px; border-radius: 8px; border-color: var(--vrp-line); background: var(--vrp-panel); }
.target-mapping-card .chip-multi-values { min-height: 42px; box-sizing: border-box; }
.target-mapping-card .chip-token { background: var(--vrp-panel-soft); color: var(--vrp-text); border-color: var(--vrp-line); text-align: left; line-height: 1.45; font-size: .78rem; font-weight: 500; max-width: 100%; overflow-wrap: anywhere; }
.target-mapping-card :is(input, select, button, a, .chip-multi-control):focus-visible { outline: 2px solid var(--vrp-primary); outline-offset: 3px; }
.target-mapping-card .target-training-fields,
.target-mapping-card .target-weekly-summary { margin: 0; padding: 20px; border: 1px solid var(--vrp-line); border-radius: 12px; background: var(--vrp-panel-soft); gap: 18px; }
.target-mapping-card [data-opg-validation-message] { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: .82rem; }
.target-mapping-card .target-mapping-toolbar { flex-wrap: wrap; }
.target-mapping-card [data-target-weekly-selected-total] { padding: 7px 12px; border-radius: 20px; background: var(--vrp-panel); font-size: .78rem; font-weight: 700; }
.target-mapping-card .target-weekly-table-shell { overflow-x: auto; border: 1px solid var(--vrp-line); border-radius: 8px; background: var(--vrp-panel); }
.target-mapping-card .target-weekly-table { width: 100%; min-width: 880px; }
.target-mapping-card .target-weekly-table th { padding: 14px 10px; font-size: .72rem; }
.target-mapping-card .target-weekly-table td { padding: 16px 10px; }
.target-mapping-card .target-weekly-table :is(th, td):first-child { text-align: left; }
.target-mapping-card .target-weekly-activity { justify-items: start; text-align: left; gap: 8px; line-height: 1.5; }
.target-mapping-card .target-weekly-activity strong { padding: 0; background: none; color: var(--vrp-text); border-radius: 0; }
.target-mapping-card .target-weekly-subactivity { justify-content: start; }
.target-mapping-card .target-weekly-activity span { padding: 0; background: none; font-size: .8rem; }
.target-mapping-card .target-weekly-cell-center { min-height: 44px; }
.target-mapping-card .target-weekly-input { width: 68px; min-height: 40px; background: var(--vrp-panel); border-radius: 8px; }
.target-mapping-card .module-form-actions { margin: 0; padding-top: 20px; gap: 12px; }
.target-mapping-card .module-form-actions :is(a, button) { min-height: 44px; padding: 11px 22px; border-radius: 8px; }
@media (max-width: 1100px) {
  .target-mapping-card .module-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .target-mapping-card .target-form-intro { padding: 20px 16px; }
  .target-mapping-card > .module-entry-form { padding: 20px 16px; }
  .target-mapping-card .module-form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .target-mapping-card .target-training-fields,
  .target-mapping-card .target-weekly-summary { padding: 14px; }
  .target-mapping-card .module-form-actions { flex-wrap: wrap; }
  .target-mapping-card .module-form-actions :is(a, button) { flex: 1; text-align: center; }
}

/* Jeevika Jankar exam module */
.jj-admin-page {
  gap: 1rem;
}

.jj-admin-page .module-hero {
  align-items: center;
  overflow: hidden;
  border-color: #cfe2d8;
  background:
    repeating-linear-gradient(135deg, rgba(89, 143, 64, 0.055) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, #ffffff 0%, #f6fbf7 48%, #eef7fa 100%);
  box-shadow: 0 18px 44px rgba(24, 64, 78, 0.10);
}

.jj-admin-page .module-hero h1 {
  color: #102f3d;
}

.jj-admin-page .module-hero-actions .list-btn,
.jj-admin-page .module-hero-actions .btn {
  min-height: 40px;
}

.jj-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.jj-summary-tile {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 1rem;
  border: 1px solid rgba(35, 94, 108, 0.12);
  border-top: 3px solid rgba(89, 143, 64, 0.55);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
  box-shadow: 0 12px 28px rgba(24, 64, 78, 0.08);
}

.jj-summary-tile small,
.jj-result-grid strong {
  display: block;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.jj-summary-tile strong {
  display: block;
  margin-top: 0.35rem;
  color: #173b4a;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.jj-summary-state {
  position: relative;
  overflow: hidden;
}

.jj-summary-state span,
.jj-window-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  margin-top: 0.45rem;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.jj-window-pill {
  margin-top: 0;
}

.jj-window-pill.running,
.jj-summary-state.running span {
  background: #e8f8ef;
  color: #11623b;
}

.jj-window-pill.ended,
.jj-summary-state.ended span {
  background: #fff5f3;
  color: var(--vrp-danger);
}

.jj-window-pill.scheduled,
.jj-summary-state.scheduled span {
  background: #fff4e5;
  color: #9a4d00;
}

.jj-window-pill.not-ready,
.jj-summary-state.not-ready span {
  background: #eef3f6;
  color: #526a75;
}

.jj-summary-state.running {
  border-color: #b7e4cb;
  background: linear-gradient(135deg, #ffffff 0%, #f0fbf4 100%);
}

.jj-summary-state.ended {
  border-color: #fac5b8;
  background: linear-gradient(135deg, #ffffff 0%, #fff5f3 100%);
}

.jj-summary-state.scheduled {
  border-color: #ffdca8;
  background: linear-gradient(135deg, #ffffff 0%, #fff8ec 100%);
}

.jj-admin-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 1rem;
  align-items: stretch;
}

.jj-admin-action-panel {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel-soft);
}

.jj-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--vrp-line);
}

.jj-section-heading .vrp-eyebrow {
  margin: 0 0 0.25rem;
}

.jj-section-heading h2 {
  margin: 0;
  color: var(--vrp-text);
  font-size: 1.05rem;
  line-height: 1.2;
}

.jj-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.2rem -0.2rem 1rem;
  padding: 0 0 0.9rem;
  border-bottom: 1px solid var(--vrp-line);
}

.jj-card-head .vrp-eyebrow {
  margin: 0 0 0.25rem;
}

.jj-card-head h2 {
  margin: 0;
  color: #102f3d;
  font-size: 1.15rem;
  line-height: 1.2;
}

.jj-card-head span {
  display: block;
  margin-top: 0.25rem;
  color: var(--vrp-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.jj-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.jj-question-bank-card,
.jj-attempts-card {
  border-color: rgba(35, 94, 108, 0.14);
  box-shadow: 0 16px 36px rgba(24, 64, 78, 0.09);
}

.jj-simple-toolbar {
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--vrp-line);
}

.jj-simple-toolbar strong {
  color: #102f3d;
  font-size: 1.05rem;
}

.jj-simple-toolbar .list-btn {
  margin-left: 0.25rem;
}

.jj-question-table-shell {
  max-height: 520px;
}

.jj-attempts-card .table-shell {
  max-height: none;
}

.jj-question-table {
  min-width: 760px;
}

.jj-attempt-table {
  min-width: 920px;
}

.jj-question-table th,
.jj-question-table td {
  padding: 12px 10px;
}

.jj-attempt-table th,
.jj-attempt-table td {
  padding: 12px;
}

.jj-question-table tbody tr,
.jj-attempt-table tbody tr {
  background: #ffffff;
}

.jj-question-table tbody tr:hover,
.jj-attempt-table tbody tr:hover {
  background: #f8fbfb;
}

.jj-question-table th:nth-child(1),
.jj-question-table td:nth-child(1) {
  width: 48px;
}

.jj-question-table th:nth-child(2),
.jj-question-table td:nth-child(2) {
  width: 32%;
}

.jj-question-table th:nth-child(3),
.jj-question-table td:nth-child(3) {
  width: 32%;
}

.jj-question-table td:nth-child(2) {
  color: #172b36;
  font-weight: 850;
  line-height: 1.45;
}

.jj-question-table td:nth-child(3) small {
  color: #203944;
  line-height: 1.5;
}

.jj-question-cell {
  display: grid;
  max-width: 520px;
  gap: 0.25rem;
}

.jj-question-cell strong {
  color: #172b36;
  font-size: 0.95rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.jj-option-list {
  display: grid;
  gap: 0.2rem;
  min-width: 220px;
}

.jj-option-list span {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #253f4a;
  font-size: 0.82rem;
  line-height: 1.35;
}

.jj-option-list strong,
.jj-answer-key {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f8ef;
  color: #11623b;
  font-size: 0.72rem;
  font-weight: 900;
}

.jj-answer-key {
  min-width: 30px;
  min-height: 30px;
  font-size: 0.8rem;
}

.jj-row-actions {
  align-items: stretch;
}

.jj-row-actions .table-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
}

.jj-action-row,
.jj-action-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.jj-action-row form,
.jj-action-cell form,
.jj-admin-qr-actions form {
  margin: 0;
}

.jj-admin-page .list-btn,
.jj-admin-page .btn-secondary,
.jj-exam-primary {
  border-radius: 8px;
}

.jj-action-row form .list-btn,
.jj-action-cell form .table-action {
  width: 100%;
}

.jj-import-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
}

.jj-import-form label,
.jj-textarea-field,
.jj-checkbox-line {
  display: grid;
  gap: 0.45rem;
}

.jj-import-form label {
  flex: 1 1 280px;
}

.jj-import-form span,
.jj-textarea-field span,
.jj-question-form label span,
.jj-quiz-form label span {
  color: #314a55;
  font-size: 0.82rem;
  font-weight: 800;
}

.jj-import-form input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 0.48rem;
  border: 1px solid #cad8dc;
  border-radius: 8px;
  background: #ffffff;
}

.jj-import-form input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 0.65rem;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.jj-checkbox-line {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-top: 0.85rem;
  color: #314a55;
  font-weight: 700;
}

.jj-checkbox-line input {
  width: 18px;
  height: 18px;
}

.jj-public-body,
.jj-exam-public-body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(232, 247, 242, 0.92), rgba(245, 248, 252, 0.96)),
    #eef5f4;
  color: #172b36;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.jj-exam-language-bar {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 40;
  margin: 0;
}

.jj-exam-language-bar .language-switcher {
  border-color: rgba(31, 83, 96, 0.16);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.jj-exam-flash {
  position: fixed;
  top: 4.8rem;
  left: 50%;
  z-index: 20;
  width: min(92vw, 620px);
  transform: translateX(-50%);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #e8f8ef;
  color: #11623b;
  box-shadow: 0 14px 30px rgba(14, 44, 54, 0.16);
  font-weight: 800;
}

.jj-exam-flash.alert {
  background: #fff4e5;
  color: #9a4d00;
}

.jj-exam-shell,
.jj-exam-take-shell {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 5.2rem 0 3rem;
}

.jj-exam-login-panel,
.jj-qr-panel,
.jj-result-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 1rem;
  align-items: stretch;
}

.jj-exam-login-copy,
.jj-qr-copy,
.jj-result-detail,
.jj-exam-login-card,
.jj-qr-card,
.jj-result-score {
  border: 1px solid rgba(31, 83, 96, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 46px rgba(20, 56, 70, 0.13);
}

.jj-exam-login-copy,
.jj-qr-copy,
.jj-result-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: 2rem;
}

.jj-exam-login-copy h1,
.jj-qr-copy h1,
.jj-result-detail h1 {
  margin: 0.25rem 0 0.7rem;
  color: #143747;
  font-size: 2.2rem;
  line-height: 1.08;
}

.jj-exam-login-copy p,
.jj-qr-copy p,
.jj-result-detail p {
  max-width: 56ch;
  color: #4c6470;
  line-height: 1.65;
}

.jj-exam-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.jj-exam-steps span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #e8f3ff;
  color: #175a91;
  font-size: 0.84rem;
  font-weight: 800;
}

.jj-exam-steps.compact span {
  background: #edf8f1;
  color: #1b6a44;
}

.jj-exam-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.jj-exam-feature-grid div {
  min-height: 96px;
  padding: 0.85rem;
  border: 1px solid rgba(31, 83, 96, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.jj-exam-feature-grid strong {
  display: block;
  color: #143747;
  font-size: 0.98rem;
}

.jj-exam-feature-grid small {
  display: block;
  margin-top: 0.35rem;
  color: #526a75;
  line-height: 1.45;
}

.jj-exam-login-card,
.jj-qr-card {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 1.5rem;
}

.jj-empty-exam,
.jj-live-exam {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.jj-empty-exam {
  border: 1px solid #fac5b8;
  background: #fff3ef;
  color: #9a3412;
}

.jj-live-exam {
  border: 1px solid #b7e4cb;
  background: #edf8f1;
  color: #17633f;
}

.jj-empty-exam span,
.jj-live-exam span {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(20, 56, 70, 0.12);
}

.jj-empty-exam strong,
.jj-live-exam strong {
  color: inherit;
  font-size: 1.05rem;
}

.jj-empty-exam small,
.jj-live-exam small {
  color: inherit;
  opacity: 0.86;
}

.jj-exam-login-card .login-form {
  display: grid;
  gap: 1rem;
}

.jj-exam-login-card .form-control {
  width: 100%;
  min-height: 46px;
}

.jj-qr-card {
  justify-items: center;
  text-align: center;
}

.jj-qr-svg {
  width: min(280px, 78vw);
  height: auto;
  border: 12px solid #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 59, 74, 0.18);
}

.jj-qr-card small {
  max-width: 100%;
  color: #526a75;
  overflow-wrap: anywhere;
}

.jj-qr-fallback {
  padding: 1rem;
  border-radius: 8px;
  background: #fff4e5;
  color: #9a4d00;
  font-weight: 800;
}

.jj-exam-primary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
}

.jj-exam-primary:hover,
.jj-exam-primary:focus {
  background: #0d615b;
  color: #ffffff;
}

.jj-exam-primary.secondary {
  background: #175a91;
  box-shadow: 0 10px 20px rgba(23, 90, 145, 0.18);
}

.jj-exam-sticky-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(31, 83, 96, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(20, 56, 70, 0.12);
}

.jj-exam-sticky-head h1 {
  margin: 0.15rem 0;
  color: #143747;
  font-size: 1.35rem;
  line-height: 1.2;
}

.jj-exam-sticky-head small {
  color: #526a75;
  font-weight: 700;
}

.jj-timer {
  display: grid;
  min-width: 132px;
  justify-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #102f3d;
  color: #ffffff;
}

.jj-timer span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.jj-timer strong {
  font-size: 1.5rem;
}

.jj-exam-take-shell.is-ending .jj-timer {
  background: #a93820;
}

.jj-question-paper {
  display: grid;
  gap: 0.9rem;
}

.jj-question-block {
  padding: 1rem;
  border: 1px solid rgba(31, 83, 96, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(20, 56, 70, 0.09);
}

.jj-question-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #526a75;
  font-size: 0.82rem;
  font-weight: 900;
}

.jj-question-head span {
  display: inline-flex;
  width: 38px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f3ff;
  color: #175a91;
}

.jj-question-block h2 {
  margin: 0.8rem 0 1rem;
  color: #172b36;
  font-size: 1.08rem;
  line-height: 1.45;
}

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

.jj-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
  min-height: 52px;
  padding: 0.75rem;
  border: 1px solid #d8e4e7;
  border-radius: 8px;
  background: #f9fbfb;
  cursor: pointer;
}

.jj-option:has(input:checked) {
  border-color: #0f766e;
  background: #e8f8ef;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.22);
}

.jj-option input {
  width: 18px;
  height: 18px;
}

.jj-option span {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  min-width: 0;
  color: #223d49;
  overflow-wrap: anywhere;
}

.jj-option strong {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #ffffff;
  color: #175a91;
}

.jj-submit-bar {
  position: sticky;
  bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem;
  border: 1px solid rgba(31, 83, 96, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 30px rgba(20, 56, 70, 0.14);
}

.jj-submit-bar span {
  color: #4c6470;
  font-weight: 700;
}

.jj-result-panel {
  grid-template-columns: 320px minmax(0, 1fr);
}

.jj-result-score {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 1.5rem;
  text-align: center;
  background: #102f3d;
  color: #ffffff;
}

.jj-result-score.passed {
  background: #0f766e;
}

.jj-result-score span {
  font-weight: 900;
  text-transform: uppercase;
}

.jj-result-score strong {
  font-size: 3rem;
  line-height: 1;
}

.jj-result-score small {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.2rem;
  font-weight: 900;
}

.jj-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.jj-result-grid span {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #f4f8f8;
  color: #203944;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .jj-summary-grid,
  .jj-admin-actions,
  .jj-exam-login-panel,
  .jj-qr-panel,
  .jj-result-panel {
    grid-template-columns: 1fr;
  }

  .jj-exam-login-copy,
  .jj-qr-copy,
  .jj-result-detail {
    min-height: 0;
  }

  .jj-result-score {
    min-height: 220px;
  }
}

@media (max-width: 640px) {
  .jj-exam-language-bar {
    top: 10px;
    right: 8px;
    left: 8px;
    justify-content: center;
  }

  .jj-exam-language-bar .language-switcher {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .jj-exam-shell,
  .jj-exam-take-shell {
    width: min(100vw - 1rem, 1120px);
    padding: 6.4rem 0 1rem;
  }

  .jj-exam-login-copy,
  .jj-qr-copy,
  .jj-result-detail,
  .jj-exam-login-card,
  .jj-qr-card,
  .jj-question-block {
    padding: 0.85rem;
  }

  .jj-exam-login-copy h1,
  .jj-qr-copy h1,
  .jj-result-detail h1 {
    font-size: 1.55rem;
  }

  .jj-exam-sticky-head,
  .jj-submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .jj-timer {
    width: 100%;
  }

  .jj-options-grid,
  .jj-result-grid,
  .jj-exam-feature-grid {
    grid-template-columns: 1fr;
  }

  .jj-option {
    min-height: 48px;
  }
}

/* JJ exam public login polish */
.jj-exam-public-body {
  background:
    linear-gradient(90deg, rgba(20, 75, 87, 0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(20, 75, 87, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #e9f7ef 0%, #f7fbff 52%, #fff7ec 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

.jj-login-shell {
  width: min(1200px, calc(100vw - 2rem));
  padding: 2.4rem 0;
}

.jj-login-shell .jj-exam-login-panel {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 1.15rem;
  min-height: min(650px, calc(100vh - 4.8rem));
}

.jj-login-shell .jj-exam-login-copy,
.jj-login-shell .jj-exam-login-card {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(22, 52, 60, 0.16);
}

.jj-login-shell .jj-exam-login-copy {
  position: relative;
  overflow: hidden;
  justify-content: space-between;
  padding: 2.2rem;
  background:
    linear-gradient(126deg, rgba(255, 255, 255, 0.09) 0 12%, transparent 12% 23%, rgba(255, 255, 255, 0.07) 23% 34%, transparent 34%),
    linear-gradient(142deg, #123b36 0%, #164b5b 58%, #2b6f4d 100%);
  color: #ffffff;
}

.jj-login-shell .jj-exam-login-copy .vrp-eyebrow {
  margin-top: 1.4rem;
  color: #bdeed1;
  letter-spacing: 0;
}

.jj-login-shell .jj-exam-login-copy h1 {
  max-width: 11ch;
  color: #ffffff;
  font-size: 2.65rem;
  line-height: 1.04;
}

.jj-login-shell .jj-exam-login-copy p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
}

.jj-brand-lockup {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.jj-brand-logo {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.jj-brand-logo img {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.jj-brand-lockup small,
.jj-brand-lockup strong {
  display: block;
}

.jj-brand-lockup small {
  color: #bdeed1;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jj-brand-lockup strong {
  color: #ffffff;
  font-size: 1.02rem;
}

.jj-exam-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
  margin: 1.35rem 0 0.35rem;
}

.jj-exam-proof-grid span {
  display: grid;
  gap: 0.25rem;
  min-height: 86px;
  align-content: center;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
}

.jj-exam-proof-grid strong {
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
}

.jj-exam-proof-grid small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.jj-login-shell .jj-exam-steps span {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.jj-login-shell .jj-exam-feature-grid div {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

.jj-login-shell .jj-exam-feature-grid strong {
  color: #ffffff;
}

.jj-login-shell .jj-exam-feature-grid small {
  color: rgba(255, 255, 255, 0.78);
}

.jj-login-shell .jj-exam-login-card {
  align-content: stretch;
  gap: 1.05rem;
  padding: 1.55rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.jj-login-card-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.jj-login-card-head .vrp-eyebrow {
  margin: 0 0 0.35rem;
  color: #20744c;
  letter-spacing: 0;
}

.jj-login-card-head h2 {
  margin: 0;
  color: #143747;
  font-size: 1.45rem;
  line-height: 1.18;
}

.jj-login-status-pill {
  display: inline-flex;
  min-width: 76px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #ecfdf3;
  color: #12623b;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jj-login-shell .jj-live-exam,
.jj-login-shell .jj-empty-exam {
  grid-template-columns: auto 1fr;
  justify-items: start;
  gap: 0.35rem 0.85rem;
  padding: 0.95rem;
  text-align: left;
}

.jj-login-shell .jj-live-exam span,
.jj-login-shell .jj-empty-exam span {
  grid-row: span 2;
  width: 46px;
  height: 46px;
}

.jj-login-shell .jj-exam-login-card .login-form {
  gap: 0.9rem;
}

.jj-field-group {
  display: grid;
  gap: 0.42rem;
}

.jj-login-shell .jj-exam-login-card .form-label {
  color: #244654;
  font-size: 0.84rem;
  font-weight: 900;
}

.jj-login-shell .jj-exam-login-card .form-control,
.jj-login-shell .jj-exam-login-card select.form-control,
.jj-login-shell .jj-exam-login-card input.form-control {
  width: 100%;
  min-height: 50px;
  padding: 0.78rem 0.92rem;
  border: 1px solid #bdd2d7;
  border-radius: 8px;
  outline: none;
  background: #f9fcfc;
  color: #172b36;
  box-shadow: none;
  font: inherit;
  font-size: 0.96rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.jj-login-shell .jj-exam-login-card select.form-control {
  appearance: auto;
}

.jj-login-shell .jj-exam-login-card .form-control:focus {
  border-color: #0f766e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

.jj-login-shell .login-password-field {
  position: relative;
}

.jj-login-shell .login-password-field .form-control {
  padding-right: 3rem;
}

.jj-login-shell .password-eye-btn {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  transform: translateY(-50%);
  background: transparent;
  color: #526a75;
  cursor: pointer;
}

.jj-login-shell .password-eye-btn:hover,
.jj-login-shell .password-eye-btn:focus {
  background: #e8f3ff;
  color: #175a91;
}

.jj-field-hint {
  color: #6a4d18;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.jj-generate-btn {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.25rem;
  padding: 0.82rem 1rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #0f766e 0%, #1f8f55 100%);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(15, 118, 110, 0.25);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.jj-generate-btn:hover,
.jj-generate-btn:focus {
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.31);
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.jj-generate-btn:disabled {
  background: #b7c9cf;
  color: #eef5f7;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.jj-exam-flash {
  border: 1px solid rgba(255, 255, 255, 0.6);
  text-align: center;
}

@media (max-width: 900px) {
  .jj-login-shell .jj-exam-login-panel {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .jj-login-shell .jj-exam-login-copy h1 {
    max-width: 100%;
    font-size: 2.1rem;
  }
}

@media (max-width: 640px) {
  .jj-login-shell {
    width: min(100vw - 1rem, 1200px);
    padding: 1rem 0;
  }

  .jj-login-shell .jj-exam-login-copy,
  .jj-login-shell .jj-exam-login-card {
    padding: 1rem;
  }

  .jj-brand-lockup,
  .jj-login-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .jj-login-shell .jj-exam-login-copy h1 {
    font-size: 1.75rem;
  }

  .jj-exam-proof-grid,
  .jj-login-shell .jj-exam-feature-grid {
    grid-template-columns: 1fr;
  }

  .jj-login-shell .jj-live-exam,
  .jj-login-shell .jj-empty-exam {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .jj-login-shell .jj-live-exam span,
  .jj-login-shell .jj-empty-exam span {
    grid-row: auto;
  }
}

/* Compact credential-first JJ exam flow */
.jj-login-compact-shell {
  display: grid;
  width: min(100vw - 2rem, 520px);
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem 0;
}

.jj-login-compact-card {
  display: grid;
  width: 100%;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(31, 83, 96, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 24px 60px rgba(22, 52, 60, 0.16);
}

.jj-login-compact-brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e4edf0;
}

.jj-login-compact-brand small {
  display: block;
  color: #20744c;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jj-login-compact-brand h1 {
  margin: 0.1rem 0 0;
  color: #143747;
  font-size: 1.5rem;
  line-height: 1.1;
}

.jj-credential-form {
  display: grid;
  gap: 0.9rem;
}

.jj-login-compact-card .form-label,
.jj-selected-exam small,
.jj-admin-qr-link span {
  color: #244654;
  font-size: 0.82rem;
  font-weight: 900;
}

.jj-login-compact-card .form-control,
.jj-login-compact-card input.form-control,
.jj-login-compact-card select.form-control,
.jj-admin-qr-link input {
  width: 100%;
  min-height: 50px;
  padding: 0.78rem 0.9rem;
  border: 1px solid #bdd2d7;
  border-radius: 8px;
  outline: none;
  background: #f9fcfc;
  color: #172b36;
  box-shadow: none;
  font: inherit;
  font-size: 0.95rem;
}

.jj-login-compact-card .form-control:focus {
  border-color: #0f766e;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.13);
}

.jj-selected-exam {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #b7e4cb;
  border-radius: 8px;
  background: #edf8f1;
}

.jj-selected-exam strong {
  color: #143747;
}

.jj-empty-exam.compact {
  justify-items: start;
  padding: 0.8rem 0.9rem;
  text-align: left;
}

.jj-login-compact-card .login-password-field {
  position: relative;
}

.jj-login-compact-card .login-password-field .form-control {
  padding-right: 3rem;
}

.jj-login-compact-card .password-eye-btn {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  transform: translateY(-50%);
  background: transparent;
  color: #526a75;
  cursor: pointer;
}

.jj-admin-qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: center;
}

.jj-admin-qr-copy h2 {
  margin: 0.2rem 0 0.9rem;
  color: #143747;
}

.jj-admin-qr-copy > p:not(.vrp-eyebrow) {
  max-width: 680px;
  margin: -0.25rem 0 1rem;
  color: #526a75;
  line-height: 1.55;
}

.jj-admin-qr-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.jj-admin-qr-meta span {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #f4f8f8;
  color: #203944;
}

.jj-admin-qr-meta strong {
  color: #667085;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.jj-admin-qr-link {
  display: grid;
  gap: 0.45rem;
}

.jj-admin-qr-link input {
  color: #4c6470;
}

.jj-admin-qr-box {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #d8e4e7;
  border-radius: 8px;
  background: #ffffff;
}

.jj-admin-qr-box svg {
  width: 190px;
  height: auto;
}

.jj-admin-qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.jj-admin-qr-copy-actions {
  width: 100%;
}

.jj-admin-qr-copy-actions .list-btn {
  width: 100%;
  justify-content: center;
}

.jj-admin-link-actions {
  justify-content: flex-start;
  margin-top: 0.75rem;
}

.jj-qr-state {
  display: grid;
  gap: 0.25rem;
  width: 100%;
  padding: 0.7rem;
  border-radius: 8px;
  text-align: left;
}

.jj-qr-state.active {
  background: #e8f8ef;
  color: #11623b;
}

.jj-qr-state.inactive {
  background: #fff4e5;
  color: #9a4d00;
}

.jj-qr-state strong {
  font-size: 0.88rem;
}

.jj-qr-state small {
  line-height: 1.45;
}

.jj-empty-exam.compact form {
  margin: 0.55rem 0 0;
}

.jj-empty-exam.compact .list-btn {
  margin-top: 0.55rem;
}

.jj-result-shell {
  width: min(920px, calc(100vw - 2rem));
}

.jj-result-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
}

.jj-result-title-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.jj-result-title-row h1 {
  margin-bottom: 0;
}

.jj-result-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0;
}

.jj-result-counts span {
  display: grid;
  min-height: 78px;
  place-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: #f4f8f8;
  color: #143747;
}

.jj-result-counts strong {
  font-size: 1.55rem;
  line-height: 1;
}

.jj-result-counts small {
  color: #526a75;
  font-weight: 900;
}

.jj-results-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.jj-results-summary-card {
  display: grid;
  gap: 0.35rem;
  min-height: 92px;
  padding: 1rem;
  border: 1px solid var(--vrp-line);
  border-radius: 8px;
  background: var(--vrp-panel);
  box-shadow: 0 14px 30px rgba(23, 33, 38, 0.06);
}

.jj-results-summary-card span {
  color: var(--vrp-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jj-results-summary-card strong {
  color: var(--vrp-text);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1;
}

.jj-results-card {
  display: grid;
  gap: 1rem;
}

.jj-results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--vrp-line);
}

.jj-results-heading h2 {
  margin: 0;
  color: var(--vrp-text);
  font-size: 1.05rem;
}

.jj-results-heading p {
  margin: 0.25rem 0 0;
  color: var(--vrp-muted);
  font-size: 0.9rem;
}

.jj-results-table-shell {
  max-height: none;
}

.jj-results-table {
  min-width: 0;
  table-layout: auto;
}

.jj-results-table th,
.jj-results-table td {
  white-space: normal;
  vertical-align: top;
}

.jj-results-table th:nth-child(1),
.jj-results-table td:nth-child(1) {
  width: 22%;
}

.jj-results-table th:nth-child(3),
.jj-results-table td:nth-child(3) {
  width: 15%;
}

.jj-results-table th:nth-child(6),
.jj-results-table td:nth-child(6) {
  width: 24%;
}

.jj-candidate-cell,
.jj-status-stack,
.jj-score-stack,
.jj-time-stack {
  display: grid;
  gap: 0.25rem;
}

.jj-candidate-cell strong,
.jj-score-stack strong {
  color: var(--vrp-text);
  font-size: 0.95rem;
}

.jj-candidate-cell span,
.jj-score-stack span,
.jj-time-stack span {
  color: var(--vrp-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.jj-status-stack {
  align-items: start;
}

.jj-result-chip {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.jj-result-chip.pass {
  background: #e8f8ef;
  color: #11623b;
}

.jj-result-chip.review {
  background: #fff4e5;
  color: #9a4d00;
}

.jj-result-chip.pending {
  background: #eef3f6;
  color: #526a75;
}

.jj-answer-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0;
}

.jj-answer-stack div {
  display: grid;
  gap: 0.15rem;
  padding: 0.45rem;
  border-radius: 8px;
  background: var(--vrp-panel-soft);
}

.jj-answer-stack dt,
.jj-answer-stack dd {
  margin: 0;
}

.jj-answer-stack dt {
  color: var(--vrp-muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jj-answer-stack dd {
  color: var(--vrp-text);
  font-weight: 900;
}

.jj-answer-review {
  margin-top: 0.55rem;
}

.jj-answer-review summary {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 8px;
  padding: 5px 10px;
  background: #e8f3ff;
  color: #175a91;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.jj-answer-review[open] summary {
  margin-bottom: 0.55rem;
}

.jj-answer-review-list {
  display: grid;
  gap: 0.55rem;
  min-width: min(420px, 72vw);
}

.jj-answer-review-item {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--vrp-line);
  border-left: 4px solid #b7c9cf;
  border-radius: 8px;
  background: #ffffff;
}

.jj-answer-review-item.correct {
  border-left-color: #1b8a4a;
  background: #f5fff8;
}

.jj-answer-review-item.wrong {
  border-left-color: #d9364e;
  background: #fffafa;
}

.jj-answer-review-question {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
}

.jj-answer-review-question span {
  display: inline-flex;
  min-width: 34px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-text);
  font-size: 0.78rem;
  font-weight: 900;
}

.jj-answer-review-question p {
  margin: 0;
  color: var(--vrp-text);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
}

.jj-answer-review-item dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.jj-answer-review-item dl div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  padding: 0.45rem;
  border-radius: 8px;
  background: var(--vrp-panel-soft);
}

.jj-answer-review-item dt,
.jj-answer-review-item dd {
  margin: 0;
}

.jj-answer-review-item dt {
  color: var(--vrp-muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.jj-answer-review-item dd {
  color: var(--vrp-text);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.jj-answer-empty {
  display: inline-flex;
  margin-top: 0.55rem;
  border-radius: 8px;
  padding: 5px 10px;
  background: #eef3f6;
  color: #526a75;
  font-size: 0.78rem;
  font-weight: 900;
}

.jj-time-stack strong {
  display: inline-block;
  min-width: 74px;
  color: var(--vrp-text);
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .jj-admin-qr-panel,
  .jj-result-card {
    grid-template-columns: 1fr;
  }

  .jj-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .jj-card-actions {
    justify-content: flex-start;
  }

  .jj-card-actions .list-btn {
    flex: 1 1 180px;
    text-align: center;
  }

  .jj-admin-qr-meta,
  .jj-result-counts,
  .jj-results-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jj-admin-link-actions .list-btn,
  .jj-action-row .list-btn,
  .jj-action-row form {
    flex: 1 1 180px;
  }

  .jj-results-table {
    min-width: 860px;
  }

  .jj-answer-review-list {
    min-width: 360px;
  }
}

@media (max-width: 520px) {
  .jj-login-compact-shell,
  .jj-result-shell {
    width: min(100vw - 1rem, 920px);
    padding: 1rem 0;
  }

  .jj-login-compact-card,
  .jj-result-detail,
  .jj-result-score {
    padding: 1rem;
  }

  .jj-result-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .jj-admin-qr-meta,
  .jj-result-counts,
  .jj-results-summary-grid,
  .jj-result-grid {
    grid-template-columns: 1fr;
  }

  .jj-answer-review-item dl {
    grid-template-columns: 1fr;
  }

}

.module-existing-uploads .upload-missing {
  color: #b42318;
  font-weight: 600;
}

/* ── Jeevika Jankar observation sheet & list ───────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Collapsible sheet on the bill form */
.bill-observation-shell {
  margin: 20px 0;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 40, 64, 0.04);
  overflow: hidden;
}

.bill-observation-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f3f66;
  background: linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
  list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}

.bill-observation-summary:hover { background: #e7f1fa; }
.bill-observation-summary::-webkit-details-marker { display: none; }

.bill-observation-summary::before {
  content: "\25B8";
  font-size: 0.85rem;
  color: #2f7fbf;
  transition: transform 0.18s ease;
}

.bill-observation-shell[open] .bill-observation-summary::before { transform: rotate(90deg); }
.bill-observation-shell[open] .bill-observation-summary {
  border-bottom: 1px solid #e3ecf4;
}

.bill-observation-summary small {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.74rem;
  color: #6b8296;
  background: #fff;
  border: 1px solid #d9e4ee;
  border-radius: 999px;
  padding: 3px 10px;
}

.bill-observation-shell[open] .bill-observation-summary small { display: none; }
.bill-observation-shell > .module-table { margin: 0; }

/* Shared table chrome */
.jeevika-observation-table th,
.jeevika-observation-table td { vertical-align: middle; }

.jeevika-observation-table tbody tr { transition: background 0.12s ease; }
.jeevika-observation-table tbody tr:nth-child(even) { background: #fbfdff; }
.jeevika-observation-table tbody tr:hover { background: #eef6fd; }

.jeevika-observation-table :is(th, td).observation-serial {
  width: 52px;
  text-align: center;
}

.jeevika-observation-table td.observation-serial {
  font-weight: 700;
  color: #2f7fbf;
}

.bill-observation-shell .jeevika-observation-table td:nth-child(2) {
  white-space: normal;
  line-height: 1.55;
  padding-top: 12px;
  padding-bottom: 12px;
  max-width: 720px;
}

/* Option columns: tight, centred, colour cued */
.jeevika-observation-table :is(th, td).observation-option {
  width: 132px;
  text-align: center;
}

.bill-observation-shell .jeevika-observation-table th.observation-option {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.bill-observation-shell .jeevika-observation-table th.observation-option::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}

.bill-observation-shell .jeevika-observation-table th.observation-option:nth-child(3)::before { background: #1b7f3b; }
.bill-observation-shell .jeevika-observation-table th.observation-option:nth-child(4)::before { background: #e8a317; }
.bill-observation-shell .jeevika-observation-table th.observation-option:nth-child(5)::before { background: #b42318; }

.observation-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.12s ease;
}

.observation-choice:hover { background: #e3eef8; }

.observation-choice input[type="radio"] {
  width: 19px;
  height: 19px;
  cursor: pointer;
  accent-color: #1f6fb2;
}

/* Highlight the row once a rating is picked */
.bill-observation-shell .jeevika-observation-table tbody tr:has(input[type="radio"]:checked) {
  background: #f3faf5;
}

/* ── Observation list ──────────────────────────────────────────────────── */

.observation-header-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.observation-month-filter label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b8296;
}

.observation-month-filter select {
  min-width: 170px;
  padding: 9px 12px;
  border: 1px solid #cfdae5;
  border-radius: 9px;
  background: #fff;
  font-weight: 600;
  color: #16354f;
}

.observation-month-filter select:focus {
  outline: none;
  border-color: #2f7fbf;
  box-shadow: 0 0 0 3px rgba(47, 127, 191, 0.15);
}

.jeevika-observation-table th.observation-rating-head {
  text-align: center;
  white-space: normal;
  min-width: 132px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.observation-head-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  margin-right: 6px;
  border-radius: 50%;
  background: #0f3f66;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
}

.jeevika-observation-table tbody td { text-align: center; }
.jeevika-observation-table tbody td:first-child,
.jeevika-observation-table tbody td:nth-child(2) { text-align: left; }
.jeevika-observation-table tbody td:first-child { font-weight: 700; color: #16354f; }

.observation-badge {
  display: inline-block;
  min-width: 96px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid transparent;
}

.observation-badge-good { background: #e3f7e8; color: #15682f; border-color: #bfe7cb; }
.observation-badge-needs-improvement { background: #fdf3e0; color: #8a5a0b; border-color: #f2ddb4; }
.observation-badge-no-progress { background: #fdeaea; color: #9f1f16; border-color: #f4c9c6; }
.observation-badge-blank { background: #eef2f6; color: #7a8894; border-color: #dde5ec; font-weight: 600; }

.observation-grade {
  display: inline-block;
  min-width: 110px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.observation-grade-green { background: #15682f; color: #fff; }
.observation-grade-yellow { background: #d9950f; color: #241900; }
.observation-grade-red { background: #a8231a; color: #fff; }

.observation-legend {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid #e3ecf4;
  border-radius: 10px;
  background: #f9fcff;
  font-size: 0.82rem;
  line-height: 1.6;
}

.observation-legend > strong {
  display: block;
  margin-bottom: 6px;
  color: #0f3f66;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.observation-legend ol { margin: 0; padding-left: 20px; }
.observation-legend li { margin-bottom: 5px; color: #44586a; }
.observation-legend li strong { color: #16354f; }

@media (max-width: 900px) {
  .observation-header-actions { width: 100%; }
  .observation-month-filter select { min-width: 100%; }
  .bill-observation-shell .jeevika-observation-table td:nth-child(2) { max-width: none; }
}

/* Training evidence: keep preview and View control on separate lines. */
.module-existing-uploads { display: flex; flex-wrap: wrap; gap: 12px; }
.training-upload-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.training-upload-thumbnail { display: block; text-decoration: none; border: 0; }
.training-upload-thumbnail img { display: block; width: 160px; height: 110px; object-fit: contain; border-radius: 6px; }
.module-existing-uploads .grid-view-link { gap: 6px; text-decoration: none; line-height: 1.3; }
.module-existing-uploads .grid-view-link svg { flex: 0 0 18px; }

.sidebar-pending-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: #dc2626;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.training-approval-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}
.training-approval-badge--pending { background: #fef3c7; color: #854d0e; border: 1px solid #facc15; }
.training-approval-badge--approved { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.training-approval-badge--rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.training-approval-badge--none { background: #f1f5f9; color: #475569; }

/* ── Training Form Edit Request (Training Form jaisa layout) ───────────── */

.edit-request-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.edit-request-hero h1 { margin: 2px 0 6px; }
.edit-request-hero p:last-child { color: #4a5a6a; font-size: 0.9rem; }

.edit-request-meta { display: flex; flex-wrap: wrap; gap: 32px; }
.edit-request-meta-item { display: flex; flex-direction: column; gap: 5px; }

.edit-request-meta-item > span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b8296;
}

.edit-request-meta-item > strong { font-size: 0.95rem; color: #16354f; }

.edit-request-status {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  width: fit-content;
}

.edit-request-status-pending { background: #fdf3e0; color: #8a5a0b; }
.edit-request-status-approved { background: #e3f7e8; color: #15682f; }
.edit-request-status-rejected { background: #fdeaea; color: #9f1f16; }


/* Fields laid out exactly like the Training Form grid */
.edit-request-grid { align-items: start; }
.edit-request-grid .edit-request-field.is-wide { grid-column: 1 / -1; }

.edit-request-field {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #2b373d;
  font-size: 0.86rem;
  font-weight: 800;
}

.edit-request-field.is-changed { background: #f3faf5; border-color: #bfe7cb; }

.edit-request-field > span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-request-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: #15682f;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edit-request-value {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  color: #16354f;
  line-height: 1.5;
  word-break: break-word;
}

.edit-request-field.is-changed .edit-request-value { border-color: #bfe7cb; }

.edit-request-was {
  font-size: 0.74rem;
  font-weight: 600;
  color: #4a7a5c;
}

.edit-request-empty { color: #9aa8b4; font-weight: 500; }
.edit-request-list { margin: 0; padding-left: 18px; font-weight: 500; }

.edit-request-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.edit-request-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2f6;
  color: #44586a;
  font-size: 0.76rem;
  font-weight: 600;
}

/* Farmer list, same identity as the Training Form picker */
/* Farmer panel: summary line, list opens on click */
.edit-request-farmer-panel > summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.edit-request-farmer-panel > summary::-webkit-details-marker { display: none; }

.edit-request-toggle {
  margin-left: auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: #eef6f1;
  color: #15682f;
  font-size: 0.73rem;
  font-weight: 800;
}

.edit-request-farmer-panel[open] > summary { margin-bottom: 10px; }
.edit-request-farmer-panel[open] .edit-request-toggle::after { content: " ✕"; }

.edit-request-count { padding: 3px 12px; border-radius: 999px; background: #eef2f6; color: #44586a; }
.edit-request-added { color: #15682f; }
.edit-request-removed { color: #9f1f16; }

.edit-request-farmers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.edit-request-farmer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 11px;
  border: 1px solid #dde5ec;
  border-radius: 8px;
  background: #fff;
}

.edit-request-farmer strong { font-size: 0.82rem; font-weight: 700; color: #16354f; }
.edit-request-farmer small { font-size: 0.71rem; color: #7a8894; }
.edit-request-farmer.is-added { border-color: #bfe7cb; background: #f4fbf6; }
.edit-request-farmer.is-removed { border-color: #f4c9c6; background: #fdf5f5; }
.edit-request-farmer.is-removed strong { text-decoration: line-through; opacity: 0.7; }

.edit-request-farmer em {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.edit-request-farmer.is-added em { color: #15682f; }
.edit-request-farmer.is-removed em { color: #9f1f16; }

/* Uploads shown like the form's photo cards */
.edit-request-files { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-start; }

.edit-request-thumb {
  position: relative;
  display: block;
  width: 74px;
  height: 74px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f8fb;
}

.edit-request-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edit-request-thumb:hover { border-color: #2f7fbf; }
.edit-request-thumb.is-new,
.edit-request-file.is-new { border-color: #15682f; box-shadow: 0 0 0 2px rgba(21, 104, 47, 0.15); }

.edit-request-new {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 1px 0;
  text-align: center;
  background: #15682f;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
}

.edit-request-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  background: #fff;
  color: #16354f;
  text-decoration: none;
  font-size: 0.77rem;
  font-weight: 600;
}

.edit-request-file:hover { border-color: #2f7fbf; }

.edit-request-file-icon {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 4px;
  background: #b42318;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
}

.edit-request-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.edit-request-file.is-missing {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  border-color: #f4c9c6;
  background: #fdeaea;
  color: #9f1f16;
}

/* Decision + history */
.edit-request-decision .module-entry-form { max-width: 620px; }
.edit-request-decision textarea { width: 100%; }

.edit-request-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.edit-request-history li { display: flex; gap: 12px; align-items: flex-start; }

.edit-request-history-action {
  flex-shrink: 0;
  min-width: 96px;
  padding: 4px 10px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: #eef2f6;
  color: #44586a;
}

.edit-request-history-approve { background: #e3f7e8; color: #15682f; }
.edit-request-history-reject { background: #fdeaea; color: #9f1f16; }
.edit-request-history-resubmitted { background: #fdf3e0; color: #8a5a0b; }
.edit-request-history small { display: block; color: #7a8894; font-size: 0.75rem; }
.edit-request-history p { margin: 4px 0 0; color: #44586a; }

@media (max-width: 1100px) {
  .edit-request-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .edit-request-grid { grid-template-columns: 1fr; }
  .edit-request-meta { gap: 18px; }
}

/* ==========================================================================
   AI Assistant — floating chat widget
   ========================================================================== */
.ai-assistant {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1200;
  font-family: inherit;
}

.ai-assistant-toggle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--vrp-primary);
  color: #fff;
  box-shadow: var(--vrp-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ai-assistant-toggle:hover { transform: translateY(-2px) scale(1.04); }
.ai-assistant-toggle:active { transform: scale(0.97); }
.ai-assistant--open .ai-assistant-toggle { transform: scale(0.9); opacity: 0.85; }

/* The launcher can be dragged off the pagination controls it would otherwise
   cover. touch-action keeps a touch drag from scrolling the page instead. */
.ai-assistant-toggle { touch-action: none; }
.ai-assistant--dragging .ai-assistant-toggle {
  cursor: grabbing;
  transform: none;
  transition: none;
}

.ai-assistant-panel {
  position: absolute;
  right: 0;
  bottom: 86px;
  width: min(440px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 130px));
  background: var(--vrp-panel);
  color: var(--vrp-text);
  border: 1px solid var(--vrp-line);
  border-radius: 16px;
  box-shadow: var(--vrp-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ai-pop 0.16s ease;
}
/* The `hidden` HTML attribute must win over `display: flex` above,
   otherwise the panel shows on load without clicking the icon. */
.ai-assistant-panel[hidden] { display: none; }
/* Once dragged away from its home corner the panel re-anchors, so it opens
   into the screen instead of off the edge. */
.ai-assistant--left .ai-assistant-panel { right: auto; left: 0; }
.ai-assistant--top .ai-assistant-panel { bottom: auto; top: 86px; }
@keyframes ai-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--vrp-primary);
  color: #fff;
}
.ai-assistant-title { display: flex; align-items: center; gap: 10px; }
.ai-assistant-title-icon { font-size: 20px; }
.ai-assistant-title strong { display: block; font-size: 15px; line-height: 1.2; }
.ai-assistant-title small { display: block; font-size: 11px; opacity: 0.85; }
.ai-assistant-close {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.ai-assistant-close:hover { background: rgba(255, 255, 255, 0.30); }

.ai-assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--vrp-panel-soft);
}

.ai-assistant-msg {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.ai-assistant-msg--user {
  align-self: flex-end;
  background: var(--vrp-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-assistant-msg--bot {
  align-self: flex-start;
  background: var(--vrp-panel);
  color: var(--vrp-text);
  border: 1px solid var(--vrp-line);
  border-bottom-left-radius: 4px;
}
.ai-assistant-msg--error {
  align-self: flex-start;
  background: rgba(180, 35, 24, 0.10);
  color: var(--vrp-danger);
  border: 1px solid var(--vrp-danger);
  border-bottom-left-radius: 4px;
}

.ai-assistant-typing { display: flex; gap: 4px; align-items: center; }
.ai-assistant-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vrp-muted);
  animation: ai-blink 1s infinite ease-in-out;
}
.ai-assistant-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-assistant-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.ai-assistant-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--vrp-line);
  background: var(--vrp-panel);
}
.ai-assistant-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--vrp-line);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.4;
  max-height: 130px;
  background: var(--vrp-panel-soft);
  color: var(--vrp-text);
}
.ai-assistant-input:focus { outline: none; border-color: var(--vrp-primary); }
.ai-assistant-send {
  border: none;
  background: var(--vrp-primary);
  color: #fff;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.ai-assistant-send:disabled { opacity: 0.5; cursor: default; }
.ai-assistant-input:disabled { opacity: 0.6; }

@media (max-width: 480px) {
  .ai-assistant { right: 14px; bottom: 14px; }
  .ai-assistant-panel { bottom: 66px; height: min(70vh, calc(100vh - 100px)); }
}

/* Project assistant: compact workspace with discoverable report downloads. */
.ai-assistant-toggle { width: auto; height: 54px; gap: 9px; padding: 0 19px; border-radius: 18px; font-size: 27px; background: linear-gradient(135deg, #254e38, #568b40); box-shadow: 0 8px 28px #163d3433; }
.ai-assistant-toggle-label { font-size: 14px; font-weight: 700; }
.ai-assistant-panel { bottom: 68px; width: min(460px, calc(100vw - 28px)); height: min(700px, calc(100dvh - 112px)); border-radius: 22px; box-shadow: 0 20px 70px #122b3433; }
.ai-assistant-header { padding: 20px; background: linear-gradient(120deg, #234b36, #447744); }
.ai-assistant-title-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #ffffff40; border-radius: 13px; background: #ffffff15; font-size: 27px; }
.ai-assistant-title strong { font-size: 17px; }
.ai-assistant-title small { margin-top: 5px; font-size: 11px; }
.ai-assistant-header-actions { display: flex; gap: 6px; }
.ai-assistant-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--vrp-line); font-size: 11px; color: var(--vrp-muted); }
.ai-assistant-status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #75a85c; margin-right: 5px; }
.ai-assistant-toolbar button { border: 1px solid var(--vrp-line); border-radius: 8px; padding: 6px 9px; color: var(--vrp-text); background: var(--vrp-panel-soft); cursor: pointer; font-size: 12px; }
.ai-assistant-messages { min-height: 0; padding: 20px 16px; gap: 14px; }
.ai-assistant-welcome { padding: 12px 7px; }
.ai-assistant-welcome-icon { color: var(--vrp-primary); font-size: 36px; }
.ai-assistant-welcome h2 { font-size: 23px; line-height: 1.25; letter-spacing: -.6px; margin: 12px 0; color: var(--vrp-text); }
.ai-assistant-welcome p { font-size: 13px; line-height: 1.7; color: var(--vrp-muted); margin-bottom: 22px; }
.ai-assistant-suggestions { display: grid; gap: 8px; }
.ai-assistant-suggestions button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; border-radius: 11px; border: 1px solid var(--vrp-line); background: var(--vrp-panel); color: var(--vrp-text); font: inherit; font-size: 12px; cursor: pointer; }
.ai-assistant-suggestions button span:last-child { margin-left: auto; color: var(--vrp-muted); }
.ai-assistant-suggestions button:hover { border-color: var(--vrp-primary); }
.ai-assistant-msg { flex-shrink: 0; max-width: 92%; font-size: 13px; line-height: 1.7; padding: 12px 15px; }
.ai-assistant-msg--user { background: #315e40; }
.ai-assistant-form { margin: 0; padding: 12px 14px 5px; border-top: 1px solid var(--vrp-line); gap: 10px; }
.ai-assistant-input { min-width: 0; border: none; padding: 8px; font-size: 13px; background: transparent; }
.ai-assistant-send { margin-bottom: 6px; border-radius: 12px; font-size: 24px; background: #315e40; }
.ai-assistant-footer { padding: 3px 22px 12px; font-size: 10px; color: var(--vrp-muted); background: var(--vrp-panel); }
.ai-assistant-links { display: grid; gap: 7px; margin-top: 12px; white-space: normal; }
.ai-assistant-links a, .ai-assistant-report-list a { display: block; text-decoration: none; padding: 10px 12px; border: 1px solid var(--vrp-line); border-radius: 9px; background: var(--vrp-panel-soft); color: var(--vrp-text); font-size: 12px; }
.ai-assistant-links a:hover, .ai-assistant-report-list a:hover { border-color: var(--vrp-primary); }
.ai-assistant-reports { padding: 14px 16px; border-bottom: 1px solid var(--vrp-line); overflow-y: auto; max-height: 48%; flex-shrink: 0; background: var(--vrp-panel); }
.ai-assistant-reports[hidden], .ai-assistant-welcome[hidden] { display: none; }
.ai-assistant-reports label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 600; }
.ai-assistant-reports input { width: 100%; box-sizing: border-box; border: 1px solid var(--vrp-line); border-radius: 9px; padding: 10px; color: var(--vrp-text); background: var(--vrp-panel-soft); }
.ai-assistant-reports p { font-size: 10px; color: var(--vrp-muted); margin: 8px 0; }
.ai-assistant-report-list { display: grid; gap: 6px; }
.ai-assistant-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ai-assistant button:focus-visible, .ai-assistant a:focus-visible, .ai-assistant input:focus-visible, .ai-assistant textarea:focus-visible { outline: 2px solid var(--vrp-primary); outline-offset: 3px; }
@media (max-width: 480px) { .ai-assistant { right: 12px; bottom: 12px; } .ai-assistant-panel { bottom: 66px; height: min(700px, calc(100dvh - 96px)); } .ai-assistant-header { padding: 15px; } }
@media (prefers-reduced-motion: reduce) { .ai-assistant *, .ai-assistant-panel { animation: none !important; transition: none !important; } }

/* Training form — "Photos & documentation" eye-icon guidance popup
   (ported from javik-jankar-asa; hover or focus the eye to reveal). */
.training-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-info-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.photo-info-eye-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2e7d32;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
}

.photo-info-eye-icon:hover,
.photo-info-eye-icon:focus {
  background: #1b5e20;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(27, 94, 32, 0.4);
  outline: none;
}

.photo-info-tooltip-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 2500;
  width: min(520px, 85vw);
  background: #ffffff;
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.photo-info-tooltip-wrap:hover .photo-info-tooltip-content,
.photo-info-tooltip-wrap:focus-within .photo-info-tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.photo-info-tooltip-header {
  font-weight: 800;
  font-size: 0.92rem;
  color: #1b5e20;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8f5e9;
}

.photo-info-tooltip-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.82rem;
  color: #2e3b42;
  line-height: 1.45;
}

.photo-info-tooltip-list li {
  position: relative;
  padding-left: 14px;
}

.photo-info-tooltip-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #2e7d32;
  font-weight: bold;
}

.photo-info-tooltip-list strong {
  color: #1b5e20;
}

.photo-info-tooltip-footer {
  margin-top: 12px;
  border-top: 1px solid #e8f5e9;
  font-size: 0.78rem;
  color: #37474f;
  line-height: 1.45;
  background: #f1f8e9;
  border-radius: 6px;
  padding: 8px 10px;
}

/* Jeevika Jankar Observation block inside the bill detail (eye-icon) view.
   Row-wise: each parameter on its own row with a rating badge on the right. */
.bill-observation-section {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--vrp-panel);
  border: 1px solid var(--vrp-line);
  border-radius: 14px;
  box-shadow: var(--vrp-shadow);
}
.bill-observation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vrp-line);
}
.bill-observation-header h2 {
  margin: 0;
  font-size: 17px;
  color: var(--vrp-text);
}
.bill-observation-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bill-observation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  background: var(--vrp-panel-soft);
  border: 1px solid var(--vrp-line);
  border-radius: 10px;
}
.bill-observation-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.bill-observation-index {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--vrp-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.bill-observation-text { min-width: 0; }
.bill-observation-text strong {
  display: block;
  font-size: 14px;
  color: var(--vrp-text);
}
.bill-observation-text small {
  display: block;
  font-size: 12px;
  color: var(--vrp-muted);
  line-height: 1.4;
  margin-top: 2px;
}
.bill-observation-row .observation-badge { flex: none; }

@media (max-width: 640px) {
  .bill-observation-row { flex-direction: column; align-items: flex-start; }
  .bill-observation-row .observation-badge { align-self: flex-start; }
}

/* Collapsible "Farmer Details" block in the bill detail (click heading to open). */
.bill-farmers-collapse {
  margin-top: 16px;
  border: 1px solid var(--vrp-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--vrp-panel);
}
.bill-farmers-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  cursor: pointer;
  list-style: none;
  background: var(--vrp-panel-soft);
  font-weight: 700;
  color: var(--vrp-text);
  user-select: none;
}
.bill-farmers-summary::-webkit-details-marker { display: none; }
.bill-farmers-summary::before {
  content: "▸";
  color: var(--vrp-primary);
  font-size: 14px;
  transition: transform 0.15s ease;
}
.bill-farmers-collapse[open] .bill-farmers-summary::before { transform: rotate(90deg); }
.bill-farmers-summary-title { flex: 1; }
.bill-farmers-summary-hint {
  font-weight: 500;
  font-size: 12px;
  color: var(--vrp-muted);
}
.bill-farmers-collapse .table-shell { margin: 0; border: none; border-radius: 0; }

/* Bill-detail observation table: centered, spacious rating cells. */
.bill-observation-section .jeevika-observation-table th,
.bill-observation-section .jeevika-observation-table td {
  text-align: center;
  vertical-align: middle;
  padding: 12px 10px;
}
.bill-observation-section .observation-rating-head {
  font-size: 12px;
  color: var(--vrp-muted);
}
.bill-observation-section .observation-head-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--vrp-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.bill-observation-section .observation-badge {
  display: inline-block;
  min-width: 96px;
}

.bill-approval-remarks {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #d5e2ce;
  border-left: 4px solid #5b913f;
  border-radius: 8px;
  background: #f2f8ee;
  color: #263d22;
  text-align: left;
  overflow-wrap: anywhere;
}

.bill-approval-remarks > strong {
  display: block;
  font-size: 12px;
  color: #456e33;
}

.approval-progress-card .bill-approval-remarks p {
  margin: 6px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
}
