/* ============================================================
   Exchange admin center — scoped portal styles (.px-exchange)
   Modern EAC (2024/2025): near-black M365 suite header (set via
   the portal registration color, #1b1a19), light shell, Fluent
   type. EAC-teal (#0f6a53) is kept as the in-portal accent for
   icons, pills, and shared-mailbox markers.
   ============================================================ */

/* ---------- icons ---------- */
.px-exchange.px-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.px-exchange.px-ico svg { width: 16px; height: 16px; display: block; }
.px-exchange .cmd-btn .ci .px-ico svg { width: 15px; height: 15px; }

/* ---------- page frame ---------- */
.px-exchange.px-page { max-width: 1120px; font-family: var(--font-fluent); }
.px-exchange.px-page h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 4px; color: #242424; }
.px-exchange .px-h2 { font-size: 16px; font-weight: 600; margin: 30px 0 12px; color: #242424; }
.px-exchange .page-desc { color: #616161; font-size: 13px; line-height: 1.55; max-width: 760px; margin-bottom: 16px; }

.px-exchange .px-crumbs { display: flex; align-items: center; gap: 7px; font-size: 12px; margin: 2px 0 12px; color: #616161; }
.px-exchange .px-crumb { color: #0f6cbd; cursor: default; }
.px-exchange .px-crumb.current { color: #616161; }
.px-exchange .px-crumb-sep { color: #9d9d9d; font-size: 11px; }

/* ---------- command bar refinements ---------- */
.px-exchange .cmdbar { border-bottom: 1px solid #e6e6e6; padding-bottom: 6px; margin-bottom: 6px; }
.px-exchange .cmd-btn { border-radius: 4px; font-size: 13.5px; padding: 7px 11px; }
.px-exchange .cmd-btn .ci { color: #0f6cbd; display: inline-flex; }

/* ---------- list bar (count / search / filter) ---------- */
.px-exchange .px-listbar { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; min-height: 32px; }
.px-exchange .px-count { font-size: 12.5px; color: #616161; }
.px-exchange .px-listbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.px-exchange .px-search {
  display: flex; align-items: center; gap: 7px; background: #fff;
  border: 1px solid #adadad; border-bottom-color: #616161; border-radius: 4px;
  padding: 5px 10px; width: 260px; color: #616161;
}
.px-exchange .px-search:focus-within { outline: 2px solid #0f6cbd; outline-offset: -1px; }
.px-exchange .px-searchin {
  border: none; outline: none; background: transparent; flex: 1; min-width: 0;
  font-family: var(--font-fluent); font-size: 13px; color: #242424;
}

/* ---------- buttons (scoped) ---------- */
.px-exchange .px-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid #d1d1d1; border-radius: 4px;
  padding: 6px 13px; font-family: var(--font-fluent); font-size: 13px; font-weight: 600;
  color: #242424; cursor: pointer;
}
.px-exchange .px-btn:hover { background: #f5f5f5; border-color: #c7c7c7; }
.px-exchange .px-btn-quiet { border-color: transparent; font-weight: 400; color: #424242; }
.px-exchange .px-btn-quiet:hover { background: #f0f0f0; border-color: transparent; }
.px-exchange .px-btn-primary { background: #0f6cbd; border-color: #0f6cbd; color: #fff; margin: 2px 0 4px; }
.px-exchange .px-btn-primary:hover { background: #115ea3; border-color: #115ea3; }
.px-exchange .px-link {
  background: none; border: none; padding: 0; margin-top: 12px;
  font-family: var(--font-fluent); font-size: 13px; font-weight: 600; color: #0f6cbd; cursor: pointer;
  text-align: left;
}
.px-exchange .px-link:hover { text-decoration: underline; color: #115ea3; }

/* ---------- home dashboard ---------- */
.px-exchange .px-home-head { margin-bottom: 6px; }
.px-exchange .px-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 14px; margin-top: 14px;
}
.px-exchange .px-card {
  background: #fff; border: 1px solid #e6e6e6; border-radius: 8px;
  padding: 16px 18px 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  display: flex; flex-direction: column; align-items: flex-start;
}
.px-exchange .px-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 2px; }
.px-exchange .px-card-head h3 { font-size: 14px; font-weight: 600; color: #242424; }
.px-exchange .px-card-ico { color: #0f6a53; }
.px-exchange .px-card-ico svg { width: 18px; height: 18px; }
.px-exchange .px-card-sub { font-size: 12px; color: #616161; line-height: 1.45; }
.px-exchange .px-stat { font-size: 30px; font-weight: 600; color: #242424; margin: 8px 0 2px; line-height: 1; }
.px-exchange .px-link:last-child { margin-top: auto; padding-top: 12px; }

/* mail flow summary — single-hue labeled bars */
.px-exchange .px-flow { width: 100%; margin: 12px 0 2px; display: flex; flex-direction: column; gap: 9px; }
.px-exchange .px-flow-row { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 8px; }
.px-exchange .px-flow-label { font-size: 11.5px; color: #616161; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-exchange .px-flow-track { height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; }
.px-exchange .px-flow-bar { height: 100%; background: #0f6cbd; border-radius: 3px; }
.px-exchange .px-flow-val { font-size: 11.5px; font-weight: 600; color: #242424; text-align: right; font-variant-numeric: tabular-nums; }

/* recommended-for-you banners */
.px-exchange .px-reco-list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.px-exchange .px-reco {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; padding: 14px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.px-exchange .px-reco-ico {
  width: 38px; height: 38px; border-radius: 8px; background: #e7f4f0; color: #0f6a53;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.px-exchange .px-reco-ico svg { width: 20px; height: 20px; }
.px-exchange .px-reco-body { flex: 1; min-width: 0; }
.px-exchange .px-reco-body h4 { font-size: 13.5px; font-weight: 600; color: #242424; margin-bottom: 2px; }
.px-exchange .px-reco-body p { font-size: 12.5px; color: #616161; line-height: 1.45; }
.px-exchange .px-reco .px-btn { flex: 0 0 auto; }

/* ---------- data table refinements ---------- */
.px-exchange .data-table th { color: #242424; font-weight: 600; padding: 8px 12px; }
.px-exchange .data-table td { padding: 9px 12px; color: #242424; }
.px-exchange .px-mbtable td:first-child, .px-exchange .px-mbtable th:first-child { width: 34px; padding-right: 2px; }
.px-exchange .px-rowcheck { width: 15px; height: 15px; accent-color: #0f6cbd; cursor: pointer; display: block; }
.px-exchange .px-rtype { color: #424242; }
.px-exchange .px-rtype.shared::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #0f6a53; margin-right: 7px; vertical-align: 1px;
}
.px-exchange .cell-sub { margin-top: 2px; max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- toggle switch ---------- */
.px-exchange .px-toggle {
  position: relative; width: 40px; height: 20px; flex: 0 0 auto;
  border: 1px solid #616161; border-radius: 10px; background: #fff; cursor: pointer; padding: 0;
  transition: background .12s, border-color .12s;
}
.px-exchange .px-toggle .px-knob {
  position: absolute; top: 2px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #616161; transition: left .12s, background .12s;
}
.px-exchange .px-toggle.on { background: #0f6cbd; border-color: #0f6cbd; }
.px-exchange .px-toggle.on .px-knob { left: 21px; background: #fff; }
.px-exchange .px-toggle:hover { border-color: #424242; }
.px-exchange .px-toggle.on:hover { background: #115ea3; border-color: #115ea3; }
.px-exchange .px-status-cell { display: flex; align-items: center; gap: 9px; }
.px-exchange .px-status-txt { font-size: 12.5px; color: #616161; }

/* ---------- tabs (flyout + page) ---------- */
.px-exchange .px-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e6e6e6; margin: 14px 0 12px; }
.px-exchange .px-tabs-page { margin-top: 16px; }
.px-exchange .px-tab {
  position: relative; background: none; border: none; padding: 9px 12px 10px;
  font-family: var(--font-fluent); font-size: 13.5px; color: #424242; cursor: pointer; border-radius: 4px 4px 0 0;
}
.px-exchange .px-tab:hover { background: #f5f5f5; color: #242424; }
.px-exchange .px-tab.active { font-weight: 600; color: #242424; }
.px-exchange .px-tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 3px; border-radius: 2px 2px 0 0; background: #0f6cbd;
}

/* ---------- flyout content ---------- */
.px-exchange.px-fly { font-family: var(--font-fluent); }
.px-exchange .px-fly-note { margin: 8px 0 4px; color: #616161; font-size: 13px; line-height: 1.55; }
.px-exchange .px-fly-id { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; }
.px-exchange .px-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #0f6cbd; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; flex: 0 0 auto; letter-spacing: .02em;
}
.px-exchange .px-avatar.shared { background: #0f6a53; }
.px-exchange .px-avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.px-exchange .px-fly-name { font-size: 15px; font-weight: 600; color: #242424; }
.px-exchange .px-fly-mail { font-size: 12.5px; color: #616161; margin-top: 1px; }

.px-exchange .px-dsec { padding: 14px 0 16px; border-bottom: 1px solid #f0f0f0; }
.px-exchange .px-dsec:last-child { border-bottom: none; }
.px-exchange .px-dsec h4 { font-size: 13.5px; font-weight: 600; color: #242424; margin-bottom: 3px; }
.px-exchange .px-dsec p { font-size: 13px; color: #242424; line-height: 1.5; }
.px-exchange .px-dsec-sub { font-size: 12px !important; color: #616161 !important; margin-bottom: 10px; }
.px-exchange .px-dim { color: #757575; font-size: 13px; }

.px-exchange .px-members { display: flex; flex-direction: column; gap: 8px; }
.px-exchange .px-member { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #242424; }

.px-exchange .px-rule-status {
  display: flex; align-items: center; gap: 10px; margin: 10px 0 4px;
  font-size: 13px; color: #242424;
}
.px-exchange .px-rulesec { margin-top: 18px; }
.px-exchange .px-rulesec h4 { font-size: 13px; font-weight: 600; color: #242424; margin-bottom: 6px; }
.px-exchange .px-at { color: #616161; font-size: 13px; }

/* ---------- mailbox setting status lines (forwarding / litigation hold) ---------- */
.px-exchange .px-mfstat { display: inline-flex; align-items: center; font-size: 13px; color: #616161; }
.px-exchange .px-mfstat::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #9d9d9d; margin-right: 8px; flex: 0 0 auto;
}
.px-exchange .px-mfstat.on { color: #242424; font-weight: 600; }
.px-exchange .px-mfstat.on::before { background: #0f7b6c; }

/* ---------- convert-to-shared confirm dialog ---------- */
.px-exchange .px-confirm-list { margin: 10px 0 4px; padding-left: 20px; }
.px-exchange .px-confirm-list li { font-size: 13px; color: #424242; line-height: 1.5; margin-bottom: 8px; }
.px-exchange .px-confirm-list li:last-child { margin-bottom: 0; }

/* ---------- email authentication (DKIM) ---------- */
.px-exchange .px-dkim-status {
  display: flex; align-items: center; gap: 10px; margin: 10px 0 4px;
  font-size: 13px; color: #242424;
}
.px-exchange .px-cname {
  background: #f7f7f7; border: 1px solid #e6e6e6; border-radius: 6px;
  padding: 9px 12px; margin-bottom: 8px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
.px-exchange .px-cname:last-child { margin-bottom: 0; }
.px-exchange .px-cname-host { font-size: 12px; font-weight: 600; color: #242424; word-break: break-all; }
.px-exchange .px-cname-val { font-size: 11.5px; color: #616161; margin-top: 3px; word-break: break-all; }

/* ---------- message trace results ---------- */
.px-exchange .px-tracebox { margin-top: 20px; }
.px-exchange .px-trace-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.px-exchange .px-trace-sub { font-size: 12.5px; color: #616161; }
.px-exchange .px-trace-running {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 8px;
  padding: 22px 18px; font-size: 13px; color: #424242;
}
.px-exchange .px-spin {
  width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid #d1d1d1; border-top-color: #0f6cbd;
  animation: busySpin .8s linear infinite;
}

/* ---------- empty / placeholder pages ---------- */
.px-exchange .px-empty { padding: 60px 20px; text-align: center; color: #616161; }
.px-exchange .px-empty-sm { padding: 40px 20px; }
.px-exchange .px-empty-ico {
  width: 52px; height: 52px; border-radius: 50%; background: #f0f4f3; color: #0f6a53;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.px-exchange .px-empty-ico svg { width: 24px; height: 24px; }
.px-exchange .px-empty h2 { font-size: 16px; font-weight: 600; color: #242424; margin-bottom: 6px; }
.px-exchange .px-empty p { font-size: 13px; line-height: 1.55; max-width: 440px; margin: 0 auto; }
