/* ============== MODULE SHELL ============== */
.mod-shell {
  --m-accent: #1E5EFF;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mod-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.mod-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.mod-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--m-accent);
}
.mod-kpi-l {
  font-size: 12px;
  color: var(--ink-mid);
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.mod-kpi-v {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.mod-kpi-s {
  font-size: 11px;
  color: var(--ink-mid);
  margin-top: 2px;
}
.mod-kpi-trend {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.mod-kpi-trend.up { color: #16A77A; background: #16A77A12; }
.mod-kpi-trend.down { color: #DC2626; background: #DC262612; }

.mod-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 0;
  overflow-x: auto;
}
.mod-tab {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.mod-tab:hover { color: var(--ink); }
.mod-tab.active {
  color: var(--m-accent);
  border-bottom-color: var(--m-accent);
}
.mod-tab-cnt {
  background: var(--bg-alt);
  color: var(--ink-mid);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 8px;
  font-weight: 600;
}
.mod-tab.active .mod-tab-cnt {
  background: color-mix(in oklab, var(--m-accent) 15%, transparent);
  color: var(--m-accent);
}

/* ============== CARDS / TABLES ============== */
.mod-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.mod-card-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.mod-card-h h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mod-card-sub {
  font-size: 13px;
  color: var(--ink-mid);
  font-weight: 500;
}

.mod-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 980px) {
  .mod-grid-2 { grid-template-columns: 1fr; }
}

.mod-search-inp {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.mod-search-inp:focus {
  outline: none;
  border-color: var(--m-accent);
}

.mod-add-btn {
  background: var(--m-accent);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s;
}
.mod-add-btn:hover { filter: brightness(1.1); }
.mod-add-btn.primary { background: var(--m-accent); }
.mod-add-btn.small { padding: 4px 10px; font-size: 11px; margin-right: 4px; }
.mod-add-btn.big { padding: 12px 24px; font-size: 14px; width: 100%; margin-top: 8px; }

.mod-row-del {
  background: transparent;
  border: 1px solid var(--border);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1;
}
.mod-row-del:hover { color: #DC2626; border-color: #DC2626; }

.mod-inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.mod-inline-form input,
.mod-inline-form select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
}
.mod-inline-form input:focus,
.mod-inline-form select:focus {
  outline: none;
  border-color: var(--m-accent);
}

.mod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mod-table thead th {
  background: var(--bg-alt);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mid);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.mod-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.mod-table tbody tr:last-child td { border-bottom: none; }
.mod-table tbody tr:hover { background: var(--bg-alt); }
.mod-table .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.mod-table .dim { color: var(--ink-mid); }

.mod-filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mod-pill {
  background: var(--bg-alt);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mid);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: capitalize;
}
.mod-pill:hover { background: #fff; border-color: var(--border); }
.mod-pill.active {
  background: color-mix(in oklab, var(--m-accent) 10%, transparent);
  color: var(--m-accent);
  border-color: color-mix(in oklab, var(--m-accent) 30%, transparent);
}
.mod-pill-cnt {
  background: rgba(0,0,0,0.06);
  font-size: 10px;
  padding: 0 6px;
  border-radius: 8px;
  font-weight: 600;
}
.mod-pill.active .mod-pill-cnt {
  background: color-mix(in oklab, var(--m-accent) 20%, transparent);
}

/* Status pills */
.fin-status, .hr-st, .hr-leave {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.fin-status.fin-paid, .hr-st.hr-active, .hr-leave.hr-approved {
  background: #16A77A18; color: #16A77A; border-color: #16A77A30;
}
.fin-status.fin-pending, .hr-leave.hr-pending {
  background: #F59E0B18; color: #B45309; border-color: #F59E0B30;
}
.fin-status.fin-overdue {
  background: #DC262618; color: #DC2626; border-color: #DC262630;
}
.hr-st.hr-leave {
  background: #7B2CE818; color: #7B2CE8; border-color: #7B2CE830;
}
.fin-status.clickable { cursor: pointer; border: 1px solid currentColor; }

.fin-cat-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-alt);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mid);
}

/* ============== FINANCE-specific ============== */
.fin-cat-list {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fin-cat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
}
.fin-cat-top {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.fin-cat-l { font-weight: 500; }
.fin-cat-v { font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.fin-cat-bar {
  height: 6px;
  background: var(--bg-alt);
  border-radius: 3px;
  overflow: hidden;
}
.fin-cat-fill {
  height: 100%;
  background: var(--m-accent);
  border-radius: 3px;
  transition: width .4s;
}
.fin-cat-pct {
  font-size: 11px;
  color: var(--ink-mid);
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  min-width: 32px;
  text-align: right;
}

.fin-cf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.fin-cf-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fin-cf-stats span {
  font-size: 11px;
  color: var(--ink-mid);
}
.fin-cf-stats b {
  font-size: 14px;
}
.fin-cf-chart {
  padding: 18px;
  height: 240px;
}

.fin-acc-list {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fin-acc-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.fin-acc-info { grid-column: 1; }
.fin-acc-name { font-weight: 600; font-size: 13px; }
.fin-acc-iban { font-size: 11px; color: var(--ink-mid); font-family: 'JetBrains Mono', monospace; }
.fin-acc-bal {
  grid-column: 2;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}
.fin-acc-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--bg-alt);
  border-radius: 2px;
  overflow: hidden;
}
/* ===== FINANCE: Income vs Expense Grouped Chart ===== */
.fin-chart-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-mid);
}
.fin-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fin-chart-legend i {
  width: 10px; height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.fin-chart-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.fin-tot {
  background: #fff;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fin-tot-l {
  font-size: 11px;
  color: var(--ink-mid);
  font-weight: 500;
}
.fin-tot-v {
  font-size: 16px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}

.fin-chart-wrap {
  display: grid;
  grid-template-columns: 40px 1fr;
  padding: 16px 18px 12px 8px;
  height: 280px;
  gap: 8px;
}
.fin-chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-mid);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  padding-right: 4px;
  padding-bottom: 22px;
}
.fin-chart-plot {
  position: relative;
}
.fin-chart-grid {
  position: absolute;
  inset: 0 0 22px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.fin-chart-grid-line {
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}
.fin-chart-bars {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.fin-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  position: relative;
}
.fin-chart-bar-pair {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding-bottom: 0;
}
.fin-chart-bar {
  flex: 1;
  max-width: 14px;
  min-width: 6px;
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: filter .15s, transform .15s;
  cursor: pointer;
}
.fin-chart-bar:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}
.fin-chart-tip {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.fin-chart-bar:hover .fin-chart-tip {
  opacity: 1;
}
.fin-chart-x {
  font-size: 10px;
  color: var(--ink-mid);
  margin-top: 4px;
  height: 18px;
  line-height: 18px;
}

/* Net profit/margin highlight */
.fin-tot:nth-child(3) .fin-tot-v {
  color: var(--ink);
}

/* Account cards (since we removed older fin-acc-list, keep grid version) */
.fin-acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 14px 18px;
}
.fin-acc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fin-acc-card.overdue { border-color: #DC262640; background: #DC26260A; }
.fin-acc-card.watch { border-color: #F59E0B40; }
.fin-acc-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fin-acc-name { font-weight: 600; font-size: 13px; }
.fin-acc-st {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fin-acc-st.active { background: #16A77A18; color: #16A77A; }
.fin-acc-st.overdue { background: #DC262618; color: #DC2626; }
.fin-acc-st.watch { background: #F59E0B18; color: #B45309; }
.fin-acc-bal { font-size: 14px; font-weight: 700; }
.fin-acc-pct { font-size: 11px; }

.mod-span-2 {
  grid-column: 1 / -1;
}

/* ============== CRM-specific (pipeline) ============== */
.crm-pipe {
  display: grid;
  grid-template-columns: repeat(5, minmax(200px, 1fr));
  gap: 12px;
  padding: 14px;
  overflow-x: auto;
}
@media (max-width: 1100px) {
  .crm-pipe { grid-template-columns: repeat(5, 220px); }
}
.crm-pipe-col {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;
}
.crm-pipe-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 8px;
  border-top: 3px solid #94A3B8;
  background: #fff;
}
.crm-pipe-l {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.crm-pipe-c {
  background: var(--bg-alt);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--ink-mid);
}
.crm-pipe-sum {
  padding: 6px 12px 10px;
  font-size: 12px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.crm-pipe-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  flex: 1;
}
.crm-deal {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  transition: box-shadow .12s, transform .12s;
}
.crm-deal:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.crm-deal-t {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
}
.crm-deal-c {
  font-size: 11px;
  color: var(--ink-mid);
}
.crm-deal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.crm-deal-foot .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--m-accent);
}
.crm-deal-owner {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--m-accent) 18%, transparent);
  color: var(--m-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.02em;
}
.crm-deal-acts {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  justify-content: flex-end;
}
.crm-deal-acts button {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-mid);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
}
.crm-deal-acts button:hover {
  background: #fff;
  color: var(--m-accent);
  border-color: var(--m-accent);
}
.crm-deal-acts button.del:hover {
  color: #DC2626;
  border-color: #DC2626;
}

/* CRM customer status pills */
.crm-st {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.crm-st-active { background: #16A77A18; color: #16A77A; border-color: #16A77A30; }
.crm-st-vip {
  background: linear-gradient(135deg, #F59E0B20, #DC262620);
  color: #B45309;
  border-color: #F59E0B40;
}
.crm-st-watch { background: #F59E0B18; color: #B45309; border-color: #F59E0B30; }

/* CRM activity feed */
.crm-feed {
  display: flex;
  flex-direction: column;
}
.crm-feed-item {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.crm-feed-item:last-child { border-bottom: none; }
.crm-feed-item:hover { background: var(--bg-alt); }
.crm-feed-ic {
  width: 36px; height: 36px;
  background: color-mix(in oklab, var(--m-accent) 12%, transparent);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.crm-feed-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.crm-feed-who {
  font-size: 12px;
  color: var(--ink);
}
.crm-feed-who b { font-weight: 600; }
.crm-feed-what {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.3;
}
.crm-feed-owner {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--m-accent) 18%, transparent);
  color: var(--m-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
}

/* legacy alias kept for backward-compat */
.crm-kanban { display: none; }

/* ============== INVENTORY-specific ============== */
.inv-stock-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.inv-stock-bar.low { color: #B45309; }
.inv-stock-bar.out { color: #DC2626; }
.inv-stock-bar.ok { color: #16A77A; }
.inv-stock-bar::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.inv-mvmt {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.inv-mvmt.in { background: #16A77A18; color: #16A77A; }
.inv-mvmt.out { background: #DC262618; color: #DC2626; }
.inv-mvmt.transfer { background: #1E5EFF18; color: #1E5EFF; }

.inv-wh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 18px;
}
.inv-wh-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.inv-wh-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.inv-wh-loc { font-size: 11px; color: var(--ink-mid); margin-bottom: 12px; }
.inv-wh-stat-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.inv-wh-bar { height: 6px; background: #fff; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.inv-wh-fill { height: 100%; background: var(--m-accent); border-radius: 3px; }

/* ============== FIELD OPS ============== */
.field-task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  padding: 14px 18px;
}
.field-task-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 3px solid var(--m-accent);
}
.field-task-card.priority-high { border-left-color: #DC2626; }
.field-task-card.priority-med { border-left-color: #F59E0B; }
.field-task-card.priority-low { border-left-color: #64748B; }
.field-task-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.field-task-t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.field-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-mid);
}
.field-task-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.field-task-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field-task-status.open { background: #1E5EFF18; color: #1E5EFF; }
.field-task-status.progress { background: #F59E0B18; color: #B45309; }
.field-task-status.done { background: #16A77A18; color: #16A77A; }

/* ============== HR-specific ============== */
.hr-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--m-accent) 18%, transparent);
  color: var(--m-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ============== REPORTS ============== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 14px 18px;
}
.reports-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, transform .12s;
}
.reports-card:hover {
  border-color: var(--m-accent);
  transform: translateY(-2px);
}
.reports-card-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.reports-card h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.reports-fmt {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.reports-fmt.fmt-pdf { background: #DC262618; color: #DC2626; }
.reports-fmt.fmt-xlsx { background: #16A77A18; color: #16A77A; }
.reports-fmt.fmt-csv { background: #1E5EFF18; color: #1E5EFF; }
.reports-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}
.reports-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 18px;
}
.reports-kpi-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.reports-kpi-l { font-size: 12px; color: var(--ink-mid); margin-bottom: 4px; }
.reports-kpi-v { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.reports-kpi-bar { height: 6px; background: #fff; border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.reports-kpi-fill { height: 100%; border-radius: 3px; }
.reports-kpi-target { font-size: 11px; }

.reports-builder {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}
.rb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rb-field { display: flex; flex-direction: column; gap: 4px; }
.rb-field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rb-field input, .rb-field select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.rb-field input:focus, .rb-field select:focus {
  outline: none;
  border-color: var(--m-accent);
}

/* Global helpers */
.mono { font-family: 'JetBrains Mono', monospace; }
.dim { color: var(--ink-mid); }


/* ===== INVENTORY: stock badges + movement pills ===== */
.inv-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.inv-stock::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.inv-stock.inv-ok { color: #16A77A; }
.inv-stock.inv-ok::before { background: #16A77A; }
.inv-stock.inv-low { color: #B45309; }
.inv-stock.inv-low::before { background: #F59E0B; }
.inv-stock.inv-out { color: #DC2626; }
.inv-stock.inv-out::before { background: #DC2626; }
.inv-stock b { font-family: 'JetBrains Mono', monospace; }

.inv-mv {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.inv-mv-in { background: #16A77A18; color: #16A77A; }
.inv-mv-out { background: #DC262618; color: #DC2626; }

.inv-wh-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 16px 8px;
  gap: 12px;
}
.inv-wh-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.inv-wh-pct { font-size: 18px; font-weight: 700; color: var(--m-accent); }
.inv-wh-bar { margin: 8px 16px 12px; }
.inv-wh-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.inv-wh-stats > div {
  background: #fff;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inv-wh-stats span { font-size: 10px; }
.inv-wh-stats b { font-size: 14px; }

/* ===== FIELD: priority + status + teams ===== */
.field-pri {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.field-pri.pri-high { background: #DC262618; color: #DC2626; }
.field-pri.pri-med { background: #F59E0B18; color: #B45309; }
.field-pri.pri-low { background: #64748B18; color: #475569; }

.field-st {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}
.field-st.st-pending { background: #64748B18; color: #475569; }
.field-st.st-in_progress { background: #1E5EFF18; color: #1E5EFF; }
.field-st.st-done { background: #16A77A18; color: #16A77A; }
.field-st.clickable:hover { filter: brightness(.95); }

.field-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  padding: 16px;
}
.field-team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.field-team-h {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.field-team-h h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.field-team-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--m-accent) 18%, transparent);
  color: var(--m-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.field-team-st {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.field-team-st.on { background: #16A77A18; color: #16A77A; }
.field-team-st.off { background: #64748B18; color: #475569; }

.field-team-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.field-team-stats > div {
  background: #fff;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.field-team-stats span { font-size: 11px; }
.field-team-stats b { font-size: 16px; }

.field-map {
  padding: 18px;
  background: linear-gradient(180deg, #F8FAFC, #fff);
}
.field-map-legend {
  display: flex;
  gap: 18px;
  padding: 10px 18px 16px;
  font-size: 12px;
  color: var(--ink-mid);
}
.field-map-legend .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}


/* ===== FIELD MAP — premium ===== */
.field-map-card .mod-card-h {
  flex-direction: row;
  align-items: flex-start;
}
.field-map-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  border-top: 1px solid var(--border);
}
@media (max-width: 1000px) {
  .field-map-wrap { grid-template-columns: 1fr; }
}

.field-map-svg {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(8,145,178,0.08), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(8,145,178,0.05), transparent 60%),
    linear-gradient(180deg, #F8FBFE, #fff);
  padding: 24px 18px;
  position: relative;
  overflow: hidden;
}
.field-map-svg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.field-map-svg svg {
  width: 100%;
  height: 380px;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 20px rgba(8,145,178,0.08));
}

.field-pin {
  transition: transform .2s;
  transform-origin: center;
}
.field-pin:hover, .field-pin.hover {
  transform: scale(1.15);
}
.field-pin text {
  pointer-events: none;
  user-select: none;
}

/* Side panel */
.field-map-side {
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: 428px;
}
@media (max-width: 1000px) {
  .field-map-side { border-left: none; border-top: 1px solid var(--border); }
}
.field-map-side-h {
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.field-map-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.field-map-item {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: border-color .15s, transform .12s;
}
.field-map-item:hover {
  border-color: var(--border);
  transform: translateX(-2px);
}
.field-map-item.status-done { opacity: 0.55; }
.field-map-item-pin {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}
.field-map-item-pin.pri-high { background: #DC2626; box-shadow: 0 0 0 3px #DC262620; }
.field-map-item-pin.pri-med { background: #F59E0B; box-shadow: 0 0 0 3px #F59E0B20; }
.field-map-item-pin.pri-low { background: #64748B; box-shadow: 0 0 0 3px #64748B20; }
.field-map-item-body { min-width: 0; }
.field-map-item-t {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field-map-item-meta {
  font-size: 10px;
  color: var(--ink-mid);
  display: flex;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field-map-item-st {
  font-size: 14px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
}
.field-map-item-st.st-done { background: #16A77A20; color: #16A77A; }
.field-map-item-st.st-in_progress { background: #F59E0B20; color: #F59E0B; }
.field-map-item-st.st-pending { background: #64748B20; color: #64748B; }

.field-map-empty {
  padding: 30px;
  text-align: center;
  color: var(--ink-mid);
  font-size: 12px;
}

/* Stats strip */
.field-map-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.field-map-stats > div {
  background: #fff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}
.field-map-stats span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.field-map-stats b {
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
}
@media (max-width: 700px) {
  .field-map-stats { grid-template-columns: repeat(3, 1fr); }
}

/* Override old .field-map padding */
.field-map { padding: 0 !important; background: transparent !important; }


/* ===== REPORTS — preview modal + thumbnails ===== */
.reports-thumb {
  background: linear-gradient(180deg, #F8FAFC, #fff);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  margin: 8px 0 10px;
}

/* Modal */
.rep-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: rep-modal-in .2s ease-out;
}
@keyframes rep-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.rep-modal-card {
  background: #F1F5F9;
  width: min(960px, 100%);
  max-height: 100%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0,0,0,0.4);
  overflow: hidden;
  animation: rep-card-in .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes rep-card-in {
  from { transform: translateY(20px) scale(.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.rep-modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.rep-modal-h-l {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.rep-modal-h-l h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rep-modal-h-r { display: flex; gap: 6px; }
.rep-modal-btn, .rep-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s;
}
.rep-modal-btn:hover, .rep-modal-close:hover { background: var(--bg-alt); border-color: var(--ink-mid); }
.rep-modal-close { font-size: 22px; line-height: 1; font-weight: 300; }

.rep-modal-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rep-modal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.rep-tb-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.rep-tb-btn:hover:not(:disabled) { background: var(--bg-alt); }
.rep-tb-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rep-tb-page {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.rep-tb-page input {
  width: 36px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.rep-tb-spacer { flex: 1; }

.rep-modal-page-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: #E2E8F0;
  display: flex;
  justify-content: center;
}

/* PDF page */
.rep-page {
  width: 100%;
  max-width: 720px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 0 0 1px #CBD5E1;
  border-radius: 2px;
  padding: 32px 36px 50px;
  position: relative;
  min-height: 580px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0F172A;
}
.rep-page-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 2px solid #475569;
  margin-bottom: 18px;
}
.rep-page-brand {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #475569;
  margin-bottom: 2px;
}
.rep-page-title {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
}
.rep-page-meta { text-align: right; }
.rep-page-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
}
.rep-page-f {
  position: absolute;
  bottom: 18px;
  left: 36px;
  right: 36px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #94A3B8;
  padding-top: 8px;
  border-top: 1px solid #E2E8F0;
}

/* Cover page */
.rep-cover {
  text-align: center;
  padding: 30px 0 0;
}
.rep-cover-tag {
  display: inline-block;
  padding: 5px 14px;
  background: #475569;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}
.rep-cover-t {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px;
}
.rep-cover-sub {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 24px;
}
.rep-cover-divider {
  width: 60px;
  height: 3px;
  background: #475569;
  margin: 0 auto 30px;
  border-radius: 2px;
}
.rep-cover-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 30px;
  text-align: left;
  margin: 30px auto;
  max-width: 380px;
}
.rep-cover-meta > div {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}
.rep-cover-meta .dim {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 3px;
}
.rep-cover-meta b { font-size: 13px; }
.rep-cover-toc {
  margin-top: 30px;
  text-align: left;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.rep-cover-toc h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475569;
  margin: 0 0 12px;
  font-weight: 700;
}
.rep-cover-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rep-cover-toc li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dotted #CBD5E1;
  font-size: 12px;
}
.rep-cover-toc li .dim { font-family: 'JetBrains Mono', monospace; }

/* Section */
.rep-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  color: #0F172A;
}
.rep-section h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #475569;
}
.rep-lead {
  font-size: 12px;
  line-height: 1.55;
  color: #334155;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #F8FAFC;
  border-left: 3px solid #475569;
  border-radius: 4px;
}
.rep-body {
  font-size: 11.5px;
  line-height: 1.6;
  color: #334155;
  margin: 0 0 14px;
}

/* Stat grid */
.rep-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.rep-stat {
  padding: 12px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
}
.rep-stat-l {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 4px;
}
.rep-stat-v {
  font-size: 18px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
  color: #0F172A;
}
.rep-stat-d {
  font-size: 10px;
  margin-top: 4px;
  color: #64748B;
  font-weight: 600;
}
.rep-stat-d.up { color: #16A77A; }

/* Chart */
.rep-chart {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 10px 6px;
  margin-bottom: 14px;
}

/* Table */
.rep-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 11px;
}
.rep-table th {
  text-align: left;
  padding: 8px 10px;
  background: #475569;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rep-table th:first-child { border-radius: 4px 0 0 0; width: 32px; }
.rep-table th:last-child { border-radius: 0 4px 0 0; }
.rep-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #E2E8F0;
}
.rep-table tr:nth-child(even) td { background: #F8FAFC; }
.rep-bar {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
}
.rep-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #475569, #64748B);
  border-radius: 3px;
}

/* Recommendations */
.rep-recs {
  padding-left: 20px;
  margin: 12px 0 20px;
}
.rep-recs li {
  font-size: 11.5px;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 8px;
  padding-left: 4px;
}
.rep-recs li::marker { color: #475569; font-weight: 700; }

.rep-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
  padding-top: 20px;
}
.rep-sign-line {
  height: 32px;
  border-bottom: 1.5px solid #475569;
  margin-bottom: 6px;
}
.rep-sign b { font-size: 12px; }


/* ===== REPORTS — per-report layouts ===== */
.rep-page { padding: 28px 36px 50px; }
.rep-page-h { padding-bottom: 14px; border-bottom-width: 3px; }
.rep-page-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Hero block */
.rep-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--page-accent, #475569) 0%, color-mix(in srgb, var(--page-accent, #475569) 75%, #000) 100%);
  border-radius: 10px;
  color: #fff;
}
.rep-hero-l { display: flex; flex-direction: column; justify-content: center; }
.rep-hero-tag {
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
  opacity: 0.75; margin-bottom: 6px;
}
.rep-hero-v {
  font-size: 38px; font-weight: 800; letter-spacing: -0.025em;
  font-family: 'JetBrains Mono', monospace; line-height: 1; margin-bottom: 8px;
}
.rep-hero-sub { font-size: 12px; opacity: 0.85; }
.rep-hero-r {
  display: grid; gap: 8px;
  align-content: center;
}
.rep-hero-stat {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.rep-hero-stat span {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em;
  opacity: 0.8; font-weight: 600;
}
.rep-hero-stat b { font-size: 13px; font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.rep-hero-stat i { font-size: 9px; font-style: normal; opacity: 0.9; font-weight: 600; }
.rep-hero-stat i.up { color: #86EFAC; }

/* Section heading */
.rep-h3 {
  font-size: 12px; font-weight: 700;
  margin: 18px 0 10px;
  color: #0F172A;
  display: flex; align-items: center; gap: 6px;
}

/* Funnel */
.rep-funnel { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.rep-funnel-row { display: grid; grid-template-columns: 90px 1fr 60px; align-items: center; gap: 8px; }
.rep-funnel-name { font-size: 10px; font-weight: 600; color: #475569; }
.rep-funnel-bar { height: 22px; background: #F1F5F9; border-radius: 4px; overflow: hidden; }
.rep-funnel-fill {
  height: 100%; display: flex; align-items: center; padding: 0 8px;
  color: #fff; font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace;
  border-radius: 4px;
}
.rep-funnel-conv { font-size: 9px; color: #64748B; font-weight: 600; }

/* Pills */
.rep-pill {
  display: inline-block;
  padding: 2px 8px; font-size: 9px; font-weight: 700;
  border-radius: 4px; letter-spacing: 0.04em;
}

/* Mini cards / grids */
.rep-grid2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.rep-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.rep-mini-card {
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  display: flex; flex-direction: column; gap: 3px;
}
.rep-mini-l { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: #94A3B8; font-weight: 600; }
.rep-mini-v { font-size: 18px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: #0F172A; }

/* Cities */
.rep-cities { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rep-city-row {
  display: grid; grid-template-columns: 8px 80px 60px 60px 1fr;
  align-items: center; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid #F1F5F9;
}
.rep-city-pin { width: 8px; height: 8px; border-radius: 50%; }
.rep-city-name { font-size: 11px; font-weight: 600; }
.rep-city-stat { display: flex; flex-direction: column; }
.rep-city-stat .dim { font-size: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.rep-city-stat b { font-size: 11px; font-family: 'JetBrains Mono', monospace; }

/* Dimensions (satisfaction) */
.rep-dims { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.rep-dim-row { display: grid; grid-template-columns: 130px 1fr 32px; align-items: center; gap: 10px; }
.rep-dim-n { font-size: 10px; font-weight: 600; color: #475569; }
.rep-dim-bar { height: 8px; background: #F1F5F9; border-radius: 4px; overflow: hidden; }
.rep-dim-fill { height: 100%; border-radius: 4px; }
.rep-dim-v { font-size: 12px; font-weight: 700; font-family: 'JetBrains Mono', monospace; text-align: right; }

/* Segments (LTV) */
.rep-segments { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.rep-segment {}
.rep-segment-h { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.rep-segment-h b { font-family: 'JetBrains Mono', monospace; color: #7B2CE8; }

/* Cohort table */
.rep-table-cohort td { text-align: center; }
.rep-table-cohort th { text-align: center; }

/* Cashflow */
.rep-flow { display: flex; flex-direction: column; gap: 6px; }
.rep-flow-row {
  display: grid; grid-template-columns: 180px 100px 1fr;
  align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 6px;
  font-size: 11px;
}
.rep-flow-row.pos { background: #16A77A10; }
.rep-flow-row.neg { background: #DC262610; }
.rep-flow-row.total { background: #475569; color: #fff; font-weight: 700; margin-top: 4px; }
.rep-flow-row.total .mono { color: #fff; }
.rep-flow-row span:first-child { font-weight: 600; }
.rep-flow-row .mono { font-weight: 700; }

/* Legend */
.rep-legend {
  display: flex; gap: 14px; justify-content: center;
  font-size: 10px; color: #64748B; margin-top: 4px;
}
.rep-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
