/*
 * megatel-partners-20261127c.css — Megatel Channel Partners section: Partners, Price books, Settlements (lists + detail pages).
 * Owner 2026-11-27: "fix the ui structure there written in the wallet".
 *
 * The page is ATC's shared Partners.jsx shown inside the Megatel shell. Its
 * hero KpiCards give the text column ~140px at common laptop widths, so the
 * 30px "₹50,000.00" overflowed and was clipped, and the stretching label row
 * left the four numbers at four different heights.
 *
 * Scoped by the ACTIVE Megatel sidebar link /megatel/partners, so ATC's own
 * Partners page is untouched. CSS only. /assets is immutable: to change this
 * file, RENAME it and repoint the <link> in index.html.
 */

/* the text column of each hero KPI card */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main [class*="shadow-e2-sheen"] > .flex-1.min-w-0.flex.flex-col {
  justify-content: flex-start;
}

/* label row: fixed height for up to three short lines, no longer stretches,
   so every card's number starts on the same line */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main [class*="shadow-e2-sheen"] > .flex-1.min-w-0.flex.flex-col > .flex-1.flex.items-start {
  flex: 0 0 auto;
  min-height: 42px;
}

/* the number: scales with the window and never runs out of the card */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main [class*="shadow-e2-sheen"] p.font-extrabold.tabular-nums {
  font-size: clamp(20px, 1.75vw, 30px);
  line-height: 1.15;
  margin-top: 10px;
  white-space: nowrap;
  max-width: 100%;
}

/* sub-text sits under the number with a little air */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main [class*="shadow-e2-sheen"] p.font-extrabold.tabular-nums + * {
  margin-top: 8px;
}

/* table status / payment-mode pills: compact enough to fit their column
   ("Prepaid wallet" was cut to "Prepaid wallet." by the cell's ellipsis) */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main table td span.rounded-full.whitespace-nowrap {
  font-size: 11px;
  padding-left: 7px;
  padding-right: 7px;
  letter-spacing: -0.005em;
}
/* …and a pill is never cut by the cell's ellipsis: it may use the cell's
   own side padding, which is blank space anyway */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main table td.truncate:has(span.rounded-full.whitespace-nowrap) {
  overflow: visible;
  text-overflow: clip;
  padding-left: 6px;
  padding-right: 6px;
}

/* page header (list + partner detail): the action buttons used to squeeze the
   title to zero width ("LCO-D…") and push the page sideways; now the title
   keeps a usable width and the buttons wrap under it when space runs out */
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main .mg-page > div > div.flex.flex-col.gap-3:first-child {
  flex-wrap: wrap;
  row-gap: 12px;
}
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main .mg-page > div > div.flex.flex-col.gap-3:first-child > div.flex.items-start.gap-3.min-w-0 {
  flex: 1 1 340px;
}
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main .mg-page > div > div.flex.flex-col.gap-3:first-child > :last-child:not(:first-child) {
  flex: 0 1 auto;
  max-width: 100%;
}
.mg-root .mg-shell:has(a.mg-nav-link.is-active:is([href="/megatel/partners"],[href="/megatel/price-books"],[href="/megatel/partner-settlements"])) .mg-main .mg-page > div > div.flex.flex-col.gap-3:first-child > :last-child:not(:first-child) * {
  flex-wrap: wrap;
}
