.mgr-master { --mgr-line: rgba(148, 163, 184, 0.2); --mgr-violet: rgba(167, 139, 250, 0.45); --mgr-cyan: rgba(56, 189, 248, 0.35); }
.mgr-hero-tools {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.mgr-hero-tools .mgr-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.86rem; font-weight: 700;
  background: rgba(109, 40, 217, 0.15); border: 1px solid var(--mgr-violet); color: #e9d5ff;
}
.mgr-search {
  display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 200px; max-width: 420px;
  background: rgba(15, 23, 42, 0.65); border: 1px solid var(--mgr-line); border-radius: 12px; padding: 0.35rem 0.65rem;
}
.mgr-search input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: #f1f5f9; font-size: 0.95rem; outline: none;
}
.mgr-search svg { flex-shrink: 0; opacity: 0.55; color: #94a3b8; }
.mgr-shell {
  border-radius: 16px; border: 1px solid var(--mgr-line);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.55));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.mgr-tbl-wrap { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mgr-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; min-width: 1000px; }
.mgr-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: rgba(15, 23, 42, 0.97); border-bottom: 1px solid var(--mgr-line);
  text-align: left; padding: 0.65rem 0.5rem; font-weight: 800; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; white-space: nowrap;
}
.mgr-table tbody td { padding: 0.55rem 0.5rem; border-bottom: 1px solid rgba(148, 163, 184, 0.1); vertical-align: middle; }
.mgr-table tbody tr.mgr-main-row:hover td { background: rgba(56, 189, 248, 0.05); }
.mgr-table th.sortable { cursor: pointer; user-select: none; }
.mgr-table th.sortable .mgr-sort-ico {
  display: inline-block; min-width: 1em; margin-left: 0.25rem; font-size: 0.72rem; opacity: 0.4; font-weight: 900;
}
.mgr-table th.sortable.is-sorted { color: #e2e8f0; }
.mgr-table th.sortable.is-sorted .mgr-sort-ico { opacity: 1; color: #7dd3fc; }
.mgr-expand:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65); outline-offset: 2px;
}
.mgr-expand {
  width: 2rem; height: 2rem; padding: 0; border-radius: 10px; border: 1px solid var(--mgr-line);
  background: rgba(15, 23, 42, 0.8); color: #cbd5e1; cursor: pointer; display: inline-grid; place-items: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mgr-expand:hover { border-color: var(--mgr-cyan); color: #7dd3fc; }
.mgr-expand[aria-expanded="true"] { background: rgba(56, 189, 248, 0.12); border-color: var(--mgr-cyan); color: #38bdf8; }
.mgr-expand i { transition: transform 0.2s ease; }
.mgr-expand[aria-expanded="true"] i { transform: rotate(90deg); }
.mgr-team-cell { display: flex; align-items: center; gap: 0.5rem; }
.mgr-team-cell img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; background: rgba(255, 255, 255, 0.06); }
.mgr-team-cell a { color: #f1f5f9; text-decoration: none; font-weight: 700; }
.mgr-team-cell a:hover { text-decoration: underline; color: #fff; }
.mgr-table td.mgr-col-identity { min-width: 11rem; max-width: 18rem; vertical-align: middle; }
.mgr-card-identity { min-width: 0; flex: 1; }
.mgr-card-identity .xg-mgr-identity { max-width: 100%; }
.mgr-main-row.over-cap td.mgr-col-wages { color: #fca5a5; font-weight: 700; }
.mgr-detail-row { display: none; }
.mgr-detail-row.is-open { display: table-row; }
.mgr-detail-row td {
  background: rgba(15, 23, 42, 0.75); border-bottom: 1px solid var(--mgr-line);
  padding: 1rem 0.85rem; vertical-align: top;
}
.mgr-detail-inner {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .mgr-detail-inner { grid-template-columns: 1fr 1fr; }
}
.mgr-detail-panel {
  border-radius: 12px; border: 1px solid var(--mgr-line); padding: 0.85rem 1rem;
  background: rgba(30, 41, 59, 0.45);
}
.mgr-detail-panel h4 {
  margin: 0 0 0.65rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: #94a3b8; font-weight: 800;
}
.mgr-struct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.45rem 0.75rem; }
.mgr-struct-pill {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.55rem; border-radius: 10px; font-size: 0.86rem;
  background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(148, 163, 184, 0.15);
}
.mgr-struct-pill span:first-child { color: #94a3b8; }
.mgr-struct-pill strong { font-variant-numeric: tabular-nums; color: #fde68a; }
.mgr-balance-big { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #86efac; }
.mgr-balance-big.neg { color: #fca5a5; }
.mgr-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mgr-links a {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.7rem; border-radius: 10px;
  font-size: 0.86rem; font-weight: 700; text-decoration: none; border: 1px solid var(--mgr-line); color: #e2e8f0;
  background: rgba(15, 23, 42, 0.5);
}
.mgr-links a:hover { border-color: var(--mgr-cyan); color: #7dd3fc; }
.mgr-footnote { margin-top: 0.85rem; font-size: 0.86rem; color: #94a3b8; line-height: 1.45; }
/* Card markup kept for backwards compatibility; layout is table-only (same as tablet/desktop). */
.mgr-cards { display: none; gap: 0.75rem; }
.mgr-card {
  border-radius: 14px; border: 1px solid var(--mgr-line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.5));
  padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.mgr-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.mgr-card .mgr-expand { flex-shrink: 0; }
.mgr-card-row { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }
.mgr-card-row .lbl { color: #94a3b8; font-size: 0.82rem; }
.mgr-card-detail { display: none; margin-top: 0.35rem; padding-top: 0.75rem; border-top: 1px dashed var(--mgr-line); }
.mgr-card-detail.is-open { display: block; }
.mgr-card.over-cap .mgr-card-row.wages .val { color: #fca5a5; font-weight: 700; }
.mgr-filter-empty {
  text-align: center; padding: 1.75rem 1rem; color: #94a3b8; font-size: 0.95rem;
  border-top: 1px solid var(--mgr-line); background: rgba(15, 23, 42, 0.35);
}
.mgr-filter-empty p { margin: 0 0 0.75rem; }
.mgr-clear-filter {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.85rem;
  border-radius: 10px; border: 1px solid var(--mgr-line); background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}
.mgr-clear-filter:hover { border-color: var(--mgr-cyan); color: #7dd3fc; }
.mgr-clear-filter:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 2px;
}
