/* ==========================================================================
   CYFROWY COMMAND CENTER — Design System
   Multi-product dashboard: CO | CA | CG | CM
   ========================================================================== */

/* --- Importy fontow --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* --- Zmienne globalne --- */
:root {
  --bg: #0a0f0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --gold: #C5A065;
  --gold-dim: rgba(197, 160, 101, 0.15);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.15);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.15);
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.15);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.15);
  --yellow: #facc15;
  --yellow-dim: rgba(250, 204, 21, 0.15);
  --text: #e8e6e3;
  --text-secondary: rgba(232, 230, 227, 0.55);
  --text-muted: rgba(232, 230, 227, 0.3);

  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;

  /* Product accent colors */
  --co-color: #4ade80;
  --ca-color: #60a5fa;
  --cg-color: #C5A065;
  --cm-color: #a78bfa;
}

/* --- Reset i bazowe style --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #d4b078;
}

/* --- Animacje --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.1s; }
.fade-in-up:nth-child(3) { animation-delay: 0.15s; }
.fade-in-up:nth-child(4) { animation-delay: 0.2s; }
.fade-in-up:nth-child(5) { animation-delay: 0.25s; }
.fade-in-up:nth-child(6) { animation-delay: 0.3s; }
.fade-in-up:nth-child(7) { animation-delay: 0.35s; }
.fade-in-up:nth-child(8) { animation-delay: 0.4s; }

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.2); }
  50% { box-shadow: 0 0 12px 4px rgba(74, 222, 128, 0.1); }
}

/* --- Nawigacja --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 32px;
  height: 64px;
  background: rgba(10, 15, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo .accent {
  color: var(--gold);
}

/* --- Product Filter Tabs --- */
.product-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.product-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.product-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.product-tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.product-tab[data-filter="CO"].active { color: var(--co-color); }
.product-tab[data-filter="CA"].active { color: var(--ca-color); }
.product-tab[data-filter="CG"].active { color: var(--cg-color); }
.product-tab[data-filter="CM"].active { color: var(--cm-color); }

.product-tab i {
  font-size: 0.625rem;
}

.nav-spacer {
  flex: 1;
}

.nav-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* --- Przyciski --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #d4b078;
  border-color: #d4b078;
  color: var(--bg);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-card);
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-primary.btn-loading::after {
  border-top-color: var(--bg);
}

.btn-secondary.btn-loading::after {
  border-top-color: var(--text-secondary);
}

/* --- Kontener glowny --- */
.main-content {
  padding: 88px 32px 64px;
  max-width: 1440px;
  margin: 0 auto;
}

/* --- Time Period Controls --- */
.time-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.time-granularity {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.time-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.time-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.time-tab.active {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
}

.time-navigator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
}

.time-nav-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}

.time-label {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  min-width: 160px;
  text-align: center;
  letter-spacing: 0.02em;
}

/* --- Sekcje --- */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.section-title .accent {
  color: var(--gold);
}

/* --- Gridy responsywne --- */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* --- Stat Card --- */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-change {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

.stat-change.positive { color: var(--green); }
.stat-change.negative { color: var(--red); }

/* --- Product Cards (Breakdown) --- */
.product-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--product-color, var(--gold));
}

.product-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-card-title i {
  font-size: 1rem;
  color: var(--product-color, var(--gold));
  width: 20px;
  text-align: center;
}

.product-card-title span {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.product-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  color: var(--product-color, var(--gold));
  background: rgba(255, 255, 255, 0.04);
}

.product-card-metrics {
  display: flex;
  gap: 20px;
}

.product-card-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card-metric-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--product-color, var(--gold));
}

.product-card-metric-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Funnel --- */
.funnel-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.funnel-stages {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 180px;
}

.funnel-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 100%;
  justify-content: flex-end;
}

.funnel-bar-wrapper {
  width: 100%;
  max-width: 120px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.funnel-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  min-height: 8px;
  transition: height 0.6s ease;
  position: relative;
}

.funnel-bar-value {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.funnel-stage-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.funnel-conversions {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.funnel-conversion {
  display: flex;
  align-items: center;
  gap: 8px;
}

.funnel-conversion-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.funnel-conversion-rate {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green);
}

.funnel-conversion-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Funnel bar colors */
.funnel-bar.leads { background: linear-gradient(180deg, var(--blue), rgba(96, 165, 250, 0.4)); }
.funnel-bar.trialing { background: linear-gradient(180deg, var(--yellow), rgba(250, 204, 21, 0.4)); }
.funnel-bar.active { background: linear-gradient(180deg, var(--green), rgba(74, 222, 128, 0.4)); }
.funnel-bar.upsell { background: linear-gradient(180deg, var(--gold), rgba(197, 160, 101, 0.4)); }

/* --- Tabela danych --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.data-table .text-right {
  text-align: right;
}

.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Product color dot in tables */
.product-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-active { color: var(--green); background: var(--green-dim); }
.badge-canceled { color: var(--red); background: var(--red-dim); }
.badge-warning { color: var(--yellow); background: var(--yellow-dim); }
.badge-gold { color: var(--gold); background: var(--gold-dim); }
.badge-trialing { color: var(--blue); background: var(--blue-dim); }
.badge-purple { color: var(--purple); background: var(--purple-dim); }

/* Product badges */
.badge-co { color: var(--co-color); background: rgba(74, 222, 128, 0.1); }
.badge-ca { color: var(--ca-color); background: rgba(96, 165, 250, 0.1); }
.badge-cg { color: var(--cg-color); background: rgba(197, 160, 101, 0.1); }
.badge-cm { color: var(--cm-color); background: rgba(167, 139, 250, 0.1); }

/* --- Chart container --- */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  height: 400px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* --- Quick Link --- */
.quick-link {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.quick-link:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  color: var(--text);
  transform: translateY(-2px);
}

.quick-link i {
  font-size: 1.25rem;
  color: var(--gold);
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.quick-link span {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
}

/* --- Lead Card --- */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lead-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.lead-card-title {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.lead-card-metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.lead-card-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lead-card-metric-value {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
}

.lead-card-metric-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lead-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.lead-card-footer a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.lead-card-footer a:hover {
  color: #d4b078;
}

/* --- Login Container --- */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.login-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  text-align: center;
}

.login-logo .accent {
  color: var(--gold);
}

.login-subtitle {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
}

.login-products {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.login-product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  letter-spacing: 0.03em;
}

.login-product-badge i {
  font-size: 0.625rem;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-form label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.login-form input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition);
}

.login-form input::placeholder {
  color: var(--text-muted);
}

.login-form input:focus {
  border-color: var(--gold);
}

.login-error {
  display: none;
  padding: 12px 16px;
  font-size: 0.8125rem;
  color: var(--red);
  background: var(--red-dim);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  text-align: center;
}

.login-error.visible {
  display: block;
}

/* --- Loading / Skeleton --- */
.loading {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  min-height: 24px;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

.loading-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.stat-value.loading {
  width: 120px;
  height: 38px;
  color: transparent;
}

/* --- Utility --- */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-purple { color: var(--purple); }
.text-red { color: var(--red); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.hidden { display: none !important; }

/* --- Responsywnosc --- */
@media (max-width: 1024px) {
  .product-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .funnel-stages {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .time-controls {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .time-granularity {
    width: 100%;
    justify-content: center;
  }

  .time-tab {
    padding: 6px 12px;
    font-size: 0.6875rem;
  }

  .time-navigator {
    width: 100%;
    justify-content: center;
  }

  .time-label {
    font-size: 0.8125rem;
    min-width: 140px;
  }

  .nav {
    padding: 0 16px;
    height: 56px;
    gap: 12px;
  }

  .product-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 200px;
  }

  .product-tabs::-webkit-scrollbar { display: none; }

  .nav-meta { display: none; }

  .nav-actions {
    gap: 6px;
  }

  .nav-actions .btn-secondary {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .main-content {
    padding: 72px 16px 48px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .product-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    display: flex;
    padding-bottom: 8px;
  }

  .product-card {
    min-width: 280px;
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  .section { margin-bottom: 32px; }

  .section-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }

  .stat-value { font-size: 1.5rem; }

  .chart-container {
    height: 280px;
    padding: 16px;
  }

  .stat-card { padding: 16px; }
  .product-card { padding: 16px; }
  .lead-card { padding: 16px; }
  .funnel-container { padding: 20px; }

  .funnel-stages {
    height: 120px;
    gap: 8px;
  }

  .funnel-bar-value { font-size: 0.875rem; }

  .funnel-conversions {
    flex-wrap: wrap;
    gap: 16px;
  }

  .table-wrapper {
    border-radius: var(--radius-sm);
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .nav-actions .hide-mobile {
    display: none;
  }

  .product-tab {
    padding: 5px 10px;
    font-size: 0.6875rem;
  }

  .login-products {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- Print --- */
@media print {
  body { background: #ffffff; color: #1a1a1a; }

  .nav {
    position: static;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    backdrop-filter: none;
  }

  .nav-actions, .product-tabs { display: none; }

  .main-content { padding: 24px 0; }

  .stat-card,
  .product-card,
  .lead-card,
  .chart-container,
  .table-wrapper,
  .quick-link,
  .funnel-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    backdrop-filter: none;
    box-shadow: none;
  }

  .stat-value { color: #1a1a1a; }
  .stat-label, .data-table th { color: #666666; }
  .data-table td { color: #1a1a1a; border-bottom-color: #e0e0e0; }
  .section-title { color: #1a1a1a; }
  a { color: #1a1a1a; }
  .quick-link i { color: #1a1a1a; }
  .btn-primary, .btn-secondary { display: none; }
  .product-card::before { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
