﻿/* ============================================================================
   SPHINXTEK LINQCMS — SphinxTEK FLUENT 2 ADMIN CENTER DESIGN SYSTEM
   Authentic SphinxTEK Admin Center / Intune / Entra / Azure Portal UI
   ============================================================================ */

:root {
  /* Fluent 2 Neutral Palette */
  --bg:             #faf9f8;
  --surface:        #ffffff;
  --surface-alt:    #f3f2f1;
  --surface-hover:  #edebe9;
  --surface-active: #e1dfdd;
  --border:         #edebe9;
  --border-strong:  #8a8886;
  --border-subtle:  #f3f2f1;

  /* Fluent 2 Typography Colors */
  --text:           #201f1e;
  --text-primary:   #201f1e;
  --text-secondary: #323130;
  --text-muted:     #605e5c;
  --text-faint:     #8a8886;
  --muted:          #605e5c;

  /* SphinxTEK Brand & Communication Blue */
  --accent:          #0078d4;
  --accent-hover:    #106ebe;
  --accent-active:   #005a9e;
  --accent-soft:     #eff6fc;
  --accent-border:   #c7e0f4;
  --accent-contrast: #ffffff;

  /* Semantic Status Colors (Fluent 2) */
  --success:         #107c10;
  --success-soft:    #dff6dd;
  --success-border:  #9fd89f;

  --warning:         #d83b01;
  --warning-soft:    #fed9cc;
  --warning-border:  #f7b199;
  --orange:          #d83b01;
  --orange-soft:     #fed9cc;

  --danger:          #a4262c;
  --danger-soft:     #fde7e9;
  --danger-border:   #f1bbbc;

  /* Fluent 2 Elevation & Radii */
  --radius-sm:       2px;
  --radius-md:       4px;
  --radius-lg:       4px;
  --shadow-sm:       0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);
  --shadow-md:       0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108);
  --shadow-lg:       0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108);
  --shadow-blade:    -6px 0 20px rgba(0, 0, 0, 0.14), -1px 0 3px rgba(0, 0, 0, 0.08);

  /* Layout Dimensions */
  --suitebar-h:      48px;
  --rail-w:          240px;
  --rail-collapsed:  48px;

  /* Fonts */
  --font-sans:       "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --font-display:    "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:       "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;

  /* Compatibility aliases */
  --glass-fill:      #ffffff;
  --glass-border:    #edebe9;
  --glass-blur:      none;
  --border-color:    #edebe9;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 20px; line-height: 28px; }
h2 { font-size: 16px; line-height: 22px; }
h3 { font-size: 14px; line-height: 20px; }

p { margin: 0 0 8px; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
}

code {
  background: var(--surface-alt);
  color: #323130;
  padding: 1px 5px;
  border-radius: 2px;
  border: 1px solid var(--border);
  font-size: 12px;
}

/* Custom Scrollbar (Fluent Light) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #faf9f8; }
::-webkit-scrollbar-thumb { background: #c8c6c4; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8a8886; }

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spin {
  animation: spin 0.9s linear infinite;
}

/* ============================================================================
   1. SphinxTEK SUITE BAR (TOP 48PX GLOBAL HEADER)
   ============================================================================ */

.ms-suitebar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--suitebar-h);
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 4px;
  z-index: 200;
  user-select: none;
}

.ms-suitebar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 240px;
}

.ms-waffle-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.1s;
}
.ms-waffle-btn:hover, .ms-waffle-btn.active {
  background: rgba(255, 255, 255, 0.12);
}

.ms-portal-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 4px 8px;
  border-radius: 2px;
}
.ms-portal-brand:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ms-four-squares {
  display: grid;
  grid-template-columns: 8px 8px;
  grid-template-rows: 8px 8px;
  gap: 1.5px;
  flex-shrink: 0;
}
.ms-four-squares span:nth-child(1) { background: #0078d4; }
.ms-four-squares span:nth-child(2) { background: #2899f5; }
.ms-four-squares span:nth-child(3) { background: #005a9e; }
.ms-four-squares span:nth-child(4) { background: #50e6ff; }

.ms-brand-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.ms-brand-divider {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
  margin: 0 2px;
}
.ms-portal-subtitle {
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

/* Suite Bar Global Search */
.ms-suitebar-center {
  flex: 1;
  max-width: 480px;
  margin: 0 16px;
  position: relative;
}

.ms-search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2px;
  height: 32px;
  padding: 0 10px;
  gap: 8px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ms-search-box:focus-within {
  background: #ffffff;
  border-color: #0078d4;
  color: #201f1e;
}
.ms-search-icon {
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}
.ms-search-box:focus-within .ms-search-icon {
  color: #0078d4;
}
.ms-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
}
.ms-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}
.ms-search-box:focus-within .ms-search-input {
  color: #201f1e;
}
.ms-search-box:focus-within .ms-search-input::placeholder {
  color: #605e5c;
}
.ms-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #ffffff;
  border: 1px solid #edebe9;
  box-shadow: var(--shadow-lg);
  border-radius: 2px;
  z-index: 300;
  overflow: hidden;
  color: #201f1e;
}
.ms-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  color: #201f1e !important;
  text-decoration: none !important;
  border-bottom: 1px solid #f3f2f1;
}
.ms-search-item:hover {
  background: #f3f2f1;
}

/* Suite Bar Right Actions */
.ms-suitebar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ms-tenant-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 2px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  margin-right: 4px;
  line-height: 1.15;
}
.ms-tenant-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
}
.ms-tenant-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
}

.ms-kiosk-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: #0078d4;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  margin-right: 4px;
  transition: background 0.12s;
}
.ms-kiosk-launch-btn:hover {
  background: #106ebe;
}
.ms-kiosk-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ccb5f;
}

.ms-suitebar-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: rgba(255, 255, 255, 0.9) !important;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  text-decoration: none !important;
  transition: background 0.1s;
}
.ms-suitebar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ms-badge-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: #f1707b;
  border-radius: 50%;
  border: 1.5px solid #0f172a;
}

.ms-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: 2px;
  cursor: pointer;
}
.ms-user-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}
.ms-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0078d4;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Waffle App Launcher Flyout */
.ms-waffle-backdrop {
  position: fixed;
  inset: 0;
  z-index: 240;
}
.ms-waffle-menu {
  position: fixed;
  top: 48px;
  left: 0;
  width: 320px;
  background: #ffffff;
  border-right: 1px solid #edebe9;
  border-bottom: 1px solid #edebe9;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  z-index: 250;
  animation: ms-fade-in 0.12s ease-out;
}
@keyframes ms-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.ms-waffle-header {
  font-size: 12px;
  font-weight: 600;
  color: #605e5c;
  margin-bottom: 10px;
  padding: 0 4px;
}
.ms-waffle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ms-waffle-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 2px;
  color: #201f1e !important;
  text-decoration: none !important;
  background: #faf9f8;
  border: 1px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}
.ms-waffle-tile:hover {
  background: #f3f2f1;
  border-color: #edebe9;
}
.ms-waffle-tile-icon {
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: #eff6fc;
  color: #0078d4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ms-waffle-tile-label {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}

/* ============================================================================
   2. SphinxTEK LEFT NAVIGATION BLADE + MAIN VIEWPORT
   ============================================================================ */

.ms-admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ms-body-shell {
  display: flex;
  flex: 1;
  padding-top: var(--suitebar-h);
}

.ms-nav-rail {
  width: var(--rail-w);
  min-width: var(--rail-w);
  background: #f3f2f1;
  border-right: 1px solid #edebe9;
  position: fixed;
  top: var(--suitebar-h);
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 120;
  user-select: none;
  transition: width 0.15s ease, min-width 0.15s ease;
}

.ms-nav-rail.collapsed {
  width: var(--rail-collapsed);
  min-width: var(--rail-collapsed);
}

.ms-nav-rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid #e1dfdd;
}

.ms-rail-collapse-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #323130;
  cursor: pointer;
  border-radius: 2px;
}
.ms-rail-collapse-btn:hover {
  background: #edebe9;
}

.ms-nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px 4px;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: #605e5c;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: left;
}
.ms-nav-section-header:hover {
  color: #201f1e;
}
.ms-nav-rail.collapsed .ms-nav-section-header,
.ms-nav-rail.collapsed .ms-nav-text,
.ms-nav-rail.collapsed .ms-nav-badge,
.ms-nav-rail.collapsed .ms-user-meta {
  display: none;
}

.ms-nav-group {
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}

.ms-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 14px;
  color: #323130 !important;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none !important;
  position: relative;
  white-space: nowrap;
  transition: background 0.08s;
}
.ms-nav-item:hover {
  background: #edebe9;
  color: #201f1e !important;
}
.ms-nav-item.active {
  background: #ffffff;
  color: #201f1e !important;
  font-weight: 600;
}
.ms-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #0078d4;
  border-radius: 0 2px 2px 0;
}

.ms-nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #605e5c;
  flex-shrink: 0;
}
.ms-nav-item.active .ms-nav-icon {
  color: #0078d4;
}

.ms-nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}
.ms-badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.ms-nav-footer {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid #e1dfdd;
  background: #edebe9;
}
.ms-nav-user-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0078d4;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ms-user-meta {
  min-width: 0;
  flex: 1;
}
.ms-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #201f1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ms-user-sub {
  font-size: 11px;
  color: #605e5c;
}
.ms-signout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  background: #ffffff;
  border: 1px solid #8a8886;
  border-radius: 2px;
  color: #323130;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ms-signout-btn:hover {
  background: #f3f2f1;
}

/* Main Content Area */
.ms-main-viewport {
  margin-left: var(--rail-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--suitebar-h));
  background: var(--bg);
  transition: margin-left 0.15s ease;
}
.ms-main-viewport.rail-collapsed {
  margin-left: var(--rail-collapsed);
}

/* Global Breadcrumb Context Strip */
.ms-context-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 0 28px;
  background: #ffffff;
  border-bottom: 1px solid #edebe9;
  font-size: 12px;
  color: #605e5c;
}
.ms-context-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ms-context-crumbs a {
  color: #0078d4;
  text-decoration: none;
}
.ms-context-crumbs a:hover {
  text-decoration: underline;
}
.ms-context-sep {
  color: #a19f9d;
  font-size: 11px;
}
.ms-context-current {
  color: #201f1e;
  font-weight: 600;
}

.ms-page-canvas {
  padding: 20px 28px 48px;
  max-width: 1600px;
  width: 100%;
}

/* ============================================================================
   3. SphinxTEK BLADE HEADERS, COMMAND BARS & ESSENTIALS PANELS
   ============================================================================ */

/* Every page's .page-header automatically becomes a SphinxTEK Blade Header + Command Bar */
.page-header,
.ms-blade-header {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.page-header h1,
.page-title,
.ms-page-title {
  font-size: 20px;
  font-weight: 600;
  color: #201f1e;
  margin: 0;
  line-height: 1.25;
}

.page-header p,
.page-subtitle {
  font-size: 12.5px;
  color: #605e5c;
  margin: 2px 0 0 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Flush Command Bar (Intune / Azure style) */
.ms-command-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  padding: 4px 8px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.ms-cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  border: none;
  border-radius: 2px;
  color: #201f1e !important;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.08s;
}
.ms-cmd-btn svg {
  color: #0078d4;
  flex-shrink: 0;
}
.ms-cmd-btn:hover:not(:disabled) {
  background: #f3f2f1;
}
.ms-cmd-btn.primary {
  font-weight: 600;
}
.ms-cmd-btn.danger svg {
  color: #a4262c;
}
.ms-cmd-divider {
  width: 1px;
  height: 20px;
  background: #edebe9;
  margin: 0 4px;
}

/* SphinxTEK "Essentials" Collapsible Property Panel */
.ms-essentials {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.ms-essentials-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ms-essentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 32px;
}
.ms-essential-row {
  display: flex;
  align-items: baseline;
  font-size: 12.5px;
  padding: 3px 0;
  border-bottom: 1px dotted #f3f2f1;
}
.ms-essential-label {
  width: 135px;
  color: #605e5c;
  flex-shrink: 0;
}
.ms-essential-val {
  color: #201f1e;
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* SphinxTEK Pivot Tabs */
.ms-pivot-bar,
.type-tabs,
.lqc-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #edebe9;
  margin-bottom: 16px;
  background: transparent;
  padding: 0;
  flex-wrap: wrap;
}

.ms-pivot-tab,
.type-tab,
.lqc-tab {
  position: relative;
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: #605e5c;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 400;
  cursor: pointer;
  border-radius: 2px 2px 0 0;
  transition: color 0.1s, background 0.1s;
}
.ms-pivot-tab:hover,
.type-tab:hover,
.lqc-tab:hover {
  color: #201f1e;
  background: #f3f2f1;
}
.ms-pivot-tab.active,
.type-tab.active,
.lqc-tab.active {
  color: #201f1e;
  font-weight: 600;
  background: transparent;
}
.ms-pivot-tab.active::after,
.type-tab.active::after,
.lqc-tab.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: #0078d4;
}

/* ============================================================================
   4. FLUENT CARDS, WIDGETS & METRICS
   ============================================================================ */

.card,
.ms-card,
.glass-card {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header,
.ms-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #edebe9;
  background: #ffffff;
}

.card-title,
.ms-card-title,
.card-header h2,
.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #201f1e;
  margin: 0;
}

.card-body,
.ms-card-body {
  padding: 16px 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-top: 3px solid #0078d4;
  border-radius: 2px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #605e5c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stat-value {
  font-size: 26px;
  font-weight: 600;
  color: #201f1e;
  line-height: 1.2;
  margin-top: 4px;
}
.stat-sub {
  font-size: 12px;
  color: #605e5c;
  margin-top: 4px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 960px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   5. FLUENT 2 CONTROLS (BUTTONS, INPUTS, SELECTS)
   ============================================================================ */

.btn,
.ms-fluent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid #8a8886;
  background: #ffffff;
  color: #323130;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.1s, border-color 0.1s;
}
.btn svg, .ms-fluent-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.btn:hover:not(:disabled),
.ms-fluent-btn:hover:not(:disabled) {
  background: #f3f2f1;
  color: #201f1e;
}
.btn:disabled,
.ms-fluent-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary,
.ms-fluent-btn.primary {
  background: #0078d4;
  border-color: #0078d4;
  color: #ffffff !important;
}
.btn-primary:hover:not(:disabled),
.ms-fluent-btn.primary:hover:not(:disabled) {
  background: #106ebe;
  border-color: #106ebe;
  color: #ffffff !important;
}

.btn-secondary,
.ms-fluent-btn.secondary {
  background: #ffffff;
  border-color: #8a8886;
  color: #323130 !important;
}
.btn-secondary:hover:not(:disabled),
.ms-fluent-btn.secondary:hover:not(:disabled) {
  background: #f3f2f1;
}

.btn-danger,
.ms-fluent-btn.danger {
  background: #a4262c;
  border-color: #a4262c;
  color: #ffffff !important;
}
.btn-danger:hover:not(:disabled),
.ms-fluent-btn.danger:hover:not(:disabled) {
  background: #8e1f24;
  border-color: #8e1f24;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #0078d4;
}
.btn-ghost:hover:not(:disabled) {
  background: #eff6fc;
  color: #005a9e;
}

.btn-sm {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}
.btn-lg {
  height: 36px;
  padding: 0 18px;
  font-size: 14px;
}
.btn-block {
  width: 100%;
}
.btn-icon {
  padding: 0 6px;
  min-width: 28px;
}

/* Fluent 2 Text Inputs & Selects */
.field {
  display: block;
  margin-bottom: 14px;
}
.field > span,
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 4px;
}
.form-hint {
  font-size: 11.5px;
  color: #605e5c;
  margin-top: 4px;
}

.input,
.form-control {
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #201f1e;
  background: #ffffff;
  border: 1px solid #8a8886;
  border-radius: 2px;
  transition: border-color 0.1s;
}
.input:hover,
.form-control:hover {
  border-color: #323130;
}
.input:focus,
.form-control:focus {
  outline: none;
  border-color: #0078d4;
  border-bottom: 2px solid #0078d4;
  padding-bottom: 4px;
}
.input::placeholder,
.form-control::placeholder {
  color: #605e5c;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #323130;
  cursor: pointer;
  margin-bottom: 10px;
}
.row {
  display: flex;
  gap: 12px;
}

/* ============================================================================
   6. FLUENT DETAILSLIST TABLES
   ============================================================================ */

.table-wrap,
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
}
.card .table-wrap,
.card .table-wrapper {
  border: none;
}

.table,
.fleet-table,
.ms-details-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
}

.table th,
.fleet-table th,
.ms-details-list th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #323130;
  padding: 9px 14px;
  background: #faf9f8;
  border-bottom: 1px solid #edebe9;
  white-space: nowrap;
  user-select: none;
}

.table td,
.fleet-table td,
.ms-details-list td {
  padding: 9px 14px;
  border-bottom: 1px solid #f3f2f1;
  color: #201f1e;
  vertical-align: middle;
}

.table tbody tr:hover,
.fleet-table tbody tr:hover,
.ms-details-list tbody tr:hover {
  background: #f3f2f1;
}

.cell-muted { color: #605e5c; font-size: 12.5px; }
.cell-name  { font-weight: 600; color: #0078d4; }
.cell-mono  { font-family: var(--font-mono); font-size: 11.5px; color: #605e5c; }
.cell-crit  { color: var(--danger); font-weight: 600; }
.cell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

/* Metric Bars inside DetailsList */
.metric-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.metric-bar {
  width: 56px;
  height: 5px;
  background: #edebe9;
  border-radius: 2px;
  overflow: hidden;
}
.metric-bar-fill {
  height: 100%;
  background: #0078d4;
}
.metric-bar-fill.ok   { background: #107c10; }
.metric-bar-fill.warn { background: #d83b01; }
.metric-bar-fill.crit { background: #a4262c; }

/* Status Badges (Fluent Pill & Dot) */
.badge,
.status-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 2px;
  line-height: 1.4;
}
.status-dot-badge::before,
.badge-online::before,
.badge-offline::before,
.badge-pending::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-online,
. badge-success,
.badge-green,
.status-dot-badge.online {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.badge-online::before,
.status-dot-badge.online::before {
  background: var(--success);
}

.badge-offline,
.badge-danger,
.status-dot-badge.offline {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}
.badge-offline::before,
.status-dot-badge.offline::before {
  background: var(--danger);
}

.badge-pending,
.badge-secondary,
.badge-neutral,
.status-dot-badge.pending {
  background: #f3f2f1;
  color: #605e5c;
  border: 1px solid #e1dfdd;
}
.badge-pending::before,
.status-dot-badge.pending::before {
  background: #8a8886;
}

.badge-blue {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.status-dot-badge.degraded {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.status-dot-badge.degraded::before {
  background: var(--warning);
}

/* ============================================================================
   7. SphinxTEK RIGHT-SIDE FLYOUT CONTEXT BLADES (DRAWERS / MODALS)
   ============================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
  animation: ms-backdrop-fade 0.15s ease;
}
@keyframes ms-backdrop-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal,
.modal-box {
  position: fixed;
  top: var(--suitebar-h);
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw !important;
  background: #ffffff;
  border-left: 1px solid #edebe9;
  border-radius: 0;
  box-shadow: var(--shadow-blade);
  display: flex;
  flex-direction: column;
  z-index: 510;
  animation: ms-blade-slide 0.18s cubic-bezier(0.1, 0.9, 0.2, 1);
}
@keyframes ms-blade-slide {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #edebe9;
  background: #ffffff;
  flex-shrink: 0;
}
.modal-header h3,
.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #201f1e;
  margin: 0;
}
.modal-close {
  background: transparent;
  border: none;
  color: #605e5c;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover {
  background: #f3f2f1;
  color: #201f1e;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid #edebe9;
  background: #faf9f8;
  flex-shrink: 0;
}

/* ============================================================================
   8. SphinxTEK LinqCMS AUTHENTICATION EXPERIENCE (BESPOKE DESIGN)
   ============================================================================ */

.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background-color: #0b1120;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.18) 0%, transparent 65%),
    radial-gradient(circle at 100% 100%, rgba(14, 165, 233, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(99, 102, 241, 0.10) 0%, transparent 55%);
  box-sizing: border-box;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-card-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  padding: 36px 32px;
  box-sizing: border-box;
}

.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-logo-badge img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.auth-brand-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
  margin-bottom: 4px;
}

.auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.auth-subheading,
.auth-subtitle {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-field-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.auth-text-input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
}

.auth-text-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-text-input::placeholder {
  color: #94a3b8;
}

.auth-validation-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 2px;
}

.auth-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0 6px 0;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.auth-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

.auth-action-btn {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.auth-action-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.auth-action-btn:active {
  transform: translateY(0);
}

.auth-switch-box {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.auth-accent-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  margin-left: 4px;
}

.auth-accent-link:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 12px;
}

.auth-sso-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
}

.auth-sso-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.auth-footer-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  margin-top: 12px;
}

.auth-footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.auth-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-footer-links a:hover {
  color: #e2e8f0;
}

.auth-footer-dot {
  color: #475569;
}

.auth-footer-copy {
  font-size: 11.5px;
  color: #64748b;
}

/* ============================================================================
   9. DISPLAYS, MEDIA LIBRARY, PLAYLISTS & SHARED COMPONENTS
   ============================================================================ */

/* Filter Bar & Search */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #edebe9;
  padding: 8px 12px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.page-stats-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #605e5c;
  margin-bottom: 10px;
}
.page-stats-bar strong { color: #201f1e; }

/* Display Grid (Live Screen Tiles) */
.display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.display-card {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.display-card:hover {
  border-color: #0078d4;
  box-shadow: var(--shadow-md);
}
.display-card-screen {
  aspect-ratio: 16 / 9;
  background: #1b1a19;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}
.display-card-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.display-card-body {
  padding: 12px 14px;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.media-tile {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s;
}
.media-tile:hover,
.media-tile--selected {
  border-color: #0078d4;
}
.media-thumb {
  aspect-ratio: 16 / 9;
  background: #1b1a19;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-type-chip {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  z-index: 2;
}
.media-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.12s;
}
.media-thumb:hover .media-thumb-overlay {
  opacity: 1;
}
.media-overlay-btn {
  width: 30px;
  height: 30px;
  border-radius: 2px;
  background: #ffffff;
  border: none;
  color: #201f1e;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-overlay-btn.danger {
  background: #a4262c;
  color: #ffffff;
}
.media-tile-body {
  padding: 10px 12px;
}
.media-tile-name {
  font-size: 13px;
  font-weight: 600;
  color: #201f1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-tile-meta {
  font-size: 11.5px;
  color: #605e5c;
  margin-top: 2px;
}
.media-tile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px 12px 10px;
  border-top: 1px solid #f3f2f1;
}

/* Media List Row */
.media-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #f3f2f1;
  cursor: pointer;
}
.media-list-row:hover {
  background: #f3f2f1;
}
.media-list-thumb {
  width: 48px;
  height: 32px;
  background: #f3f2f1;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.media-list-thumb img, .media-list-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-list-info { flex: 1; min-width: 0; }
.media-list-name { font-weight: 600; font-size: 13px; color: #201f1e; }
.media-list-meta { font-size: 11.5px; color: #605e5c; }
.media-list-actions { display: flex; gap: 6px; }

.view-toggle {
  display: flex;
  border: 1px solid #8a8886;
  border-radius: 2px;
  overflow: hidden;
}
.view-toggle-btn {
  height: 30px;
  padding: 0 10px;
  background: #ffffff;
  border: none;
  color: #605e5c;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.view-toggle-btn.active {
  background: #eff6fc;
  color: #0078d4;
  font-weight: 600;
}

/* Playlist Item Editor Rows */
.playlist-item-list {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
}
.playlist-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f2f1;
  background: #ffffff;
}
.playlist-item-row:hover {
  background: #faf9f8;
}
.drag-handle {
  cursor: grab;
  color: #8a8886;
  user-select: none;
}
.playlist-item-num {
  width: 24px;
  font-size: 12px;
  font-weight: 600;
  color: #605e5c;
  text-align: center;
}
.playlist-item-thumb {
  width: 56px;
  height: 36px;
  border-radius: 2px;
  background: #f3f2f1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.playlist-item-thumb img, .playlist-item-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.playlist-item-info { flex: 1; min-width: 0; }
.playlist-item-name { font-weight: 600; color: #201f1e; }
.playlist-item-meta { font-size: 11.5px; color: #605e5c; }
.playlist-item-duration {
  display: flex;
  align-items: center;
  gap: 6px;
}
.playlist-item-duration .input {
  width: 72px;
  text-align: right;
}

/* Add Media Grid inside Modal */
.add-content-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #edebe9;
  margin-bottom: 14px;
}
.act-tab {
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: #605e5c;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.act-tab.active {
  color: #0078d4;
  font-weight: 600;
  border-bottom-color: #0078d4;
}
.add-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.add-media-card {
  border: 1px solid #edebe9;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
}
.add-media-card:hover {
  border-color: #0078d4;
}
.add-media-card-thumb {
  aspect-ratio: 16 / 9;
  background: #f3f2f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.add-media-card-thumb img, .add-media-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.add-media-card-name {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 6px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.add-media-card-type {
  font-size: 10px;
  color: #605e5c;
  padding: 0 6px 6px;
}

/* Pairing Code & Copy Button */
.pairing-code {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: #eff6fc;
  color: #005a9e;
  border: 1px solid #c7e0f4;
  padding: 3px 10px;
  border-radius: 2px;
  display: inline-block;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #8a8886;
  border-radius: 2px;
  color: #323130;
  cursor: pointer;
}
.copy-btn:hover { background: #f3f2f1; }
.copy-btn.copied {
  background: var(--success-soft);
  border-color: var(--success-border);
  color: var(--success);
}

/* Onboarding Steps */
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.onboarding-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: #faf9f8;
  border: 1px solid #edebe9;
  border-radius: 2px;
  color: #201f1e !important;
  text-decoration: none !important;
  transition: border-color 0.1s, background 0.1s;
}
.onboarding-step:hover {
  border-color: #0078d4;
  background: #ffffff;
}
.onboarding-step.done {
  background: #f3f2f1;
  opacity: 0.75;
}
.onboarding-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0078d4;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.onboarding-step.done .onboarding-step-num {
  background: #107c10;
}
.onboarding-step-body { flex: 1; }
.onboarding-step-title { font-size: 13px; font-weight: 600; }
.onboarding-step-desc  { font-size: 11.5px; color: #605e5c; margin-top: 2px; }

/* Empty States */
.empty-state {
  background: #ffffff;
  border: 1px solid #edebe9;
  border-radius: 2px;
  padding: 40px 24px;
  text-align: center;
  color: #605e5c;
}
.empty-state-icon {
  color: #8a8886;
  margin-bottom: 10px;
}
.empty-state h3,
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: #201f1e;
  margin-bottom: 4px;
}
.empty-state p,
.empty-state-subtitle {
  font-size: 12.5px;
  color: #605e5c;
  max-width: 420px;
  margin: 0 auto 14px;
}

/* Alerts & Message Bars (Fluent MessageBar) */
.alert {
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 12.5px;
  margin-bottom: 14px;
  border-left: 3px solid #0078d4;
  background: #eff6fc;
  color: #201f1e;
}
.alert-danger {
  background: #fde7e9;
  border-left-color: #a4262c;
  color: #a4262c;
}
.alert-success {
  background: #dff6dd;
  border-left-color: #107c10;
  color: #107c10;
}
.alert-info {
  background: #eff6fc;
  border-left-color: #0078d4;
  color: #005a9e;
}

/* Usage Bars */
.usage-bar {
  width: 100%;
  height: 6px;
  background: #edebe9;
  border-radius: 2px;
  overflow: hidden;
}
.usage-bar-fill {
  height: 100%;
  background: #0078d4;
}

/* Activity Feed */
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f2f1;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0078d4;
  margin-top: 6px;
  flex-shrink: 0;
}

/* Emergency Modal & Active Bar */
.em-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 900;
  display: flex;
  justify-content: flex-end;
}
.em-modal { width: 620px;
  max-width: 100vw;
  height: 100vh;
  background: #ffffff;
  border-left: 3px solid #a4262c;
  box-shadow: var(--shadow-blade);
  display: flex;
  flex-direction: column;
  animation: ms-blade-slide 0.18s cubic-bezier(0.1, 0.9, 0.2, 1);
}
.em-modal-head {
  padding: 16px 24px;
  background: #fde7e9;
  border-bottom: 1px solid #f1bbbc;
  display: flex;
  align-items: center;
  gap: 12px;
}
.em-modal-icon {
  width: 32px;
  height: 32px;
  background: #a4262c;
  color: #ffffff;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.em-modal-title { font-size: 14px; font-weight: 700; color: #a4262c; }
.em-modal-sub   { font-size: 12px; color: #605e5c; }
.em-modal-steps { display: flex; gap: 6px; margin-left: auto; }
.em-step-dot { width: 8px; height: 8px; border-radius: 50%; background: #c8c6c4; }
.em-step-dot.active { background: #a4262c; }
.em-step-dot.done   { background: #107c10; }
.em-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.em-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #edebe9;
  background: #faf9f8;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}
.em-preview {
  border-radius: 2px;
  padding: 20px;
  min-height: 80px;
  color: #ffffff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.em-warn-box {
  background: #fed9cc;
  border-left: 3px solid #d83b01;
  padding: 10px 12px;
  font-size: 12px;
  color: #323130;
  margin-bottom: 14px;
}
.em-phrase-input {
  width: 100%;
  height: 34px;
  padding: 6px 10px;
  border: 1px solid #8a8886;
  font-family: var(--font-mono);
  font-size: 13px;
}
.em-active-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fde7e9;
  border: 1px solid #f1bbbc;
  border-left: 4px solid #a4262c;
  border-radius: 2px;
  margin-bottom: 16px;
}
.em-active-bar-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a4262c;
}
.em-active-label { font-size: 13px; font-weight: 700; color: #a4262c; }
.em-active-since { font-size: 12px; color: #323130; }

/* Toast Stack */
.toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #edebe9;
  border-left: 4px solid #0078d4;
  box-shadow: var(--shadow-lg);
  border-radius: 2px;
  font-size: 13px;
  color: #201f1e;
  min-width: 280px;
}
.toast-success { border-left-color: #107c10; }
.toast-error   { border-left-color: #a4262c; }
.toast-warning { border-left-color: #d83b01; }
.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #605e5c;
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-inner {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 90vh;
}
.lightbox-inner img, .lightbox-inner video {
  display: block;
  max-width: 100%;
  max-height: 84vh;
}
.lightbox-close {
  position: absolute;
  top: -32px;
  right: 0;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}
.lightbox-caption {
  text-align: center;
  color: #ffffff;
  margin-top: 8px;
  font-size: 13px;
}

/* Tag & Runtime Chips */
.tag-chip, .runtime-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  background: #f3f2f1;
  border: 1px solid #e1dfdd;
  border-radius: 2px;
  font-size: 11px;
  color: #323130;
}

.upload-dropzone {
  border: 1px dashed #0078d4;
  background: #eff6fc;
  padding: 20px;
  border-radius: 2px;
  text-align: center;
}

/* ============================================================================
   10. KIOSK PLAYER RUNTIME (/play) — FULLSCREEN DARK STAGE PRESERVED
   ============================================================================ */

.kiosk-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  overflow: hidden;
  font-family: var(--font-sans);
}
.kiosk-pairing {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: radial-gradient(circle at 50% 20%, #0f172a, #05060a 70%);
  text-align: center;
  padding: 2rem;
}
.kiosk-pairing h1 { color: #ffffff; font-size: 1.75rem; }
.kiosk-pairing p  { color: #94a3b8; max-width: 28rem; }
.kiosk-pairing .pairing-form { display: flex; gap: 0.6rem; margin-top: 0.5rem; align-items: center; }
.pairing-code-input-wrap {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0.5rem 1rem;
}
.pairing-code-input {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  width: 220px;
}
.kiosk-standby {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #05060a;
  color: #94a3b8;
  gap: 0.75rem;
}
.kiosk-stage { position: relative; width: 100%; height: 100%; }
.kiosk-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.kiosk-slide img, .kiosk-slide video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.kiosk-slide iframe { width: 100%; height: 100%; border: none; }
.kiosk-nowplaying {
  position: relative; width: 100%; height: 100%;
  background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.kiosk-np-bg {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center;
  filter: blur(60px); opacity: 0.45; transform: scale(1.1);
}
.kiosk-np-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.82) 100%);
}
.kiosk-np-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.75rem; padding: 2rem; max-width: 560px; width: 100%; text-align: center;
}
.kiosk-np-art { width: 280px; height: 280px; object-fit: cover; border-radius: 8px; }
.kiosk-np-title  { color: #fff; font-size: 2rem; font-weight: 700; }
.kiosk-np-artist { color: rgba(255,255,255,0.75); font-size: 1.25rem; }
.kiosk-np-album  { color: rgba(255,255,255,0.85); font-size: 1rem; text-transform: uppercase; }
.emergency-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
}
.emergency-overlay-content { text-align: center; padding: 2rem 3rem; max-width: 80vw; }
.emergency-overlay-message { font-size: clamp(1.4rem, 4vw, 3rem); font-weight: 800; color: #fff; }
.screenshare-overlay { position: fixed; inset: 0; z-index: 50; background: #000; display: none; flex-direction: column; }
.screenshare-overlay--active { display: flex; }

/* Responsive Mobile Rail */
@media (max-width: 900px) {
  .ms-nav-rail {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .ms-nav-rail.open {
    transform: translateX(0);
  }
  .ms-main-viewport,
  .ms-main-viewport.rail-collapsed {
    margin-left: 0;
  }
  .ms-page-canvas {
    padding: 16px;
  }
  .ms-tenant-pill {
    display: none;
  }
}



/* Enhanced Emergency Modal Components */
.em-scope-pill-group {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.em-scope-pill {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.em-scope-pill.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.em-color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
}

.em-color-btn:hover {
  transform: scale(1.1);
}

.em-color-btn.active {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8) inset, 0 2px 4px rgba(0,0,0,0.25);
  transform: scale(1.12);
}

.em-media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px;
  background: #f8fafc;
}

.em-media-picker-item {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  text-align: center;
  font-size: 11px;
  transition: all 0.15s ease;
}

.em-media-picker-item:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.em-media-picker-item.active {
  border-color: #2563eb;
  background: #dbeafe;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}