/* ============================================================
   Macrotech GuestXP — Super Admin Dashboard Styles
   ============================================================ */

/* ── Dark-theme CSS variables used by the Gateways / AP Fleet tabs ── */
.sa-body {
  /* Dark palette tokens — all gateway/AP cards read these */
  --bg:      #0d1117;
  --bg2:     #161b22;
  --bg3:     #21262d;
  --border:  #30363d;
  --text:    #e6edf3;
  --muted:   #8b949e;
  --primary: #58a6ff;
  --green:   #3fb950;
  --red:     #f85149;
  --yellow:  #d29922;
  --purple:  #bc8cff;
  --orange:  #f8a100;
  --mqtt:    #00bcd4;

  display: block;
  background: #f0f4f8;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.sa-header {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  background: #0f1729;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  gap: 16px;
}

.sa-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sa-logo-box {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #1a73e8, #00bcd4);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.sa-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.sa-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.sa-brand-by {
  font-size: 10px;
  color: #a0aec0;
}

.sa-header-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.12);
  margin: 0 4px;
}

.sa-header-context {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.sa-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sa-clock {
  font-size: 13px;
  font-weight: 700;
  color: #a0aec0;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.sa-status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #a0aec0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 4px 12px;
}
.sa-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00c853;
  box-shadow: 0 0 6px #00c853;
  animation: sa-pulse-dot 2s ease-in-out infinite;
}
@keyframes sa-pulse-dot {
  0%,100% { box-shadow: 0 0 4px #00c853; }
  50%      { box-shadow: 0 0 10px #00c853; }
}

/* Notification button */
.sa-notif-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #a0aec0;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.sa-notif-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.sa-notif-badge {
  position: absolute;
  top: -3px; right: -3px;
  width: 16px; height: 16px;
  background: #f44336;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #0f1729;
}

/* User avatar */
.sa-user-menu { position: relative; }
.sa-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a73e8, #00bcd4);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.2);
  transition: border-color 0.18s;
}
.sa-avatar:hover { border-color: #1a73e8; }
.sa-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 999;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.sa-user-dropdown.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
.sa-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f0f4f8, #e8f0fe);
}
.sa-user-avatar-lg {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a73e8, #00bcd4);
  color: #fff; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sa-user-name  { font-size: 13px; font-weight: 700; color: #1a1f36; }
.sa-user-email { font-size: 11px; color: #64748b; margin-top: 1px; }
.sa-user-role  { font-size: 10px; font-weight: 700; color: #f59e0b; margin-top: 2px; }
.sa-user-role i { margin-right: 3px; }
.sa-user-dropdown-divider { height: 1px; background: #e5e7eb; margin: 4px 0; }
.sa-user-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s;
}
.sa-user-item i { width: 16px; color: #6b7280; }
.sa-user-item:hover { background: #f0f4f8; }
.sa-logout-item { color: #f44336; }
.sa-logout-item i { color: #f44336; }
.sa-logout-item:hover { background: #fff5f5; }

/* ══════════════════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════════════════ */
.sa-main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 28px 60px;
}

/* ── Hero ── */
.sa-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.sa-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a1f36;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.sa-hero-wave { font-size: 26px; }
.sa-hero-sub  {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}
.sa-hero-sub strong { color: #1a1f36; }
.sa-hero-actions { display: flex; gap: 10px; }

/* ── Buttons ── */
.sa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  border: none;
  font-family: 'Inter', sans-serif;
}
.sa-btn-primary {
  background: linear-gradient(135deg, #1a73e8, #0d5bc7);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26,115,232,0.35);
}
.sa-btn-primary:hover {
  background: linear-gradient(135deg, #1557b0, #0a47a8);
  box-shadow: 0 5px 16px rgba(26,115,232,0.45);
  transform: translateY(-1px);
}
.sa-btn-outline {
  background: #fff;
  color: #374151;
  border: 1.5px solid #e5e7eb;
}
.sa-btn-outline:hover {
  background: #f0f4f8;
  border-color: #1a73e8;
  color: #1a73e8;
}
.sa-btn-danger {
  background: linear-gradient(135deg, #f44336, #c62828);
  color: #fff;
}
.sa-btn-sm { padding: 6px 12px; font-size: 11px; border-radius: 8px; }

/* ── KPI Strip ── */
.sa-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 1200px) { .sa-kpi-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .sa-kpi-strip { grid-template-columns: repeat(2, 1fr); } }

.sa-kpi-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  border: 1px solid #e5e7eb;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}
.sa-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.sa-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.10); }

.sa-kpi-blue::before   { background: #1a73e8; }
.sa-kpi-green::before  { background: #00c853; }
.sa-kpi-red::before    { background: #f44336; }
.sa-kpi-purple::before { background: #9c27b0; }
.sa-kpi-teal::before   { background: #00bcd4; }
.sa-kpi-orange::before { background: #ff9800; }

.sa-kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.sa-kpi-blue   .sa-kpi-icon { background: #e8f0fe; color: #1a73e8; }
.sa-kpi-green  .sa-kpi-icon { background: #e8f5e9; color: #00c853; }
.sa-kpi-red    .sa-kpi-icon { background: #ffebee; color: #f44336; }
.sa-kpi-purple .sa-kpi-icon { background: #f3e5f5; color: #9c27b0; }
.sa-kpi-teal   .sa-kpi-icon { background: #e0f7fa; color: #00838f; }
.sa-kpi-orange .sa-kpi-icon { background: #fff3e0; color: #ff9800; }

.sa-kpi-val   { font-size: 22px; font-weight: 800; color: #1a1f36; line-height: 1; }
.sa-kpi-label { font-size: 11px; font-weight: 600; color: #6b7280; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── Section Header ── */
.sa-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sa-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #1a1f36;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sa-section-count {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  background: #e5e7eb;
  border-radius: 20px;
  padding: 2px 10px;
}
.sa-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Search */
.sa-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.sa-search-wrap > i {
  position: absolute;
  left: 10px;
  color: #9ca3af;
  font-size: 12px;
  pointer-events: none;
}
.sa-search-wrap input {
  padding: 8px 12px 8px 30px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 12px;
  width: 200px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  color: #1a1f36;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sa-search-wrap input:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

/* Filter tabs */
.sa-filter-tabs { display: flex; gap: 4px; }
.sa-filter-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s;
}
.sa-filter-tab:hover  { border-color: #1a73e8; color: #1a73e8; }
.sa-filter-tab.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* View toggle */
.sa-view-toggle { display: flex; gap: 3px; }
.sa-view-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  color: #9ca3af;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.sa-view-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.sa-view-btn:hover:not(.active) { border-color: #1a73e8; color: #1a73e8; }

/* ══════════════════════════════════════════════════
   PROPERTY GRID — COMPACT
══════════════════════════════════════════════════ */
.sa-props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 0;
}
.sa-props-grid.list-view {
  grid-template-columns: 1fr;
  gap: 7px;
}

/* ── COMPACT CARD ── */
.sa-prop-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: default;
}
.sa-prop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.10);
  border-color: #d0d9e8;
}

/* Left accent bar (3px vertical strip) */
.sa-prop-card-compact .sa-prop-card-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  height: auto;
  border-radius: 0;
}

/* Top row: emoji + name + status dot */
.sa-prop-card-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px 0 16px;
}
.sa-prop-card-emoji {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.sa-prop-name-wrap { flex: 1; min-width: 0; }
.sa-prop-name {
  font-size: 13px;
  font-weight: 800;
  color: #1a1f36;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sa-prop-location {
  font-size: 10px;
  color: #9ca3af;
  font-weight: 500;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── STATUS COL wrapper (fixed-width in list view) ── */
.sa-prop-status-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
  padding-top: 3px;
}

/* ── STATUS DOT with rich tooltip ── */
.sa-prop-status-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: help;
  position: relative;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--st-color, #9ca3af);
  transition: box-shadow 0.15s;
  display: block;
}
/* Tooltip bubble on hover */
.sa-prop-status-dot.sa-status-tip::after {
  content: attr(data-tip);
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  transform: translateY(-50%);
  background: #1a1f36;
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid var(--st-color, #9ca3af);
}
/* Arrow pointing right toward the dot */
.sa-prop-status-dot.sa-status-tip::before {
  content: '';
  position: absolute;
  top: 50%;
  right: calc(100% + 5px);
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #1a1f36;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 201;
}
.sa-prop-status-dot.sa-status-tip:hover::after,
.sa-prop-status-dot.sa-status-tip:hover::before {
  opacity: 1;
}

/* Alert dot (pulsing on property name) */
.sa-prop-alert-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: sa-pulse-dot 1.8s ease-in-out infinite;
  vertical-align: middle;
}

/* Group tag (colored pill — now lives in footer) */
.sa-prop-group-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gtc, #546e7a);
  background: var(--gtbg, #eceff1);
  border: 1px solid color-mix(in srgb, var(--gtc, #546e7a) 22%, transparent);
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: filter 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  flex-shrink: 0;
}
.sa-prop-group-tag:hover {
  filter: brightness(0.9);
  box-shadow: 0 1px 6px color-mix(in srgb, var(--gtc, #546e7a) 25%, transparent);
}
.sa-prop-group-tag i { font-size: 8px; flex-shrink: 0; }

/* Stats row (single row: APs / Guests / BW · Health%) */
.sa-prop-stats-compact {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px 4px 16px;
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  flex-wrap: nowrap;
  overflow: hidden;
}
.sa-prop-stats-compact > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sa-prop-stats-compact i { font-size: 9px; }

/* BW + health combined span */
.sa-prop-bw-health {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 1 !important;
}
.sa-prop-health-inline {
  font-weight: 800;
  font-size: 10px;
}

/* Slim health bar */
.sa-prop-health-bar-slim {
  height: 3px;
  background: #eef1f5;
  margin: 2px 11px 0 16px;
  border-radius: 3px;
  overflow: hidden;
}
.sa-prop-health-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.7s ease;
}

/* ── FOOTER: group tag LEFT + action icons RIGHT ── */
.sa-prop-actions-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;   /* group left, buttons right */
  gap: 6px;
  padding: 6px 9px 8px 12px;
  margin-top: auto;
  border-top: 1px solid #f3f4f6;
}
/* Right cluster of icon buttons */
.sa-prop-action-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Shared icon button */
.sa-prop-action-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.14s;
  font-family: 'Inter', sans-serif;
}
.sa-prop-action-icon:hover {
  background: #f0f4f8;
  border-color: #1a73e8;
  color: #1a73e8;
}
/* Manage button — blue gradient */
.sa-prop-action-manage {
  background: linear-gradient(135deg, #1a73e8, #0d5bc7);
  color: #fff;
  border-color: #1a73e8;
  box-shadow: 0 2px 6px rgba(26,115,232,0.28);
}
.sa-prop-action-manage:hover {
  background: linear-gradient(135deg, #1557b0, #0a47a8);
  color: #fff !important;
  border-color: #1557b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,115,232,0.38);
}

/* ── LIST VIEW overrides ── */
.sa-props-grid.list-view .sa-prop-card-compact {
  flex-direction: row;
  align-items: center;
  border-radius: 10px;
  min-height: 52px;
}
.sa-props-grid.list-view .sa-prop-card-accent {
  position: relative;
  width: 3px;
  height: auto;
  align-self: stretch;
  flex-shrink: 0;
}
.sa-props-grid.list-view .sa-prop-card-top {
  flex: 0 0 260px;          /* fixed name-column width — all rows identical */
  width: 260px;
  padding: 7px 8px 7px 14px;
  min-width: 0;
  overflow: hidden;
}
/* In list view the status-col becomes a standalone centred column */
.sa-props-grid.list-view .sa-prop-status-col {
  flex: 0 0 32px;           /* fixed 32px column — always same x position */
  width: 32px;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #f1f5f9;
  padding-top: 0;
}
/* In grid view the status col is inline inside card-top — no separator needed */
.sa-prop-card-top .sa-prop-status-col {
  border-right: none;
}
.sa-props-grid.list-view .sa-prop-stats-compact {
  flex: 1 1 0;
  padding: 0 10px;
  border-right: 1px solid #f1f5f9;
  gap: 12px;
  min-width: 0;
}
.sa-props-grid.list-view .sa-prop-health-bar-slim { display: none; }
.sa-props-grid.list-view .sa-prop-actions-compact {
  padding: 0 10px;
  border-top: none;
  margin-top: 0;
  min-width: 180px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   BOTTOM GRID (Alerts + Chart)
══════════════════════════════════════════════════ */
.sa-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) { .sa-bottom-grid { grid-template-columns: 1fr; } }

.sa-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}
.sa-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafbfc;
}
.sa-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a1f36;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sa-panel-link {
  font-size: 12px;
  font-weight: 700;
  color: #1a73e8;
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
}
.sa-panel-link:hover { text-decoration: underline; }
.sa-panel-body { padding: 0; }
.sa-legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
}
.sa-leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Alert list items */
.sa-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}
.sa-alert-item:last-child { border-bottom: none; }
.sa-alert-item:hover { background: #fafbfc; }
.sa-alert-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}
.sa-alert-body { flex: 1; min-width: 0; }
.sa-alert-title { font-size: 13px; font-weight: 700; color: #1a1f36; }
.sa-alert-meta  { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.sa-alert-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 2px;
}

/* ── Alert item — clickable + action buttons ── */
.sa-alert-clickable {
  cursor: pointer;
}
.sa-alert-clickable:hover {
  background: #f0f7ff;
}
.sa-alert-time {
  color: #c4c9d4;
}

/* Action buttons — slide in on hover */
.sa-alert-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}
.sa-alert-item:hover .sa-alert-actions {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}
.sa-alert-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  transition: all 0.13s ease;
}
.sa-alert-act-open {
  background: #eff6ff;
  color: #1a73e8;
  border-color: #bfdbfe;
}
.sa-alert-act-open:hover {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}
.sa-alert-act-ticket {
  background: #fffbeb;
  color: #d97706;
  border-color: #fde68a;
}
.sa-alert-act-ticket:hover {
  background: #f59e0b;
  color: #fff;
  border-color: #f59e0b;
}

/* Property card ticket button */
.sa-prop-action-ticket {
  color: #d97706;
  border-color: #fde68a;
  background: #fffbeb;
}
.sa-prop-action-ticket:hover {
  background: #f59e0b !important;
  color: #fff !important;
  border-color: #f59e0b !important;
}

/* ══════════════════════════════════════════════════
   TICKET MODAL
══════════════════════════════════════════════════ */
.sa-ticket-modal-inner {
  max-width: 680px;
}

/* Ticket ID badge in modal header */
.sa-tkt-id-badge {
  font-size: 11px;
  font-weight: 800;
  color: #f59e0b;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  font-family: 'JetBrains Mono', 'Fira Mono', monospace;
}

/* Meta info row (property / reported / priority) */
.sa-tkt-meta-row {
  display: flex;
  gap: 0;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  margin-bottom: 16px;
}
.sa-tkt-meta-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-right: 1px solid #e5e7eb;
}
.sa-tkt-meta-item:last-child { border-right: none; }
.sa-tkt-meta-label {
  font-size: 9px;
  font-weight: 800;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sa-tkt-meta-val {
  font-size: 12px;
  font-weight: 700;
  color: #1a1f36;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sa-tkt-priority-badge { }

.sa-tkt-divider {
  height: 1px;
  background: #f1f5f9;
  margin-bottom: 16px;
}

/* Warning button */
.sa-btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 3px 10px rgba(245,158,11,0.3);
}
.sa-btn-warning:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 5px 16px rgba(245,158,11,0.4);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════ */
.sa-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.sa-modal-overlay.open {
  opacity: 1; pointer-events: all;
}
.sa-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}
.sa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0;
  background: #fff;
  z-index: 1;
  border-radius: 18px 18px 0 0;
}
.sa-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1f36;
  display: flex; align-items: center; gap: 8px;
}
.sa-modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f0f4f8;
  border: none; color: #6b7280;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s;
}
.sa-modal-close:hover { background: #e5e7eb; color: #1a1f36; }
.sa-modal-body {
  padding: 20px 22px;
}
.sa-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid #e5e7eb;
}
.sa-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 500px) { .sa-form-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════
   NOTIFICATIONS SLIDE-IN PANEL
══════════════════════════════════════════════════ */
.sa-notif-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 400px;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -6px 0 30px rgba(0,0,0,0.12);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
}
.sa-notif-panel.open { right: 0; }
.sa-notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafbfc;
  flex-shrink: 0;
}
.sa-notif-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.sa-notif-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1199;
  display: none;
}
.sa-notif-backdrop.open { display: block; }

/* ══════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════ */
#sa-toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sa-toast {
  background: #1a1f36;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  border-left: 4px solid #1a73e8;
  animation: sa-toast-in 0.3s ease;
  transition: opacity 0.3s ease;
}
.sa-toast.success { border-left-color: #00c853; }
.sa-toast.warning { border-left-color: #ff9800; }
.sa-toast.danger  { border-left-color: #f44336; }
@keyframes sa-toast-in {
  from { opacity:0; transform: translateX(30px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ══════════════════════════════════════════════════
   FORM CONTROLS (re-use from main app)
══════════════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 700; color: #374151; }
.form-control {
  padding: 9px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #1a1f36;
  background: #fff;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sa-main { padding: 16px 16px 40px; }
  .sa-hero { flex-direction: column; align-items: flex-start; }
  .sa-props-grid { grid-template-columns: 1fr; }
  .sa-header { padding: 0 16px; }
  .sa-status-chip { display: none; }
  .sa-clock { display: none; }
  .sa-section-header { flex-direction: column; align-items: flex-start; }
  .sa-notif-panel { width: 100%; }
}

/* ══════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════ */
.sa-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.sa-empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.sa-empty-state p { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: #6b7280; }
.sa-empty-state span { font-size: 13px; }

/* ══════════════════════════════════════════════════
   HERO STATUS ROW (Online / Warning / Offline chips)
══════════════════════════════════════════════════ */
.sa-hero-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.sa-hero-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.sa-hero-chip-online  { background: #e8f5e9; color: #00c853; border: 1px solid #a5d6a7; }
.sa-hero-chip-warning { background: #fff8e1; color: #ff9800; border: 1px solid #ffe082; }
.sa-hero-chip-offline { background: #ffebee; color: #f44336; border: 1px solid #ef9a9a; }

/* ══════════════════════════════════════════════════
   STATE BREAKDOWN SECTION
══════════════════════════════════════════════════ */
.sa-state-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.sa-state-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sa-state-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #1a1f36;
  display: flex;
  align-items: center;
  gap: 7px;
}
.sa-state-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #f44336;
  background: #fff5f5;
  border: 1px solid #fecaca;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Inter', sans-serif;
}
.sa-state-clear-btn:hover { background: #fee2e2; }

/* Scrollable horizontal state chip bar */
.sa-state-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}
.sa-state-bar::-webkit-scrollbar {
  height: 4px;
}
.sa-state-bar::-webkit-scrollbar-track { background: transparent; }
.sa-state-bar::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

/* Individual state chip */
.sa-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  background: #f8f9fa;
  border: 1.5px solid #e5e7eb;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s ease;
}
.sa-state-chip:hover {
  border-color: var(--chip-color, #1a73e8);
  background: color-mix(in srgb, var(--chip-color, #1a73e8) 8%, #fff);
}
.sa-state-chip.active {
  background: color-mix(in srgb, var(--chip-color, #1a73e8) 12%, #fff);
  border-color: var(--chip-color, #1a73e8);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--chip-color, #1a73e8) 30%, transparent);
}
.sa-state-chip-bar {
  display: inline-block;
  height: 8px;
  min-width: 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: width 0.3s ease;
}
.sa-state-chip-name {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
}
.sa-state-chip.active .sa-state-chip-name {
  color: var(--chip-color, #1a73e8);
}
.sa-state-chip-count {
  font-size: 10px;
  font-weight: 800;
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 20px;
  text-align: center;
}
.sa-state-chip.active .sa-state-chip-count {
  background: var(--chip-color, #1a73e8);
  color: #fff;
}

/* ══════════════════════════════════════════════════
   SELECT / DROPDOWN (shared across filters & sort)
══════════════════════════════════════════════════ */
.sa-select {
  padding: 7px 28px 7px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
  height: 34px;
}
.sa-select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}
.sa-select-sm {
  height: 30px;
  padding: 4px 26px 4px 8px;
  font-size: 11px;
  border-radius: 8px;
}

/* ══════════════════════════════════════════════════
   PAGINATION BAR
══════════════════════════════════════════════════ */
.sa-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sa-pagination-bottom {
  margin-top: 16px;
  margin-bottom: 28px;
}

.sa-range-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
}

.sa-page-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sa-page-nums {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Pagination buttons (numbered + prev/next) */
.sa-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.sa-page-btn:hover:not(:disabled):not(.sa-page-btn-active) {
  border-color: #1a73e8;
  color: #1a73e8;
  background: #eff6ff;
}
.sa-page-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.sa-page-btn-active {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
  box-shadow: 0 2px 8px rgba(26,115,232,0.3);
}
.sa-page-prev-btn,
.sa-page-next-btn {
  font-size: 11px;
}

.sa-page-ellipsis {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 700;
  padding: 0 4px;
  line-height: 32px;
  user-select: none;
}

.sa-per-page-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sa-per-page-label {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  white-space: nowrap;
}
.sa-page-info-text {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   TABLE VIEW
══════════════════════════════════════════════════ */
/* Wrapper that replaces .sa-props-grid when table view is active */
.sa-props-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 0;
  /* overrides the grid gap that sa-props-grid uses */
  display: block;
  gap: unset;
  grid-template-columns: unset;
}

.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Inter', sans-serif;
  min-width: 900px;
}
.sa-table thead {
  background: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 2;
}
.sa-table thead tr {
  border-bottom: 2px solid #e5e7eb;
}
.sa-table thead th {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.12s;
}
.sa-table thead th:hover { color: #1a73e8; }

.sa-tbl-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s;
}
.sa-tbl-row:last-child { border-bottom: none; }
.sa-tbl-row:hover { background: #f8fbff; }

.sa-tbl-row td {
  padding: 10px 12px;
  vertical-align: middle;
}

/* Name cell — emoji + stacked name/type */
.sa-tbl-name {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 180px;
}

/* ══════════════════════════════════════════════════
   SECTION ACTIONS — extra selects responsive tweak
══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  #sa-state-select,
  #sa-type-select,
  #sa-group-select,
  #sa-sort-select { display: none; }
}
@media (max-width: 900px) {
  .sa-pagination-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sa-page-info-text { display: none; }
  .sa-per-page-wrap  { display: none; }
}
@media (max-width: 600px) {
  .sa-state-section { padding: 12px 14px; }
  .sa-state-bar { gap: 6px; }
}

/* ══════════════════════════════════════════════════
   PAGE TAB NAVIGATION
══════════════════════════════════════════════════ */
.sa-page-tabs {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 2px solid var(--border, #e2e8f0);
  background: var(--card-bg, #fff);
  margin-bottom: 28px;
  position: sticky;
  top: 64px;
  z-index: 90;
}
.sa-page-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.sa-page-tab:hover { color: var(--primary, #1a73e8); }
.sa-page-tab.active {
  color: var(--primary, #1a73e8);
  border-bottom-color: var(--primary, #1a73e8);
}

/* ══════════════════════════════════════════════════
   USER MANAGEMENT — SHARED
══════════════════════════════════════════════════ */
.sa-um-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 0 16px;
}
.sa-um-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #111827);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
}
.sa-um-sub {
  font-size: 13px;
  color: var(--text-muted, #9ca3af);
  margin: 0;
}

/* KPI row */
.sa-um-kpi-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sa-um-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 14px 20px;
  flex: 1;
  min-width: 140px;
}

/* User table */
.sa-um-table-wrap {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
}
.sa-um-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sa-um-table thead th {
  background: var(--body-bg, #f8fafc);
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary, #64748b);
  border-bottom: 1px solid var(--border, #e2e8f0);
  white-space: nowrap;
}
.sa-um-table tbody tr {
  border-bottom: 1px solid var(--border, #e2e8f0);
  transition: background .12s;
}
.sa-um-table tbody tr:last-child { border-bottom: none; }
.sa-um-table tbody tr:hover { background: var(--body-bg, #f8fafc); }
.sa-um-table td { padding: 12px 14px; vertical-align: middle; }

/* Avatar */
.sa-um-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary, #1a73e8);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sa-um-avatar-xl {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary, #1a73e8);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Role badge */
.sa-um-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Status badge */
.sa-um-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}
.sa-um-status-badge.active   { background: #e8f5e9; color: #2e7d32; }
.sa-um-status-badge.inactive { background: #f1f5f9; color: #64748b; }
.sa-um-status-badge.pending  { background: #fff8e1; color: #f59e0b; }

/* Action buttons */
.sa-um-action-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 7px;
  background: var(--card-bg, #fff);
  color: var(--primary, #1a73e8);
  cursor: pointer;
  font-size: 12px;
  transition: background .12s, color .12s;
}
.sa-um-action-btn:hover { background: var(--primary-light, #e8f0fe); }
.sa-um-action-btn.danger { color: #dc2626; }
.sa-um-action-btn.danger:hover { background: #fee2e2; border-color: #fca5a5; }

/* Property chip in table */
.sa-um-prop-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  background: var(--primary-light, #e8f0fe);
  color: var(--primary, #1a73e8);
  border: 1px solid var(--primary, #1a73e8)30;
}
.sa-um-prop-chip.more {
  background: #f1f5f9;
  color: #64748b;
  border-color: var(--border, #e2e8f0);
}

/* ── USER MODAL — Property selector ── */
.sa-um-invite-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #e8f0fe;
  border: 1px solid #c5d8fc;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: #1a73e8;
  font-weight: 600;
}
.sa-um-prop-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 7px 12px;
  margin-bottom: 8px;
  background: var(--body-bg, #f8fafc);
}
.sa-um-prop-search-wrap i { color: var(--text-muted, #9ca3af); }
.sa-um-prop-search-wrap input {
  border: none;
  background: none;
  outline: none;
  font-size: 12px;
  color: var(--text-primary, #111827);
  width: 100%;
}
.sa-um-prop-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  margin-bottom: 8px;
}
.sa-um-prop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, #e2e8f0);
  transition: background .1s;
  font-size: 12px;
}
.sa-um-prop-item:last-child { border-bottom: none; }
.sa-um-prop-item:hover, .sa-um-prop-item.selected { background: var(--primary-light, #e8f0fe); }
.sa-um-prop-item input[type=checkbox] { accent-color: var(--primary, #1a73e8); flex-shrink: 0; }
.sa-um-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  padding: 4px 0;
}
.sa-um-sel-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--primary-light, #e8f0fe);
  color: var(--primary, #1a73e8);
  border: 1px solid #c5d8fc;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Profile tab cards ── */
.sa-um-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 20px;
}
.sa-um-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary, #111827);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sa-um-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.sa-um-security-row:last-of-type { border-bottom: none; }

/* ── GLOBAL FOOTER ────────────────────────────────── */
.sa-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  font-size: 11.5px;
  color: var(--text-muted, #9ca3af);
  letter-spacing: 0.01em;
}
.sa-footer-copy  { font-weight: 600; color: var(--text-secondary, #64748b); }
.sa-footer-divider { color: var(--border, #e2e8f0); font-size: 14px; }
.sa-footer-link {
  color: var(--primary, #1a73e8);
  font-weight: 600;
  text-decoration: none;
}
.sa-footer-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════
   MSP SUPPORT TICKET PORTAL — SA Level
══════════════════════════════════════════════════ */

/* Scope note banner under portal header */
.sa-tkt-scope-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1d4ed8;
}
.sa-tkt-scope-note i { font-size: 11px; }

/* Nav badge on Support Tickets tab */
.sa-tkt-nav-badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 18px; height: 18px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* KPI Cards row */
.sa-tkt-kpi-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sa-tkt-kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 16px 18px;
  flex: 1;
  min-width: 160px;
  transition: box-shadow .15s;
}
.sa-tkt-kpi-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.sa-tkt-kpi-card.sa-tkt-kpi-alert {
  border-color: #fca5a5;
  background: #fff5f5;
}
.sa-tkt-kpi-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sa-tkt-kpi-body { min-width: 0; }
.sa-tkt-kpi-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}
.sa-tkt-kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sa-tkt-kpi-sub {
  font-size: 10.5px;
  color: var(--text-muted, #9ca3af);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Filter Bar */
.sa-tkt-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 10px 0;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}
.sa-tkt-filter-bar .sa-search-wrap {
  min-width: 160px;
}
.sa-tkt-sel {
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
  padding: 6px 8px;
  height: 34px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  color: var(--text-primary, #111827);
  background: #fff;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.sa-tkt-filter-divider {
  width: 1px; height: 24px;
  background: var(--border, #e2e8f0);
  flex-shrink: 0; margin: 0 2px;
}
.sa-tkt-view-btn {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.sa-tkt-view-btn:hover { border-color: var(--primary, #1a73e8); color: var(--primary, #1a73e8); }
.sa-tkt-view-btn.active {
  background: var(--primary, #1a73e8);
  border-color: var(--primary, #1a73e8);
  color: #fff;
}

/* Ticket table overrides */
.sa-tkt-table { min-width: 1100px; }
.sa-tkt-row { cursor: pointer; }
.sa-tkt-row:hover { background: #f0f7ff !important; }
.sa-tkt-row-breach { border-left: 3px solid #dc2626 !important; }

/* Ticket badge styles */
.sa-tkt-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.sa-tkt-priority-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.sa-tkt-sev-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.sa-tkt-escl-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.sa-tkt-msp-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.sa-tkt-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}
.sa-tkt-breach-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

/* Icon action button */
.sa-icon-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #6b7280;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.sa-icon-btn:hover { background: var(--primary-light, #e8f0fe); color: var(--primary, #1a73e8); border-color: var(--primary, #1a73e8); }

/* Kanban Board */
.sa-tkt-kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
  min-height: 400px;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}
.sa-tkt-kanban-col {
  flex: 0 0 260px;
  width: 260px;
  background: var(--body-bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 700px;
}
.sa-tkt-kanban-col-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  display: flex; align-items: center; gap: 7px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  flex-shrink: 0;
}
.sa-tkt-kanban-col-body {
  flex: 1; overflow-y: auto;
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 8px;
  scrollbar-width: thin; scrollbar-color: #e5e7eb transparent;
}
.sa-tkt-col-open    { background: #fef2f2; color: #dc2626; }
.sa-tkt-col-inprog  { background: #fffbeb; color: #d97706; }
.sa-tkt-col-pending { background: #eff6ff; color: #2563eb; }
.sa-tkt-col-resolved{ background: #f0fdf4; color: #16a34a; }
.sa-tkt-col-closed  { background: #f9fafb; color: #6b7280; }
.sa-tkt-col-count {
  margin-left: auto;
  background: rgba(0,0,0,0.08);
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
}

/* Kanban card */
.sa-tkt-kanban-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  border-left: 3px solid transparent;
}
.sa-tkt-kanban-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.1); transform: translateY(-1px); }
.sa-tkt-card-breach { border-left-color: #dc2626 !important; background: #fff5f5; }
.sa-tkt-kanban-card-head { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.sa-tkt-kanban-card-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-primary, #111827);
  line-height: 1.4; margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sa-tkt-kanban-card-prop {
  font-size: 10.5px; color: #2563eb; font-weight: 600; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sa-tkt-kanban-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; gap: 6px; flex-wrap: wrap;
}

/* Detail Slide-in Panel */
.sa-tkt-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1050;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.sa-tkt-detail-overlay.open { opacity: 1; pointer-events: all; }

.sa-tkt-detail-panel {
  position: fixed;
  top: 0; right: -540px;
  width: 520px;
  max-width: calc(100vw - 20px);
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  z-index: 1051;
  display: flex; flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sa-tkt-detail-panel.open { right: 0; }

.sa-tkt-detail-header {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafbfc;
  flex-shrink: 0;
}
.sa-tkt-detail-body {
  flex: 1; overflow-y: auto;
  padding: 16px 18px;
  scrollbar-width: thin; scrollbar-color: #e5e7eb transparent;
}

/* Detail panel internals */
.sa-tkt-prop-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  margin-bottom: 14px;
}
.sa-tkt-detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.sa-tkt-detail-meta-grid .sa-tkt-meta-item {
  background: #fff;
  padding: 9px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.sa-tkt-meta-label {
  font-size: 9px; font-weight: 800; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .05em;
}
.sa-tkt-meta-val {
  font-size: 12px; font-weight: 700;
  color: var(--text-primary, #111827);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sa-tkt-sla-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.sa-tkt-notes-block {
  background: #fafbfc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.sa-tkt-detail-section-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted, #9ca3af);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 16px 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.sa-tkt-detail-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border, #e2e8f0);
}

/* Timeline */
.sa-tkt-timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.sa-tkt-timeline-item { display: flex; gap: 10px; position: relative; padding-bottom: 12px; }
.sa-tkt-timeline-item:last-child { padding-bottom: 0; }
.sa-tkt-timeline-item:not(:last-child)::before {
  content: ''; position: absolute;
  left: 13px; top: 24px; bottom: 0;
  width: 1px; background: #e5e7eb;
}
.sa-tkt-timeline-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; flex-shrink: 0;
  background: #f1f5f9; color: #6b7280;
  border: 2px solid #e5e7eb;
  z-index: 1;
}
.sa-tkt-dot-created  { background: #e8f0fe; color: #1a73e8; border-color: #93c5fd; }
.sa-tkt-dot-comment  { background: #f3e8ff; color: #7c3aed; border-color: #c4b5fd; }
.sa-tkt-dot-status   { background: #fff3cd; color: #d97706; border-color: #fde68a; }
.sa-tkt-dot-resolved { background: #dcfce7; color: #16a34a; border-color: #86efac; }
.sa-tkt-dot-closed   { background: #f1f5f9; color: #6b7280; border-color: #e2e8f0; }
.sa-tkt-timeline-content { flex: 1; padding-top: 2px; }

/* Comment box */
.sa-tkt-comment-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.sa-tkt-comment-box textarea {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid #e5e7eb; border-radius: 10px;
  font-size: 13px; font-family: 'Inter', sans-serif;
  color: var(--text-primary, #111827); resize: vertical; min-height: 72px;
  transition: border-color .15s;
}
.sa-tkt-comment-box textarea:focus {
  outline: none; border-color: var(--primary, #1a73e8);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}

/* SA btn sizes */
.sa-btn-sm {
  padding: 5px 12px;
  font-size: 11.5px;
}
.sa-btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 3px 10px rgba(220,38,38,.3);
}
.sa-btn-danger:hover { background: linear-gradient(135deg, #b91c1c, #991b1b); }

/* Responsive tweaks */
@media (max-width: 900px) {
  .sa-tkt-kpi-card { min-width: 140px; }
  .sa-tkt-detail-panel { width: 100%; }
}
@media (max-width: 600px) {
  .sa-tkt-filter-bar { overflow-x: auto; }
  .sa-tkt-sel { min-width: 110px; }
}

/* ══════════════════════════════════════════════════════════════
   GROUP DASHBOARD — GuestXP / CloudExt  (SA light theme)
   All colors, cards, typography, spacing match existing .sa-*
══════════════════════════════════════════════════════════════ */

/* ── Root wrapper ── */
.gd-root {
  background: #f0f4f8;   /* exact match to .sa-body */
  padding-bottom: 40px;
}

/* ── Pulse animation (reuse for live dot + nav badge) ── */
@keyframes gdPulse {
  0%,100% { box-shadow: 0 0 4px #00c853; }
  50%      { box-shadow: 0 0 10px #00c853; }
}
@keyframes gdPinPulse {
  0%,100% { transform: scale(1); opacity: .5; }
  50%      { transform: scale(1.9); opacity: 0; }
}

/* ── Top Sub-bar — sits just below the tab strip, light themed ── */
.gd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 18px;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 6px;
}
.gd-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gd-logo-badge {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #e8f0fe, #e0f7fa);
  border: 1px solid #c7d7f8;
  border-radius: 10px;
  padding: 6px 14px;
}
.gd-logo-badge i { font-size: 16px; color: #1a73e8; }
.gd-logo-text { color: #1a1f36; font-size: 13px; font-weight: 800; }
.gd-logo-accent { color: #1a73e8; }
.gd-topbar-divider { width: 1px; height: 20px; background: #e5e7eb; }
.gd-live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #00c853; box-shadow: 0 0 6px #00c853;
  animation: gdPulse 2s ease-in-out infinite;
}
.gd-live-label { font-size: 11px; font-weight: 700; color: #00c853; letter-spacing:.06em; text-transform:uppercase; }
.gd-time-label { font-size: 13px; font-weight: 700; color: #6b7280; font-variant-numeric: tabular-nums; }

.gd-topbar-center { display: flex; align-items: center; gap: 12px; }
.gd-group-selector-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 12px;
  transition: border-color .15s;
}
.gd-group-selector-wrap:focus-within { border-color: #1a73e8; }
.gd-group-sel {
  background: transparent; border: none;
  color: #1a1f36; font-size: 13px; font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer; outline: none; min-width: 220px;
}

.gd-topbar-right { display: flex; align-items: center; gap: 10px; }
.gd-alert-chip {
  display: flex; align-items: center; gap: 6px;
  background: #fff5f5; border: 1.5px solid #fecaca;
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; font-weight: 700; color: #f44336;
}
.gd-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid #e5e7eb;
  border-radius: 10px; color: #374151;
  font-size: 12px; font-weight: 700;
  padding: 7px 14px; cursor: pointer;
  font-family: 'Inter', sans-serif; transition: all .18s;
}
.gd-action-btn:hover { background: #f0f4f8; border-color: #1a73e8; color: #1a73e8; }
.gd-action-btn-glow {
  background: linear-gradient(135deg,#1a73e8,#0d5bc7);
  border-color: #1a73e8; color: #fff;
  box-shadow: 0 3px 10px rgba(26,115,232,0.3);
}
.gd-action-btn-glow:hover { box-shadow: 0 5px 16px rgba(26,115,232,0.45); transform: translateY(-1px); }

/* ── Nav badge pulse ── */
.gd-nav-pulse {
  display: inline-block;
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00c853;
  animation: gdPulse 1.8s ease-in-out infinite;
}

/* ── Layout Rows ── */
.gd-root { padding-top: 0; }
.gd-kpi-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  padding: 16px 24px 0;
}
@media (max-width: 1400px) { .gd-kpi-row { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 900px)  { .gd-kpi-row { grid-template-columns: repeat(2,1fr); } }

.gd-row2 {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 14px;
  padding: 14px 24px 0;
}
@media (max-width: 1400px) { .gd-row2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px)  { .gd-row2 { grid-template-columns: 1fr; } }

.gd-row3 {
  display: grid;
  grid-template-columns: 1fr 320px 320px;
  gap: 14px;
  padding: 14px 24px 0;
}
@media (max-width: 1400px) { .gd-row3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px)  { .gd-row3 { grid-template-columns: 1fr; } }

.gd-row5 {
  display: grid;
  grid-template-columns: 1fr 320px 320px;
  gap: 14px;
  padding: 14px 24px 0;
}
@media (max-width: 1400px) { .gd-row5 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px)  { .gd-row5 { grid-template-columns: 1fr; } }

/* ── Base Card ── */
.gd-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.gd-card::before {
  content: '';
  position: absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(90deg, #1a73e8, #0d5bc7);
  border-radius: 14px 14px 0 0;
}

/* ── Card Title ── */
.gd-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.gd-ai-tag {
  margin-left: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 9px; font-weight: 900;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: .1em;
}
.gd-ai-tag-purple {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

/* ── KPI Cards ── */
.gd-kpi-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: default;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.gd-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.gd-kpi-card::after {
  content: '';
  position: absolute; bottom:0; left:0; right:0; height:3px;
  background: var(--gd-kpi-accent, #1a73e8);
  border-radius: 0 0 14px 14px;
}
.gd-kpi-icon-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.gd-kpi-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--gd-kpi-bg, #e8f0fe);
  color: var(--gd-kpi-accent, #1a73e8);
}
.gd-kpi-trend {
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 3px;
}
.gd-kpi-trend.up   { color: #00c853; }
.gd-kpi-trend.down { color: #f44336; }
.gd-kpi-trend.flat { color: #9ca3af; }
.gd-kpi-val {
  font-size: 26px;
  font-weight: 900;
  color: #1a1f36;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.gd-kpi-label {
  font-size: 10.5px; font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 4px;
}
.gd-kpi-spark {
  height: 28px; width: 100%; margin-top: 10px;
  display: flex; align-items: flex-end; gap: 2px;
}
.gd-spark-bar {
  flex: 1; border-radius: 2px 2px 0 0;
  background: var(--gd-kpi-accent, #1a73e8);
  opacity: .25;
  transition: height .4s ease;
  min-height: 2px;
}
.gd-spark-bar.active { opacity: .75; }

/* ── Score Gauge Card ── */
.gd-score-card { display: flex; flex-direction: column; align-items: center; }
.gd-gauge-wrap {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto 16px;
}
.gd-gauge-center {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.gd-gauge-val {
  font-size: 42px; font-weight: 900;
  color: #1a1f36;
  line-height: 1;
  letter-spacing: -.03em;
}
.gd-gauge-sub { font-size: 14px; font-weight: 700; color: #6b7280; }
.gd-gauge-grade {
  margin-top: 4px;
  font-size: 12px; font-weight: 800;
  padding: 2px 10px;
  border-radius: 99px;
  letter-spacing: .06em;
}
.gd-subscore-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gd-subscore-item {
  display: flex; flex-direction: column; gap: 4px;
}
.gd-subscore-label {
  font-size: 10px; font-weight: 700; color: #6b7280;
  text-transform: uppercase; letter-spacing: .05em;
}
.gd-subscore-bar-bg {
  height: 5px; background: #e5e7eb; border-radius: 99px; overflow: hidden;
}
.gd-subscore-bar-fill {
  height: 100%; border-radius: 99px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.gd-subscore-val {
  font-size: 11px; font-weight: 800;
  color: #374151;
}

/* ── Map Card ── */
.gd-map-card { position: relative; }
.gd-map-legend-row {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 600; color: #6b7280;
}
.gd-map-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.gd-dot-online  { background: #00c853; }
.gd-dot-warn    { background: #ff9800; }
.gd-dot-offline { background: #f44336; }
.gd-map-container {
  position: relative;
  width: 100%; aspect-ratio: 600/650;
  max-height: 400px;
}
.gd-india-svg { width: 100%; height: 100%; }
.gd-india-path {
  fill: #e8f0fe;
  stroke: #c7d7f8;
  stroke-width: 1;
}
.gd-map-pins { position: absolute; inset: 0; pointer-events: none; }
.gd-map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: all;
  cursor: pointer;
}
.gd-pin-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  position: relative;
}
.gd-pin-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  animation: gdPinPulse 2s ease-in-out infinite;
  opacity: .4;
}
.gd-pin-online .gd-pin-dot { background: #00c853; }
.gd-pin-online .gd-pin-dot::after { border: 2px solid #00c853; }
.gd-pin-warn   .gd-pin-dot { background: #ff9800; }
.gd-pin-warn   .gd-pin-dot::after { border: 2px solid #ff9800; }
.gd-pin-offline .gd-pin-dot { background: #f44336; }
.gd-pin-offline .gd-pin-dot::after { border: 2px solid #f44336; }
@keyframes gdPinPulse {
  0%,100% { transform: scale(1); opacity: .4; }
  50%      { transform: scale(1.8); opacity: 0; }
}
.gd-pin-tooltip {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
  white-space: nowrap;
  font-size: 11px;
  color: #1a1f36;
  pointer-events: none;
  display: none;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.gd-map-pin:hover .gd-pin-tooltip { display: block; }

/* ── AI Insights ── */
.gd-ai-card { display: flex; flex-direction: column; }
.gd-ai-list { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 340px; }
.gd-ai-item {
  display: flex; gap: 10px; align-items: flex-start;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all .2s;
}
.gd-ai-item:hover { background: #f3e8ff; border-color: #c4b5fd; }
.gd-ai-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.gd-ai-type-critical .gd-ai-icon  { background: #fee2e2; color: #ef4444; }
.gd-ai-type-warning  .gd-ai-icon  { background: #fef3c7; color: #f59e0b; }
.gd-ai-type-info     .gd-ai-icon  { background: #e0f2fe; color: #0ea5e9; }
.gd-ai-type-predict  .gd-ai-icon  { background: #ede9fe; color: #7c3aed; }
.gd-ai-body { flex: 1; }
.gd-ai-msg { font-size: 12px; font-weight: 600; color: #1a1f36; line-height: 1.4; }
.gd-ai-meta { font-size: 10px; color: #6b7280; margin-top: 3px; }
.gd-ai-footer { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e5e7eb; }
.gd-btn-ghost {
  background: #faf5ff;
  border: 1.5px solid #e9d5ff;
  border-radius: 8px;
  color: #7c3aed;
  font-size: 11px; font-weight: 700;
  padding: 7px 14px;
  cursor: pointer; width: 100%;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.gd-btn-ghost:hover { background: #f3e8ff; border-color: #c4b5fd; }
.gd-btn-sm { padding: 5px 10px; font-size: 11px; width: auto; }

/* ── Streaming Card ── */
.gd-stream-metrics {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  margin-bottom: 14px;
}
.gd-stream-metric {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}
.gd-sm-icon { font-size: 18px; margin-bottom: 5px; }
.gd-sm-val { font-size: 16px; font-weight: 900; color: #1a1f36; }
.gd-sm-label { font-size: 9.5px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing:.05em; margin-top:2px; }
.gd-chart-wrap { position: relative; }

/* ── Device Grid ── */
.gd-device-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 14px;
}
.gd-device-item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.gd-dev-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.gd-dev-body {}
.gd-dev-name { font-size: 11px; font-weight: 700; color: #1a1f36; }
.gd-dev-stat { font-size: 10px; color: #6b7280; margin-top: 1px; }
.gd-dev-val  { font-size: 13px; font-weight: 900; margin-top: 2px; }
.gd-dev-online  .gd-dev-icon { background: #dcfce7; color: #16a34a; }
.gd-dev-warn    .gd-dev-icon { background: #fef3c7; color: #d97706; }
.gd-dev-offline .gd-dev-icon { background: #fee2e2; color: #dc2626; }
.gd-dev-online  .gd-dev-val  { color: #16a34a; }
.gd-dev-warn    .gd-dev-val  { color: #d97706; }
.gd-dev-offline .gd-dev-val  { color: #dc2626; }

.gd-ops-btns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.gd-op-btn {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-size: 11px; font-weight: 700;
  padding: 8px 10px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.gd-op-btn:hover { background: #f0f4f8; border-color: #1a73e8; color: #1a73e8; }
.gd-op-btn-accent {
  background: linear-gradient(135deg, #1a73e8, #0d5bc7);
  border-color: #1a73e8;
  color: #fff;
  grid-column: 1 / -1;
  box-shadow: 0 3px 10px rgba(26,115,232,0.25);
}
.gd-op-btn-accent:hover { box-shadow: 0 5px 16px rgba(26,115,232,0.4); transform: translateY(-1px); }

/* ── Alerts Card ── */
.gd-alerts-card {}
.gd-alert-live-badge {
  margin-left: auto;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 10px; font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
  animation: gdPulse 2s ease-in-out infinite;
}
.gd-alerts-list {
  display: flex; flex-direction: column; gap: 7px;
  max-height: 380px; overflow-y: auto;
}
.gd-alert-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid;
  transition: all .2s;
}
.gd-alert-item:hover { transform: translateX(2px); }
.gd-alert-critical { background: #fff5f5;  border-color: #fecaca; }
.gd-alert-warning  { background: #fffbeb;  border-color: #fde68a; }
.gd-alert-info     { background: #eff6ff;  border-color: #bfdbfe; }
.gd-alert-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.gd-alert-critical .gd-alert-icon { background: #fee2e2; color: #dc2626; }
.gd-alert-warning  .gd-alert-icon { background: #fef3c7; color: #d97706; }
.gd-alert-info     .gd-alert-icon { background: #dbeafe; color: #2563eb; }
.gd-alert-body { flex: 1; min-width: 0; }
.gd-alert-msg  { font-size: 11.5px; font-weight: 600; color: #1a1f36; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-alert-prop { font-size: 10px; color: #6b7280; margin-top: 2px; }
.gd-alert-time { font-size: 10px; color: #9ca3af; white-space: nowrap; align-self: flex-start; margin-top: 2px; }
.gd-alert-sev {
  font-size: 9px; font-weight: 900; letter-spacing: .08em;
  padding: 2px 6px; border-radius: 99px;
}
.gd-alert-critical .gd-alert-sev { background: #fee2e2; color: #dc2626; }
.gd-alert-warning  .gd-alert-sev { background: #fef3c7; color: #d97706; }
.gd-alert-info     .gd-alert-sev { background: #dbeafe; color: #2563eb; }

/* ── Property Table Card ── */
.gd-table-card { padding: 18px 18px 12px; margin: 14px 24px 0; }
.gd-search-input {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  color: #1a1f36;
  font-size: 12px;
  padding: 6px 12px;
  outline: none;
  width: 180px;
  font-family: 'Inter', sans-serif;
  transition: all .2s;
}
.gd-search-input::placeholder { color: #9ca3af; }
.gd-search-input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.gd-mini-sel {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  outline: none;
}
.gd-mini-sel option { background: #fff; }
.gd-table-wrap { overflow-x: auto; margin-top: 12px; }
.gd-prop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.gd-prop-table thead tr {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.gd-prop-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.gd-prop-table td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}
.gd-prop-table tbody tr {
  transition: background .15s;
  cursor: pointer;
}
.gd-prop-table tbody tr:hover { background: #f0f4f8; }
.gd-prop-name { font-weight: 700; color: #1a1f36; font-size: 12px; }
.gd-prop-loc  { font-size: 10px; color: #6b7280; margin-top: 1px; }
.gd-group-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}
.gd-score-bar-cell { min-width: 100px; }
.gd-score-bar-bg { background: #e5e7eb; border-radius: 99px; height: 5px; overflow: hidden; margin-top: 4px; }
.gd-score-bar-fill { height: 100%; border-radius: 99px; }
.gd-score-num { font-size: 13px; font-weight: 900; }
.gd-score-excellent { color: #16a34a; }
.gd-score-good      { color: #1a73e8; }
.gd-score-warning   { color: #d97706; }
.gd-score-critical  { color: #dc2626; }
.gd-health-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px;
}
.gd-internet-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
}
.gd-risk-badge {
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 6px;
}
.gd-risk-low  { background: #dcfce7; color: #16a34a; }
.gd-risk-med  { background: #fef3c7; color: #d97706; }
.gd-risk-high { background: #fee2e2; color: #dc2626; }
.gd-status-dot-td {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
}
.gd-table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 11px; color: #6b7280;
}
.gd-page-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  transition: all .2s;
}
.gd-page-btn:hover { background: #e8f0fe; border-color: #1a73e8; color: #1a73e8; }
.gd-page-info { font-size: 11px; font-weight: 700; color: #6b7280; padding: 0 4px; line-height: 28px; }

/* ── Heatmap ── */
.gd-heatmap-card {}
.gd-heatmap-legend { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gd-hm-swatch { display: inline-block; width: 80px; height: 8px; border-radius: 99px; }
.gd-heatmap-canvas {
  width: 100%; height: 220px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}
.gd-heatmap-legend-row {
  display: flex; gap: 14px; margin-top: 8px;
}
.gd-hm-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #6b7280; font-weight: 600; }
.gd-hm-dot  { width: 8px; height: 8px; border-radius: 50%; }

/* ── WAN Card ── */
.gd-wan-list { display: flex; flex-direction: column; gap: 8px; }
.gd-wan-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}
.gd-wan-isp { font-size: 11px; font-weight: 700; color: #1a1f36; flex: 1; }
.gd-wan-speed { font-size: 11px; font-weight: 700; color: #1a73e8; }
.gd-wan-pill {
  font-size: 9px; font-weight: 800;
  padding: 2px 7px; border-radius: 99px;
}
.gd-wan-up   { background: #dcfce7; color: #16a34a; }
.gd-wan-down { background: #fee2e2; color: #dc2626; }
.gd-wan-deg  { background: #fef3c7; color: #d97706; }

/* ── Bandwidth Card ── */
.gd-bw-total { text-align: center; margin-bottom: 12px; }
.gd-bw-big-val { font-size: 32px; font-weight: 900; color: #16a34a; line-height:1; }
.gd-bw-sub { font-size: 10px; color: #6b7280; margin-top: 3px; }
.gd-bw-breakdown { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.gd-bw-row { display: flex; align-items: center; gap: 8px; }
.gd-bw-row-label { font-size: 10.5px; font-weight: 700; color: #6b7280; flex: 1; white-space: nowrap; }
.gd-bw-row-bar { flex: 2; height: 4px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.gd-bw-row-fill { height: 100%; border-radius: 99px; }
.gd-bw-row-val { font-size: 10.5px; font-weight: 800; color: #374151; white-space: nowrap; }

/* ── Scrollbar styling ── */
.gd-ai-list::-webkit-scrollbar,
.gd-alerts-list::-webkit-scrollbar { width: 4px; }
.gd-ai-list::-webkit-scrollbar-track,
.gd-alerts-list::-webkit-scrollbar-track { background: transparent; }
.gd-ai-list::-webkit-scrollbar-thumb,
.gd-alerts-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }

/* ── Toast for GD ── */
.gd-toast {
  position: fixed; bottom: 80px; right: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 20px;
  color: #1a1f36;
  font-size: 13px; font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  display: flex; align-items: center; gap: 8px;
  animation: gdToastIn .3s ease;
  pointer-events: none;
}
@keyframes gdToastIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

/* ── Responsive ── */
@media (max-width: 900px) {
  .gd-topbar { flex-direction: column; align-items: flex-start; }
  .gd-kpi-row { grid-template-columns: repeat(2,1fr); }
  .gd-stream-metrics { grid-template-columns: repeat(3,1fr); }
}
