/* Glocal Sage Research (GSR) visual identity & theme */
:root {
  --bg: #f2f6fb;
  --surface: #ffffff;
  --surface-2: #f7fafe;
  --text: #0b1d3a;
  --muted: #576d8c;
  --border: #dbe4ef;
  --primary: #1b75bc;
  --primary-dark: #0b2545;
  --primary-light: #38bdf8;
  --sidebar: #091a32;
  --shadow: 0 14px 40px rgba(11, 37, 69, 0.08);
}

.sidebar {
  background: linear-gradient(175deg, #091a32 0%, #050e1c 100%) !important;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  gap: 12px;
  align-items: center;
}

.brand strong {
  letter-spacing: -0.3px;
  color: #ffffff;
  font-weight: 700;
}

.brand small {
  color: #7dd3fc;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.6px;
}

.brand-logo {
  background: transparent;
  border: 0;
  box-shadow: none;
  object-fit: contain;
}

.brand-logo-full {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.nav-label {
  color: #6482a6;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.side-nav a {
  color: #b0c6df;
  font-weight: 500;
  transition: all 0.15s ease-in-out;
}

.side-nav a:hover {
  background: rgba(27, 117, 188, 0.18);
  color: #ffffff;
}

.side-nav a.active {
  color: #ffffff !important;
  background: linear-gradient(90deg, rgba(27, 117, 188, 0.38), rgba(27, 117, 188, 0.08)) !important;
  box-shadow: inset 3px 0 #1b75bc !important;
  font-weight: 600;
}

.hero-panel {
  background: radial-gradient(ellipse at 90% 10%, rgba(27, 117, 188, 0.35), transparent 55%),
              linear-gradient(115deg, #0b2545, #144477) !important;
  color: #ffffff;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(11, 37, 69, 0.16);
}

.hero-kicker {
  color: #7dd3fc !important;
  background: rgba(27, 117, 188, 0.22) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  font-weight: 700;
}

.hero-panel h2 {
  color: #ffffff !important;
}

.hero-panel p {
  color: #d2e4f7 !important;
}

.profile .avatar {
  background: #e0f2fe;
  color: #1b75bc;
  font-weight: 700;
}

.btn-pro.primary, .login-submit {
  background: linear-gradient(100deg, #1b75bc 0%, #0b2545 100%) !important;
  box-shadow: 0 8px 24px rgba(27, 117, 188, 0.28) !important;
  color: #ffffff !important;
  border: 0;
  font-weight: 600;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-pro.primary:hover, .login-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.metric-card {
  box-shadow: 0 6px 22px rgba(11, 37, 69, 0.045);
  border: 1px solid #dce6f2;
}

.accent-purple .metric-icon {
  background: #e0f2fe;
  color: #1b75bc;
}

/* Login Page Styling */
.login-page {
  background: #f0f4f9;
}

.login-story {
  background: radial-gradient(ellipse at 15% 80%, rgba(27, 117, 188, 0.30), transparent 55%),
              linear-gradient(145deg, #061122 0%, #0b2545 60%, #134275 100%) !important;
}

.story-copy h1 {
  max-width: 650px;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.06;
  letter-spacing: -2.5px;
  color: #ffffff;
}

.story-copy > p {
  color: #cce1f5;
  line-height: 1.8;
}

.story-stats strong {
  color: #ffffff;
}

.story-stats span, .story-foot {
  color: #8fb1d7;
}

.login-form-wrap {
  background: radial-gradient(circle at 100% 0, #e0f2fe 0%, transparent 60%), #f5f8fc !important;
}

.login-form {
  border: 1px solid #dce5f0 !important;
  box-shadow: 0 28px 70px rgba(11, 37, 69, 0.10) !important;
  background: #ffffff;
}

.input-wrap:focus-within {
  border-color: #1b75bc !important;
  box-shadow: 0 0 0 3px rgba(27, 117, 188, 0.16) !important;
}

:focus-visible {
  outline: 3px solid #1b75bc !important;
  outline-offset: 3px;
}

.master-copy button {
  background: #1b75bc !important;
  color: #ffffff !important;
}

.profile-chips > span {
  background: #e0f2fe !important;
  border-color: #bae6fd !important;
  color: #0369a1 !important;
}

/* Workspace background */
body.panel-body {
  background-image: none !important;
  background-color: #f2f6fb !important;
}

body.panel-body .app-shell,
body.panel-body .app-main,
body.panel-body .page-content {
  background-image: none !important;
  background-color: transparent !important;
}

body.dark {
  --bg: #061122;
  --surface: #0b1e38;
  --surface-2: #102849;
  --text: #eaf2fc;
  --muted: #849ebd;
  --border: #1a355c;
  --primary: #38bdf8;
  --primary-dark: #7dd3fc;
}

body.dark.panel-body {
  background-color: #061122 !important;
}

body.dark .topbar {
  background: rgba(11, 30, 56, 0.95);
  border-bottom: 1px solid #1a355c;
}

body.dark .btn-pro.primary {
  color: #061122 !important;
  background: #38bdf8 !important;
}

@media (max-width: 560px) {
  .login-form {
    padding: 24px;
  }
  .story-copy h1 {
    letter-spacing: -1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *:before, *:after {
    transition: none !important;
    animation: none !important;
  }
}
