/* ============================================================================
   Barmaso — the MD Dashboard (#/md)
   ----------------------------------------------------------------------------
   The portal's own colours: the deep green of its banner for the frame, the
   brand yellow for the one thing on a card that matters, emerald for money
   that came in. State (met, behind, no data) is always a word as well as a
   colour. Cards on a laptop run six across for Retail, four for Wholesale;
   a phone stacks them two by two.
   ============================================================================ */

.md { display: grid; gap: 18px; padding-bottom: 32px; }

/* --- head and period -------------------------------------------------------- */

.md-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 22px 24px 0;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--pt-hero-1), var(--pt-hero-2));
  color: #fff;
  overflow: hidden;
}
.md-kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pt-yellow); }
.md-title { margin: 2px 0 16px; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.md-tabs { display: flex; gap: 4px; }
.md-tab {
  padding: 11px 16px 13px;
  border-radius: 12px 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.md-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.md-tab.is-on { background: var(--pt-bg); color: var(--pt-ink); }

.md-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 12px 14px;
  border: 1px solid var(--pt-line);
  border-radius: 14px;
  background: #fff;
}
.md-month { display: flex; align-items: center; gap: 6px; }
.md-month-label { min-width: 104px; text-align: center; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--pt-ink); }
.md-icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--pt-line); border-radius: 10px; background: #fff; color: var(--pt-slate); cursor: pointer;
}
.md-icon-btn:disabled { opacity: 0.35; cursor: default; }
.md-icon-btn:not(:disabled):hover { border-color: var(--pt-green); color: var(--pt-ink); }
.md-asof { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--pt-slate); }
.md-date { width: auto; min-height: 38px; padding-block: 6px; }
.md-refresh { margin-left: auto; }

/* --- blocks ------------------------------------------------------------------ */

.md-body { display: grid; gap: 22px; }
.md-block { display: grid; gap: 14px; }
.md-block-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.md-block-title { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--pt-ink); }
.md-block-sub { margin: 2px 0 0; font-size: 13px; color: var(--pt-slate); }
.md-tag {
  padding: 2px 10px; border-radius: 999px; font-family: var(--font-body); font-size: 12px; font-weight: 700;
  background: var(--pt-green-50); color: var(--pt-green-700);
}
.md-block--wholesale .md-tag { background: #eef2ff; color: #3730a3; }

.md-note {
  margin: 0; padding: 10px 14px; border-radius: 12px;
  background: var(--pt-line-soft); color: var(--pt-slate); font-size: 13px; line-height: 1.55;
}
.md-note.is-warn { background: #fffbeb; color: #92400e; }
.md-note.is-info { background: #eef2ff; color: #3730a3; }

/* --- KPI cards ------------------------------------------------------------- */

.md-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.md-kpis--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.md-kpi {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--pt-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.md-kpi::before {
  content: ''; position: absolute; left: 16px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--pt-line);
}
.md-kpi.is-lead::before { background: var(--pt-yellow); }
.md-kpi.is-good::before { background: var(--pt-green); }
.md-kpi.is-warn::before { background: #f59e0b; }
.md-kpi-label { font-size: 12.5px; font-weight: 700; color: var(--pt-slate); line-height: 1.4; }
.md-kpi-value {
  font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: 28px; font-weight: 700; line-height: 1.15; color: var(--pt-ink); letter-spacing: -0.01em;
}
.md-kpi.is-good .md-kpi-value { color: var(--pt-green-700); }
.md-kpi.is-warn .md-kpi-value { color: #b45309; }
.md-kpi-sub { font-size: 12px; color: var(--pt-slate); line-height: 1.45; }
.md-kpi .md-share { margin-top: 6px; }

/* --- share bar ---------------------------------------------------------------- */

.md-share { position: relative; display: block; height: 7px; border-radius: 999px; background: var(--pt-line); min-width: 60px; }
.md-share i { display: block; height: 100%; border-radius: 999px; background: #f59e0b; }
.md-share i.is-met { background: var(--pt-green-600); }
.md-share i.is-behind { background: #dc2626; }
.md-share b { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--pt-ink); border-radius: 2px; }

/* --- panels and charts -------------------------------------------------------- */

.md-grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.md-panel { min-width: 0; padding: 16px; border: 1px solid var(--pt-line); border-radius: 16px; background: #fff; }
.md-panel-title { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--pt-ink); }
.md-figure { margin: 0; }
.md-legend { display: flex; gap: 16px; margin-bottom: 6px; font-size: 12px; color: var(--pt-slate); }
.md-key::before { content: ''; display: inline-block; width: 12px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: 0; }
.md-key--now::before { background: var(--pt-green-600); }
.md-key--prev::before { height: 2px; vertical-align: 3px; background: #64748b; }
.md-chart { display: block; width: 100%; height: auto; }
.md-chart .md-grid { stroke: var(--pt-line-soft); stroke-width: 1; }
.md-chart .md-axis { fill: var(--pt-muted); font-size: 12px; font-family: var(--font-display); }
.md-chart .md-bar-now { fill: var(--pt-green-600); }
.md-chart .md-line-prev { fill: none; stroke: #64748b; stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.md-chart .md-hit { fill: transparent; cursor: pointer; }
.md-chart .md-hit:hover { fill: rgba(15, 23, 42, 0.04); }

.md-tip {
  position: fixed; z-index: 90; pointer-events: none;
  padding: 8px 10px; border-radius: 10px;
  background: var(--pt-ink); color: #fff; font-size: 12px; line-height: 1.5;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  font-variant-numeric: tabular-nums;
}
.md-tip div:first-child { font-weight: 700; }

.md-rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.md-rank-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; }
.md-rank-list .md-share { grid-column: 1 / -1; grid-row: 2; }
.md-rank-name { font-size: 13px; font-weight: 700; color: var(--pt-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-rank-name:hover { text-decoration: underline; }
.md-rank-pct { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--pt-slate); }

.md-hbars { display: grid; gap: 12px; }
.md-hbar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 90px; grid-template-areas: "label track value" ". sub sub"; gap: 2px 12px; align-items: center; }
.md-hbar-label { grid-area: label; font-size: 13px; font-weight: 700; color: var(--pt-ink); }
.md-hbar-track { grid-area: track; height: 12px; border-radius: 6px; background: var(--pt-line-soft); overflow: hidden; }
.md-hbar-track i { display: block; height: 100%; border-radius: 6px; background: #4f46e5; }
.md-hbar-value { grid-area: value; text-align: right; font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--pt-ink); }
.md-hbar-sub { grid-area: sub; font-size: 12px; color: var(--pt-muted); }

/* --- tables -------------------------------------------------------------------- */

.md-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.md-search { flex: 1 1 260px; max-width: 420px; }
.md-count { font-size: 12.5px; color: var(--pt-muted); }
.md-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.md-chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--pt-line); border-radius: 999px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--pt-slate); cursor: pointer;
}
.md-chip-btn span { padding: 0 7px; border-radius: 999px; background: var(--pt-line-soft); font-size: 12px; }
.md-chip-btn.is-on { border-color: var(--pt-hero-1); background: var(--pt-hero-1); color: #fff; }
.md-chip-btn.is-on span { background: rgba(255, 255, 255, 0.18); }

.md-table-wrap { overflow-x: auto; border: 1px solid var(--pt-line); border-radius: 14px; background: #fff; }
.md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.md-table th, .md-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--pt-line-soft); white-space: nowrap; }
.md-table thead th { background: #f8fafc; font-size: 12px; font-weight: 700; color: var(--pt-slate); position: sticky; top: 0; }
.md-table th.is-sort { cursor: pointer; user-select: none; }
.md-table th.is-sort:hover, .md-table th.is-on { color: var(--pt-ink); }
.md-table .is-num { text-align: right; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.md-table tbody tr:last-child td { border-bottom: 0; }
.md-table tfoot td { background: #fff7c2; font-weight: 800; }
.md-row { cursor: pointer; }
.md-row:hover td { background: var(--pt-green-50); }
.md-row:focus-visible { outline: 2px solid var(--pt-green); outline-offset: -2px; }
.md-cell-store { font-weight: 700; color: var(--pt-ink); white-space: normal !important; min-width: 180px; }
.md-cell-share { min-width: 130px; }
.md-cell-share > span:first-child { display: block; margin-bottom: 4px; }
.md-code { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 6px; background: #eef2ff; color: #3730a3; font-family: var(--font-mono); font-size: 12px; }

.md-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.md-chip.is-met { background: #dcfce7; color: #15803d; }
.md-chip.is-open { background: #fef3c7; color: #b45309; }
.md-chip.is-behind { background: #fee2e2; color: #b91c1c; }
.md-chip.is-none { background: var(--pt-line-soft); color: var(--pt-slate); }
.md-chip.is-nodata { background: #f1f5f9; color: #64748b; border: 1px dashed #cbd5e1; }

.md-reconcile { display: grid; gap: 12px; }
.md-recon { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.md-recon div { padding: 10px 12px; border-radius: 12px; background: var(--pt-line-soft); }
.md-recon dt { font-size: 12px; font-weight: 700; color: var(--pt-slate); }
.md-recon dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; color: var(--pt-ink); }

.md-sheet .count-sheet-card { width: min(920px, 100%); }
.md-sheet-sub { display: block; font-size: 12px; color: var(--pt-muted); }
.md-sheet .count-sheet-body { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.md-sheet .count-sheet-body > * { flex: none; }
.md-sheet .md-table-wrap { overflow: visible; }

/* --- narrower screens ---------------------------------------------------------- */

@media (max-width: 1180px) {
  .md-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .md-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .md-kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .md-head { padding: 18px 16px 0; border-radius: 16px; }
  .md-title { font-size: 22px; margin-bottom: 12px; }
  .md-tabs { width: 100%; }
  .md-tab { flex: 1; text-align: center; padding: 10px 8px 12px; font-size: 13px; }
  .md-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .md-asof { grid-column: 1 / -1; order: 3; }
  .md-date { flex: 1; min-height: 44px; }
  .md-refresh { margin-left: 0; }
  .md-kpis, .md-kpis--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .md-kpi { padding: 14px 12px 12px; }
  .md-kpi-value { font-size: 22px; }
  .md-hbar { grid-template-columns: 96px minmax(0, 1fr) 64px; }
  .md-recon { grid-template-columns: minmax(0, 1fr); }
  .md-search { max-width: none; }

  /* Tables as cards: the name and its status first, the figures named under. */
  .md-table-wrap { overflow: visible; border: 0; background: none; }
  .md-table, .md-table tbody, .md-table tfoot { display: block; }
  .md-table thead { display: none; }
  .md-table tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px;
    margin-bottom: 8px; padding: 12px 14px; border: 1px solid var(--pt-line); border-radius: 14px; background: #fff;
  }
  .md-table td { padding: 0; border: 0; white-space: normal; min-width: 0; text-align: left !important; }
  .md-table td[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--pt-muted); }
  .md-table .md-cell-store { grid-column: 1; min-width: 0; font-size: 15px; }
  .md-table .md-cell-status { grid-column: 2; grid-row: 1; justify-self: end; }
  .md-table .md-cell-share { min-width: 0; }
  .md-table tfoot tr { background: #fff7c2; }
  .md-table tfoot td { background: none; }
  .md-table tfoot td:empty { display: none; }
  .md-table--days tr { grid-template-columns: minmax(0, 1fr) auto; }
}

/* --- the month at the top: one big card and the stores beside it ---------- */

.md-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; }
.md-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, auto);
  gap: 20px 28px;
  padding: 22px 24px;
  border: 1px solid var(--pt-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -16px rgba(15, 23, 42, 0.18);
}
.md-hero-main { display: grid; gap: 6px; min-width: 0; align-content: start; }
.md-hero-label { font-size: 13px; font-weight: 700; color: var(--pt-slate); }
.md-hero-value {
  margin: 0; font-family: var(--font-display); font-variant-numeric: tabular-nums;
  font-size: clamp(28px, 2.6vw, 40px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; color: var(--pt-ink);
  overflow-wrap: anywhere;
}
.md-hero-value small, .md-kpi-unit { margin-left: 6px; font-size: 0.42em; font-weight: 700; letter-spacing: 0.04em; color: var(--pt-muted); }
.md-hero-of { margin: 0; font-size: 13.5px; color: var(--pt-slate); font-variant-numeric: tabular-nums; }
.md-hero-bar { display: grid; gap: 6px; margin-top: 10px; }
.md-hero-track { position: relative; display: block; height: 14px; border-radius: 999px; background: var(--pt-line-soft); box-shadow: inset 0 0 0 1px var(--pt-line); }
.md-hero-track i { display: block; height: 100%; min-width: 4px; border-radius: 999px; background: linear-gradient(90deg, var(--pt-green-600), var(--pt-green)); }
.md-hero.is-behind .md-hero-track i { background: linear-gradient(90deg, #dc2626, #f97316); }
.md-hero-track b { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 3px; background: var(--pt-ink); }
.md-hero-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--pt-muted); }
.md-hero-pace { font-weight: 700; color: var(--pt-slate); }
.md-hero-compare { margin: 6px 0 0; font-size: 12.5px; color: var(--pt-slate); }
.md-hero-compare b { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.md-hero-compare .is-up { color: var(--pt-green-700); }
.md-hero-compare .is-down { color: #b91c1c; }
.md-hero-stats { display: grid; align-content: start; gap: 14px; margin: 0; padding-left: 24px; border-left: 1px solid var(--pt-line-soft); }
.md-hero-stats dt { font-size: 12px; font-weight: 700; color: var(--pt-slate); }
.md-hero-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 700; color: var(--pt-ink); }
.md-hero-stats dd small { font-size: 12px; color: var(--pt-muted); }
.md-hero-stats dd.is-good { color: var(--pt-green-700); }
.md-hero-stats dd.is-warn { color: #b45309; }
.md-hero-hint { display: block; margin-top: 2px; font-size: 12px; color: var(--pt-muted); line-height: 1.45; }

.md-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.md-panel-head .md-panel-title { margin: 0; }
.md-panel-note { font-size: 12px; color: var(--pt-muted); white-space: nowrap; }
.md-panel-title--sub { margin-top: 16px; }
.md-panel-foot { margin: 8px 0 0; font-size: 12px; color: var(--pt-muted); }

.md-stores { display: grid; align-content: start; gap: 12px; }
.md-store-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.md-store-counts > div { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--pt-line-soft); }
.md-store-counts b { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 28px; line-height: 1.1; color: var(--pt-ink); }
.md-store-counts span { font-size: 12px; font-weight: 700; color: var(--pt-slate); }
.md-store-counts .is-open b { color: #b45309; }
.md-store-counts .is-met b { color: var(--pt-green-700); }
.md-stack { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; background: var(--pt-line-soft); }
.md-stack-part { min-width: 6px; cursor: default; }
.md-stack-part.is-met { background: var(--pt-green-600); }
.md-stack-part.is-open { background: #f59e0b; }
.md-stack-part.is-behind { background: #dc2626; }
.md-stack-part.is-nodata { background: repeating-linear-gradient(45deg, #cbd5e1 0 4px, #e2e8f0 4px 8px); }
.md-stack-legend { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; padding: 0; font-size: 12.5px; color: var(--pt-slate); }
.md-stack-legend li { display: flex; align-items: center; gap: 8px; }
.md-stack-legend b { margin-left: auto; font-family: var(--font-display); font-variant-numeric: tabular-nums; color: var(--pt-ink); }
.md-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.md-stack-legend .is-met .md-dot { background: var(--pt-green-600); }
.md-stack-legend .is-open .md-dot { background: #f59e0b; }
.md-stack-legend .is-behind .md-dot { background: #dc2626; }
.md-stack-legend .is-nodata .md-dot { background: repeating-linear-gradient(45deg, #cbd5e1 0 3px, #e2e8f0 3px 6px); }
.md-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border: 1px dashed #cbd5e1; border-radius: 12px;
  color: var(--pt-ink); font-size: 13px; font-weight: 700; text-decoration: none;
}
.md-cta:hover { border-color: var(--pt-green); background: var(--pt-green-50); }

.md-rank-list li { grid-template-columns: minmax(0, 1fr) auto; }
.md-rank-list .md-share { grid-row: 2; }
.md-rank-sub { grid-column: 1 / -1; font-size: 12px; color: var(--pt-muted); font-variant-numeric: tabular-nums; }
.md-rank-pct.is-good { color: var(--pt-green-700); }
.md-rank-pct.is-bad { color: #b91c1c; }

.md-kpi-value { font-size: clamp(20px, 1.9vw, 28px); overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .md-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .md-hero { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .md-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--pt-line-soft); }
  .md-hero-stats > div:last-child { grid-column: 1 / -1; }
  .md-stack-legend { grid-template-columns: minmax(0, 1fr); }
}

/* Which side of the business: a segmented switch in the period bar — three
   choices only, each at least 44px high (48px under a thumb). */
.md-scope { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--pt-line-soft); border: 1px solid var(--pt-line); }
.md-scope-btn {
  min-height: 44px; padding: 4px 18px; border: 0; border-radius: 9px; background: none;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--pt-slate); cursor: pointer; white-space: nowrap;
}
.md-scope-btn:hover { color: var(--pt-ink); }
.md-scope-btn.is-on { background: #fff; color: var(--pt-hero-1); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
@media (max-width: 720px) {
  .md-scope { grid-column: 1 / -1; order: 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md-scope-btn { min-height: 48px; font-size: 14px; }
}

/* --- the company: one total, then a card a side ----------------------------
   The card is the button (Fitts): the whole of it opens that side, so the
   target is as large as the card and nothing small has to be aimed at. */
.md-block--company { display: grid; gap: 14px; }
.md-block--company .md-hero { grid-template-columns: minmax(0, 1fr) minmax(220px, auto); }
.md-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.md-side {
  display: grid; align-content: start; gap: 6px; min-height: 220px; padding: 20px 22px 16px;
  border: 1px solid var(--pt-line); border-radius: 18px; background: #fff; color: var(--pt-ink);
  font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -16px rgba(15, 23, 42, 0.18);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.md-side:hover { border-color: var(--pt-green); box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 28px -14px rgba(15, 23, 42, 0.25); }
.md-side:focus-visible { outline: 3px solid var(--pt-green); outline-offset: 2px; }
.md-side:active { transform: scale(0.99); }
.md-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.md-side-title { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.md-side-label { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--pt-slate); }
.md-side-value {
  font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere;
}
.md-side-value small { margin-left: 6px; font-size: 0.45em; font-weight: 700; color: var(--pt-muted); }
.md-side-empty, .md-side-of { font-size: 13px; color: var(--pt-slate); font-variant-numeric: tabular-nums; }
.md-side .md-share { margin: 8px 0 2px; }
.md-side-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 4px; }
.md-side-stats > span { display: inline-flex; align-items: baseline; gap: 6px; }
.md-side-stats b { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 17px; }
.md-side-stats b.is-good { color: var(--pt-green-700); }
.md-side-stats b.is-warn { color: #b45309; }
.md-side-stats small { font-size: 12px; color: var(--pt-muted); }
.md-side-more {
  display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 12px;
  min-height: 44px; border-top: 1px solid var(--pt-line-soft); font-size: 14px; font-weight: 800; color: var(--pt-green-700);
}
.md-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md-team-list li { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 720px) {
  .md-sides { grid-template-columns: minmax(0, 1fr); }
  .md-side { min-height: 0; padding: 18px 16px 12px; }
  .md-block--company .md-hero { grid-template-columns: minmax(0, 1fr); }
  .md-kpis--3 { grid-template-columns: minmax(0, 1fr); }
}
