﻿/* ── Zmienne ───────────────────────────────────────────────── */
:root {
  --sidebar-bg:      #0b1628;
  --sidebar-width:   240px;
  --sidebar-text:    #8b97b0;
  --sidebar-hover:   rgba(255,255,255,0.06);
  --sidebar-active:  #0ea5c9;
  --content-bg:      #f0f3f8;
  --card-bg:         #ffffff;
  --card-radius:     12px;
  --card-shadow:     0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
  --border-color:    #e4e8f0;
  --text-primary:    #0d1f3c;
  --text-secondary:  #5a6a82;
  --accent:          #0077b6;
  --accent-light:    #e8f4fd;
  --success:         #16a34a;
  --success-light:   #dcfce7;
  --warning:         #d97706;
  --warning-light:   #fef3c7;
  --danger:          #dc2626;
  --danger-light:    #fee2e2;
  --brand-navy:      #0d1f3c;
  --brand-blue:      #0077b6;
  --brand-teal:      #00b4d8;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       16px;
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--content-bg);
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
#wrapper { min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────────── */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  border-right: 1px solid rgba(255,255,255,0.04);
}
#sidebar::-webkit-scrollbar { display: none; }
#content-wrapper { min-width: 0; }
.content-area { min-height: 100vh; padding: 24px; }

/* ── Sidebar brand ─────────────────────────────────────────── */
.sidebar-brand {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}
.sidebar-logo {
  height: 36px;
  width: auto;
  max-width: 180px;
  display: block;
}
.sidebar-logo-offcanvas {
  height: 32px;
  width: auto;
  max-width: 160px;
  display: block;
  background: #fff;
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Sidebar nav ───────────────────────────────────────────── */
.sidebar-nav { padding: 8px; }
.sidebar-nav .nav-link {
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 1px;
  transition: background .12s, color .12s;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  font-weight: 450;
}
.sidebar-nav .nav-link i { font-size: 0.95rem; flex-shrink: 0; }
.sidebar-nav .nav-link:hover  { background: var(--sidebar-hover); color: #e5e7eb; }
.sidebar-nav .nav-link.active {
  background: rgba(0, 180, 216, 0.15);
  color: #22d3ee;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #00b4d8;
}

.sidebar-section-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,0.25);
  padding: 16px 12px 4px;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 16px;
}
.sidebar-footer .text-muted { color: var(--sidebar-text) !important; font-size: 0.8rem; }
.sidebar-footer .btn-outline-secondary {
  color: var(--sidebar-text);
  border-color: rgba(255,255,255,0.12);
  font-size: 0.78rem;
  padding: 4px 10px;
}
.sidebar-footer .btn-outline-secondary:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.2); }

/* ── Offcanvas mobile ──────────────────────────────────────── */
.sidebar-offcanvas {
  background: var(--sidebar-bg) !important;
  width: var(--sidebar-width) !important;
}
.sidebar-offcanvas .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,0.06); padding: 16px; }
.sidebar-offcanvas .brand-text { color: #fff; }

.mobile-topbar {
  background: var(--sidebar-bg);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 8px 16px;
}
.mobile-topbar .btn-outline-secondary { color: #9ca3af; border-color: rgba(255,255,255,0.15); }

/* ── Nagłówki stron ─────────────────────────────────────────── */
.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* ── Karty stat ─────────────────────────────────────────────── */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 20px 22px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); }
.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}
.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.stat-sub { font-size: 0.72rem; color: var(--text-secondary); margin-top: 4px; }

/* Warianty kolorów pasków */
.stat-card.stat-green::before  { background: #10a37f; }
.stat-card.stat-blue::before   { background: #4285f4; }
.stat-card.stat-yellow::before { background: var(--warning); }
.stat-card.stat-red::before    { background: #c96442; }
.stat-card.stat-purple::before { background: #4f46e5; }
.stat-card.stat-teal::before   { background: #0d9488; }

/* ── Karty ──────────────────────────────────────────────────── */
.card {
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  background: var(--card-bg);
  transition: box-shadow .2s;
}
.card-header {
  background: #fcfcfd;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 14px 18px;
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}
.card-body { padding: 18px; }
.card-body.p-0 { padding: 0; }

/* ── Tabele ─────────────────────────────────────────────────── */
.table {
  font-size: 0.83rem;
  margin: 0;
}
.table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
  font-weight: 600;
  border-top: none;
  padding: 10px 12px;
  white-space: nowrap;
  background: #f8f9fb;
  border-bottom: 1px solid var(--border-color) !important;
}
.table td {
  vertical-align: middle;
  padding: 9px 12px;
  border-color: var(--border-color);
}
.table-hover tbody tr:hover { background: #f8faff; }

/* ── Score badge ────────────────────────────────────────────── */
.score-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.score-high { background: var(--success-light); color: var(--success); }
.score-mid  { background: var(--warning-light);  color: var(--warning); }
.score-low  { background: var(--danger-light);   color: var(--danger); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 6px;
}

/* ── Btn xs ─────────────────────────────────────────────────── */
.btn-xs {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 500;
}

/* ── Przyciski ──────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, #0077b6, #0062a3);
  border-color: #0062a3;
  font-weight: 500;
  transition: all .15s;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0062a3, #005082);
  border-color: #005082;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,119,182,0.3);
}
.btn-primary:active { transform: translateY(0); }
.btn { border-radius: var(--radius-sm); font-size: 0.83rem; transition: all .15s; }

/* ── Form controls ──────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(0,180,216,0.12);
}

/* ── Login ──────────────────────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, #0b1628 0%, #0d2547 50%, #07364e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  background: #fff;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.login-icon { font-size: 2.5rem; }

/* ── Odpowiedź AI ───────────────────────────────────────────── */
.response-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.75;
  max-height: 500px;
  overflow-y: auto;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 0;
  color: var(--text-primary);
}

/* ── Alerty ─────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); font-size: 0.84rem; border: none; }
.alert-success { background: var(--success-light); color: var(--success); }
.alert-danger   { background: var(--danger-light);  color: var(--danger); }
.alert-info     { background: var(--accent-light);  color: var(--accent); }
.alert-warning  { background: var(--warning-light); color: var(--warning); }


/* ── Bulk action bar ────────────────────────────────────────── */
.bulk-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  position: sticky;
  top: 8px;
  z-index: 20;
  animation: fadeInUp .15s ease;
}

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { gap: 3px; }
.page-link {
  border-radius: var(--radius-sm) !important;
  border-color: var(--border-color);
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 5px 10px;
}
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); }

/* ── Progress bar ───────────────────────────────────────────── */
.progress { border-radius: 20px; background: #e9ecef; }

/* ── Separator sekcji ───────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--border-color);
  margin: 20px 0;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Podgląd odpowiedzi (markdown render) ───────────────────── */
.resp-preview {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-primary);
  max-height: 600px;
  overflow-y: auto;
}
.resp-preview h1, .resp-preview h2, .resp-preview h3 {
  font-weight: 700; margin: 1em 0 .4em;
}
.resp-preview h1 { font-size: 1.1rem; }
.resp-preview h2, .resp-preview h3 { font-size: 1rem; }
.resp-preview p  { margin-bottom: .6em; }
.resp-preview ul, .resp-preview ol { padding-left: 1.4em; margin-bottom: .6em; }
.resp-preview li { margin-bottom: .2em; }
.resp-preview code {
  background: #f1f5f9; padding: 1px 5px; border-radius: 4px;
  font-family: monospace; font-size: .85em;
}
.resp-preview pre {
  background: #f1f5f9; padding: 12px 14px; border-radius: 8px;
  overflow-x: auto; font-size: .82rem; line-height: 1.5;
}
.resp-preview pre code { background: none; padding: 0; }
.resp-preview a { color: var(--accent); }
.resp-preview blockquote {
  border-left: 3px solid var(--border-color);
  margin: .5em 0; padding: .3em 1em; color: var(--text-secondary);
}
.resp-preview strong { font-weight: 700; }
.resp-preview table { border-collapse: collapse; width: 100%; margin-bottom: .6em; font-size: .82rem; }
.resp-preview th, .resp-preview td { border: 1px solid var(--border-color); padding: 5px 10px; }
.resp-preview th { background: #fafafa; font-weight: 600; }

/* ── Kafelki odpowiedzi AI ──────────────────────────────────── */
.response-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .15s;
  overflow: hidden;
}
.response-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.response-card-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
}

.model-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.01em;
}
.model-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  background-size: 86%;
  background-repeat: no-repeat;
  background-position: center;
}

.model-badge-sm {
  font-size: 0.65rem;
  padding: 2px 6px;
  gap: 4px;
}
.model-badge-sm .model-dot { width: 12px; height: 12px; }

/* ── Model badge variants - brand colors + icons ──────────────── */
.model-badge-gpt         { background: #f0fdf9; color: #065f46; }
.model-badge-gpt         .model-dot {
  background-color: #10a37f;
  background-image: url('/static/icons/openai.svg');
  border-radius: 50%;
  background-size: 82%;
}
/* Gemini: własny gradient w SVG, nie trzeba background-color */
.model-badge-gemini      { background: #f0f4ff; color: #1e3a8a; }
.model-badge-gemini      .model-dot {
  background-color: transparent;
  background-image: url('/static/icons/gemini.svg');
  background-size: 100%;
  border-radius: 50%;
}
.model-badge-claude,
.model-badge-anthropic   { background: #fff7f4; color: #7c2d12; }
.model-badge-claude      .model-dot,
.model-badge-anthropic   .model-dot {
  background-color: #D97757;
  background-image: url('/static/icons/anthropic.svg');
  background-size: 80%;
  border-radius: 3px;
}
/* Perplexity: własne czarne tło w SVG */
.model-badge-perplexity  { background: #f5f5f5; color: #1a1a1a; }
.model-badge-perplexity  .model-dot {
  background-color: transparent;
  background-image: url('/static/icons/perplexity.svg');
  background-size: 100%;
  border-radius: 3px;
}
.model-badge-aio         { background: #f5f3ff; color: #4338ca; }
.model-badge-aio         .model-dot {
  background-color: #4f46e5;
  background-image: url('/static/icons/aio.svg');
  border-radius: 50%;
  background-size: 82%;
}

.prompt-text {
  font-size: 0.83rem;
  color: var(--text-primary);
  line-height: 1.45;
  font-weight: 500;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
}

.response-card-signals {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.signal-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.signal-yes {
  background: var(--success-light);
  color: var(--success);
}
.signal-no {
  background: #f1f5f9;
  color: #94a3b8;
}
.signal-yes i, .signal-no i { font-size: 0.8rem; }

.signal-item.signal-compact {
  padding: 2px 6px;
  gap: 3px;
  font-size: 0.68rem;
  border-radius: 5px;
  flex-shrink: 0;
}
.signal-label-short { white-space: nowrap; }

.signal-score {
  margin-left: auto;
}

.response-snippet {
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.response-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--card-bg);
}

.sources-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.source-chip {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  border: 1px solid var(--border-color);
}

/* ── Compare snippet ────────────────────────────────────────── */
.compare-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.signal-neutral {
  background: #fef3c7;
  color: #d97706;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}
.signal-neutral i { font-size: 0.8rem; }

/* ── GEO recommendations ─────────────────────────────────────── */
.geo-rec {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid;
}
.geo-rec-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.geo-rec-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.geo-rec-text {
  font-size: 0.82rem;
  line-height: 1.55;
}
.geo-rec-danger  { background: var(--danger-light);  border-color: #fca5a5; }
.geo-rec-danger  .geo-rec-icon { color: var(--danger); }
.geo-rec-danger  .geo-rec-title { color: var(--danger); }
.geo-rec-danger  .geo-rec-text  { color: #7f1d1d; }
.geo-rec-warning { background: var(--warning-light); border-color: #fcd34d; }
.geo-rec-warning .geo-rec-icon { color: var(--warning); }
.geo-rec-warning .geo-rec-title { color: var(--warning); }
.geo-rec-warning .geo-rec-text  { color: #78350f; }
.geo-rec-info    { background: var(--accent-light);  border-color: #93c5fd; }
.geo-rec-info    .geo-rec-icon { color: var(--accent); }
.geo-rec-info    .geo-rec-title { color: var(--accent); }
.geo-rec-info    .geo-rec-text  { color: #1e3a8a; }
.geo-rec-success { background: var(--success-light); border-color: #86efac; }
.geo-rec-success .geo-rec-icon { color: var(--success); }
.geo-rec-success .geo-rec-title { color: var(--success); }
.geo-rec-success .geo-rec-text  { color: #14532d; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
}
.empty-state-icon {
  font-size: 2.8rem;
  color: #d1d5db;
  margin-bottom: 14px;
  display: block;
}
.empty-state-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.empty-state-text {
  font-size: 0.82rem;
  color: #9ca3af;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Skeleton loading ─────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, #f0f2f7 25%, #e4e7ed 50%, #f0f2f7 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 4px;
  color: transparent;
}
.skeleton-row { height: 38px; margin-bottom: 2px; border-radius: var(--radius-sm); }

/* ── Run status badge ─────────────────────────────────────────── */
.run-status-running  { background: #dbeafe; color: #1e40af; }
.run-status-done     { background: var(--success-light); color: var(--success); }
.run-status-error    { background: var(--danger-light); color: var(--danger); }
.run-status-pending  { background: #f3f4f6; color: #6b7280; }

/* ── Trend indicator ─────────────────────────────────────────── */
.trend-up   { color: var(--success); font-size: 0.78rem; font-weight: 600; }
.trend-down { color: var(--danger);  font-size: 0.78rem; font-weight: 600; }
.trend-flat { color: var(--text-secondary); font-size: 0.78rem; }

/* ── KPI delta ───────────────────────────────────────────────── */
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}
.kpi-delta-up   { background: var(--success-light); color: var(--success); }
.kpi-delta-down { background: var(--danger-light);  color: var(--danger); }
.kpi-delta-flat { background: #f3f4f6; color: var(--text-secondary); }

/* ── Page fade-in ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content-area { animation: fadeInUp .22s ease-out; }

/* ── Tooltip override ─────────────────────────────────────────── */
.tooltip-inner { font-size: 0.78rem; border-radius: 6px; }

/* ── Utility ─────────────────────────────────────────────────── */
.fw-450 { font-weight: 450; }
.text-xs { font-size: 0.72rem; }
.gap-1 { gap: 4px !important; }
.rounded-pill-sm { border-radius: 20px !important; }

/* ── Card hover lift ─────────────────────────────────────────── */
.card-lift { transition: box-shadow .2s, transform .2s; }
.card-lift:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }

/* ── User avatar ─────────────────────────────────────────────── */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0077b6, #00b4d8);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.user-avatar-lg {
  width: 64px; height: 64px; font-size: 1.3rem;
}

/* ── Sidebar user row ─────────────────────────────────────────── */
.sidebar-user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: background .12s;
}
.sidebar-user-link:hover { background: var(--sidebar-hover); }
.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-sub {
  font-size: 0.67rem;
  color: var(--sidebar-text);
  line-height: 1.2;
}

/* ── Field hint box ───────────────────────────────────────────── */
.field-hint {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 6px;
}
.field-hint strong { color: var(--text-primary); }
.field-hint code {
  background: #eef2f7;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.82em;
  color: #0077b6;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 767px) {
  .content-area { padding: 16px; }
  .stat-value { font-size: 1.5rem; }
  .page-title { font-size: 1.1rem; }

  .card > .card-body.p-0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .d-flex.gap-2.align-items-center { flex-wrap: wrap; }
  .input-group { flex-wrap: nowrap; }
  .input-group .btn { white-space: nowrap; }
  .table .hide-mobile { display: none; }

  body, #wrapper, .content-area { overflow-x: hidden; }

  .d-flex.align-items-center.justify-content-between.mb-3 { flex-wrap: wrap; gap: 8px; }

  .stat-card { padding: 14px 16px; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }
}

/* ── Premium SoV ranking chart ────────────────────────────────── */
.sov-ranking-card .card-body { padding: 20px 24px; }

.sov-row { padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.sov-row:last-child { border-bottom: none; }
.sov-row-brand { background: #f0fdf4; border-radius: 10px; padding: 10px 12px; margin: 0 -12px; border-bottom: none !important; }

.sov-rank {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e2e8f0; color: #64748b;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sov-rank-1 { background: #fef3c7; color: #92400e; }
.sov-rank-2 { background: #e2e8f0; color: #475569; }
.sov-rank-3 { background: #fde8d8; color: #9a3412; }

.sov-favicon { width: 24px; flex-shrink: 0; }

.sov-label { width: 180px; flex-shrink: 0; }
.sov-name { font-size: 0.875rem; line-height: 1.3; }
.sov-sublabel { margin-top: 1px; }

.sov-bar-wrap { min-width: 80px; }
.sov-bar-track {
  background: #f1f5f9;
  border-radius: 100px;
  height: 10px;
  overflow: hidden;
}
.sov-bar-fill {
  height: 100%;
  border-radius: 100px;
  width: var(--sov-w, 0%);
  animation: sov-grow 0.7s cubic-bezier(.22,1,.36,1) both;
}
.sov-bar-brand { background: linear-gradient(90deg, #10b981, #34d399); }
.sov-bar-comp  { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }

@keyframes sov-grow {
  from { clip-path: inset(0 100% 0 0 round 100px); }
  to   { clip-path: inset(0 0% 0 0 round 100px); }
}

.sov-pct {
  width: 44px; text-align: right; flex-shrink: 0;
  font-size: 0.95rem; font-weight: 700; color: #374151;
}

/* ── Brand card ──────────────────────────────────────────────── */
.brand-card { border: 1.5px solid #e4e8f0; transition: box-shadow .15s; }
.brand-card:hover { box-shadow: var(--card-shadow-hover); }

.brand-section {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 14px;
}
.brand-section-label {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: #64748b;
}
.brand-domain-tag {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 6px; padding: 3px 8px;
  font-size: 0.8rem; color: #374151;
}

/* ── Brand / Competitor modal ────────────────────────────────── */
.brand-modal {
  border-radius: 16px;
  border: none;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.14);
}

.brand-modal-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.brand-modal-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.brand-modal-section .form-control {
  background: #fff;
  border-color: #e2e8f0;
  font-size: .875rem;
}
.brand-modal-section .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.brand-modal-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #374151;
  flex-wrap: wrap;
}
.brand-modal-section-label .text-muted {
  font-weight: 400;
  font-size: .75rem;
}

.brand-modal-hint {
  margin-top: 8px;
  font-size: .75rem;
  color: #6b7280;
  line-height: 1.5;
}
.brand-modal-hint code {
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  color: #374151;
  font-size: .72rem;
}

.brand-modal .modal-footer .btn-light {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}
.brand-modal .modal-footer .btn-light:hover {
  background: #e2e8f0;
}

/* ── Model filter badge buttons ────────────────────────────────── */
.model-filter-opt {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  transition: all 0.12s;
  user-select: none;
}
.model-filter-opt:hover { background: #f1f5f9; }
.model-filter-opt.active {
  border-color: #0077b6;
  background: #e8f4fd;
}
.model-filter-opt.active .model-badge { font-weight: 600; }

/* ── Prompts table ─────────────────────────────────────────────── */
.prompts-table td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.prompts-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }

.prompt-text-cell {
  max-width: 420px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: .875rem;
  line-height: 1.45;
  color: #0d1f3c;
}

.prompt-row-inactive td { opacity: .55; }

.prompt-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
}
.prompt-tag-cat  { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.prompt-tag-tofu { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.prompt-tag-mofu { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.prompt-tag-bofu { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.prompt-tag-ok   { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.prompt-tag-warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.prompt-tag-err  { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.dropdown-toggle-no-caret::after { display: none; }

/* ── Trends model cards ─────────────────────────────────────────── */
.trends-model-card {
  border: 1.5px solid #e4e8f0;
  transition: box-shadow .15s, border-color .15s;
}
.trends-model-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--model-accent, #e4e8f0);
}

.trends-avg-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--model-accent, #0d1f3c);
  line-height: 1.1;
  margin: 4px 0 0;
}

.trends-mini-bar {
  height: 4px;
  background: #f1f5f9;
  border-radius: 100px;
  overflow: hidden;
}
.trends-mini-fill {
  height: 100%;
  border-radius: 100px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}

/* ── Compare page ──────────────────────────────────────────────── */
.compare-prompt-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 680px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.compare-prompt-selector:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.compare-card {
  border: 1.5px solid #e4e8f0;
  border-top: 3px solid var(--mc, #e4e8f0);
  transition: box-shadow .15s, border-color .15s;
  border-radius: 12px;
  overflow: hidden;
}
.compare-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }

.compare-card-top {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 14px;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.compare-card-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--mc, #e4e8f0);
  border-radius: 0;
}
.compare-card-top .d-flex { padding-left: 8px; }

.compare-score-big {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.cmp-signal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cmp-sig-yes     { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.cmp-sig-no      { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.cmp-sig-neutral { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.compare-snippet {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--mc, #e2e8f0);
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  font-size: .83rem;
  line-height: 1.55;
  color: #374151;
  font-style: normal;
}

.cmp-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .71rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Matrix table ──────────────────────────────────────────────── */
.matrix-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1.5px solid #e4e8f0;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: .82rem;
}

.matrix-table thead tr {
  background: #f8fafc;
}
.matrix-table thead th {
  padding: 10px 12px;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  border-bottom: 2px solid #e4e8f0;
  border-right: 1px solid #eef2f7;
  white-space: nowrap;
  vertical-align: middle;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
.matrix-table thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 220px;
  max-width: 280px;
}
.matrix-table thead th:last-child { border-right: 0; }

.matrix-table tbody tr:hover > td { background-color: rgba(0,0,0,.018); }

.matrix-table tbody td {
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  padding: 0;
  vertical-align: middle;
}
.matrix-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  border-right: 2px solid #e4e8f0;
  padding: 10px 14px;
}
.matrix-table tbody tr:hover > td:first-child { background: #f8fafc; }
.matrix-table tbody td:last-child { border-right: 0; }
.matrix-table tbody tr:last-child > td { border-bottom: 0; }

.matrix-prompt-txt {
  font-size: .82rem;
  line-height: 1.4;
  color: #0d1f3c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 240px;
}
.matrix-prompt-cat {
  display: inline-block;
  margin-top: 4px;
  font-size: .65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 100px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.matrix-cell-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 6px;
  min-width: 80px;
  text-decoration: none;
  transition: filter .12s;
}
.matrix-cell-link:hover { filter: brightness(.94); text-decoration: none; }

.matrix-cell-pct {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  color: inherit;
}
.matrix-cell-lbl {
  font-size: .6rem;
  font-weight: 500;
  opacity: .75;
  margin-top: 2px;
  color: inherit;
}
.matrix-cell-sigs {
  display: flex;
  gap: 3px;
  margin-top: 3px;
}

.cell-full   { background: #d1fae5; color: #065f46; }
.cell-brand  { background: #dbeafe; color: #1e40af; }
.cell-domain { background: #fef9c3; color: #854d0e; }
.cell-none   { background: #f8fafc; color: #9ca3af; }
.cell-empty  { background: #fff; }

.matrix-avg-cell {
  text-align: center;
  padding: 8px 10px !important;
}
.matrix-avg-pct {
  font-size: .95rem;
  font-weight: 800;
  color: #0d1f3c;
}
.matrix-avg-lbl {
  font-size: .6rem;
  color: #6b7280;
  margin-top: 2px;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-top: 14px;
  font-size: .78rem;
  color: #475569;
}
.matrix-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.sig-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.sig-brand  { background: #3b82f6; }
.sig-domain { background: #f59e0b; }

/* ── Text truncate utility ───────────────────────────────────── */
.text-truncate-cell {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE IMPROVEMENTS
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 575px) {
  /* Page header rows */
  .d-flex.align-items-center.justify-content-between {
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-title { font-size: 1.05rem; }

  /* Stats grid: 2 cols on phones */
  .row.g-3 > .col-md-3,
  .row.g-3 > .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Stat card */
  .stat-card { padding: 12px 14px; }
  .stat-value { font-size: 1.4rem; }

  /* Buttons group wrapping */
  .btn-group, .d-flex.gap-2 { flex-wrap: wrap; }

  /* Tables: horizontal scroll */
  .table-responsive { -webkit-overflow-scrolling: touch; }
  .card > .card-body.p-0 { overflow-x: auto; }

  /* Modal full width */
  .modal-dialog { margin: 8px; }

  /* Hide less-important table columns */
  .table .d-none-xs { display: none !important; }

  /* Brand facts: stacked layout */
  .brand-facts-row { flex-direction: column; }

  /* Response cards */
  .response-card-signals { gap: 4px; padding: 8px 12px; }
  .signal-score { margin-left: 0; }

  /* Pagination */
  .pagination { gap: 2px; }
  .page-link { padding: 4px 8px; font-size: 0.78rem; }
}

@media (max-width: 767px) {
  /* Content padding */
  .content-area { padding: 12px 14px; }

  /* Card paddings */
  .card-body { padding: 14px 16px; }
  .card-header { padding: 11px 16px; }

  /* Sidebar user section */
  .sidebar-footer { padding: 10px; }

  /* Chart containers */
  canvas { max-height: 240px !important; }

  /* Hide bulk-bar on mobile if too long */
  .bulk-bar .d-flex { flex-wrap: wrap; gap: 6px; }

  /* Table: hide non-essential columns */
  .hide-sm { display: none !important; }

  /* Topbar */
  .mobile-topbar { padding: 8px 12px; min-height: 48px; }

  /* Btn groups in header */
  .btn-toolbar { flex-wrap: wrap; gap: 6px; }

  /* Model filter row */
  .model-filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

  /* Tabs */
  .nav-tabs .nav-link { padding: 6px 10px; font-size: 0.8rem; }

  /* Modal */
  .modal-dialog { max-width: calc(100vw - 16px); }
  .modal-body { padding: 16px; }

  /* Offcanvas sidebar full height */
  .sidebar-offcanvas { max-width: 280px; }

  /* Login card */
  .login-card { margin: 16px; }

  /* Alert */
  .alert { font-size: 0.82rem; padding: 10px 14px; }

  /* Runs page action buttons */
  .run-actions-row { flex-wrap: wrap; gap: 8px; }

  /* Report date picker */
  .period-pills-row { flex-wrap: wrap; gap: 6px; }

  /* Geo recs */
  .geo-rec { flex-direction: column; gap: 8px; padding: 14px; }

  /* SoV label width */
  .sov-label { width: 140px; }

  /* Compare card stack */
  .compare-card-top { flex-direction: column; gap: 8px; align-items: flex-start; }
  .compare-card-accent { width: 100%; height: 4px; bottom: auto; right: 0; }
}

@media (min-width: 576px) and (max-width: 991px) {
  /* Tablet: sidebar still hidden, layout adjustments */
  .stat-value { font-size: 1.6rem; }
  .content-area { padding: 18px 20px; }
  canvas { max-height: 280px !important; }
}

/* Landing page mobile ─────────────────────────────────────── */
@media (max-width: 767px) {
  .landing-hero { padding: 48px 20px 36px; }
  .landing-hero h1 { font-size: clamp(1.6rem, 6vw, 2.4rem) !important; }
  .landing-hero .lead { font-size: 0.95rem !important; }
  .landing-cta-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .landing-cta-row .btn { text-align: center; }
  .landing-models-row { gap: 10px; }
  .landing-stat-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .landing-feature-grid { grid-template-columns: 1fr !important; }
  .landing-pricing-row { flex-direction: column; }
  .landing-footer-row { flex-direction: column; gap: 12px; text-align: center; }
  .landing-nav { padding: 12px 16px; }
  .landing-nav-links { display: none; }
}

/* Portal dashboard mobile ──────────────────────────────────── */
@media (max-width: 575px) {
  .portal-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .portal-period-btns { width: 100%; display: flex; justify-content: flex-start; }
}

/* ── Page Guide (help section at page bottom) ───────────────── */
.page-guide {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
  transition: opacity .2s;
}
.page-guide.guide-hidden { display: none !important; }
.page-guide-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.page-guide-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
}
.guide-block {
  background: #f8fafc;
  border-radius: 10px;
  padding: 14px 16px;
  height: 100%;
  border: 1px solid #eaecf2;
}
.guide-block-icon {
  font-size: 1rem;
  color: #6366f1;
  margin-bottom: 6px;
  display: block;
}
.guide-block-title {
  font-size: .8rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}
.guide-block-body {
  font-size: .76rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}
.guide-block-body strong { color: #334155; font-weight: 600; }

/* ── Page Guide toggle button ("i" near page title) ─────────── */
.btn-page-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e0f2fe;
  border: 1.5px solid #bae6fd;
  color: #0284c7;
  font-size: .68rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, color .15s, transform .15s;
  padding: 0;
  vertical-align: middle;
  margin-left: 8px;
  line-height: 1;
}
.btn-page-help:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
  transform: scale(1.12);
}
.btn-page-help.guide-active {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #fff;
}

@media (max-width: 767px) {
  .page-guide { margin-top: 32px; padding-top: 20px; }
}

/* ── Help FAB button ────────────────────────────────────────────────────── */
.btn-help-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1039;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: #0f172a;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.28);
  transition: background .15s, transform .15s, box-shadow .15s;
  letter-spacing: .01em;
}
.btn-help-fab:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14,165,233,.35);
  color: #fff;
}
.btn-help-fab i { font-size: 1rem; }

/* Guide blocks wewnątrz offcanvasa — jeden na szerokość */
#pageHelpBody .row > * { flex: 0 0 auto; width: 100%; }
#pageHelpBody .guide-block { margin-bottom: 2px; }

/* ── Brand Health Score widget ──────────────────────────────────────────── */
.bhs-card { background: linear-gradient(135deg, #f8fafc 0%, #fff 100%); border: 1px solid var(--border-color); border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.bhs-circle { width: 88px; height: 88px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 6px; border: 5px solid; }
.bhs-excellent { border-color: #16a34a; color: #16a34a; }
.bhs-good      { border-color: #0ea5e9; color: #0ea5e9; }
.bhs-fair      { border-color: #d97706; color: #d97706; }
.bhs-poor      { border-color: #dc2626; color: #dc2626; }
.bhs-value { font-size: 1.45rem; font-weight: 800; line-height: 1; }
.bhs-max   { font-size: .55rem; color: #94a3b8; letter-spacing: .02em; }
.bhs-grade { font-size: .95rem; font-weight: 700; }
.bhs-signal { margin-bottom: 8px; }
.bhs-signal-label { font-size: .7rem; color: #64748b; font-weight: 600; margin-bottom: 3px; }
.bhs-bar  { height: 5px; border-radius: 99px; background: #e9ecef; }
.bhs-bar .progress-bar { border-radius: 99px; transition: width .6s ease; }
.bhs-signal-val { font-size: .7rem; font-weight: 600; color: #1e293b; margin-top: 3px; }
.bhs-signal-val .text-muted { font-weight: 400; }
