:root {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --primary-navy: #0a192f;
  --primary-blue: #1d4ed8;
  --primary-blue-hover: #1e40af;
  --accent-gold: #c59b27;
  --accent-gold-soft: rgba(197, 155, 39, 0.12);
  --text-main: #0f172a;
  --text-muted: #475569;
  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 20px 35px -5px rgba(15, 23, 42, 0.08), 0 10px 15px -5px rgba(15, 23, 42, 0.04);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* UKŁAD STRONY Z BOCZNYM PANEOLEM (SIDEBAR LAYOUT) */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 2.2rem 1.6rem;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
}

.brand-text span {
  color: var(--primary-blue);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.sidebar-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--primary-blue);
  background-color: var(--bg-card-subtle);
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* GŁÓWNA ZAWARTOŚĆ */
.main-content {
  margin-left: 270px;
  flex-grow: 1;
  padding: 2.8rem 3.5rem;
  max-width: calc(100% - 270px);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.8rem;
}

.sub-badge {
  display: inline-block;
  padding: 0.25rem 0.8rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid rgba(197, 155, 39, 0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.6rem;
}

.header-title h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.8px;
  line-height: 1.2;
}

.header-title h1 span {
  color: var(--primary-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.date-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* PRZYCISKI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-navy);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-blue);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--primary-navy);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: #f8fafc;
}

.btn-subtle {
  background: var(--bg-card-subtle);
  color: var(--primary-navy);
  border: 1px solid var(--border-color);
}

.btn-subtle:hover {
  background: var(--border-color);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

.full-width {
  width: 100%;
}

/* BENTO HERO SECTION */
.bento-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.8rem;
  margin-bottom: 3.5rem;
}

.bento-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.8rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.bento-main-card h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.bento-main-card p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.hero-action-row {
  display: flex;
  gap: 1rem;
}

.bento-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mini-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.8rem;
  box-shadow: var(--card-shadow);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mini-stat-card.accent {
  background: linear-gradient(135deg, rgba(197, 155, 39, 0.05), var(--bg-card));
  border-color: rgba(197, 155, 39, 0.25);
}

.stat-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-navy);
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}

.stat-change {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stat-change.positive {
  color: var(--primary-blue);
  font-weight: 600;
}

/* SECTIONS */
.content-section {
  margin-bottom: 3.5rem;
}

.section-heading-inline {
  margin-bottom: 1.8rem;
}

.section-heading-inline h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 0.3rem;
  letter-spacing: -0.5px;
}

.section-heading-inline p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* MODUŁY GRID */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.module-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2.2rem;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.module-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(29, 78, 216, 0.3);
}

.mod-number {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

.module-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
}

.module-item p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 1.5rem;
}

.mod-tag {
  font-size: 0.75rem;
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-weight: 600;
}

/* TABELA */
.data-box-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.2rem;
  box-shadow: var(--card-shadow);
}

.box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.box-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.box-header span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.table-container {
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}

.modern-table th,
.modern-table td {
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--border-color);
}

.modern-table th {
  color: var(--primary-navy);
  font-weight: 700;
  background: var(--bg-card-subtle);
}

.modern-table td {
  color: var(--text-muted);
}

.modern-table td:first-child {
  color: var(--primary-navy);
  font-weight: 600;
}

.highlight-text {
  color: var(--primary-blue);
  font-weight: 700;
}

/* CENY / DOSTĘP */
.pricing-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
  max-width: 850px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.featured-node {
  border: 2px solid var(--primary-navy);
  box-shadow: 0 15px 35px -5px rgba(10, 25, 47, 0.12);
}

.ribbon {
  position: absolute;
  top: -12px;
  right: 25px;
  background: var(--primary-navy);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.plan-name {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary-navy);
}

.plan-price {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--primary-blue);
  font-weight: 700;
}

.plan-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.8rem;
}

.plan-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-features li {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.4rem;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 800;
}

/* STOPKA */
.console-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-left p {
  margin-bottom: 0.3rem;
}

.footer-email a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
}

.footer-email a:hover {
  text-decoration: underline;
}

.disclaimer-mini {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-right a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.footer-right a:hover {
  color: var(--primary-blue);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .sidebar { width: 85px; padding: 1.5rem 0.75rem; }
  .sidebar-brand .brand-text,
  .sidebar-nav a span,
  .sidebar-footer .status-indicator span:last-child { display: none; }
  .main-content { margin-left: 85px; max-width: calc(100% - 85px); padding: 2rem 1.5rem; }
  .modules-grid { grid-template-columns: 1fr; }
  .bento-hero { grid-template-columns: 1fr; }
  .pricing-split-grid { grid-template-columns: 1fr; }
}