﻿/* CyberSentinel global account/session UI fix */
.cs-global-account-widget {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cs-global-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e5e7eb;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
}

.cs-global-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, #ff6a3d, #ef4444);
}

.cs-global-account-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  max-width: 180px;
}

.cs-global-account-name {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-global-account-plan {
  font-size: 11px;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cs-global-logout,
.cs-global-login,
.cs-global-signup {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  color: white !important;
}

.cs-global-logout {
  background: rgba(239, 68, 68, .95);
}

.cs-global-login {
  background: rgba(15, 23, 42, .88);
  border: 1px solid rgba(148, 163, 184, .35);
}

.cs-global-signup {
  background: linear-gradient(135deg, #ff6a3d, #ef4444);
}

.cs-global-logout:hover,
.cs-global-login:hover,
.cs-global-signup:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Fix ugly default blue top links when page-level navigation styles fail */
body > a,
body > nav a,
body > header a,
.site-nav a,
.navbar a,
.topbar a,
.header a {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
}

/* Prevent account widget from covering small mobile screens */
@media (max-width: 720px) {
  .cs-global-account-widget {
    top: 8px;
    right: 8px;
    transform: scale(.9);
    transform-origin: top right;
  }

  .cs-global-account-text {
    max-width: 115px;
  }
}

/* Duplicate login/signup emergency fix */
body.cs-logged-out .cs-global-account-widget {
  display: none !important;
}

/* Sentinel AI sidebar logout fix */
.cs-sentinel-sidebar-logout {
  width: calc(100% - 24px);
  margin: 10px 12px 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(249, 115, 22, 0.95));
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.22);
}

.cs-sentinel-sidebar-logout:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.cs-sentinel-user-row-fixed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* On Sentinel AI app pages, do not show the floating top-right global account widget.
   The sidebar already has account info and now has logout. */
body.cs-sentinel-ai-page .cs-global-account-widget {
  display: none !important;
}

/* Remove accidental mojibake arrow if it appears beside the Sentinel profile card */
body.cs-sentinel-ai-page .cs-mojibake-cleaned {
  display: none !important;
}
