/* ============================================================
   Microsoft 365 admin center — portal-specific fidelity styles.
   Every selector is scoped under .px-m365 (page roots + overlay
   bodies + flyout panels get this class from js/portal-m365.js).
   ============================================================ */

.px-m365 { font-family: var(--font-fluent); color: #242424; }
.px-m365 h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.px-m365 .page-desc { font-size: 13px; color: #616161; }

/* ---------------- avatars ---------------- */
.px-m365 .mac-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  user-select: none;
}
.px-m365 .mac-avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.px-m365 .mac-gavatar svg { display: block; }

/* ---------------- toolbar / command bar ---------------- */
.px-m365 .mac-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid #e0e0e0; padding-bottom: 6px; margin-bottom: 2px;
  min-height: 42px;
}
.px-m365 .mac-cmdhost { flex: 1; min-width: 0; }
.px-m365 .cmdbar { border-bottom: none; padding-bottom: 0; margin-bottom: 0; align-items: center; }
.px-m365 .cmd-btn { font-size: 13px; font-weight: 400; padding: 6px 10px; border-radius: 4px; }
.px-m365 .cmd-btn .ci { display: inline-flex; color: #0f6cbd; }
.px-m365 .cmd-btn:hover:not(:disabled) .ci { color: #0c5aa0; }
.px-m365 .mac-more-btn { padding: 6px 8px; }
.px-m365 .mac-more-btn .ci { color: #424242; }
.px-m365 .mac-selchip {
  background: #ebf3fc; color: #0f548c; font-weight: 600; margin-right: 6px;
}
.px-m365 .mac-selchip:hover:not(:disabled) { background: #deecf9; color: #0f548c; }
.px-m365 .mac-selchip .ci { color: #0f548c; }

.px-m365 .mac-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.px-m365 .mac-searchbox {
  display: flex; align-items: center; gap: 7px; width: 230px;
  border: 1px solid #adadad; border-bottom-color: #616161; border-radius: 4px;
  padding: 5px 10px; background: #fff; color: #616161;
}
.px-m365 .mac-searchbox:focus-within { border-bottom: 2px solid #0f6cbd; padding-bottom: 4px; }
.px-m365 .mac-searchbox input {
  border: none; outline: none; flex: 1; min-width: 0; font-size: 13px;
  font-family: var(--font-fluent); background: transparent; color: #242424;
}
.px-m365 .mac-filterchip {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  background: transparent; border: none; border-radius: 4px; padding: 6px 10px;
  font-size: 13px; color: #424242; font-family: var(--font-fluent);
}
.px-m365 .mac-filterchip:hover { background: #f0f0f0; color: #242424; }
.px-m365 .mac-filterchip svg:first-child { color: #0f6cbd; }
.px-m365 .mac-countrow { padding: 8px 2px 0; }
.px-m365 .mac-count { font-size: 12px; color: #616161; }

/* ---------------- data table refinements ---------------- */
.px-m365 .data-table { margin-top: 4px; }
.px-m365 .data-table th { font-size: 12px; font-weight: 600; color: #242424; padding: 8px 10px; }
.px-m365 .data-table td { padding: 7px 10px; font-size: 13px; border-bottom-color: #f0f0f0; }
.px-m365 .data-table tbody tr:hover { background: #f5f5f5; }
.px-m365 .data-table tbody tr.row-selected { background: #ebf3fc; }
.px-m365 .data-table tbody tr.row-selected:hover { background: #deecf9; }
.px-m365 .data-table th:first-child, .px-m365 .data-table td:first-child { width: 30px; padding-right: 0; }
.px-m365 .mac-check { accent-color: #0f6cbd; width: 15px; height: 15px; cursor: pointer; margin: 0; display: block; }
.px-m365 .mac-namecell { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.px-m365 .cell-link { color: #0f6cbd; font-weight: 600; }
.px-m365 .data-table tbody tr:hover .cell-link { text-decoration: underline; }
.px-m365 .mac-upn { color: #424242; }
.px-m365 .mac-warncell { display: inline-flex; align-items: center; gap: 6px; color: #9d5d00; font-weight: 600; }
.px-m365 .mac-status { font-size: 13px; }
.px-m365 .mac-status.is-blocked { color: #c50f1f; font-weight: 600; }
.px-m365 .mac-status.is-ok { color: #424242; }
.px-m365 .mac-healthcell { display: inline-flex; align-items: center; gap: 6px; }
.px-m365 .mac-healthcell svg { color: #107c10; }
.px-m365 .mac-mfa.is-on { color: #424242; }
.px-m365 .mac-mfa.is-off { color: #9d5d00; }
.px-m365 .mac-row-more {
  background: transparent; border: none; border-radius: 4px; padding: 4px 6px;
  color: #616161; display: inline-flex; visibility: hidden;
}
.px-m365 .data-table tbody tr:hover .mac-row-more,
.px-m365 .data-table tbody tr.row-selected .mac-row-more { visibility: visible; }
.px-m365 .mac-row-more:hover { background: #e0e0e0; color: #242424; }
.px-m365 .mac-assigncell { display: inline-flex; align-items: center; gap: 12px; }
.px-m365 .mac-prod-ico {
  width: 28px; height: 28px; border-radius: 4px; background: #ebf3fc; color: #0f6cbd;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* ---------------- pivots (tab strip) ---------------- */
.px-m365 .mac-tabs { display: flex; gap: 2px; border-bottom: 1px solid #e0e0e0; margin: 12px 0 6px; }
.px-m365 .mac-tab {
  position: relative; background: transparent; border: none; padding: 9px 12px 10px;
  font-size: 13.5px; color: #424242; font-family: var(--font-fluent); border-radius: 4px 4px 0 0;
}
.px-m365 .mac-tab:hover { background: #f5f5f5; color: #242424; }
.px-m365 .mac-tab.active { font-weight: 600; color: #242424; }
.px-m365 .mac-tab.active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 3px; border-radius: 3px 3px 0 0; background: #0f6cbd;
}

/* ---------------- info bars ---------------- */
.px-m365 .mac-infobar {
  display: flex; align-items: flex-start; gap: 9px; border-radius: 4px;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.45; margin: 10px 0;
}
.px-m365 .mac-infobar svg { flex: 0 0 auto; margin-top: 1px; }
.px-m365 .mac-infobar-warn { background: #fff4ce; color: #6d4e00; }
.px-m365 .mac-infobar-warn svg { color: #9d5d00; }
.px-m365 .mac-infobar-err { background: #fde7e9; color: #750b1c; }
.px-m365 .mac-infobar-err svg { color: #c50f1f; }
.px-m365 .mac-infobar-ok { background: #dff6dd; color: #0e5c0e; max-width: 720px; }
.px-m365 .mac-infobar-ok svg { color: #107c10; }

/* ---------------- flyout panel (Fluent panel look) ---------------- */
.px-m365.flyout { width: 560px; }
.px-m365 .flyout-head h3 { font-size: 20px; font-weight: 600; }
.px-m365 .flyout-foot { justify-content: flex-start; }
.px-m365 .flyout-foot .btn-primary { border-radius: 4px; }

.px-m365 .mac-uf-head { display: flex; align-items: center; gap: 14px; padding: 2px 0 10px; }
.px-m365 .mac-uf-name { font-size: 19px; font-weight: 600; line-height: 1.25; }
.px-m365 .mac-uf-sub { font-size: 12.5px; color: #424242; margin-top: 2px; }
.px-m365 .mac-uf-sub2 { font-size: 12px; color: #616161; margin-top: 1px; }

.px-m365 .mac-uf-actions {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 0 8px;
  border-bottom: 1px solid #e0e0e0;
}
.px-m365 .mac-uf-actions-tight { border-bottom: none; margin-top: 12px; padding-bottom: 0; }
.px-m365 .mac-act {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: none; border-radius: 4px; padding: 7px 10px;
  font-size: 12.5px; color: #242424; font-family: var(--font-fluent); white-space: nowrap;
}
.px-m365 .mac-act:hover { background: #f0f0f0; }
.px-m365 .mac-act-ico { display: inline-flex; color: #0f6cbd; }

.px-m365 .mac-tabbody { padding-top: 4px; }
.px-m365 .mac-kv { display: flex; gap: 12px; padding: 7px 0; font-size: 13px; }
.px-m365 .mac-kv-l { flex: 0 0 170px; color: #616161; font-size: 12.5px; }
.px-m365 .mac-kv-v { flex: 1; color: #242424; }
.px-m365 .section-label { color: #242424; letter-spacing: .3px; }
.px-m365 .mac-muted { font-size: 12.5px; color: #616161; margin: 6px 0; }

.px-m365 .mac-link-btn {
  background: transparent; border: none; padding: 6px 0; margin-right: 16px;
  color: #0f6cbd; font-size: 13px; font-weight: 600; font-family: var(--font-fluent);
  cursor: pointer; text-align: left;
}
.px-m365 .mac-link-btn:hover { color: #0c5aa0; text-decoration: underline; }
.px-m365 .mac-inline-link { padding: 0; margin-left: 8px; font-weight: 400; font-size: 12.5px; }

.px-m365 .mac-chiplist { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.px-m365 .mac-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 999px; padding: 3px 12px 3px 4px;
}
.px-m365 .mac-chip .mac-avatar { width: 22px; height: 22px; font-size: 9px; }

.px-m365 .mac-licrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 13px; }
.px-m365 .mac-licrow-ico { color: #107c10; display: inline-flex; margin-top: 1px; }
.px-m365 .mac-apps { display: flex; gap: 4px; margin-top: 7px; }
.px-m365 .mac-app {
  width: 22px; height: 22px; border-radius: 4px; color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

.px-m365 .mac-memberlist { margin: 6px 0; max-height: 250px; overflow-y: auto; }
.px-m365 .mac-member { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.px-m365 .mac-member b { font-weight: 600; }

.px-m365 .mac-userchip {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  background: #f5f5f5; border-radius: 6px; padding: 10px 12px; margin: 10px 0 4px;
}
.px-m365 .mac-userchip b { font-weight: 600; }
.px-m365 .mac-panel-note { font-size: 13px; color: #424242; line-height: 1.5; margin: 12px 0 4px; }

.px-m365 .f-check { padding: 4px 0; }
.px-m365 .f-check input, .px-m365 .f-radio input { accent-color: #0f6cbd; }
.px-m365 .mac-lic-label b { font-weight: 600; display: block; }
.px-m365 .mac-lic-label .f-hint { display: block; margin-top: 2px; }
.px-m365 .mac-checkuser { display: flex; align-items: center; gap: 10px; }
.px-m365 .mac-checkuser b { font-weight: 600; display: block; }
.px-m365 .mac-checkuser .f-hint { margin-top: 0; }

.px-m365 .mac-typecard {
  border: 1px solid #d1d1d1; border-radius: 6px; padding: 12px 14px; margin: 8px 0;
  transition: border-color .1s, background .1s;
}
.px-m365 .mac-typecard:hover { border-color: #0f6cbd; background: #f7fbff; }
.px-m365 .mac-typecard-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 6px; background: #ebf3fc; color: #0f6cbd; margin-top: 1px;
}
.px-m365 .mac-typecard b { font-weight: 600; }

/* ---------------- bars ---------------- */
.px-m365 .mac-bar {
  display: inline-block; width: 120px; height: 4px; border-radius: 2px;
  background: #e0e0e0; overflow: hidden; vertical-align: middle;
}
.px-m365 .mac-bar-fill { display: block; height: 100%; background: #0f6cbd; border-radius: 2px; }
.px-m365 .mac-licbar { margin: 10px 0 4px; }
.px-m365 .mac-licbar .mac-bar { width: 100%; display: block; height: 5px; }
.px-m365 .mac-licbar-txt { display: block; font-size: 12px; color: #616161; margin-top: 6px; }

/* ---------------- home ---------------- */
.px-m365.mac-home {
  background: #f5f5f5; margin: -24px -28px -60px; padding: 28px 32px 60px; min-height: 100%;
}
.px-m365 .mac-home-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.px-m365 .mac-home-org { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.px-m365 .mac-home-sub { font-size: 12.5px; color: #616161; margin-top: 3px; }
.px-m365 .mac-home-search {
  display: flex; align-items: center; gap: 8px; width: 340px; max-width: 40vw;
  background: #fff; border: 1px solid #d1d1d1; border-radius: 4px; padding: 7px 12px; color: #616161;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.px-m365 .mac-home-search input {
  border: none; outline: none; flex: 1; min-width: 0; font-size: 13px;
  font-family: var(--font-fluent); background: transparent;
}
.px-m365 .mac-support-search { margin-top: 16px; width: 420px; }

.px-m365 .mac-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.px-m365 .mac-count-card {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: pointer; font-family: var(--font-fluent);
}
.px-m365 .mac-count-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,.1); }
.px-m365 .mac-count-ico {
  width: 34px; height: 34px; border-radius: 8px; background: #ebf3fc; color: #0f6cbd;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.px-m365 .mac-count-num { display: block; font-size: 19px; font-weight: 600; line-height: 1.2; color: #242424; }
.px-m365 .mac-count-lbl { display: block; font-size: 12px; color: #616161; margin-top: 1px; }

.px-m365 .mac-reco {
  background: #fff; border: 1px solid #e6e6e6; border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); margin-bottom: 16px; overflow: hidden;
}
.px-m365 .mac-reco-head {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: transparent; border: none; padding: 13px 16px; font-size: 13.5px;
  font-family: var(--font-fluent); color: #242424;
}
.px-m365 .mac-reco-head:hover { background: #fafafa; }
.px-m365 .mac-reco-headchev { display: inline-flex; color: #616161; transition: transform .12s; }
.px-m365 .mac-reco-head .mac-reco-sub { margin-left: auto; }
.px-m365 .mac-reco-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: transparent; border: none; border-top: 1px solid #f0f0f0;
  padding: 11px 16px; font-family: var(--font-fluent); color: #242424;
}
.px-m365 .mac-reco-row:hover { background: #f5f9fd; }
.px-m365 .mac-reco-ico {
  width: 30px; height: 30px; border-radius: 6px; background: #ebf3fc; color: #0f6cbd;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.px-m365 .mac-reco-ico.is-done { background: #dff6dd; color: #107c10; }
.px-m365 .mac-reco-txt { flex: 1; min-width: 0; font-size: 13px; }
.px-m365 .mac-reco-txt b { display: block; font-weight: 600; }
.px-m365 .mac-reco-sub { display: block; font-size: 11.5px; color: #616161; margin-top: 1px; font-weight: 400; }
.px-m365 .mac-reco-chev { display: inline-flex; color: #616161; }

.px-m365 .mac-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.px-m365 .mac-cards-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 14px; }
.px-m365 .mac-card {
  background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; padding: 18px 18px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); display: flex; flex-direction: column;
}
.px-m365 .mac-card-dim { opacity: .78; }
.px-m365 .mac-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.px-m365 .mac-card-head h3 { font-size: 14px; font-weight: 600; }
.px-m365 .mac-card-ico {
  width: 30px; height: 30px; border-radius: 6px; background: #ebf3fc; color: #0f6cbd;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.px-m365 .mac-ac-ico {
  width: 30px; height: 30px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.px-m365 .mac-card p { font-size: 12.5px; color: #616161; line-height: 1.5; flex: 1; }
.px-m365 .mac-card-links { display: flex; flex-wrap: wrap; margin-top: 10px; border-top: 1px solid #f0f0f0; padding-top: 4px; }
.px-m365 .mac-healthline {
  display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  color: #107c10; margin-bottom: 6px;
}
.px-m365 .mac-stat { padding: 16px 18px; }
.px-m365 .mac-stat .mac-count-num { font-size: 24px; }

/* ---------------- wizard stepper (Add domain) ---------------- */
.px-m365 .mac-steps {
  display: flex; align-items: center; gap: 20px; margin: 2px 0 14px;
  border-bottom: 1px solid #e0e0e0; padding-bottom: 12px;
}
.px-m365 .mac-step { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #616161; white-space: nowrap; }
.px-m365 .mac-step-num {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid #adadad; color: #616161;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.px-m365 .mac-step.active { color: #242424; font-weight: 600; }
.px-m365 .mac-step.active .mac-step-num { background: #0f6cbd; border-color: #0f6cbd; color: #fff; }
.px-m365 .mac-step.done { color: #242424; }
.px-m365 .mac-step.done .mac-step-num { background: #dff6dd; border-color: #107c10; color: #107c10; }

/* ---------------- DNS record table (domain verification) ---------------- */
.px-m365 .mac-dnstable {
  width: 100%; border-collapse: collapse; margin: 8px 0 4px;
  border: 1px solid #e0e0e0; border-radius: 4px; font-size: 12.5px;
}
.px-m365 .mac-dnstable th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: #616161;
  padding: 7px 12px; background: #fafafa; border-bottom: 1px solid #e0e0e0;
}
.px-m365 .mac-dnstable td { padding: 9px 12px; color: #242424; border-bottom: 1px solid #f0f0f0; }
.px-m365 .mac-dnstable tr:last-child td { border-bottom: none; }
.px-m365 .mac-mono {
  font-family: Consolas, 'SF Mono', Menlo, monospace; font-size: 12px;
  background: #f5f5f5; border-radius: 3px; padding: 2px 7px;
}

/* ---------------- empty states ---------------- */
.px-m365 .mac-empty { text-align: center; padding: 64px 20px; color: #616161; }
.px-m365 .mac-empty-ico {
  width: 72px; height: 72px; border-radius: 50%; background: #f0f6fc; color: #0f6cbd;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.px-m365 .mac-empty h2 { font-size: 16px; font-weight: 600; color: #242424; margin-bottom: 6px; }
.px-m365 .mac-empty p { font-size: 13px; max-width: 380px; margin: 0 auto; line-height: 1.5; }

/* ---------------- reset password result panel ---------------- */
.px-m365 .mac-pw-done { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 10px; }
.px-m365 .mac-pw-done-ico { color: #107c10; display: inline-flex; margin-top: 2px; }
.px-m365 .mac-pw-done-title { font-size: 16px; font-weight: 600; color: #242424; }
.px-m365 .mac-pw-box { display: flex; gap: 8px; margin: 6px 0 8px; align-items: stretch; }
.px-m365 .mac-pw-input {
  flex: 1; min-width: 0;
  font-family: Consolas, 'SF Mono', Menlo, monospace; font-size: 16px; letter-spacing: 1.5px;
  padding: 8px 12px; border: 1px solid #d1d1d1; border-radius: 4px;
  background: #faf9f8; color: #242424;
}
.px-m365 .mac-pw-input:focus { outline: 2px solid #0f6cbd; border-color: transparent; }
.px-m365 .mac-copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #0f6cbd;
  padding: 0 14px; border: 1px solid #d1d1d1; border-radius: 4px;
  background: #fff; cursor: pointer; white-space: nowrap;
}
.px-m365 .mac-copy-btn:hover { background: #f5f5f5; color: #0c5aa0; }

/* ---------------- Copilot page ---------------- */
.px-m365 .mac-copilot-hero {
  display: flex; gap: 16px; align-items: flex-start;
  background: linear-gradient(105deg, #eef4fe 0%, #f6effc 55%, #fdf0f7 100%);
  border: 1px solid #e3e3ef; border-radius: 8px;
  padding: 20px 22px; margin: 4px 0 20px; max-width: 980px;
}
.px-m365 .mac-copilot-ico {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f6cbd, #8331a7); color: #fff;
}
.px-m365 .mac-copilot-hero h3 { font-size: 15px; font-weight: 600; color: #242424; margin-bottom: 6px; }
.px-m365 .mac-copilot-hero p { font-size: 13px; color: #424242; line-height: 1.55; max-width: 760px; }
