/* ==========================================================================
   Microsoft 365 Admin Center — Fluent UI clone theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fluent design tokens (CSS custom properties)
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --fluent-brand-primary: #0078d4;
  --fluent-brand-primary-hover: #106ebe;
  --fluent-brand-primary-pressed: #005a9e;
  --fluent-brand-primary-tint-10: #deecf9;
  --fluent-brand-primary-tint-20: #c7e0f4;
  --fluent-brand-primary-tint-40: #2b88d8;
  --fluent-brand-primary-tint-60: #004578;

  /* Neutral backgrounds */
  --fluent-neutral-background-1: #ffffff;
  --fluent-neutral-background-2: #faf9f8;
  --fluent-neutral-background-3: #f3f2f1;
  --fluent-neutral-background-4: #edebe9;
  --fluent-neutral-background-5: #e1dfdd;
  --fluent-neutral-background-6: #d2d0ce;

  /* Neutral foreground */
  --fluent-neutral-foreground-1: #323130;
  --fluent-neutral-foreground-2: #605e5c;
  --fluent-neutral-foreground-3: #a19f9d;
  --fluent-neutral-foreground-disabled: #c8c6c4;

  /* Stroke / border */
  --fluent-neutral-stroke-1: #edebe9;
  --fluent-neutral-stroke-2: #e1dfdd;
  --fluent-neutral-stroke-accessible: #8a8886;
  --fluent-neutral-stroke-focus: #0078d4;

  /* Semantic */
  --fluent-success: #107c10;
  --fluent-success-bg: #dff6dd;
  --fluent-warning: #797775;
  --fluent-warning-accent: #ffb900;
  --fluent-warning-bg: #fff4ce;
  --fluent-danger: #d13438;
  --fluent-danger-bg: #fde7e9;
  --fluent-info-bg: #deecf9;

  /* Layout */
  --fluent-header-height: 48px;
  --fluent-nav-width: 260px;
  --fluent-content-max-width: 1400px;
  --fluent-page-padding-x: 32px;
  --fluent-page-padding-y: 24px;
  --fluent-radius-sm: 2px;
  --fluent-radius-md: 4px;
  --fluent-shadow-card: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  --fluent-shadow-elevated: 0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.11);
  --fluent-font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;

  /* Legacy aliases (backward compatibility) */
  --ms-blue: var(--fluent-brand-primary);
  --ms-blue-dark: var(--fluent-brand-primary-pressed);
  --ms-blue-light: var(--fluent-brand-primary-tint-10);
  --ms-nav-bg: var(--fluent-neutral-background-1);
  --ms-nav-hover: #f3f2f1;
  --ms-nav-active: #eff6fc;
  --ms-border: var(--fluent-neutral-stroke-1);
  --ms-text: var(--fluent-neutral-foreground-1);
  --ms-text-secondary: var(--fluent-neutral-foreground-2);
  --ms-header-height: var(--fluent-header-height);
  --ms-sidebar-width: var(--fluent-nav-width);
  --ms-success: var(--fluent-success);
  --ms-warning: var(--fluent-warning-accent);
  --ms-danger: var(--fluent-danger);
}

/* --------------------------------------------------------------------------
   Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fluent-font-family);
  font-size: 14px;
  line-height: 1.4286;
  color: var(--fluent-neutral-foreground-1);
  background: var(--fluent-neutral-background-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--fluent-brand-primary);
  text-decoration: none;
}

a:hover {
  color: var(--fluent-brand-primary-hover);
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* Fluent icon wrapper */
.ms-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  line-height: 0;
}

.ms-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* --------------------------------------------------------------------------
   Suite header (Microsoft 365 top bar)
   -------------------------------------------------------------------------- */
.ms-suite-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--fluent-header-height);
  padding: 0 12px;
  background: var(--fluent-brand-primary);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.ms-suite-header-grid {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(200px, 1fr) minmax(0, auto);
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: 100%;
}

.ms-suite-left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.ms-suite-center {
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 0 8px;
}

.ms-suite-right {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  justify-content: flex-end;
}

.ms-app-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: var(--fluent-radius-sm);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.1s ease;
}

.ms-app-launcher:hover,
.ms-app-launcher:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.ms-suite-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 4px;
  border-radius: var(--fluent-radius-sm);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
}

.ms-suite-brand:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.ms-suite-brand .ms-icon svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

.ms-suite-brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-suite-search {
  width: 100%;
  max-width: 560px;
}

.ms-suite-search form {
  margin: 0;
}

.ms-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ms-search-input-wrap .ms-icon {
  position: absolute;
  left: 12px;
  color: #605e5c;
  pointer-events: none;
  z-index: 1;
}

.ms-search-input-wrap input[type="search"] {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 40px;
  border: none;
  border-radius: 4px;
  background: #ffffff;
  color: var(--fluent-neutral-foreground-1);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.12s ease;
}

.ms-search-input-wrap input[type="search"]::placeholder {
  color: #605e5c;
}

.ms-search-input-wrap input[type="search"]:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.ms-search-input-wrap input[type="search"]:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 2px 8px rgba(0, 0, 0, 0.16);
}

.ms-tenant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  min-height: 32px;
  padding: 2px 10px 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ms-tenant-chip-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-header-settings {
  margin-left: 2px;
}

.ms-header-utilities {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 6px;
  margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.ms-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--fluent-radius-sm);
  color: #ffffff;
  text-decoration: none;
  transition: background 0.1s ease;
}

.ms-header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.ms-header-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #d13438;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 1px solid var(--fluent-brand-primary);
  pointer-events: none;
}

.ms-me-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  padding: 4px 4px 4px 10px;
  margin-left: 4px;
  border-radius: var(--fluent-radius-sm);
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s ease;
}

.ms-me-control:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  text-decoration: none;
}

.ms-me-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-me-control .ms-persona {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   App shell layout
   -------------------------------------------------------------------------- */
.ms-app-shell {
  display: flex;
  min-height: 100vh;
  padding-top: var(--fluent-header-height);
}

/* --------------------------------------------------------------------------
   Left navigation
   -------------------------------------------------------------------------- */
.ms-left-nav {
  position: fixed;
  top: var(--fluent-header-height);
  left: 0;
  bottom: 0;
  z-index: 1000;
  width: var(--fluent-nav-width);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--fluent-neutral-background-3);
  border-right: 1px solid var(--fluent-neutral-stroke-1);
  padding: 8px 0 12px;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ms-nav-divider {
  height: 1px;
  margin: 8px 16px;
  background: var(--fluent-neutral-stroke-1);
}

.ms-nav-section-label {
  padding: 8px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fluent-neutral-foreground-2);
  letter-spacing: 0.02em;
}

.ms-nav-top,
.ms-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  margin: 1px 8px;
  padding: 0 12px;
  color: var(--fluent-neutral-foreground-1);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  border: none;
  border-radius: var(--fluent-radius-sm);
  background: transparent;
  transition: background 0.1s ease, color 0.1s ease, box-shadow 0.1s ease;
  width: calc(100% - 16px);
  box-sizing: border-box;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.ms-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ms-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-nav-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--fluent-neutral-foreground-2);
  transition: transform 0.15s ease;
}

.ms-nav-item .ms-icon,
.ms-nav-icon .ms-icon {
  color: var(--fluent-neutral-foreground-2);
}

.ms-nav-item:hover,
.ms-nav-group-toggle:hover {
  background: var(--ms-nav-hover);
  color: var(--fluent-neutral-foreground-1);
  text-decoration: none;
}

.ms-nav-item.is-active,
.ms-nav-group.has-active-child > .ms-nav-group-toggle.is-active {
  background: var(--ms-nav-active);
  color: var(--fluent-brand-primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--fluent-brand-primary);
}

.ms-nav-item.is-active .ms-icon,
.ms-nav-group.has-active-child > .ms-nav-group-toggle.is-active .ms-icon,
.ms-nav-group-toggle.is-active .ms-icon {
  color: var(--fluent-brand-primary);
}

.ms-nav-group {
  margin: 0;
}

.ms-nav-group-toggle {
  justify-content: flex-start;
}

.ms-nav-group:not(.is-expanded) .ms-nav-chevron {
  transform: rotate(-90deg);
}

.ms-nav-group:not(.is-expanded) .ms-nav-group-items {
  display: none;
}

.ms-nav-group-items {
  padding: 2px 0 4px;
}

.ms-nav-subitem {
  min-height: 32px;
  padding: 0 12px 0 44px;
  margin: 1px 8px;
  font-size: 14px;
  font-weight: 400;
  gap: 0;
}

.ms-nav-subitem.is-active {
  background: var(--ms-nav-active);
  color: var(--fluent-brand-primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--fluent-brand-primary);
}

.ms-nav-footer {
  margin-top: auto;
  padding: 8px 20px 4px;
}

.ms-nav-footer-link {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--fluent-brand-primary);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ms-nav-footer-link:hover {
  text-decoration: underline;
}

.ms-nav-customize {
  color: var(--fluent-neutral-foreground-2);
}

/* --------------------------------------------------------------------------
   Content area
   -------------------------------------------------------------------------- */
.ms-content-area {
  flex: 1;
  min-width: 0;
  margin-left: var(--fluent-nav-width);
  background: var(--fluent-neutral-background-2);
}

.ms-view-switcher {
  display: flex;
  gap: 0;
  padding: 0 var(--fluent-page-padding-x);
  background: var(--fluent-neutral-background-1);
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
}

.ms-view-tab {
  display: inline-block;
  padding: 12px 16px;
  color: var(--fluent-neutral-foreground-2);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.1s ease, border-color 0.1s ease;
}

.ms-view-tab:hover {
  color: var(--fluent-neutral-foreground-1);
  text-decoration: none;
}

.ms-view-tab.is-active {
  color: var(--fluent-brand-primary);
  font-weight: 600;
  border-bottom-color: var(--fluent-brand-primary);
}

.ms-page-container {
  max-width: var(--fluent-content-max-width);
  padding: var(--fluent-page-padding-y) var(--fluent-page-padding-x) 48px;
}

/* --------------------------------------------------------------------------
   Page header & breadcrumb
   -------------------------------------------------------------------------- */
.ms-page-header {
  margin-bottom: 20px;
}

.ms-page-header h1,
.ms-page-title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--fluent-neutral-foreground-1);
}

.ms-page-header p,
.ms-page-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 12px;
}

.ms-breadcrumb a {
  color: var(--fluent-brand-primary);
  text-decoration: none;
}

.ms-breadcrumb a:hover {
  text-decoration: underline;
}

.ms-breadcrumb-sep {
  color: var(--fluent-neutral-foreground-3);
}

.ms-breadcrumb-current {
  color: var(--fluent-neutral-foreground-2);
}

/* --------------------------------------------------------------------------
   Message bar (Fluent MessageBar)
   -------------------------------------------------------------------------- */
.ms-messagebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: var(--fluent-radius-sm);
  font-size: 14px;
  line-height: 1.4;
}

.ms-messagebar-success,
.ms-messagebar-info {
  background: var(--fluent-success-bg);
  color: var(--fluent-success);
  border: 1px solid #c7e0c7;
}

.ms-messagebar-warning {
  background: var(--fluent-warning-bg);
  color: var(--fluent-warning);
  border: 1px solid #f0e199;
}

.ms-messagebar-danger,
.ms-messagebar-error {
  background: var(--fluent-danger-bg);
  color: var(--fluent-danger);
  border: 1px solid #f1bbbc;
}

.ms-messagebar .btn-close {
  flex-shrink: 0;
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Panels (Fluent cards on dashboard)
   -------------------------------------------------------------------------- */
.ms-panel {
  background: var(--fluent-neutral-background-1);
  border: 1px solid var(--fluent-neutral-stroke-1);
  border-radius: var(--fluent-radius-sm);
  margin-bottom: 16px;
  box-shadow: var(--fluent-shadow-card);
}

.ms-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
}

.ms-panel-header a {
  font-size: 13px;
  white-space: nowrap;
}

.ms-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

.ms-panel-body {
  padding: 16px 20px;
}

.ms-panel-body-flush {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ms-panel-body-flush .ms-details-list,
.ms-panel-body-flush .ms-table {
  min-width: 640px;
}

/* --------------------------------------------------------------------------
   Command bar
   -------------------------------------------------------------------------- */
.ms-command-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 16px;
}

.ms-command-bar-spacer {
  flex: 1;
  min-width: 8px;
}

.ms-command-search,
.ms-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-width: 200px;
  max-width: 320px;
}

.ms-command-search input[type="search"],
.ms-search-box input[type="search"],
.ms-search-box .form-control {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--fluent-neutral-stroke-accessible);
  border-radius: var(--fluent-radius-sm);
  background: var(--fluent-neutral-background-1);
  font-family: inherit;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-1);
  outline: none;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.ms-command-search input[type="search"]:focus,
.ms-search-box input[type="search"]:focus,
.ms-search-box .form-control:focus {
  border-color: var(--fluent-brand-primary);
  box-shadow: 0 0 0 1px var(--fluent-brand-primary);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.ms-btn,
.ms-btn-primary,
.ms-btn-default,
.btn-ms-primary,
.btn-ms-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 16px;
  border-radius: var(--fluent-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.ms-btn-primary,
.btn-ms-primary {
  border: 1px solid var(--fluent-brand-primary);
  background: var(--fluent-brand-primary);
  color: #ffffff;
}

.ms-btn-primary:hover,
.btn-ms-primary:hover {
  border-color: var(--fluent-brand-primary-hover);
  background: var(--fluent-brand-primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.ms-btn-primary:active,
.btn-ms-primary:active {
  border-color: var(--fluent-brand-primary-pressed);
  background: var(--fluent-brand-primary-pressed);
}

.ms-btn-default,
.btn-ms-secondary {
  border: 1px solid var(--fluent-neutral-stroke-accessible);
  background: var(--fluent-neutral-background-1);
  color: var(--fluent-neutral-foreground-1);
}

.ms-btn-default:hover,
.btn-ms-secondary:hover {
  border-color: var(--fluent-neutral-stroke-accessible);
  background: var(--fluent-neutral-background-4);
  color: var(--fluent-neutral-foreground-1);
  text-decoration: none;
}

.ms-btn-default:active,
.btn-ms-secondary:active {
  background: var(--fluent-neutral-background-5);
}

button.ms-btn,
button.ms-btn-primary,
button.ms-btn-default {
  appearance: none;
}

/* --------------------------------------------------------------------------
   Details list (Fluent DetailsList)
   -------------------------------------------------------------------------- */
.ms-details-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ms-details-list thead th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  background: var(--fluent-neutral-background-2);
  color: var(--fluent-neutral-foreground-1);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.ms-details-list tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  vertical-align: middle;
  color: var(--fluent-neutral-foreground-1);
}

.ms-details-list tbody tr {
  cursor: pointer;
  transition: background 0.08s ease;
}

.ms-details-list tbody tr:hover td {
  background: var(--fluent-neutral-background-3);
}

.ms-details-list tbody tr:last-child td {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Persona / person cell
   -------------------------------------------------------------------------- */
.ms-persona {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fluent-brand-primary-tint-10);
  color: var(--fluent-brand-primary);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.ms-persona-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.ms-me-control .ms-persona {
  background: rgba(255, 255, 255, 0.95);
  color: var(--fluent-brand-primary);
}

.ms-person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ms-person-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ms-person-name {
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-person-email {
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Backward compatibility alias */
.ms-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fluent-brand-primary-tint-10);
  color: var(--fluent-brand-primary);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Pills & badges
   -------------------------------------------------------------------------- */
.ms-pill,
.ms-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--fluent-radius-sm);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.ms-pill-success,
.ms-badge-success {
  background: var(--fluent-success-bg);
  color: var(--fluent-success);
}

.ms-pill-warning,
.ms-badge-warning {
  background: var(--fluent-warning-bg);
  color: var(--fluent-warning);
}

.ms-pill-danger,
.ms-badge-danger {
  background: var(--fluent-danger-bg);
  color: var(--fluent-danger);
}

.ms-pill-info,
.ms-badge-info {
  background: var(--fluent-info-bg);
  color: var(--fluent-brand-primary-pressed);
}

/* --------------------------------------------------------------------------
   Home dashboard
   -------------------------------------------------------------------------- */
.ms-home-hero {
  margin-bottom: 24px;
}

/* M365 dashboard home */
.ms-dashboard-header {
  margin-bottom: 24px;
}

.ms-dashboard-greeting {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
}

.ms-dashboard-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-health-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--fluent-warning-bg);
  border: 1px solid #fde7a0;
  border-radius: var(--fluent-radius-sm);
}

.ms-health-banner-icon {
  color: var(--fluent-warning-accent);
  flex-shrink: 0;
}

.ms-health-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.ms-health-banner-text strong {
  font-size: 14px;
}

.ms-health-banner-action {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
}

.ms-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.ms-dash-card {
  background: var(--fluent-neutral-background-1);
  border: 1px solid var(--fluent-neutral-stroke-1);
  border-radius: var(--fluent-radius-sm);
  box-shadow: var(--fluent-shadow-card);
  min-height: 120px;
}

.ms-dash-span-2 {
  grid-column: span 2;
}

.ms-dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}

.ms-dash-card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.ms-dash-card-header a {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ms-dash-card-body {
  padding: 12px 20px 20px;
}

.ms-org-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ms-org-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--fluent-radius-sm);
  background: var(--fluent-brand-primary-tint-10);
  color: var(--fluent-brand-primary);
}

.ms-org-name {
  font-size: 15px;
  font-weight: 600;
}

.ms-org-domain {
  font-size: 13px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-dash-stats-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.ms-dash-stats-inline div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-dash-stats-inline dt {
  margin: 0;
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
  font-weight: 400;
}

.ms-dash-stats-inline dd {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

.ms-dash-big-number {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--fluent-brand-primary);
}

.ms-dash-big-label {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-dash-user-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ms-dash-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--fluent-neutral-stroke-1);
  color: inherit;
  text-decoration: none;
}

.ms-dash-user-row:hover {
  text-decoration: none;
  color: inherit;
  background: var(--fluent-neutral-background-2);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}

.ms-dash-user-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-dash-user-meta {
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-dash-health-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-dash-health-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
}

.ms-dash-health-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-dash-health-status {
  font-size: 12px;
  font-weight: 600;
}

.ms-dash-health-status.is-ok {
  color: var(--fluent-success);
}

.ms-dash-health-status.is-warn {
  color: var(--fluent-warning-accent);
}

.ms-dash-reco-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 4px;
}

.ms-dash-reco-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--fluent-neutral-stroke-1);
  border-radius: var(--fluent-radius-sm);
  background: var(--fluent-neutral-background-2);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.ms-dash-reco-card:hover {
  border-color: var(--fluent-brand-primary-tint-20);
  box-shadow: var(--fluent-shadow-card);
  text-decoration: none;
  color: inherit;
}

.ms-dash-reco-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--fluent-neutral-background-4);
  color: var(--fluent-neutral-foreground-2);
}

.ms-dash-reco-icon.is-done {
  background: var(--fluent-success-bg);
  color: var(--fluent-success);
}

.ms-dash-reco-title {
  font-size: 14px;
  font-weight: 600;
}

.ms-dash-reco-desc {
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
  line-height: 1.4;
}

.ms-dash-reco-arrow {
  position: absolute;
  top: 16px;
  right: 12px;
  color: var(--fluent-neutral-foreground-3);
}

.ms-dash-billing-product {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ms-dash-billing-meta,
.ms-dash-billing-renew,
.ms-dash-billing-invoice {
  font-size: 13px;
  color: var(--fluent-neutral-foreground-2);
  margin-top: 4px;
}

.ms-setup-progress-bar {
  height: 4px;
  margin-bottom: 8px;
  border-radius: 2px;
  background: var(--fluent-neutral-background-4);
  overflow: hidden;
}

.ms-setup-progress-fill {
  height: 100%;
  background: var(--fluent-brand-primary);
  border-radius: 2px;
}

.ms-setup-progress-label {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-dash-message-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
}

.ms-dash-message-item:last-child {
  border-bottom: none;
}

.ms-dash-message-title {
  font-size: 14px;
  font-weight: 600;
}

.ms-dash-message-meta {
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-home-hero h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
}

.ms-home-hero p {
  margin: 0;
  max-width: 640px;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-metrics-row,
.ms-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ms-metric-card,
.ms-stat-tile {
  display: block;
  padding: 16px 20px;
  background: var(--fluent-neutral-background-1);
  border: 1px solid var(--fluent-neutral-stroke-1);
  border-radius: var(--fluent-radius-sm);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--fluent-shadow-card);
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.ms-metric-card:hover {
  border-color: var(--fluent-brand-primary-tint-20);
  box-shadow: var(--fluent-shadow-elevated);
  text-decoration: none;
  color: inherit;
}

.ms-metric-value,
.ms-stat-tile .stat-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--fluent-brand-primary);
}

.ms-metric-label,
.ms-stat-tile .stat-label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.ms-reco-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  color: inherit;
  text-decoration: none;
  transition: background 0.08s ease;
}

.ms-reco-item:last-child {
  border-bottom: none;
}

.ms-reco-item:hover {
  background: var(--fluent-neutral-background-3);
  text-decoration: none;
  color: inherit;
}

.ms-reco-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--fluent-neutral-background-4);
  color: var(--fluent-neutral-foreground-2);
  flex-shrink: 0;
}

.ms-reco-icon.is-done {
  background: var(--fluent-success-bg);
  color: var(--fluent-success);
}

.ms-reco-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ms-reco-title {
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

.ms-reco-desc {
  font-size: 13px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-reco-chevron {
  color: var(--fluent-neutral-foreground-3);
  flex-shrink: 0;
}

/* Health indicators */
.ms-health-dot,
.health-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
  flex-shrink: 0;
}

.ms-health-dot.is-healthy,
.health-dot.healthy {
  background: var(--fluent-success);
}

.ms-health-dot.is-advisory,
.health-dot.advisory {
  background: var(--fluent-warning-accent);
}

.ms-health-dot.is-incident,
.health-dot.incident {
  background: var(--fluent-danger);
}

.ms-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  font-size: 14px;
}

.ms-health-row:last-child {
  border-bottom: none;
}

/* Progress bars / license usage */
.ms-progress-row {
  margin-bottom: 16px;
}

.ms-progress-row:last-child {
  margin-bottom: 0;
}

.ms-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.ms-progress-meta span:first-child {
  color: var(--fluent-neutral-foreground-1);
  font-weight: 600;
}

.ms-progress-meta span:last-child {
  color: var(--fluent-neutral-foreground-2);
}

.ms-progress-bar,
.license-bar {
  height: 8px;
  overflow: hidden;
  border-radius: var(--fluent-radius-md);
  background: var(--fluent-neutral-background-4);
}

.ms-progress-fill,
.license-bar-fill {
  height: 100%;
  border-radius: var(--fluent-radius-md);
  background: var(--fluent-brand-primary);
  transition: width 0.3s ease;
}

/* Setup progress */
.ms-setup-row,
.setup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
}

.ms-setup-row:last-child,
.setup-item:last-child {
  border-bottom: none;
}

.ms-setup-icon,
.setup-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

.ms-setup-icon.is-done,
.setup-check.done {
  background: var(--fluent-success-bg);
  color: var(--fluent-success);
}

.ms-setup-icon.is-pending,
.setup-check.pending {
  background: var(--fluent-neutral-background-4);
  color: var(--fluent-neutral-foreground-2);
}

/* --------------------------------------------------------------------------
   Cards & tables (backward compatibility)
   -------------------------------------------------------------------------- */
.ms-card {
  background: var(--fluent-neutral-background-1);
  border: 1px solid var(--fluent-neutral-stroke-1);
  border-radius: var(--fluent-radius-sm);
  margin-bottom: 16px;
  box-shadow: var(--fluent-shadow-card);
}

.ms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
}

.ms-card-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.ms-card-body {
  padding: 16px 20px;
}

.ms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ms-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  background: var(--fluent-neutral-background-2);
  color: var(--fluent-neutral-foreground-1);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.ms-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  vertical-align: middle;
}

.ms-table tr:hover td {
  background: var(--fluent-neutral-background-3);
}

/* Detail layouts */
.ms-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.ms-property-list dt {
  margin-bottom: 2px;
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-property-list dd {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-1);
}

/* --------------------------------------------------------------------------
   Forms (Bootstrap overrides + Fluent inputs)
   -------------------------------------------------------------------------- */
.form-label,
.ms-form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

.form-control,
.form-select,
.ms-form-input {
  display: block;
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--fluent-neutral-stroke-accessible);
  border-radius: var(--fluent-radius-sm);
  background: var(--fluent-neutral-background-1);
  font-family: inherit;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-1);
  outline: none;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.form-control:focus,
.form-select:focus,
.ms-form-input:focus {
  border-color: var(--fluent-brand-primary);
  box-shadow: 0 0 0 1px var(--fluent-brand-primary);
}

.alert {
  border-radius: var(--fluent-radius-sm);
}

/* --------------------------------------------------------------------------
   Microsoft sign-in page
   -------------------------------------------------------------------------- */
.ms-signin-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f2f2f2;
}

.ms-signin-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.ms-signin-card {
  width: 100%;
  max-width: 440px;
  padding: 44px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ms-signin-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ms-signin-logo .ms-icon svg {
  width: 21px;
  height: 21px;
}

.ms-signin-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

.ms-signin-links {
  margin-top: 24px;
}

.ms-signin-links a {
  font-size: 13px;
  color: var(--fluent-brand-primary);
}

.ms-signin-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-signin-footer a {
  color: var(--fluent-neutral-foreground-2);
  text-decoration: none;
}

.ms-signin-footer a:hover {
  text-decoration: underline;
  color: var(--fluent-neutral-foreground-1);
}

.ms-tenant-login-share .input-group {
  max-width: 100%;
}

.ms-tenant-login-share-compact .input-group {
  min-width: 18rem;
}

.ms-tenant-login-cell {
  min-width: 20rem;
  max-width: 28rem;
}

@media (max-width: 991.98px) {
  .ms-tenant-login-cell {
    min-width: 14rem;
  }
}

/* Legacy login page (access denied) */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  background: #f2f2f2;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  background: #ffffff;
  border-radius: var(--fluent-radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.login-card .login-logo {
  margin-bottom: 32px;
  text-align: center;
}

.login-card .login-logo h1 {
  margin: 8px 0 0;
  font-size: 22px;
  color: var(--fluent-brand-primary);
}

.login-card .login-logo p {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-2);
}

/* --------------------------------------------------------------------------
   Responsive breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .ms-home-grid,
  .ms-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ms-dash-span-2 {
    grid-column: span 2;
  }

  .ms-dash-reco-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  :root {
    --fluent-page-padding-x: 24px;
  }

  .ms-left-nav {
    transform: translateX(-100%);
    box-shadow: var(--fluent-shadow-elevated);
  }

  .ms-left-nav.is-open {
    transform: translateX(0);
  }

  .ms-app-shell.nav-open .ms-left-nav {
    transform: translateX(0);
  }

  .ms-content-area {
    margin-left: 0;
  }

  .ms-suite-header-grid {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .ms-suite-center {
    display: none;
  }

  .ms-tenant-chip {
    max-width: 120px;
  }

  .ms-me-name {
    display: none;
  }

  .ms-detail-grid {
    grid-template-columns: 1fr;
  }

  .ms-me-control span:not(.ms-persona) {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --fluent-page-padding-x: 16px;
    --fluent-page-padding-y: 16px;
  }

  .ms-page-header h1,
  .ms-page-title,
  .ms-home-hero h1 {
    font-size: 24px;
  }

  .ms-metrics-row,
  .ms-stats-row,
  .ms-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .ms-dash-span-2 {
    grid-column: span 1;
  }

  .ms-metric-value,
  .ms-stat-tile .stat-value {
    font-size: 22px;
  }

  .ms-command-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .ms-command-bar-spacer {
    display: none;
  }

  .ms-command-search,
  .ms-search-box {
    margin-left: 0;
    max-width: none;
    width: 100%;
  }

  .ms-view-switcher {
    padding: 0 16px;
    overflow-x: auto;
  }

  .ms-signin-card {
    padding: 32px 24px;
  }

  .ms-details-list {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .ms-metrics-row,
  .ms-stats-row {
    grid-template-columns: 1fr;
  }

  .ms-suite-brand span {
    display: none;
  }

  .ms-suite-divider {
    display: none;
  }

  .ms-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Multi-tenant header switcher */
.ms-tenant-switcher {
  margin: 0;
  min-width: 0;
}

.ms-tenant-select {
  max-width: 160px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.ms-tenant-select:hover,
.ms-tenant-select:focus {
  background: transparent;
}

.ms-tenant-select option {
  color: var(--fluent-neutral-foreground-1);
  background: #ffffff;
}

/* Responsive tables & forms */
.ms-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ms-table-scroll .ms-details-list,
.ms-table-scroll .ms-table {
  min-width: 640px;
}

.ms-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ms-form-grid-1 {
  grid-template-columns: 1fr;
}

.ms-form-field {
  min-width: 0;
}

.ms-form-span-2 {
  grid-column: span 2;
}

.ms-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.ms-form-section {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.ms-info-box {
  padding: 12px 16px;
  background: var(--fluent-neutral-background-3);
  border-radius: var(--fluent-radius-sm);
}

.ms-form-panel {
  max-width: 760px;
}

.ms-page-grid {
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.2fr);
}

.ms-text-muted {
  color: var(--fluent-neutral-foreground-2);
  font-size: 12px;
}

.ms-empty-cell {
  text-align: center;
  color: var(--fluent-neutral-foreground-2);
  padding: 32px 16px !important;
}

.ms-actions-cell {
  white-space: nowrap;
}

.ms-inline-form {
  display: inline-block;
  margin-right: 4px;
}

.ms-btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

@media (max-width: 992px) {
  .ms-tenant-switcher {
    display: none;
  }

  .ms-suite-left {
    flex: 1;
    min-width: 0;
  }

  .ms-tenant-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ms-page-grid,
  .ms-home-grid {
    grid-template-columns: 1fr;
  }

  .ms-form-grid {
    grid-template-columns: 1fr;
  }

  .ms-form-span-2 {
    grid-column: span 1;
  }

  .ms-dash-stats-inline {
    grid-template-columns: 1fr;
  }

  .ms-app-shell.nav-open::before {
    content: "";
    position: fixed;
    inset: var(--fluent-header-height) 0 0 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.4);
  }
}

@media (max-width: 768px) {
  .ms-table-scroll .ms-details-list,
  .ms-table-scroll .ms-table {
    min-width: 520px;
  }

  .ms-command-bar .ms-command-search {
    width: 100%;
    max-width: none;
  }

  .ms-dash-reco-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Settings tiles grid */
.ms-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ms-settings-tile {
  background: var(--fluent-neutral-background-1, #fff);
  border: 1px solid var(--fluent-neutral-stroke-1, #edebe9);
  border-radius: var(--fluent-radius-sm, 2px);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--fluent-shadow-card);
}
.ms-settings-tile:hover {
  border-color: var(--fluent-brand-primary-tint-10, #deecf9);
  text-decoration: none;
  color: inherit;
}
.ms-settings-tile-icon { color: var(--fluent-brand-primary, #0078d4); margin-bottom: 8px; }
.ms-settings-tile-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.ms-settings-tile-desc { font-size: 13px; color: #616161; margin: 0; }

.ms-payment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #edebe9;
  border-radius: 2px;
  margin-bottom: 12px;
}
.ms-payment-details { flex: 1; }
.ms-payment-meta { font-size: 13px; color: #616161; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Licenses page (Microsoft 365 admin center clone)
   -------------------------------------------------------------------------- */
.ms-licenses-page .ms-page-header {
  margin-bottom: 0;
}

.ms-licenses-pivot {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
}

.ms-licenses-pivot-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--fluent-neutral-foreground-2);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.1s ease, border-color 0.1s ease;
}

.ms-licenses-pivot-tab:hover {
  color: var(--fluent-neutral-foreground-1);
  text-decoration: none;
}

.ms-licenses-pivot-tab.is-active {
  color: var(--fluent-brand-primary);
  font-weight: 600;
  border-bottom-color: var(--fluent-brand-primary);
}

.ms-licenses-pivot-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--fluent-neutral-background-4);
  color: var(--fluent-neutral-foreground-1);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.ms-licenses-pivot-tab.is-active .ms-licenses-pivot-count {
  background: var(--fluent-brand-primary-tint-10);
  color: var(--fluent-brand-primary);
}

.ms-licenses-intro {
  margin: 20px 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fluent-neutral-foreground-1);
}

.ms-licenses-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ms-licenses-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-licenses-toolbar-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}

.ms-licenses-item-count {
  font-size: 14px;
  color: var(--fluent-neutral-foreground-2);
  white-space: nowrap;
}

.ms-licenses-search {
  position: relative;
  min-width: 220px;
}

.ms-licenses-search .ms-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fluent-neutral-foreground-2);
  pointer-events: none;
}

.ms-licenses-search input[type="search"] {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--fluent-neutral-stroke-accessible);
  border-radius: var(--fluent-radius-sm);
  background: var(--fluent-neutral-background-1);
  font-family: inherit;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-1);
  outline: none;
}

.ms-licenses-search input[type="search"]:focus {
  border-color: var(--fluent-brand-primary);
  box-shadow: 0 0 0 1px var(--fluent-brand-primary);
}

.ms-licenses-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--fluent-neutral-stroke-accessible);
  border-radius: var(--fluent-radius-sm);
  background: var(--fluent-neutral-background-1);
  color: var(--fluent-neutral-foreground-1);
  cursor: pointer;
}

.ms-licenses-filter-btn:hover {
  background: var(--fluent-neutral-background-3);
}

.ms-licenses-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ms-licenses-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 8px 2px 10px;
  border: 1px solid var(--fluent-neutral-stroke-accessible);
  border-radius: 12px;
  background: var(--fluent-neutral-background-1);
  font-size: 12px;
  color: var(--fluent-neutral-foreground-1);
}

.ms-licenses-filter-chip-label {
  color: var(--fluent-neutral-foreground-2);
}

.ms-licenses-filter-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--fluent-neutral-foreground-2);
  cursor: pointer;
}

.ms-licenses-filter-chip button:hover {
  background: var(--fluent-neutral-background-4);
  color: var(--fluent-neutral-foreground-1);
}

.ms-licenses-table-wrap {
  background: var(--fluent-neutral-background-1);
  border: 1px solid var(--fluent-neutral-stroke-1);
  border-radius: var(--fluent-radius-sm);
  box-shadow: var(--fluent-shadow-card);
}

.ms-licenses-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ms-licenses-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  background: var(--fluent-neutral-background-1);
  color: var(--fluent-neutral-foreground-1);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.ms-licenses-table th a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.ms-licenses-table th a:hover {
  color: var(--fluent-brand-primary);
  text-decoration: none;
}

.ms-licenses-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--fluent-neutral-stroke-1);
  vertical-align: middle;
  color: var(--fluent-neutral-foreground-1);
}

.ms-licenses-table tbody tr:last-child td {
  border-bottom: none;
}

.ms-licenses-table tbody tr:hover td {
  background: var(--fluent-neutral-background-3);
}

.ms-licenses-table tbody tr.is-clickable {
  cursor: pointer;
}

.ms-license-product-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: hsl(var(--license-icon-hue, 210), 55%, 92%);
  color: hsl(var(--license-icon-hue, 210), 45%, 38%);
  flex-shrink: 0;
}

.ms-license-product-icon .ms-icon svg {
  width: 18px;
  height: 18px;
}

.ms-license-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.ms-license-name-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ms-license-name {
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

.ms-license-sku {
  font-size: 12px;
  color: var(--fluent-neutral-foreground-2);
}

.ms-license-assigned-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.ms-license-assigned-bar {
  flex: 1;
  min-width: 96px;
  max-width: 160px;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #323130;
}

.ms-license-assigned-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #8764b8;
  transition: width 0.25s ease;
}

.ms-license-assigned-count {
  min-width: 42px;
  font-size: 14px;
  color: var(--fluent-neutral-foreground-1);
  white-space: nowrap;
}

.ms-licenses-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--fluent-neutral-foreground-2);
  font-size: 14px;
}

.ms-licenses-empty h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fluent-neutral-foreground-1);
}

@media (max-width: 768px) {
  .ms-licenses-toolbar-meta {
    width: 100%;
    margin-left: 0;
  }

  .ms-licenses-search {
    flex: 1;
    min-width: 0;
  }
}

/* --------------------------------------------------------------------------
   Bootstrap 5.3 bridge — project-wide UI/UX enhancements
   -------------------------------------------------------------------------- */

.ms-breadcrumb-list {
  --bs-breadcrumb-divider: "/";
  background: transparent;
  padding: 0;
  font-size: 13px;
}

.ms-breadcrumb-list .breadcrumb-item + .breadcrumb-item::before {
  color: var(--fluent-neutral-foreground-3);
}

.ms-breadcrumb-list a {
  color: var(--fluent-brand-primary);
  text-decoration: none;
}

.ms-breadcrumb-list a:hover {
  text-decoration: underline;
}

.ms-command-search .input-group-text,
.ms-licenses-search .input-group-text {
  color: var(--fluent-neutral-foreground-2);
}

.ms-command-search .input-group:focus-within,
.ms-licenses-search .input-group:focus-within {
  box-shadow: 0 0 0 1px var(--fluent-brand-primary);
  border-radius: var(--fluent-radius-sm);
}

.ms-command-search .form-control:focus,
.ms-licenses-search .form-control:focus {
  box-shadow: none;
}

.ms-empty-state {
  color: var(--fluent-neutral-foreground-2);
}

.ms-panel.card,
.card.ms-panel {
  border-color: var(--fluent-neutral-stroke-1);
}

.table.ms-details-list thead th,
.table.ms-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--fluent-neutral-background-2);
  font-size: 13px;
  white-space: nowrap;
}

.table.ms-details-list tbody tr.is-clickable,
.table.ms-table tbody tr[data-href],
.table.ms-table tbody tr[onclick] {
  cursor: pointer;
}

.table.ms-details-list tbody tr.is-clickable:hover td,
.table.ms-table tbody tr[onclick]:hover td {
  background: var(--fluent-neutral-background-3);
}

.table.ms-details-list tbody tr.is-clickable:focus-visible,
.table.ms-table tbody tr[onclick]:focus-visible {
  outline: 2px solid var(--fluent-brand-primary);
  outline-offset: -2px;
}

.ms-empty-cell,
td.ms-empty-cell {
  text-align: center;
  color: var(--fluent-neutral-foreground-2);
  padding: 2.5rem 1rem !important;
}

.btn.ms-btn,
a.btn.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: var(--bs-danger);
}

.modal-content {
  border-radius: var(--fluent-radius-sm);
  border-color: var(--fluent-neutral-stroke-1);
}

.modal-header {
  border-bottom-color: var(--fluent-neutral-stroke-1);
}

.modal-footer {
  border-top-color: var(--fluent-neutral-stroke-1);
}

.alert {
  border: none;
}

.ms-messagebar.alert-dismissible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 768px) {
  .ms-command-bar {
    gap: 0.5rem;
  }

  .ms-command-search {
    flex: 1 1 100%;
    max-width: none;
    order: 10;
  }

  .ms-page-header .ms-page-title {
    font-size: 1.35rem;
  }
}
