:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #eef3e8;
  --text: #20251f;
  --muted: #687064;
  --line: #d9dfd1;
  --red: #c92f28;
  --green: #29745a;
  --blue: #315f9d;
  --amber: #b06c1b;
  --ink: #26322a;
  --shadow: 0 18px 45px rgba(35, 44, 35, 0.1);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: visible;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 24px 20px;
  color: #fff;
  background: #26322a;
  box-shadow: 0 10px 30px rgba(21, 31, 24, 0.18);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.brand h1,
.brand p,
.title-row h2,
.title-row p,
.panel h3,
.panel p,
.product-card h4,
.product-card p {
  margin: 0;
}

.brand h1 {
  font-size: 1.05rem;
}

.brand p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
}

.selector-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  overflow: hidden;
  transition: max-height 240ms ease, opacity 180ms ease, transform 220ms ease, margin 220ms ease;
}

.report-selector {
  margin-top: 16px;
  overflow: visible;
  transition: none;
}

.selector-bar.expanded {
  max-height: 150px;
  opacity: 1;
  transform: translateY(0);
}

.selector-bar.collapsed {
  max-height: 0;
  margin-top: -8px;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.selector-bar label,
.data-actions {
  min-width: 0;
}

.selector-bar span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.report-selector span {
  color: var(--muted);
}

select,
input[type="search"],
input[type="date"],
input[type="file"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

input[type="date"] {
  font: inherit;
  font-weight: 700;
}

input[type="file"] {
  max-width: 320px;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.primary-button,
.view-button,
.ghost-button,
.filter-toggle {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--red);
}

.refresh-preview-button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #c92f27;
  box-shadow: 0 3px 0 #8f201b, 0 6px 14px rgba(143, 32, 27, 0.2);
  font-weight: 800;
  cursor: pointer;
}

.refresh-preview-button:hover {
  background: #ad251f;
}

.refresh-preview-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #8f201b, 0 3px 8px rgba(143, 32, 27, 0.18);
}

.view-button,
.ghost-button,
.filter-toggle {
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

.icon-button {
  width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.filter-toggle {
  position: absolute;
  right: 24px;
  bottom: -18px;
  display: inline-grid;
  grid-template-columns: auto auto;
  place-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px 0 16px;
  border: 0;
  border-radius: 0 0 8px 8px;
  color: #fff;
  background: var(--red);
  box-shadow: 0 10px 22px rgba(10, 18, 13, 0.18);
}

.filter-toggle::after {
  content: none;
}

.filter-toggle-text {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.filter-toggle-arrow {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-135deg);
  transition: transform 180ms ease;
}

.filter-toggle[aria-expanded="false"] .filter-toggle-arrow {
  transform: rotate(45deg);
}

.view-button.active {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

main {
  min-width: 0;
  padding: 26px;
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title-row h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(1.7rem, 2.6vw, 2.55rem);
  line-height: 1.05;
}

#pageTitle {
  color: var(--red);
  font-size: clamp(1.2rem, 1.82vw, 1.78rem);
}

.scope-text {
  margin-top: 8px;
  color: var(--muted);
}

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

.upload-subnav {
  display: flex;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f5;
}

.upload-subnav .view-button {
  min-width: 132px;
}

.product-grid {
  display: grid;
  gap: 16px;
}

.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-kpi-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  box-shadow: 0 8px 20px rgba(35, 44, 35, 0.06);
}

.dashboard-kpi-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.dashboard-kpi-icon svg {
  width: 18px;
  height: 18px;
}

.dashboard-kpi-month-icon {
  display: block;
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dashboard-kpi-month-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff !important;
  font-size: 13.2px;
  font-weight: 900;
  line-height: 1;
  text-transform: capitalize;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.dashboard-kpi-body {
  min-width: 0;
}

.dashboard-kpi-card span,
.dashboard-kpi-card small {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
}

.dashboard-kpi-card span {
  text-transform: uppercase;
}

.dashboard-kpi-card .dashboard-kpi-month-badge {
  text-transform: none !important;
}

.dashboard-kpi-card strong {
  display: block;
  margin: 7px 0 3px;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-kpi-lines {
  display: grid;
  gap: 3px;
  margin-top: 7px;
}

.dashboard-kpi-lines b {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.12;
  white-space: nowrap;
}

.dashboard-kpi-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
}

.dashboard-kpi-line .dashboard-kpi-line-label,
.dashboard-kpi-line .dashboard-kpi-line-value {
  display: block;
  color: var(--ink);
  font-size: inherit;
  font-weight: 900;
  line-height: inherit;
  text-transform: none;
}

.dashboard-kpi-line .dashboard-kpi-line-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-kpi-line .dashboard-kpi-line-value {
  min-width: 2.4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-kpi-blue { border-top: 3px solid #1f66db; }
.dashboard-kpi-green { border-top: 3px solid #238765; }
.dashboard-kpi-amber { border-top: 3px solid #c99700; }
.dashboard-kpi-red { border-top: 3px solid #d84236; }
.dashboard-kpi-violet { border-top: 3px solid #7650d6; }
.dashboard-kpi-ink { border-top: 3px solid var(--ink); }
.dashboard-kpi-overall {
  border-color: rgba(201, 47, 40, 0.36);
  border-top: 4px solid var(--red);
  background: linear-gradient(135deg, #fff7f5 0%, #ffffff 58%);
  box-shadow: 0 12px 28px rgba(201, 47, 40, 0.14);
}
.dashboard-kpi-overall span {
  color: var(--red);
}
.dashboard-kpi-overall strong {
  color: var(--red);
  font-size: 1.48rem;
}
.dashboard-kpi-overall small {
  color: #5f6b5f;
}
.dashboard-kpi-blue .dashboard-kpi-icon { background: #1f66db; }
.dashboard-kpi-green .dashboard-kpi-icon { background: #238765; }
.dashboard-kpi-amber .dashboard-kpi-icon { background: #d08a00; }
.dashboard-kpi-red .dashboard-kpi-icon { background: #d84236; }
.dashboard-kpi-violet .dashboard-kpi-icon { background: #7650d6; }
.dashboard-kpi-ink .dashboard-kpi-icon { background: var(--ink); }
.dashboard-kpi-overall .dashboard-kpi-icon { background: var(--red); }

.transaction-kpi-details {
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  padding: 12px;
}

.transaction-kpi-heading {
  margin-bottom: 8px;
  gap: 10px;
}

.transaction-kpi-actions,
.transaction-kpi-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.transaction-kpi-actions {
  justify-content: flex-end;
}

.transaction-kpi-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.transaction-kpi-table {
  min-width: 760px;
  table-layout: fixed;
}

.transaction-kpi-table th,
.transaction-kpi-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  text-align: left;
  white-space: nowrap;
}

.transaction-kpi-table th:nth-child(5),
.transaction-kpi-table td:nth-child(5),
.transaction-kpi-table th:nth-child(6),
.transaction-kpi-table td:nth-child(6) {
  text-align: right;
}

.product-grid {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.metric,
.panel,
.product-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span,
.metric small,
.panel p,
td.secondary,
td small,
.target-line {
  color: var(--muted);
}

.metric span {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 9px 0 4px;
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel h3 {
  color: var(--ink);
  font-size: 1.05rem;
}

#productPanelTitle {
  font-size: 0.84rem;
}

.panel-scope-title {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.08;
}

.panel p {
  margin-top: 4px;
  font-size: 0.9rem;
}

.product-card {
  min-width: 0;
  padding: 14px;
  box-shadow: none;
  border-top-width: 3px;
}

.product-card[role="button"],
.clickable-kpi-card {
  cursor: pointer;
}

.product-card[role="button"]:hover,
.clickable-kpi-card:hover {
  border-color: rgba(35, 135, 101, 0.42);
  box-shadow: 0 12px 26px rgba(31, 45, 36, 0.12);
}

.product-card[role="button"]:focus-visible,
.clickable-kpi-card:focus-visible {
  outline: 3px solid rgba(31, 102, 219, 0.28);
  outline-offset: 3px;
}

.product-card.no-product-data {
  border-style: dashed;
  background: #fafbf8;
}

.product-card.no-product-data .actual-value,
.product-card.no-product-data .product-percent-ring strong {
  color: var(--muted);
}

.product-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.product-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.product-icon svg {
  width: 21px;
  height: 21px;
}

.product-card h4 {
  color: var(--ink);
  font-size: 1rem;
}

.product-card p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
}

.product-percent-ring {
  --ring-percent: 0%;
  --ring-color: var(--ink);
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) var(--ring-percent), #e7ebe4 0);
}

.product-percent-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface);
}

.product-percent-ring strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.product-percent-ring strong small {
  font-size: 0.58em;
  font-weight: 900;
  vertical-align: 0.18em;
}

.product-card-blue { border-top-color: #1f66db; }
.product-card-violet { border-top-color: #6734c4; }
.product-card-green { border-top-color: #16856d; }
.product-card-orange { border-top-color: #f27612; }
.product-card-navy { border-top-color: #123f86; }
.product-card-sky { border-top-color: #0f87a8; }
.product-card-blue .product-icon { background: #1f66db; }
.product-card-violet .product-icon { background: #6734c4; }
.product-card-green .product-icon { background: #16856d; }
.product-card-orange .product-icon { background: #f27612; }
.product-card-navy .product-icon { background: #123f86; }
.product-card-sky .product-icon { background: #0f87a8; }

.derived-no-target-card .product-percent-ring,
.derived-no-target-card .target-label,
.derived-no-target-card .target-value,
.derived-no-target-card .fy-achievement {
  display: none;
}

.derived-no-target-card .target-line {
  grid-template-columns: 1fr auto;
}

.target-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  margin: 14px 0 9px;
  font-size: 0.82rem;
}

.title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.office-summary-text,
.period-heading {
  color: var(--muted);
  font-weight: 800;
}

.office-summary-text {
  font-size: 0.92rem;
}

.period-heading {
  margin-top: 5px;
  font-size: 0.9rem;
}

.dashboard-loaded-text {
  margin-top: 3px;
  color: #7b8678;
  font-size: 0.72rem;
  font-weight: 700;
}

.actual-value,
.target-value {
  color: var(--ink);
  font-weight: 800;
  text-align: right;
}

.target-value {
  color: #7d877b;
  font-weight: 700;
}

.bar-track {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e9df;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--green);
}

.progress-segment {
  flex: 0 0 auto;
  height: 100%;
}

.progress-red {
  background: #f2aaa5;
}

.progress-yellow {
  background: #a9c94a;
}

.progress-green {
  background: var(--green);
}

.progress-muted {
  background: #8a9188;
}

.fy-achievement {
  margin-top: 12px;
}

.fy-achievement-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.fy-track {
  height: 7px;
}

.fy-target-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.fy-target-line strong {
  color: var(--muted);
  text-align: right;
}

.sub-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.sub-products span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f3ee;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.office-panel,
.office-sheet,
.data-panel,
.top-performers-panel {
  margin-top: 16px;
}

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

.performer-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcf7;
}

.performer-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.performer-photo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.placeholder-photo {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.performer-body {
  min-width: 0;
}

.performer-body h4,
.performer-body p,
.performer-body span {
  margin: 0;
}

.performer-body h4 {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performer-body p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.performer-body span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performer-card > strong {
  color: var(--green);
  font-size: 1.35rem;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.month-chart {
  display: grid;
  gap: 10px;
}

.month-chart-row {
  display: grid;
  grid-template-columns: 74px minmax(140px, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.month-chart-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.month-chart-row strong {
  color: var(--ink);
  font-size: 0.86rem;
  text-align: right;
}

.month-chart-track {
  height: 14px;
}

.product-month-chart {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-month-chart:empty {
  display: none;
}

.product-month-chart-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.product-month-chart-head h4,
.product-month-chart-head p {
  margin: 0;
}

.product-month-chart-head h4 {
  color: var(--ink);
  font-size: 0.95rem;
}

.product-month-chart-head p,
.product-month-chart-head span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.product-month-chart-rows {
  display: grid;
  grid-template-columns: repeat(12, 58px);
  justify-content: start;
  gap: 1px;
  align-items: end;
  overflow-x: auto;
  padding-bottom: 4px;
}

.product-month-chart-row {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  padding: 8px 4px;
}

.product-month-value {
  position: absolute;
  left: 50%;
  bottom: 50%;
  display: block;
  width: 142px;
  color: #0b120f;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 0 2px rgba(255, 255, 255, 0.95);
  transform: translate(-50%, 50%) rotate(-90deg);
  z-index: 2;
}

.product-month-chart-row.is-negative .product-month-value {
  color: #0b120f;
}

.product-month-chart-row .month-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.product-month-chart-row b {
  font-size: 0.78rem;
  color: var(--ink);
}

.product-month-chart-row.is-empty {
  opacity: 0.72;
}

.product-month-meta {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 72px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.product-month-meta strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  max-width: 70px;
  font-size: 0.64rem;
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
  transform: rotate(-90deg);
}

.product-month-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 34px;
  height: 150px;
  overflow: visible;
  border-radius: 6px 6px 3px 3px;
  background: #e4e9df;
}

.business-bar {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  border-radius: 6px 6px 0 0;
  background: var(--green);
}

.product-month-bar-value {
  position: absolute;
  left: 50%;
  bottom: 50%;
  display: block;
  width: 142px;
  overflow: visible;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: unset;
  text-shadow:
    0 1px 1px rgba(49, 24, 89, 0.58),
    0 0 2px rgba(49, 24, 89, 0.5);
  white-space: nowrap;
  transform: translate(-50%, 50%) rotate(-90deg);
  transform-origin: center;
  pointer-events: none;
}

.business-bar.zero {
  display: none;
}

.business-bar.negative {
  display: none;
}

.product-month-chart-row.is-empty .business-bar {
  min-height: 0;
}

.product-office-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.product-office-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.product-office-detail-head h4,
.product-office-detail-head p {
  margin: 0;
}

.product-office-detail-head h4 {
  color: var(--ink);
  font-size: 0.95rem;
}

.product-office-detail-head p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.product-office-table {
  table-layout: fixed;
  min-width: 1160px;
}

.product-office-table th,
.product-office-table td {
  overflow: hidden;
  padding: 5px 4px;
  font-size: 0.68rem;
  text-overflow: ellipsis;
}

.product-office-table th {
  line-height: 1.05;
  white-space: normal;
}

.product-office-table .sort-button {
  line-height: 1.05;
}

.product-office-table th:first-child .sort-button,
.product-office-table th:nth-child(2) .sort-button {
  text-align: left;
}

.product-office-table th:nth-child(n+3) .sort-button {
  text-align: right;
}

.product-office-table td {
  white-space: nowrap;
}

.product-office-table tr.product-office-good td {
  background: #edf7ef;
}

.product-office-table tr.product-office-watch td {
  background: #fff7d9;
}

.product-office-table tr.product-office-risk td {
  background: #ffebe8;
}

.product-office-table tr.product-office-muted td {
  background: #f5f6f3;
}

.product-office-table tr.product-office-good td:first-child { box-shadow: inset 3px 0 #2d765b; }
.product-office-table tr.product-office-watch td:first-child { box-shadow: inset 3px 0 #d4a000; }
.product-office-table tr.product-office-risk td:first-child { box-shadow: inset 3px 0 #f1261d; }

.subcategory-total-row td {
  border-top: 2px solid #9aa596;
  background: #edf2e9;
}

.mo-beat-table,
.hierarchy-table {
  table-layout: fixed;
}

.mo-beat-table {
  min-width: 930px;
}

.hierarchy-table {
  min-width: 1060px;
}

.mo-beat-table th,
.mo-beat-table td,
.hierarchy-table th,
.hierarchy-table td {
  padding: 7px 5px;
  font-size: 0.78rem;
  text-align: right;
  white-space: nowrap;
}

.hierarchy-table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.hierarchy-table tbody tr:nth-child(even) td {
  background: #f1f5ed;
}

.hierarchy-table tbody tr.clickable-row:hover td {
  background: #e8f0e3;
}

.mo-beat-table th:first-child,
.mo-beat-table td:first-child {
  width: 165px;
  text-align: left;
}

.mo-beat-table th:nth-child(2),
.mo-beat-table td:nth-child(2) {
  width: 68px;
}

.hierarchy-table th:first-child,
.hierarchy-table td:first-child {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  text-align: left;
  white-space: normal;
}

.hierarchy-table td:first-child strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.18;
}

.hierarchy-table th:first-child .sort-button {
  text-align: left;
}

.hierarchy-table th:nth-child(2),
.hierarchy-table td:nth-child(2) {
  width: 62px;
  min-width: 62px;
  max-width: 62px;
}

.hierarchy-office-level .hierarchy-table th:first-child,
.hierarchy-office-level .hierarchy-table td:first-child {
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  text-align: center;
  white-space: nowrap;
}

.hierarchy-office-level .hierarchy-table th:nth-child(2),
.hierarchy-office-level .hierarchy-table td:nth-child(2) {
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  text-align: left;
  white-space: normal;
}

.hierarchy-office-level .hierarchy-table th:nth-child(2) .sort-button {
  text-align: left;
}

.hierarchy-parent-label {
  display: block;
  margin-top: 3px;
  color: #6a7368;
  font-size: 0.68rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.hierarchy-table th:nth-child(n+3),
.hierarchy-table td:nth-child(n+3) {
  width: 122px;
}

.hierarchy-table th:last-child,
.hierarchy-table td:last-child {
  width: 76px;
}

.mo-beat-table td span,
.mo-beat-table td small {
  display: block;
}

.mo-beat-table td small {
  margin-top: 2px;
  color: #6f786f;
  font-size: 0.68rem;
  font-weight: 800;
}

.hierarchy-drill-row {
  cursor: pointer;
}

.attendance-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.attendance-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
  padding: 10px;
}

.attendance-card span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.attendance-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.15rem;
}

.attendance-table {
  min-width: 2800px;
  table-layout: fixed;
}

.attendance-table th,
.attendance-table td {
  padding: 5px 4px;
  font-size: 0.68rem;
  text-align: center;
  white-space: nowrap;
}

.attendance-table th:nth-child(2),
.attendance-table td:nth-child(2) {
  width: 120px;
  text-align: left;
}

.attendance-table th:nth-child(1),
.attendance-table td:nth-child(1) {
  width: 48px;
}

.attendance-table th:nth-child(n+3):nth-child(-n+6),
.attendance-table td:nth-child(n+3):nth-child(-n+6) {
  width: 62px;
}

.attendance-table th:nth-child(n+7),
.attendance-table td:nth-child(n+7) {
  width: 6ch;
  min-width: 6ch;
  box-sizing: content-box;
}

.attendance-date-even {
  background: #e2f2d3;
}

.attendance-date-odd {
  background: #d6edf7;
}

.attendance-date-start {
  border-left: 8px solid #fff !important;
}

.attendance-missing-row td {
  background: #ffebe8;
}

.jurisdiction-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.jurisdiction-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
  padding: 10px;
}

.jurisdiction-card span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.jurisdiction-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.15rem;
}

.health-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.health-table {
  min-width: 1120px;
  table-layout: fixed;
}

.health-table th,
.health-table td {
  overflow: hidden;
  padding: 8px 8px;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-table th:nth-child(1),
.health-table td:nth-child(1) {
  width: 80px;
}

.health-table th:nth-child(2),
.health-table td:nth-child(2) {
  width: 80px;
}

.health-table th:nth-child(3),
.health-table td:nth-child(3) {
  width: 120px;
}

.health-table th:nth-child(4),
.health-table td:nth-child(4) {
  width: 90px;
  text-align: right;
}

.health-table th:nth-child(5),
.health-table td:nth-child(5),
.health-table th:nth-child(6),
.health-table td:nth-child(6) {
  width: 180px;
}

.health-table th:nth-child(7),
.health-table td:nth-child(7) {
  width: 90px;
}

.job-log-heading {
  margin-top: 18px;
}

.job-log-table {
  min-width: 1320px;
  table-layout: fixed;
}

.job-log-table th,
.job-log-table td {
  overflow: hidden;
  padding: 8px 8px;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-log-table th:nth-child(1),
.job-log-table td:nth-child(1) {
  width: 92px;
}

.job-log-table th:nth-child(2),
.job-log-table td:nth-child(2) {
  width: 110px;
}

.job-log-table th:nth-child(3),
.job-log-table td:nth-child(3) {
  width: 105px;
}

.job-log-table th:nth-child(4),
.job-log-table td:nth-child(4) {
  width: 170px;
}

.job-log-table th:nth-child(5),
.job-log-table td:nth-child(5) {
  width: 260px;
}

.job-log-table th:nth-child(6),
.job-log-table td:nth-child(6),
.job-log-table th:nth-child(7),
.job-log-table td:nth-child(7) {
  width: 150px;
}

.job-log-table th:nth-child(8),
.job-log-table td:nth-child(8) {
  width: 80px;
  text-align: center;
}

.job-log-table th:nth-child(9),
.job-log-table td:nth-child(9) {
  width: 120px;
}

.inline-download-link {
  display: inline-block;
  margin-left: 0.35rem;
  color: #1f66db;
  font-weight: 800;
  text-decoration: underline;
}

.job-log-table .job-message-cell {
  white-space: normal;
  text-overflow: clip;
}

.job-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.job-status-success {
  background: #d9f3e4;
  color: #11633a;
}

.job-status-partial,
.job-status-running {
  background: #fff4c7;
  color: #856000;
}

.job-status-failed {
  background: #ffd9d7;
  color: #b3261e;
}

.job-status-unknown {
  background: #eef0ea;
  color: var(--muted);
}

.jurisdiction-table {
  min-width: 2480px;
  border-collapse: collapse;
  table-layout: fixed;
}

.jurisdiction-table th,
.jurisdiction-table td {
  border: 1px solid #c8d3c3;
  overflow: hidden;
  padding: 6px 5px;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jurisdiction-table th {
  background: #f3f6f0;
  height: auto;
  min-height: 34px;
  vertical-align: middle;
  white-space: normal;
}

.jurisdiction-table th .sort-button,
.jurisdiction-table th .jurisdiction-sort-button {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.08;
  min-height: 34px;
  white-space: normal;
}

.jurisdiction-table th .th-line {
  display: block;
  overflow-wrap: anywhere;
}

.jurisdiction-table td:nth-child(n+2):nth-child(-n+11),
.jurisdiction-table td:nth-child(n+19):nth-child(-n+22) {
  text-align: left;
}

.jurisdiction-table .editable-sheet-cell {
  background: #fffef8;
  box-shadow: inset 0 0 0 1px rgba(198, 118, 26, 0.12);
  cursor: text;
}

.jurisdiction-table .editable-sheet-cell:hover {
  background: #fff8df;
  border-color: #b6c3af;
}

.jurisdiction-table .editable-sheet-cell:focus {
  background: #ffffff;
  border-color: #d62f28;
  box-shadow: inset 0 0 0 1px rgba(214, 47, 40, 0.35), 0 0 0 2px rgba(214, 47, 40, 0.12);
  outline: none;
}

.jurisdiction-table th:first-child,
.jurisdiction-table td:first-child {
  width: 28px;
  padding-left: 2px;
  padding-right: 2px;
  text-align: center;
}

.jurisdiction-table td:first-child input {
  width: 13px;
  height: 13px;
}

.jurisdiction-table th:nth-child(2),
.jurisdiction-table td:nth-child(2) {
  width: 260px;
  text-align: left;
}

.jurisdiction-table th:nth-child(3),
.jurisdiction-table td:nth-child(3) {
  width: 50px;
}

.jurisdiction-table th:nth-child(4),
.jurisdiction-table td:nth-child(4) {
  width: 135px;
}

.jurisdiction-table th:nth-child(n+5),
.jurisdiction-table td:nth-child(n+5) {
  width: 122px;
}

.jurisdiction-table th:nth-child(5),
.jurisdiction-table td:nth-child(5),
.jurisdiction-table th:nth-child(6),
.jurisdiction-table td:nth-child(6),
.jurisdiction-table th:nth-child(7),
.jurisdiction-table td:nth-child(7) {
  width: 150px;
}

.jurisdiction-table th:nth-child(n+12):nth-child(-n+18),
.jurisdiction-table td:nth-child(n+12):nth-child(-n+18) {
  width: 98px;
  text-align: right;
}

.jurisdiction-new-row td {
  background: #f1fff5;
}

.jurisdiction-sheet-tools {
  justify-content: flex-end;
  margin: 8px 0 6px;
}

.jurisdiction-sheet-tools button {
  min-height: 36px;
  padding: 8px 14px;
}

.jurisdiction-sheet-tools select {
  min-height: 36px;
  max-width: 190px;
}

.editable-sheet-cell {
  background: #fffef8;
  outline: none;
}

.editable-sheet-cell:focus {
  background: #fff7d0;
  box-shadow: inset 0 0 0 2px rgba(196, 141, 0, 0.34);
}

.edited-cell {
  background: #ecfff2;
}

.jurisdiction-unmapped-row td {
  background: #fff7d9;
}

.mapping-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mapping-tools input,
.mapping-tools select {
  min-width: 170px;
}

.mapping-batch-tools {
  align-items: center;
  margin: 8px 0 10px;
}

.mapping-batch-hint {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.mapping-table {
  min-width: 1500px;
  table-layout: fixed;
}

.mapping-table th,
.mapping-table td {
  overflow: hidden;
  padding: 7px 6px;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-table th:nth-child(1),
.mapping-table td:nth-child(1) {
  width: 54px;
  text-align: center;
}

.mapping-table th:nth-child(2),
.mapping-table td:nth-child(2) {
  width: 72px;
}

.mapping-table th:nth-child(3),
.mapping-table td:nth-child(3) {
  width: 190px;
  text-align: left;
}

.mapping-table th:nth-child(4),
.mapping-table td:nth-child(4) {
  width: 130px;
}

.mapping-table th:nth-child(5),
.mapping-table td:nth-child(5),
.mapping-table th:nth-child(6),
.mapping-table td:nth-child(6),
.mapping-table th:nth-child(7),
.mapping-table td:nth-child(7),
.mapping-table th:nth-child(8),
.mapping-table td:nth-child(8) {
  width: 150px;
  text-align: left;
}

.mapping-table th:nth-child(9),
.mapping-table td:nth-child(9) {
  width: 330px;
}

.mapping-table th:nth-child(10),
.mapping-table td:nth-child(10) {
  width: 70px;
  text-align: right;
}

.mapping-table th:nth-child(11),
.mapping-table td:nth-child(11) {
  width: 100px;
}

.mapping-table th:nth-child(12),
.mapping-table td:nth-child(12) {
  width: 86px;
}

.mapping-check {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}

.mapping-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 38px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.mapping-master-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.mapping-best-suggestion {
  margin-top: 6px;
  max-width: 520px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.mapping-best-suggestion.muted {
  color: #9a9f96;
}

.mapping-save-button {
  min-height: 32px;
  padding: 6px 10px;
}

.mapping-recommendation {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.mapping-recommendation-safe_candidate {
  color: #176b4d;
  background: #e0f4e9;
}

.mapping-recommendation-review {
  color: #8a6500;
  background: #fff3c4;
}

.mapping-recommendation-no_suggestion {
  color: #a32c25;
  background: #fde2df;
}

.product-office-table th:first-child,
.product-office-table td:first-child {
  width: 118px;
}

.product-office-table th:nth-child(2),
.product-office-table td:nth-child(2) {
  width: 58px;
  max-width: 58px;
}

.product-office-table td.secondary {
  color: #7a8376;
  font-size: 0.64rem;
}

.product-office-table th:nth-child(n+3),
.product-office-table td:nth-child(n+3) {
  width: 86px;
  text-align: right;
}

.table-heading {
  align-items: center;
}

.table-tools,
.data-actions,
.report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.report-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.admin-login {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 190px auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f7f1;
}

.admin-login-status h4,
.admin-login-status p {
  margin: 0;
}

.admin-login-status h4 {
  font-size: 0.92rem;
}

.admin-login-status p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-login label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.data-operations {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.data-operations:disabled {
  opacity: 0.55;
}

.data-scope-strip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 12px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf6;
}

.data-scope-strip span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.data-scope-strip strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 0.9rem;
}

.override-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 800;
}

.override-toggle input {
  width: 16px;
  height: 16px;
}

.data-grid label,
.upload-box label {
  min-width: 0;
}

.data-grid span,
.upload-box span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.data-action-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.upload-box,
.fetch-box {
  display: flex;
  gap: 10px;
  align-items: end;
}

.upload-box {
  min-width: 0;
}

.fetch-box {
  justify-content: flex-end;
}

.data-status {
  min-height: 22px;
  margin-top: 14px !important;
  color: var(--ink) !important;
  font-weight: 700;
}

.target-upload-button {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.target-upload-status {
  margin-top: -4px !important;
  margin-bottom: 12px;
}

.target-upload-status[data-tone="success"] {
  color: #1d7a50 !important;
}

.target-upload-status[data-tone="error"] {
  color: var(--red) !important;
}

.messaging-panel {
  margin-top: 16px;
}

.messaging-operations {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.messaging-operations:disabled {
  opacity: 0.55;
}

.message-template-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.message-tag-helper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.message-tag-helper span {
  margin-right: 2px;
  text-transform: uppercase;
}

.message-tag-helper code {
  border: 1px solid #cdd8c7;
  border-radius: 6px;
  padding: 3px 6px;
  background: #f7faf4;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
}

.message-template-field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.message-template-field textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.message-recipient-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.message-select-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7ef;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.message-select-tools label,
.message-recipient-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.message-select-tools input,
.message-recipient-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.message-recipient {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcf7;
}

.message-recipient-main {
  flex: 1;
  min-width: 0;
}

.message-recipient-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
}

.message-recipient strong {
  font-size: 0.82rem;
  line-height: 1.15;
}

.message-recipient strong,
.message-recipient span,
.message-recipient p {
  display: block;
}

.message-recipient span,
.message-recipient p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.message-recipient p {
  margin: 3px 0 0;
}

.message-recipient pre {
  max-height: 118px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 5px 0 0;
  padding: 6px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.68rem;
  line-height: 1.28;
}

.disabled-link {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.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;
}

.material-panel {
  margin-top: 16px;
}

.event-carousel {
  margin-top: 12px;
}

.event-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 160px;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(36, 49, 41, 0.96), rgba(26, 74, 68, 0.9)),
    #26322a;
  box-shadow: var(--shadow);
}

.event-slide h3 {
  margin-top: 10px;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1.05;
}

.event-slide p {
  max-width: 760px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.event-slide .type-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.event-date {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 160px;
}

.event-date small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.event-date strong {
  font-size: 1.1rem;
}

.material-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.material-product-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-product-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.material-product-tab.active {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.material-carousel-actions {
  display: flex;
  gap: 8px;
}

.material-admin-controls {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #d7dfd2;
  border-radius: 8px;
  background: #f4f7f1;
}

.material-event-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 140px 150px minmax(180px, 1.3fr) minmax(180px, 1.2fr) minmax(190px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}

.material-event-form strong {
  grid-column: 1 / -1;
  color: #26352d;
}

.material-event-form input,
.material-event-form select {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cbd6c7;
  border-radius: 6px;
  background: #fff;
  color: #26352d;
}

.event-slide-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 6px;
}

.material-delete-button {
  color: #a52b27;
  border-color: #e5b7b2;
}

.material-image-slide {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 16 / 5;
  padding: 0;
  overflow: hidden;
  background: #26322a;
}

.material-image-slide .event-slide-image {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: #26322a;
}

.material-carousel-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.material-side-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #26352d;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.material-side-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.04);
}

.material-side-arrow-prev { left: 14px; }
.material-side-arrow-next { right: 14px; }

.material-carousel-icon {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  color: #26352d;
  cursor: pointer;
  font-weight: 900;
}

.material-carousel-icon:hover {
  transform: translateY(-1px);
}

.material-add-button {
  position: relative;
  overflow: hidden;
  color: #1769aa;
}

.material-add-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.material-carousel-empty {
  position: relative;
  min-height: 180px;
  padding: 28px;
}

.material-carousel-empty > .material-add-button {
  position: absolute;
  top: 18px;
  right: 18px;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 8px;
  font-size: 1.25rem;
  line-height: 1;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.material-featured-links {
  margin-top: 8px;
}

.material-featured-links:empty {
  display: none;
}

.material-featured-heading {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.material-featured-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-featured-link {
  width: fit-content;
}

.material-text-link {
  color: #0b63ce;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.material-text-link:hover,
.material-text-link:focus {
  color: #084b9d;
}

.material-muted-link {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.material-section {
  display: grid;
  gap: 10px;
}

.material-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.material-section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.material-section-toggle:hover {
  color: #0b63ce;
}

.material-section-symbol {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  font-size: 1.15rem;
  line-height: 1;
}

.material-section-links {
  display: grid;
  gap: 8px;
  padding: 2px 0 6px 31px;
}

.material-text-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.material-text-description {
  color: var(--muted);
  font-size: 0.82rem;
}

.material-section-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.material-section-heading span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

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

.material-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  background: #fff;
}

.material-card-green { border-top-color: #16856d; }
.material-card-violet { border-top-color: #6734c4; }
.material-card-orange { border-top-color: #f27612; }
.material-card-navy { border-top-color: #123f86; }
.material-card-sky { border-top-color: #0f87a8; }

.material-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.material-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.material-card-green .material-icon { background: #16856d; }
.material-card-violet .material-icon { background: #6734c4; }
.material-card-orange .material-icon { background: #f27612; }
.material-card-navy .material-icon { background: #123f86; }
.material-card-sky .material-icon { background: #0f87a8; }

.material-icon svg {
  width: 22px;
  height: 22px;
}

.material-card-head span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.material-card h4 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.16;
}

.material-card p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.material-card-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.material-card-foot small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.table-tools select {
  width: 155px;
}

.table-tools input {
  width: 240px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 8px 6px;
  border-top: 1px solid var(--line);
  text-align: right;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  background: var(--surface);
}

th:first-child,
td:first-child,
th:nth-child(2),
td:nth-child(2),
th:nth-child(3),
td:nth-child(3) {
  text-align: left;
}

td small {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
}

.office-table {
  min-width: 1220px;
}

.office-table th,
.office-table td {
  padding: 5px 5px;
}

.office-table .sticky-col {
  width: 142px;
  min-width: 142px;
  max-width: 142px;
  background: var(--surface);
  font-size: 0.72rem;
}

.office-table td.secondary {
  width: 82px;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
}

.office-table th:nth-child(2),
.office-table td:nth-child(2) {
  width: 46px;
}

.office-table th:nth-child(3),
.office-table td:nth-child(3) {
  width: 82px;
}

.office-table th:nth-child(n+4):nth-child(-n+8),
.office-table td:nth-child(n+4):nth-child(-n+8) {
  width: 138px;
}

.office-table th:nth-child(9),
.office-table td:nth-child(9) {
  width: 72px;
}

.clickable-row:hover .sticky-col {
  background: #fafcf7;
}

.sort-button {
  width: 100%;
  min-height: 22px;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.office-table th:first-child .sort-button,
.office-table th:nth-child(2) .sort-button,
.office-table th:nth-child(3) .sort-button {
  text-align: left;
}

.th-line {
  display: block;
  line-height: 1.05;
}

.product-cell-button {
  width: 100%;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.product-cell-button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.mini-product {
  min-width: 116px;
  max-width: 116px;
}

.mini-product-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.mini-product-top small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-product-top strong {
  color: var(--ink);
  font-size: 0.7rem;
}

.mini-product-top span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.mini-target-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: baseline;
  text-align: left;
  line-height: 1.05;
}

.mini-target-row span {
  color: var(--muted);
}

.mini-target-row b {
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 700;
  text-align: left;
}

.mini-policy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: baseline;
  text-align: left;
  line-height: 1.05;
  color: var(--muted);
  font-size: 0.54rem;
}

.mini-policy-row b {
  color: var(--ink);
  font-weight: 800;
}

.mini-track {
  display: flex;
  height: 4px;
  overflow: hidden;
  margin: 2px 0;
  border-radius: 999px;
  background: #e4e9df;
}

.mini-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
}

.office-product-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.office-product-detail:empty {
  display: none;
}

.office-product-detail-head,
.detail-metrics {
  display: flex;
  gap: 12px;
}

.office-product-detail-head {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.office-product-detail-head h4,
.office-product-detail-head p {
  margin: 0;
}

.office-product-detail-head h4 {
  color: var(--ink);
}

.office-product-detail-head strong {
  color: var(--ink);
  font-size: 1.3rem;
}

.detail-metrics {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-metrics span {
  min-width: 150px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafcf7;
}

.detail-metrics small {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.office-detail-table {
  min-width: 0;
  max-width: 520px;
}

.office-detail-table th,
.office-detail-table td {
  padding: 8px 10px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #fafcf7;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #edf2e7;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
}

.status-good {
  color: var(--green);
}

.status-watch {
  color: var(--amber);
}

.status-risk {
  color: var(--red);
}

.status-muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 1240px) {
  .selector-bar {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .selector-bar.expanded {
    max-height: 230px;
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .dashboard-kpi-strip {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

}

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 720px) {
  .app-header,
  main {
    padding: 16px;
  }

  .app-header {
    padding-bottom: 22px;
  }

  .header-main {
    align-items: stretch;
    flex-direction: column;
  }

  .selector-bar,
  .top-performers,
  .data-grid,
  .data-action-panel,
  .admin-login {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-kpi-card {
    gap: 8px;
    padding: 9px 10px;
  }

  .dashboard-kpi-icon {
    width: 30px;
    height: 30px;
  }

  .dashboard-kpi-icon svg {
    width: 16px;
    height: 16px;
  }

  .dashboard-kpi-card strong {
    font-size: 1.05rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    padding: 10px;
  }

  .product-card-head {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }

  .product-percent-ring {
    grid-column: 1 / -1;
    justify-self: end;
    width: 46px;
    height: 46px;
    margin-top: -4px;
  }

  .product-percent-ring::before {
    inset: 5px;
  }

  .product-percent-ring strong {
    font-size: 0.78rem;
  }

  .product-icon {
    width: 32px;
    height: 32px;
  }

  .product-icon svg {
    width: 18px;
    height: 18px;
  }

  .product-card h4 {
    font-size: 0.9rem;
  }

  .product-card p,
  .target-line,
  .fy-achievement-line,
  .fy-target-line {
    font-size: 0.7rem;
  }

  .selector-bar.expanded {
    max-height: 430px;
  }

  .filter-toggle {
    right: 16px;
  }

  .title-row,
  .panel-heading,
  .table-tools,
  .data-actions,
  .upload-box,
  .fetch-box {
    align-items: stretch;
    flex-direction: column;
  }

  .view-actions {
    width: 100%;
  }

  .upload-subnav {
    width: 100%;
    flex-wrap: wrap;
  }

  .upload-subnav .view-button {
    flex: 1 1 130px;
  }

  .view-button {
    flex: 1;
  }

  .table-tools select,
  .table-tools input,
  input[type="file"] {
    width: 100%;
    max-width: none;
  }

  .office-table {
    min-width: 930px;
  }

  .office-table th,
  .office-table td {
    padding: 4px 3px;
  }

  .office-table .sticky-col {
    width: 116px;
    min-width: 116px;
    max-width: 116px;
    font-size: 0.68rem;
  }

  .office-table th:nth-child(2),
  .office-table td:nth-child(2) {
    width: 40px;
  }

  .office-table th:nth-child(3),
  .office-table td:nth-child(3) {
    width: 64px;
  }

  .office-table td.secondary {
    width: 64px;
    max-width: 64px;
    font-size: 0.68rem;
  }

  .office-table th:nth-child(n+4):nth-child(-n+8),
  .office-table td:nth-child(n+4):nth-child(-n+8) {
    width: 118px;
  }

  .office-table th:nth-child(9),
  .office-table td:nth-child(9) {
    width: 62px;
  }

  .mini-product {
    min-width: 100px;
    max-width: 100px;
  }

  .mini-product-top strong {
    font-size: 0.66rem;
  }

  .mini-product-top span,
  .mini-target-row,
  .sort-button {
    font-size: 0.62rem;
  }

  .product-month-chart-head {
    display: grid;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .product-month-chart-rows {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 3px;
    overflow-x: visible;
  }

  .product-month-track {
    width: 26px;
    height: 104px;
  }

  .product-month-chart-row {
    gap: 4px;
    padding: 6px 2px;
  }

  .product-month-chart-row .month-label {
    font-size: 0.66rem;
  }

  .product-month-value {
    font-size: 0.52rem;
  }

  .product-month-chart-head h4 {
    font-size: 0.88rem;
  }

  .hierarchy-table {
    min-width: 940px;
  }

  .hierarchy-table th:first-child,
  .hierarchy-table td:first-child {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
  }

  .hierarchy-office-level .hierarchy-table th:first-child,
  .hierarchy-office-level .hierarchy-table td:first-child {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
  }

  .hierarchy-office-level .hierarchy-table th:nth-child(2),
  .hierarchy-office-level .hierarchy-table td:nth-child(2) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
  }

  .product-office-detail-head {
    display: grid;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .product-office-table {
    min-width: 980px;
  }

  .product-office-table th,
  .product-office-table td {
    padding: 4px 2px;
    font-size: 0.62rem;
  }

  .product-office-table th:first-child,
  .product-office-table td:first-child {
    width: 104px;
  }

  .product-office-table th:nth-child(2),
  .product-office-table td:nth-child(2) {
    width: 50px;
    max-width: 50px;
  }

  .product-office-table td.secondary {
    font-size: 0.58rem;
  }

  .product-office-table th:nth-child(n+3),
  .product-office-table td:nth-child(n+3) {
    width: 76px;
  }

  .message-recipient-list {
    gap: 5px;
  }

  .message-select-tools {
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .message-recipient {
    gap: 5px;
    padding: 6px;
  }

  .message-recipient-check {
    gap: 5px;
  }

  .message-recipient-check input {
    width: 14px;
    height: 14px;
  }

  .message-recipient-head {
    gap: 5px;
  }

  .message-recipient strong {
    font-size: 0.74rem;
  }

  .message-recipient span,
  .message-recipient p {
    font-size: 0.61rem;
    line-height: 1.15;
  }

  .message-recipient pre {
    max-height: 88px;
    margin-top: 4px;
    padding: 5px;
    font-size: 0.6rem;
    line-height: 1.2;
  }

  .event-slide {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 16px;
  }

  .event-date {
    justify-items: start;
    min-width: 0;
  }

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

  .material-product-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-product-tab {
    justify-content: center;
  }

  .material-carousel-actions {
    justify-content: flex-end;
  }

  .material-image-slide {
    aspect-ratio: 4 / 3;
  }

  .material-event-form {
    grid-template-columns: 1fr 1fr;
  }

  .material-event-form strong,
  .material-event-form input[type="file"],
  .material-event-form button {
    grid-column: 1 / -1;
  }

  .material-grid,
  .material-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .material-card {
    min-height: 178px;
    padding: 10px;
  }

  .material-card-head {
    gap: 8px;
  }

  .material-icon {
    width: 34px;
    height: 34px;
  }

  .material-icon svg {
    width: 18px;
    height: 18px;
  }

  .material-card h4 {
    font-size: 0.82rem;
  }

  .material-card p,
  .material-card-foot {
    font-size: 0.7rem;
  }

  .metric strong {
    font-size: 1.62rem;
  }
}

@media (min-width: 520px) and (max-width: 720px) {
  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.visit-analytics-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
  background: #fbfcf8;
}

.visit-analytics-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.visit-analytics-table th,
.visit-analytics-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
}

.visit-analytics-table th:nth-child(n+2),
.visit-analytics-table td:nth-child(n+2) {
  text-align: right;
}
