/* Chartschmiede Pro-Sidebar — Shared Component v1.0 (2026-06-30) */
/* Wird von /js/sidebar.js auf allen Pages injiziert */

:root {
  --cs-bg-deep: #060812;
  --cs-bg-base: #0a0e1a;
  --cs-bg-card: #131828;
  --cs-bg-hover: #1a2138;
  --cs-border: rgba(99, 132, 195, 0.10);
  --cs-border-strong: rgba(99, 132, 195, 0.22);
  --cs-border-glow: rgba(79, 179, 255, 0.35);
  --cs-text: #f0f4fb;
  --cs-text-mid: #98a4bd;
  --cs-text-dim: #525a73;
  --cs-accent: #4fb3ff;
  --cs-accent-2: #8b5cf6;
  --cs-mint: #00d4aa;
  --cs-gold: #ffb547;
  --cs-rose: #ff5a78;
  --cs-grad-primary: linear-gradient(135deg, #4fb3ff 0%, #8b5cf6 100%);
  --cs-grad-mint: linear-gradient(135deg, #00d4aa 0%, #4fb3ff 100%);
  --cs-grad-gold: linear-gradient(135deg, #ffb547 0%, #ff5a78 100%);
}

/* Hide existing navbar */
body.cs-sidebar-mounted nav.navbar { display: none !important; }

/* Body becomes flex container */
body.cs-sidebar-mounted {
  margin: 0;
  padding-left: 220px;
  background: var(--cs-bg-deep);
}
@media (max-width: 880px) {
  body.cs-sidebar-mounted { padding-left: 0; padding-top: 56px; }
}

/* ═══ TOP-BAR (mobile + minimal desktop) ═══ */
.cs-topbar {
  position: fixed;
  top: 0;
  left: 220px;
  right: 0;
  height: 56px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--cs-border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  z-index: 90;
}
@media (max-width: 880px) {
  .cs-topbar { left: 0; }
}
.cs-topbar .cs-toggle {
  display: none;
  background: none; border: none; color: var(--cs-text); cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
}
@media (max-width: 880px) {
  .cs-topbar .cs-toggle { display: flex; align-items: center; justify-content: center; background: var(--cs-bg-card); }
}
.cs-topbar .cs-tier-switch {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--cs-bg-card);
  border: 1px solid var(--cs-border);
  padding: 4px;
  border-radius: 10px;
}
.cs-tier-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--cs-text-mid);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.15s;
  font-family: inherit;
}
.cs-tier-btn:hover { color: var(--cs-text); }
.cs-tier-btn.active { background: var(--cs-grad-primary); color: white; box-shadow: 0 2px 8px rgba(79, 179, 255, 0.25); }
.cs-tier-btn.tier-pro.active { background: var(--cs-grad-gold); color: #1a1206; }

.cs-tier-info {
  margin-left: 8px;
  background: var(--cs-bg-card);
  border: 1px solid var(--cs-border);
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 11px;
  color: var(--cs-text-mid);
}
@media (max-width: 880px) {
  .cs-topbar .cs-tier-switch, .cs-tier-info { display: none; }
}

/* ═══ SIDEBAR ═══ */
.cs-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: var(--cs-bg-base);
  border-right: 1px solid var(--cs-border);
  padding: 18px 12px 24px;
  overflow-y: auto;
  z-index: 95;
  transition: transform 0.2s;
  font-family: 'Inter', -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
}
.cs-sidebar::-webkit-scrollbar { width: 6px; }
.cs-sidebar::-webkit-scrollbar-thumb { background: var(--cs-border-strong); border-radius: 3px; }
@media (max-width: 880px) {
  .cs-sidebar { transform: translateX(-100%); width: 270px; padding-top: 70px; }
  .cs-sidebar.cs-open { transform: translateX(0); box-shadow: 0 0 50px rgba(0,0,0,0.5); }
  .cs-mobile-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 94;
    display: none;
  }
  .cs-mobile-overlay.cs-open { display: block; }
}

.cs-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 18px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid var(--cs-border);
  margin-bottom: 12px;
}
.cs-logo-badge {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--cs-grad-primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px rgba(79, 179, 255, 0.25);
  flex-shrink: 0;
}
.cs-logo-badge svg { width: 18px; height: 18px; }
.cs-logo-text {
  background: var(--cs-grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cs-pro-pill {
  background: var(--cs-grad-gold);
  color: #1a1206;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 6px;
  border-radius: 5px;
  margin-left: 4px;
  letter-spacing: 0.04em;
}

.cs-nav-section {
  margin: 14px 0 6px;
  padding: 0 10px;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--cs-text-dim);
  font-weight: 700;
}
.cs-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text-mid);
  text-decoration: none;
  margin-bottom: 1px;
  transition: all 0.15s;
  position: relative;
  cursor: pointer;
}
.cs-nav-item:hover { background: var(--cs-bg-card); color: var(--cs-text); }
.cs-nav-item.active {
  background: linear-gradient(135deg, rgba(79, 179, 255, 0.15), rgba(139, 92, 246, 0.08));
  color: var(--cs-text);
  border-left: 2px solid var(--cs-accent);
  padding-left: 9px;
  box-shadow: inset 0 0 18px rgba(79, 179, 255, 0.06);
}
.cs-nav-item.locked { opacity: 0.55; cursor: pointer; }
.cs-nav-item.locked:hover { opacity: 0.85; }
.cs-nav-ico { width: 18px; height: 18px; flex-shrink: 0; }
.cs-badge {
  margin-left: auto;
  background: var(--cs-rose);
  color: white;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
}
.cs-badge.mint { background: var(--cs-mint); color: #042822; }
.cs-badge.pro {
  background: var(--cs-grad-gold);
  color: #1a1206;
  font-size: 8.5px;
  padding: 2px 5px;
  letter-spacing: 0.04em;
}
.cs-lock-ico { margin-left: auto; opacity: 0.5; }

.cs-cta-card {
  margin: 18px 8px 6px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 181, 71, 0.12), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(255, 181, 71, 0.25);
  border-radius: 11px;
}
.cs-cta-title {
  font-size: 13px;
  font-weight: 700;
  background: var(--cs-grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 4px;
}
.cs-cta-sub {
  font-size: 11px;
  color: var(--cs-text-mid);
  margin-bottom: 10px;
  line-height: 1.4;
}
.cs-cta-btn {
  display: block;
  background: var(--cs-grad-gold);
  color: #1a1206;
  text-decoration: none;
  text-align: center;
  padding: 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.15s;
}
.cs-cta-btn:hover { transform: translateY(-1px); }

/* ═══ LOCK OVERLAY ═══ */
.cs-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 18, 0.85);
  backdrop-filter: blur(10px);
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cs-lock-overlay.cs-open { display: flex; }
.cs-lock-modal {
  background: linear-gradient(180deg, #131a30 0%, #0c1124 100%);
  border: 1px solid var(--cs-border-glow);
  border-radius: 18px;
  max-width: 480px;
  width: 100%;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.cs-lock-icon {
  width: 64px; height: 64px;
  background: var(--cs-grad-gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 0 32px rgba(255, 181, 71, 0.3);
}
.cs-lock-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.cs-lock-sub {
  color: var(--cs-text-mid);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.cs-lock-feature-name {
  background: var(--cs-grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}
.cs-lock-features {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 11px;
  padding: 16px;
  margin-bottom: 22px;
  text-align: left;
}
.cs-lock-features-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cs-text-mid);
  margin-bottom: 10px;
}
.cs-lock-list {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--cs-text);
}
.cs-lock-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.cs-lock-list li::before {
  content: '✓';
  color: var(--cs-mint);
  font-weight: 700;
}
.cs-lock-price {
  margin-bottom: 18px;
}
.cs-lock-price-num {
  font-size: 36px;
  font-weight: 800;
  background: var(--cs-grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.cs-lock-price-period {
  color: var(--cs-text-mid);
  font-size: 14px;
}
.cs-lock-trial {
  display: inline-block;
  margin-top: 6px;
  background: rgba(0, 212, 170, 0.15);
  color: var(--cs-mint);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.cs-lock-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.cs-lock-btn-primary {
  flex: 1;
  min-width: 180px;
  background: var(--cs-grad-gold);
  color: #1a1206;
  border: none;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
  font-family: inherit;
}
.cs-lock-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 181, 71, 0.3); }
.cs-lock-btn-mini {
  background: transparent;
  border: 1px solid var(--cs-border-strong);
  color: var(--cs-text);
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.cs-lock-btn-mini:hover { background: rgba(255, 255, 255, 0.05); }

/* Tier banner shown to logged-out users */
.cs-tier-banner {
  position: fixed;
  bottom: 14px;
  right: 14px;
  z-index: 88;
  background: var(--cs-bg-card);
  border: 1px solid var(--cs-border-strong);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--cs-text-mid);
  max-width: 320px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.cs-tier-banner strong {
  color: var(--cs-text);
  display: block;
  margin-bottom: 4px;
}
