/**
 * Signalboard — OSINT / SaaS product layer
 * Loaded after theme.css to unify palette, typography, and shell chrome.
 */

body {
  font-family: var(--font-sans);
  background: var(--bg);
  letter-spacing: -0.01em;
}

p,
.analysis-insight-text,
.analysis-section-sub,
.analysis-hero-sub,
.analysis-report-card-body,
.analysis-report-note,
.team-card-sub,
.analysis-source-post-body,
.empty-state p {
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.text-muted,
.form-text,
.datasets-card-sub,
.tg-panel-sub,
.analysis-section-sub {
  color: var(--muted) !important;
}

body::before {
  background:
    radial-gradient(ellipse 70% 45% at 12% -8%, rgba(0, 229, 192, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 92% 8%, rgba(56, 189, 248, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 25% at 50% 100%, rgba(0, 180, 216, 0.06), transparent 60%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 192, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 192, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 45% 25%, black 15%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

/* ── Sidebar ── */
.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 229, 192, 0.04) 0%, transparent 28%),
    linear-gradient(180deg, #04070d 0%, #060a10 50%, #04060b 100%);
}

.sidebar::after {
  background: linear-gradient(180deg, rgba(0, 229, 192, 0.55), rgba(56, 189, 248, 0.2), transparent 72%);
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(0, 229, 192, 0.45);
}

.sidebar-section-telegram.is-active-section .sidebar-section-label {
  color: rgba(56, 189, 248, 0.75);
}

.brand-logo {
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0, 229, 192, 0.22), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(0, 229, 192, 0.35);
  color: #00e5c0;
  box-shadow:
    0 0 0 1px rgba(0, 229, 192, 0.08) inset,
    0 8px 28px rgba(0, 229, 192, 0.15);
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: rgba(0, 229, 192, 0.55);
}

.nav-icon-accent {
  background: rgba(0, 229, 192, 0.08);
  border-color: rgba(0, 229, 192, 0.18);
  color: #00e5c0;
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(0, 229, 192, 0.12), rgba(0, 229, 192, 0.02));
  border-color: rgba(0, 229, 192, 0.22);
  box-shadow: 0 4px 20px rgba(0, 229, 192, 0.08);
}

.nav-link.active::before {
  background: linear-gradient(180deg, #00e5c0, #38bdf8);
  box-shadow: 0 0 14px rgba(0, 229, 192, 0.55);
}

.nav-link.active .nav-icon,
.nav-link.active .nav-icon-accent {
  background: rgba(0, 229, 192, 0.14);
  border-color: rgba(0, 229, 192, 0.32);
  color: #00e5c0;
  box-shadow: 0 0 18px rgba(0, 229, 192, 0.12);
}

.sidebar-nav-sub .nav-link-sub.active::before {
  background: #38bdf8;
}

.sidebar-toggle:hover {
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.28);
  box-shadow: 0 0 20px rgba(0, 229, 192, 0.12);
}

/* ── Page chrome ── */
.page-header h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(95deg, #f8fafc 0%, #00e5c0 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.glass-card {
  background: linear-gradient(165deg, rgba(12, 18, 28, 0.94), rgba(6, 10, 16, 0.9));
  border: 1px solid var(--border);
  border-top-color: rgba(0, 229, 192, 0.14);
  border-radius: var(--radius-lg);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 20px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
}

.stat-card::after {
  background: var(--stat-glow, var(--glow));
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.stat-value {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── Buttons & forms ── */
.btn-primary {
  background: linear-gradient(135deg, #00e5c0, #00b4d8);
  box-shadow: 0 4px 22px rgba(0, 229, 192, 0.28);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #00f5d0, #00c4e8);
  box-shadow: 0 6px 30px rgba(0, 229, 192, 0.38);
}

.btn-check:checked + .btn-outline-light,
.btn-check:active + .btn-outline-light {
  background: linear-gradient(135deg, #00e5c0, #00b4d8) !important;
  box-shadow: 0 4px 22px rgba(0, 229, 192, 0.28);
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.18) !important;
  border-color: rgba(0, 229, 192, 0.45) !important;
}

.upload-zone {
  border-color: rgba(0, 229, 192, 0.22);
  background: rgba(0, 229, 192, 0.03);
  border-radius: var(--radius-lg);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--brand);
  background: rgba(0, 229, 192, 0.07);
  box-shadow: 0 0 40px rgba(0, 229, 192, 0.1);
}

.upload-zone i {
  color: var(--brand);
}

/* ── Tables & datasets ── */
.datasets-hero {
  border-color: rgba(0, 229, 192, 0.18);
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.06) 0%, rgba(56, 189, 248, 0.04) 50%, rgba(6, 10, 16, 0.95));
}

.datasets-hero-icon {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.12);
  border-color: rgba(0, 229, 192, 0.28);
}

.datasets-count-badge {
  font-family: var(--font-mono);
  background: rgba(0, 229, 192, 0.1);
  border: 1px solid rgba(0, 229, 192, 0.22);
  color: #00e5c0;
}

.datasets-table thead th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(0, 229, 192, 0.5);
}

.datasets-table tbody tr:hover td {
  background: rgba(0, 229, 192, 0.04);
}

.datasets-table tbody tr:hover .dataset-action-btn-view {
  border-color: rgba(0, 229, 192, 0.35);
}

.datasets-dt-toolbar .dataTables_filter input {
  border-color: rgba(0, 229, 192, 0.15);
  background: rgba(0, 0, 0, 0.25);
}

.datasets-dt-toolbar .dataTables_filter input:focus {
  border-color: rgba(0, 229, 192, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.1);
}

.dataset-action-btn-view {
  color: #00e5c0;
  border-color: rgba(0, 229, 192, 0.25);
  background: rgba(0, 229, 192, 0.08);
}

.dataset-action-btn-view:hover {
  color: #5eead4;
  background: rgba(0, 229, 192, 0.14);
  border-color: rgba(0, 229, 192, 0.38);
}

.analysis-source-btn {
  color: #00e5c0;
  border-color: rgba(0, 229, 192, 0.22);
  background: rgba(0, 229, 192, 0.06);
}

.analysis-source-btn:hover {
  color: #5eead4;
  border-color: rgba(0, 229, 192, 0.38);
  background: rgba(0, 229, 192, 0.12);
}

.analysis-source-modal {
  border-color: rgba(0, 229, 192, 0.15);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 229, 192, 0.06);
}

.analysis-source-modal-header {
  border-bottom-color: rgba(0, 229, 192, 0.12);
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.06) 0%, rgba(6, 10, 16, 0.4) 100%);
}

.analysis-source-modal-kicker {
  color: #00e5c0;
}

.analysis-source-card {
  border-color: rgba(0, 229, 192, 0.1);
}

.analysis-source-card:hover {
  border-color: rgba(0, 229, 192, 0.22);
  background: rgba(0, 229, 192, 0.03);
}

.analysis-source-index {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.2);
}

.analysis-source-title-link:hover {
  color: #5eead4;
}

.analysis-source-icon-link:hover {
  color: #00e5c0;
  border-color: rgba(0, 229, 192, 0.35);
  background: rgba(0, 229, 192, 0.1);
}

.analysis-source-view-btn {
  color: #00e5c0;
  border-color: rgba(0, 229, 192, 0.28);
  background: rgba(0, 229, 192, 0.08);
}

.analysis-source-view-btn:hover {
  color: #042f2e;
  border-color: rgba(0, 229, 192, 0.5);
  background: #00e5c0;
}

.analysis-source-comments {
  border-left-color: rgba(0, 229, 192, 0.45);
}

.analysis-source-highlight {
  color: #5eead4;
}

.analysis-report-card {
  border-color: rgba(0, 229, 192, 0.1);
}

.analysis-report-card.has-sources:hover {
  border-color: rgba(0, 229, 192, 0.24);
  background: rgba(0, 229, 192, 0.04);
  box-shadow: 0 10px 32px rgba(0, 229, 192, 0.06);
}

.analysis-issue-item.has-sources:hover {
  border-color: rgba(0, 229, 192, 0.22);
  background: rgba(0, 229, 192, 0.04);
}

.analysis-issue-item.severity-high .analysis-issue-rank {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.22);
}

.analysis-issue-item.severity-medium .analysis-issue-rank {
  color: #5eead4;
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.2);
}

.analysis-report-card--issue.severity-high .analysis-report-card-rank,
.analysis-report-card-rank {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.2);
}

.analysis-report-card-quote {
  background: rgba(0, 229, 192, 0.04);
  border-color: rgba(0, 229, 192, 0.08);
}

.analysis-pattern-item.has-sources:hover {
  border-color: rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.05);
}

.analysis-pattern-item.confidence-high .analysis-pattern-index {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.25);
}

.analysis-identity-pillar {
  border-color: rgba(0, 229, 192, 0.1);
}

.analysis-identity-pillar-index {
  color: #5eead4;
  background: rgba(0, 229, 192, 0.08);
  border-color: rgba(0, 229, 192, 0.18);
}

.analysis-identity-assessment {
  border-left-color: rgba(251, 191, 36, 0.6);
  background: rgba(0, 229, 192, 0.03);
  border-color: rgba(0, 229, 192, 0.1);
}

.analysis-report-card-source-btn:hover {
  border-color: rgba(0, 229, 192, 0.28) !important;
  background: rgba(0, 229, 192, 0.08) !important;
  color: #5eead4 !important;
}

.analysis-report-badge-medium {
  background: rgba(0, 229, 192, 0.1);
  color: #5eead4;
  border-color: rgba(0, 229, 192, 0.22);
}

.analysis-source-post-id:hover {
  color: #00e5c0;
  border-color: rgba(0, 229, 192, 0.35);
  background: rgba(0, 229, 192, 0.1);
}

.team-workspace-option.is-active {
  border-color: rgba(0, 229, 192, 0.35);
  background: rgba(0, 229, 192, 0.08);
}

.team-workspace-active-badge {
  color: #5eead4;
  background: rgba(0, 229, 192, 0.12);
  border-color: rgba(0, 229, 192, 0.25);
}

.team-workspace-option-icon {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.1);
}

/* ── Analysis queue dock ── */
.analysis-queue-panel {
  border-color: rgba(0, 229, 192, 0.22);
  background: linear-gradient(165deg, rgba(8, 14, 22, 0.98), rgba(4, 8, 14, 0.98));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 229, 192, 0.06) inset;
}

.analysis-queue-dock.has-active .analysis-queue-panel {
  border-color: rgba(0, 229, 192, 0.35);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(0, 229, 192, 0.1);
}

.analysis-queue-header-main i {
  color: #00e5c0;
}

.analysis-queue-count {
  font-family: var(--font-mono);
  background: rgba(0, 229, 192, 0.12);
  color: #00e5c0;
}

.analysis-queue-label {
  color: #00e5c0;
}

.analysis-queue-progress .progress-bar {
  background: linear-gradient(90deg, #00e5c0, #38bdf8);
}

.analysis-queue-step {
  font-family: var(--font-mono);
  background: rgba(0, 229, 192, 0.1);
  color: #00e5c0;
}

/* ── Telegram pages ── */
.tg-hero {
  border-color: rgba(0, 229, 192, 0.18);
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.07), rgba(56, 189, 248, 0.05) 45%, rgba(4, 8, 14, 0.95));
}

.tg-hero-kicker {
  font-family: var(--font-mono);
  color: rgba(0, 229, 192, 0.75);
}

.tg-hero-icon {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.28);
}

.tg-hero-channels {
  border-color: rgba(56, 189, 248, 0.18);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(0, 229, 192, 0.05) 50%, rgba(4, 8, 14, 0.95));
}

.tg-subnav-link.is-active {
  color: #00e5c0;
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.14), rgba(56, 189, 248, 0.08));
  border-color: rgba(0, 229, 192, 0.25);
  box-shadow: 0 0 24px rgba(0, 229, 192, 0.08);
}

.tg-ch-tab.is-active {
  color: #e0fdf8;
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.14), rgba(56, 189, 248, 0.08));
  border-color: rgba(0, 229, 192, 0.25);
  box-shadow: 0 0 20px rgba(0, 229, 192, 0.08);
}

.tg-panel-icon,
.tg-ch-section-icon {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.08);
  border-color: rgba(0, 229, 192, 0.18);
}

.tg-progress-fill {
  background: linear-gradient(90deg, #00e5c0, #38bdf8);
}

.tg-channel-card:hover {
  border-color: rgba(0, 229, 192, 0.28);
  background: rgba(0, 229, 192, 0.04);
}

.tg-ch-row:hover {
  background: rgba(0, 229, 192, 0.04);
}

.tg-status-pill-ok {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.1);
  border-color: rgba(0, 229, 192, 0.28);
}

/* ── Analysis dashboard ── */
.analysis-section-nav {
  background: linear-gradient(180deg, rgba(10, 16, 24, 0.95), rgba(6, 10, 16, 0.92));
  border-color: var(--border);
}

.analysis-section-nav-title {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: rgba(0, 229, 192, 0.45);
}

.analysis-section-nav-link.is-active {
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.08);
  border-left-color: #00e5c0;
}

.analysis-pdf-cover {
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.1), rgba(6, 10, 16, 0.95));
  border-color: rgba(0, 229, 192, 0.22);
}

.analysis-pdf-cover-brand {
  font-family: var(--font-mono);
  color: #00e5c0;
}

.analysis-hero {
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.08), rgba(6, 10, 16, 0.92) 48%);
  border-color: rgba(0, 229, 192, 0.18);
}

.analysis-hero::before {
  background: rgba(0, 229, 192, 0.12);
}

.analysis-hero-title {
  background: linear-gradient(95deg, #f8fafc 0%, #00e5c0 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.analysis-section-title,
.analysis-hero-title {
  letter-spacing: -0.02em;
}

.analysis-meta-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.analysis-section-head {
  border-bottom-color: var(--border);
}

/* ── Loading ── */
.loading-overlay {
  background: rgba(3, 5, 8, 0.82);
  backdrop-filter: blur(8px);
}

.spinner-brand {
  border-color: rgba(0, 229, 192, 0.15);
  border-top-color: #00e5c0;
}

/* ── Import progress ── */
.import-progress .progress-bar {
  background: linear-gradient(90deg, #00e5c0, #38bdf8);
}

/* ── Prompts ── */
.prompts-step-badge {
  border-color: rgba(0, 229, 192, 0.2);
}

.prompts-step-badge-base {
  background: rgba(0, 229, 192, 0.1);
  color: #00e5c0;
}

/* ── Bootstrap data tables pagination ── */
.page-link {
  background: var(--panel-2) !important;
  border-color: var(--border) !important;
  color: var(--muted) !important;
}

.page-link:hover {
  background: rgba(0, 229, 192, 0.08) !important;
  border-color: rgba(0, 229, 192, 0.2) !important;
  color: #00e5c0 !important;
}

.page-item.active .page-link {
  background: rgba(0, 229, 192, 0.15) !important;
  border-color: rgba(0, 229, 192, 0.3) !important;
  color: #00e5c0 !important;
}

/* ── Scrollbars ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 192, 0.15);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 192, 0.28);
}

/* ── Selection ── */
::selection {
  background: rgba(0, 229, 192, 0.28);
  color: #fff;
}

/* ── Auth ── */
.app-shell.auth-mode .sidebar,
.app-shell.auth-mode .content-topbar {
  display: none !important;
}

.app-shell.auth-mode {
  grid-template-columns: 1fr !important;
}

.app-shell.auth-mode .main-content {
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  width: min(420px, 100%);
  padding: 2rem 1.75rem;
  border-color: rgba(0, 229, 192, 0.2);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.auth-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #00e5c0;
  background: rgba(0, 229, 192, 0.1);
  border: 1px solid rgba(0, 229, 192, 0.28);
  box-shadow: 0 0 24px rgba(0, 229, 192, 0.12);
}

.auth-brand-title {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.auth-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 229, 192, 0.55);
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-tab.is-active {
  color: #e0fdf8;
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.16), rgba(56, 189, 248, 0.1));
  box-shadow: 0 0 16px rgba(0, 229, 192, 0.08);
}

.auth-form .form-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}

.auth-footnote {
  margin-top: 1.25rem;
  text-align: center;
  line-height: 1.45;
}

.sidebar-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-wrap {
  margin-bottom: 0;
}

.sidebar-workspace-wrap {
  margin-bottom: 0;
}

/* legacy aliases — styles moved to theme.css sidebar account panel */
.sidebar-workspace-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.sidebar-workspace-select:focus {
  border-color: rgba(0, 229, 192, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 229, 192, 0.1);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sidebar-user-avatar {
  flex-shrink: 0;
}

.sidebar-user-text {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn:hover {
  color: #f87171 !important;
}

/* Telegram lookup */
.tg-lookup-card {
  overflow: hidden;
}

.tg-lookup-card-head {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.06), rgba(56, 189, 248, 0.03));
}

.tg-lookup-avatar .tg-ch-avatar {
  width: 72px;
  height: 72px;
}

.tg-lookup-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.tg-lookup-handle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.tg-lookup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.tg-lookup-card-body {
  padding: 1.1rem 1.35rem;
}

.tg-lookup-section {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--border);
}

.tg-lookup-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.tg-lookup-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1.25rem;
  margin: 0;
}

.tg-lookup-detail dt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.tg-lookup-detail dd {
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0;
  word-break: break-word;
}

.tg-lookup-detail-warn dd {
  color: #fbbf24;
}

.tg-lookup-about {
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .tg-lookup-detail-grid {
    grid-template-columns: 1fr;
  }
}

.tg-pill-user {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}

.tg-lookup-mode-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.75rem 1rem 0;
  border-bottom: 1px solid var(--border);
}

.tg-lookup-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: -1px;
}

.tg-lookup-mode-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tg-lookup-mode-tab.is-active {
  color: var(--text);
  font-weight: 600;
  border-color: var(--border);
  border-bottom-color: transparent;
  background: rgba(0, 229, 192, 0.06);
}

/* Channel stats modal */
.tg-channel-stats-modal .modal-content {
  max-height: min(92vh, 900px);
}

.tg-ch-stats-header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.08) 0%, rgba(56, 189, 248, 0.04) 100%);
}

.tg-ch-stats-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.tg-ch-stats-body {
  padding: 1rem 1.25rem 1.25rem;
}

.tg-ch-stats-footer {
  border-top: 1px solid var(--border);
}

.tg-ch-stats-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.tg-ch-stats-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tg-ch-stats-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tg-ch-stats-tab.is-active {
  color: var(--text);
  font-weight: 600;
  background: linear-gradient(135deg, rgba(0, 229, 192, 0.2), rgba(0, 229, 192, 0.08));
}

.tg-ch-stats-tab-panel {
  display: none;
}

.tg-ch-stats-tab-panel.is-active {
  display: block;
}

.tg-ch-stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.tg-ch-stats-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.tg-ch-stats-kpi-accent {
  border-color: rgba(0, 229, 192, 0.3);
  background: linear-gradient(160deg, rgba(0, 229, 192, 0.1), rgba(0, 0, 0, 0.2));
}

.tg-ch-stats-kpi-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.tg-ch-stats-kpi-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tg-ch-stats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.tg-ch-stats-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.08);
}

.tg-ch-stats-pill-views {
  border-color: rgba(0, 229, 192, 0.28);
  background: rgba(0, 229, 192, 0.08);
}

.tg-ch-stats-pill-forwards {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
}

.tg-ch-stats-pill-lbl {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tg-ch-stats-pill-val {
  font-size: 0.8rem;
  font-weight: 600;
}

.tg-ch-stats-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.78rem;
}

.tg-ch-stats-range-line {
  flex: 1;
  min-width: 2rem;
  height: 1px;
  background: var(--border);
}

.tg-ch-stats-panel {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.tg-ch-stats-panel-head {
  padding: 0.75rem 1rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.tg-ch-stats-panel-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.tg-ch-stats-panel-desc {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.tg-ch-stats-panel-body {
  padding: 0.85rem 1rem 1rem;
}

.tg-ch-stats-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  padding-top: 0.25rem;
}

.tg-ch-stats-bars-dates {
  height: 100px;
}

.tg-ch-stats-bar-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.tg-ch-stats-bar {
  width: 100%;
  max-width: 14px;
  margin-top: auto;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.9), rgba(56, 189, 248, 0.35));
  transition: opacity 0.15s;
}

.tg-ch-stats-bar-col.is-peak .tg-ch-stats-bar {
  background: linear-gradient(180deg, #00e5c0, rgba(0, 229, 192, 0.4));
}

.tg-ch-stats-bars-views .tg-ch-stats-bar {
  background: linear-gradient(180deg, rgba(0, 229, 192, 0.9), rgba(0, 229, 192, 0.35));
}

.tg-ch-stats-bars-forwards .tg-ch-stats-bar {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.9), rgba(251, 191, 36, 0.35));
}

.tg-ch-stats-bars-avg .tg-ch-stats-bar {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.9), rgba(167, 139, 250, 0.35));
}

.tg-ch-stats-bars-local .tg-ch-stats-bar {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.9), rgba(52, 211, 153, 0.35));
}

.tg-ch-stats-bar-label {
  font-size: 0.55rem;
  color: var(--muted);
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tg-ch-stats-bar-label-spacer {
  visibility: hidden;
  height: 0.85rem;
}

.tg-ch-stats-date-wrap {
  overflow-x: auto;
}

.tg-ch-stats-tz {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 229, 192, 0.25);
  background: rgba(0, 229, 192, 0.06);
}

.tg-ch-stats-tz-muted {
  border-color: var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.tg-ch-stats-tz-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.tg-ch-stats-tz-badge-high { background: rgba(52, 211, 153, 0.2); color: #34d399; }
.tg-ch-stats-tz-badge-medium { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
.tg-ch-stats-tz-badge-low { background: rgba(248, 113, 113, 0.2); color: #f87171; }

.tg-ch-stats-business-hero {
  text-align: center;
  margin-bottom: 0.75rem;
}

.tg-ch-stats-business-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #00e5c0;
}

.tg-ch-stats-meter-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.tg-ch-stats-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00e5c0, #38bdf8);
}

.tg-ch-stats-business-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.tg-ch-stats-bh-val {
  display: block;
  font-weight: 700;
  font-family: var(--font-mono);
}

.tg-ch-stats-bh-lbl {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
}

.tg-ch-stats-bh-primary {
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 229, 192, 0.25);
  background: rgba(0, 229, 192, 0.06);
}

.tg-ch-stats-top-msg {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.06);
}

.tg-ch-stats-top-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .tg-ch-stats-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tg-ch-stats-business-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
