@font-face {
    font-family: 'Inter';
    src: url('./fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

html,
body,
* {
  font-family: "Inter", sans-serif;
}

/* ========== KOLORY ========== */
:root {
  --color-gus-blue: #001d77;
  --color-gus-blue-dark: #00175f;
  --color-gus-magenta: #ff00ff;
  --color-gus-magenta-dark: #cc00cc;
  --color-gus-dark: #111827;
  --color-gus-card-dark: #1f2937;
  --color-gus-border: #dadbdf;
  --color-gus-border-dark: #374151;
  --color-gus-logo: #f0ab00;
  --color-gus-logo-dark: #070706;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-highlight: #f5a800;
  --color-highlight-dark: #ff00ff;

  --color-chart-2023: #aac811;
  --color-chart-2022: #ccde70;
  --color-chart-2020: #eef4cf;
  --color-chart-2015: #ccd2e4;
  --color-chart-dom: #aac811;
  --color-chart-ruch: #6678ae;
  --color-chart-praca: #ccde70;
  --color-chart-szkola: #ccd2e4;
  --color-chart-inne: #001e78;
  --color-chart-PL: #aac811;
  --color-chart-UE: #001d77;
}

.dark {
  --color-chart-2023: #00ffff;
  --color-chart-2022: #ff00ff;
  --color-chart-2020: #00ff00;
  --color-chart-2015: #00ff00;
  --color-chart-dom: #ff00ff;
  --color-chart-ruch: #0000ff;
  --color-chart-praca: #00ffff;
  --color-chart-szkola: #00ff00;
  --color-chart-inne: #ff00ff;
  --color-chart-PL: #00aaff;
  --color-chart-UE: #00ff00;
}

.marker-eu {
  background-color: var(--color-chart-2023); /* #aac811 */
}

.marker-pl {
  background-color: var(--color-chart-PL); /* #00aaff */
}

.dark .marker-eu,
.dark #marker-eu {
  background-color: #00ff00 !important;
}

.dark .marker-pl,
.dark #marker-pl {
  background-color: #00aaff !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-spin,
  .animate-bounce,
  .animate-pulse,
  .shake,
  .cookie-consent-popup.shake {
    animation: none !important;
  }
}

/* ========== KOLORY DLA MARKERÓW ========== */
.marker-2023 {
  background-color: var(--color-chart-2023);
}

.marker-2022 {
  background-color: var(--color-chart-2022);
}

.marker-2020 {
  background-color: var(--color-chart-2020);
}

.marker-2015 {
  background-color: var(--color-chart-2015);
}

.marker-dom {
  background-color: var(--color-chart-dom);
}

.marker-ruch {
  background-color: var(--color-chart-ruch);
}

.marker-praca {
  background-color: var(--color-chart-praca);
}

.marker-szkola {
  background-color: var(--color-chart-szkola);
}

.marker-inne {
  background-color: var(--color-chart-inne);
}

/* ========== HIGHLIGHTS ========== */
.text-highlight {
  color: var(--color-gus-blue);
}

.dark .text-highlight {
  color: var(--color-gus-magenta);
}

/* ========== STATYSTYKI ========== */
.stat-trend-up {
  color: #10b981;
}

.stat-trend-down {
  color: #ef4444;
}

/* ========== NOTYFIKACJE ========== */
.notification-slide {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========== SPINNER ========== */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ========== DROPDOWN ARCHIWUM ========== */
#archive-dropdown {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header .absolute a,
#archive-dropdown a,
.group .absolute a {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

header .absolute a span:first-child,
#archive-dropdown a span:first-child,
.group .absolute a span:first-child {
  font-weight: 600 !important;
}

header .absolute a:hover,
#archive-dropdown a:hover,
.group .absolute a:hover {
  background-color: #f3f4f6 !important;
  transform: translateX(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .absolute a:hover span,
header .absolute a:hover .text-sm,
#archive-dropdown a:hover span,
#archive-dropdown a:hover .text-sm,
.group .absolute a:hover span,
.group .absolute a:hover .text-sm {
  color: #001d77 !important;
}

.dark header .absolute a:hover,
.dark #archive-dropdown a:hover,
.dark .group .absolute a:hover {
  background-color: #374151 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark header .absolute a:hover span,
.dark header .absolute a:hover .text-sm,
.dark #archive-dropdown a:hover span,
.dark #archive-dropdown a:hover .text-sm,
.dark .group .absolute a:hover span,
.dark .group .absolute a:hover .text-sm {
  color: #ff00ff !important;
}

header .absolute a::before,
#archive-dropdown a::before,
.group .absolute a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-gus-blue);
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

.dark header .absolute a::before,
.dark #archive-dropdown a::before,
.dark .group .absolute a::before {
  background-color: var(--color-gus-magenta);
}

header .absolute a:hover::before,
#archive-dropdown a:hover::before,
.group .absolute a:hover::before {
  transform: translateX(0);
}

/* ========== NAVIGACJA ========== */
.nav-btn {
  border-left: 4px solid transparent !important;
  transition: all 0.2s ease-in-out !important;
  align-items: flex-start !important;
}

.nav-btn .flex.flex-col {
  flex: 1;
  min-width: 0;
}

.nav-btn .h-8.w-8 {
  background-color: transparent !important;
  border: none !important;
  flex-shrink: 0 !important;
  margin-top: 2px;
}

.nav-btn span {
  color: #374151 !important;
}

.dark .nav-btn span {
  color: #d1d5db !important;
}

.nav-btn .text-sm {
  color: #6b7280 !important;
}

.dark .nav-btn .text-sm {
  color: #9ca3af !important;
}

.nav-btn:hover:not(.active) .h-8.w-8 i,
.nav-btn:hover:not(.active) span:first-child {
  color: var(--color-gus-blue) !important;
}

.nav-btn:hover:not(.active) .text-sm {
  color: var(--color-gus-blue) !important;
  opacity: 0.8 !important;
}

.dark .nav-btn:hover:not(.active) .h-8.w-8 i,
.dark .nav-btn:hover:not(.active) span:first-child {
  color: var(--color-gus-magenta) !important;
}

.dark .nav-btn:hover:not(.active) .text-sm {
  color: var(--color-gus-magenta) !important;
  opacity: 0.8 !important;
}

.nav-btn:hover:not(.active) .h-8.w-8 i,
.nav-btn:hover:not(.active) span:first-child,
.nav-btn:hover:not(.active) .text-sm {
  color: var(--color-gus-blue) !important;
}

.dark .nav-btn:hover:not(.active) .h-8.w-8 i,
.dark .nav-btn:hover:not(.active) span:first-child,
.dark .nav-btn:hover:not(.active) .text-sm {
  color: var(--color-gus-magenta) !important;
}

.nav-btn.active .h-8.w-8 i,
.nav-btn.active span:first-child,
.nav-btn.active .text-sm {
  color: var(--color-gus-blue) !important;
}

.nav-btn.active span:first-child {
  font-weight: 600 !important;
}

.nav-btn.active .text-sm {
  opacity: 0.85 !important;
  font-weight: 400 !important;
}

.nav-btn.active .h-2.w-2 {
  background-color: var(--color-gus-blue) !important;
  opacity: 1 !important;
}

.dark .nav-btn.active .h-8.w-8 i,
.dark .nav-btn.active span:first-child,
.dark .nav-btn.active .text-sm {
  color: var(--color-gus-magenta) !important;
}

.dark .nav-btn.active .text-sm {
  opacity: 0.8 !important;
}

.dark .nav-btn.active .h-2.w-2 {
  background-color: var(--color-gus-magenta) !important;
}

.nav-btn .h-2.w-2 {
  opacity: 0 !important;
  transition: opacity 0.2s ease;
}

/* ========== UKŁAD ========== */
.app-container {
  min-height: 100vh;
}

.flex.flex-1.relative {
  flex: 1 1 0%;
  min-height: 0;
}

#main-content {
  overflow-y: auto;
}

footer {
  flex-shrink: 0;
}

#page-content {
  height: auto !important;
  min-height: auto !important;
}

#page-content .grid {
  height: auto !important;
  align-items: start !important;
}

.chart-card {
  height: fit-content !important;
  align-self: start;
}

.chart-card svg {
  max-height: 900px;
  width: 100%;
  height: auto;
}

.main-scrollable {
  overflow-y: auto;
  max-height: calc(100vh - 76px);
}

/* ========== PRZEWIJANIE ========== */
.sidebar-scrollable {
  height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gus-blue) transparent;
}

.sidebar-scrollable::-webkit-scrollbar {
  width: 8px;
}

.sidebar-scrollable::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
  background-color: var(--color-gus-blue) !important;
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.sidebar-scrollable::-webkit-scrollbar-thumb:hover {
  background-color: rgba(43, 64, 214, 0.8) !important;
}

.dark .sidebar-scrollable {
  scrollbar-color: var(--color-gus-magenta) rgba(55, 65, 81, 0.3);
}

.dark .sidebar-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    rgba(255, 0, 255, 0.8),
    var(--color-gus-magenta)
  );
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.dark .sidebar-scrollable::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, rgba(255, 0, 255, 0.9), #cc00cc);
}

.main-scrollable::-webkit-scrollbar {
  width: 12px;
}

.main-scrollable::-webkit-scrollbar-track {
  background: rgba(229, 231, 235, 0.5);
  border-radius: 6px;
  margin: 20px 0;
}

.main-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    rgba(43, 64, 214, 0.8),
    var(--color-gus-blue)
  );
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  min-height: 40px;
}

.main-scrollable::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    rgba(43, 64, 214, 0.9),
    var(--color-gus-blue)
  );
}

.dark .main-scrollable {
  scrollbar-color: rgba(255, 0, 255, 0.8) rgba(55, 65, 81, 0.5);
}

.dark .main-scrollable::-webkit-scrollbar-track {
  background: rgba(55, 65, 81, 0.5);
}

.dark .main-scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    rgba(255, 0, 255, 0.8),
    var(--color-gus-magenta)
  );
  border: 2px solid rgba(31, 41, 55, 0.9);
}

.dark .main-scrollable::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, rgba(255, 0, 255, 0.9), #cc00cc);
}

.overflow-x-auto {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.overflow-x-auto::-webkit-scrollbar {
  display: none;
}

/* ========== PRZYCISK POWROTU NA GÓRĘ ========== */
.scroll-to-top {
  position: fixed;
  bottom: 120px;
  right: 36px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-gus-blue);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.scroll-to-top:hover {
  background-color: var(--color-gus-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:active {
  transform: translateY(0);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top.dark {
  background-color: var(--color-gus-magenta);
}

.scroll-to-top.dark:hover {
  background-color: #cc00cc;
}

/* ========== SIDEBAR ========== */
#sidebar {
  width: 26rem;
  transition: width 0.2s ease;
}
#sidebar.collapsed {
  width: 5rem !important;
}

#sidebar.collapsed .nav-btn {
  justify-content: center !important;
  padding: 0.75rem 0.5rem !important;
}
#sidebar.collapsed .nav-btn .flex.flex-col {
  display: none !important;
}
#sidebar.collapsed .nav-btn .flex.items-start {
  justify-content: center !important;
}
#sidebar.collapsed .nav-btn .h-8.w-8 {
  margin-right: 0 !important;
  margin-left: 0 !important;
}
#sidebar.collapsed .sidebar-footer {
  display: flex;
  justify-content: center;
}
#sidebar.collapsed .sidebar-footer-text {
  display: none;
}

@media (max-width: 640px) {
  #sidebar {
    max-width: 280px;
  }
}

@media (max-width: 768px) and (min-width: 641px) {
  #sidebar {
    max-width: 320px;
  }
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #ced0d4;
  background-color: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.dark .sidebar-footer {
  border-top-color: #606773;
  background-color: #1f2937;
}

.sidebar-footer .footer-text {
  font-size: 0.9rem;
  color: var(--color-gray-500);
  white-space: nowrap;
  overflow: hidden;
}

.dark .sidebar-footer .footer-text {
  color: var(--color-gray-400);
}

.sidebar-collapse-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gus-blue);
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background-color: var(--color-gray-200);
  color: var(--color-gus-blue);
}

.dark .sidebar-collapse-btn {
  color: var(--color-gray-400);
}

.dark .sidebar-collapse-btn:hover {
  background-color: #374151;
  color: var(--color-gus-magenta);
}

.sidebar-collapse-btn i {
  font-size: 1.2rem;
}

#mobile-overlay {
  transition: opacity 0.3s ease-in-out;
}

body.overflow-hidden {
  overflow: hidden;
  height: 100vh;
}

/* ========== TABELE ========== */
.table-container th,
.table-container th[rowspan],
.table-container th[colspan] {
  text-align: center !important;
  vertical-align: middle !important;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--color-gray-50);
  color: var(--color-gray-600);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: lovercase;
  letter-spacing: 0.5px;
  padding: 0.75rem;
  border-top: 1px solid var(--color-gray-300);
  border-bottom: 1px solid var(--color-gray-300);
  border-right: 1px solid var(--color-gray-300);
  text-align: center;
}

.dark th {
  background: #111827;
  color: var(--color-gray-400);
  border-top-color: var(--color-gray-600);
  border-bottom-color: var(--color-gray-600);
  border-right-color: var(--color-gray-600);
}

th:last-child {
  border-right: none;
}

td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-gray-300);
  border-right: 1px solid var(--color-gray-300);
  color: var(--color-gray-800);
  text-align: right;
}

.dark td {
  border-bottom-color: var(--color-gray-600);
  border-right-color: var(--color-gray-600);
  color: var(--color-gray-200);
}

td:last-child {
  border-right: none;
  font-weight: 400;
  color: inherit;
  text-align: right;
}

.dark td:last-child {
  color: inherit;
}

td:first-child {
  font-weight: 500;
  padding-left: 1.5rem;
  text-align: left;
}

td.indent {
  padding-left: 3rem;
  font-weight: 400;
}

tr:hover td {
  background: var(--color-gray-100);
}

.dark tr:hover td {
  background: #2d3748;
}

tfoot td,
tfoot td:last-child {
  color: var(--color-gray-500) !important;
  font-weight: normal !important;
}

.dark tfoot td,
.dark tfoot td:last-child {
  color: var(--color-gray-400) !important;
}

.no-stretch {
  align-self: flex-start;
  height: auto !important;
  min-height: 0;
}

.indent {
  padding-left: 3rem !important;
}

.indent-2 {
  padding-left: 4.5rem !important;
}

.indent-3 {
  padding-left: 6rem !important;
}

.table-wrapper {
  background: var(--color-white);
  border-radius: 1rem;
  border: 1px solid var(--color-gray-300);
  overflow-x: hidden !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: fit-content;
  transition: all 0.2s ease-in-out;
}

.table-wrapper:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.dark .table-wrapper {
  background: var(--color-gus-card-dark);
  border-color: var(--color-gray-700);
}

.table-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  min-height: 85px;
  display: flex;
  align-items: flex-start !important;
}

.dark .table-header {
  background: #111827;
  border-bottom-color: var(--color-gray-700);
}

.table-title {
  font-weight: 600;
  color: #111827;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dark .table-title {
  color: var(--color-white);
}

.table-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--color-gus-blue);
  color: var(--color-white);
}

.dark .table-badge {
  background: var(--color-gus-magenta);
}

.table-container * {
  box-sizing: border-box;
}

.table-container {
  overflow-x: hidden !important;
  max-width: 100%;
  padding: 1rem 0.5rem;
}

.span-2 table th {
  background-color: var(--color-gray-100);
  color: var(--color-gray-700);
  font-weight: 600;
  padding: 0.75rem;
  text-align: center;
  vertical-align: bottom;
  border-bottom: 1px solid var(--color-gray-300);
  border-right: 1px solid var(--color-gray-300);
}

.dark .span-2 table th {
  background-color: #111827;
  color: var(--color-gray-400);
  border-bottom-color: var(--color-gray-600);
  border-right-color: var(--color-gray-600);
}

.span-2 table th:last-child {
  border-right: none;
}

.span-2 table td {
  all: unset;
  display: table-cell;
  padding: 0.75rem;
  border-bottom: 0;
  border-right: 0;
  text-align: right;
  font-weight: 400;
  color: inherit;
}

.dark .span-2 table td {
  color: var(--color-gray-400);
}

.span-2 table td:last-child {
  font-weight: 400 !important;
  color: inherit !important;
}

.dark .span-2 table td:last-child {
  color: inherit !important;
}

.span-2 .row-2024 td {
  font-weight: 600 !important;
}

.span-2 .row-2024 td:first-child {
  font-weight: 600 !important;
}

.table-wrapper .table-container table thead th img {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 8px auto;
  cursor: pointer;
  opacity: 0.95;
  overflow-x: hidden !important;
}

.table-wrapper .table-container table thead th img:hover {
  transform: scale(1.1);
  opacity: 1;
}

.table-wrapper .table-container table thead th {
  vertical-align: bottom;
  text-align: center;
}

.table-wrapper .table-container table thead th div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

@media (max-width: 640px) {
  .table-wrapper .table-container table thead th img {
    height: 60px !important;
  }
}

@media (max-width: 480px) {
  .table-wrapper .table-container table thead th img {
    height: 50px !important;
  }
}

/* ========== WYKRESY ========== */
.chart-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--color-white);
  border-radius: 1rem;
  border: 1px solid var(--color-gray-300);
  overflow: hidden;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  height: fit-content;
  display: flex;
  flex-direction: column;
}

.dark .chart-card {
  background: var(--color-gus-card-dark);
  border-color: var(--color-gray-700);
}

.chart-card:hover {
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.chart-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  background: var(--color-gray-50);
  display: flex;
  justify-content: flex-start;
  align-items: flex-start !important;
  min-height: 85px;
}

.dark .chart-header {
  background: #111827;
  border-bottom-color: var(--color-gray-700);
}

.chart-title {
  font-weight: 600;
  color: #111827;
  font-size: 1.2rem;
  align-items: flex-start;
}

.dark .chart-title {
  color: var(--color-white);
}

.chart-subtitle {
  font-weight: 500;
  color: var(--color-gray-500);
  font-size: 1rem;
  margin-top: 2px;
}

.dark .chart-subtitle {
  color: var(--color-gray-400);
}

.chart-card .legend-item[data-series] {
  cursor: pointer;
}

.chart-card .legend-marker-line {
  display: inline-block;
  width: 20px;
  height: 3px;
  vertical-align: middle;
  margin-right: 5px;
  transition: opacity 0.3s ease;
}

.chart-card .legend-item.inactive {
  opacity: 0.5;
}

.series-container {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.marker-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.series-name {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.4;
}

/* ========== OSIE I SIATKA ========== */
.axis path,
.axis line,
.axis .domain {
  stroke: #b3b3b3;
  stroke-width: 2.5px;
}

.dark .axis path,
.dark .axis line,
.dark .axis .domain {
  stroke: #b3b3b3;
}

.grid .tick line {
  stroke: #b3b3b3 !important;
  stroke-width: inherit !important;
  stroke-dasharray: none !important;
  opacity: 1 !important;
}

.dark .grid .tick line {
  opacity: 0.8 !important;
  stroke: var(--color-gray-300) !important;
}

.grid .domain,
.axis-x-labels .domain,
.axis-x-labels .tick line {
  display: none !important;
}

.tracking-group line {
  stroke: #808080 !important;
  stroke-width: 1px !important;
  stroke-dasharray: 0 !important;
  opacity: 0.8 !important;
}

.dark .tracking-group line {
  stroke: #b3b3b3 !important;
}

.axis text {
  font-family: "Inter", sans-serif;
  font-size: 16px !important;
  font-weight: 500;
  fill: var(--color-gray-600);
}

.dark .axis text {
  fill: var(--color-gray-400);
}

.axis .tick text {
  font-size: 16px !important;
  font-weight: 500;
}

.dark .axis .tick text {
  font-size: 16px !important;
  font-weight: 500;
}

.axis .tick line {
  stroke: var(--color-gray-200);
}

.dark .axis .tick line {
  stroke: var(--color-gray-700);
}

/* ========== LEGENDY ========== */
.legend-container {
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.5rem;
  row-gap: 0.5rem;
  margin: 0;
  width: 100%;
  border-top: 0 !important;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-gray-700);
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  line-height: 1.2;
  margin: 0;
}

.dark .legend-item {
  color: var(--color-gray-300);
}

.legend-grid .legend-item[data-chart="rynekPracy1112"] .legend-marker {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 2px;
}

.legend-item:hover {
  color: var(--color-gus-blue);
  font-weight: 600;
}

.dark .legend-item:hover {
  color: var(--color-gus-magenta);
}

.legend-item.inactive {
  opacity: 0.5;
}

.legend-marker {
  width: 12px;
  height: 12px;
  transition:
    background-color 0.3s ease,
    opacity 0.3s ease;
}

.legend-marker-line {
  display: inline-block;
  width: 20px;
  height: 3px;
  vertical-align: middle;
  margin-right: 5px;
  transition: opacity 0.3s ease;
}

.legend-header {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-gray-600);
  text-align: center;
  padding: 0.5rem 1rem 0.25rem 1rem;
  margin-top: 0.25rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-top: 1px solid var(--color-gray-200);
  width: 100%;
}

.dark .legend-header {
  color: var(--color-gray-400);
  border-top-color: var(--color-gray-600);
}

.legend-container {
  padding-top: 0.25rem;
}

/* ========== TOOLTIPY ========== */
.tooltip-d3 {
  position: absolute;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.15),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(229, 231, 235, 0.8);
  padding: 12px 16px;
  pointer-events: none;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  z-index: 1000;
  backdrop-filter: blur(4px);
  max-width: max-content;
  animation: tooltipFadeIn 0.15s ease-out;
}

.dark .tooltip-d3 {
  background: rgba(31, 41, 55, 0.75);
  border-color: rgba(75, 85, 99, 0.5);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.5),
    0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

.tooltip-d3 table {
  border-collapse: collapse;
  width: 100%;
}

.tooltip-d3 th {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  padding: 8px 12px 8px 8px;
  background-color: #e6e6e6;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  border-radius: 8px 8px 0 0;
  letter-spacing: 0.3px;
  text-transform: none !important;
}

.dark .tooltip-d3 th {
  background-color: #2d3a4e;
  color: #f1f5f9;
  border-bottom-color: var(--color-gray-700);
}

.tooltip-d3 td {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  padding: 8px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

.dark .tooltip-d3 td {
  color: #e2e8f0;
  border-bottom-color: var(--color-gray-700);
}

.tooltip-d3 tr:last-child td {
  border-bottom: none;
}

.tooltip-d3 .color-marker {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  vertical-align: middle;
}

.tooltip-d3 td:last-child {
  font-weight: 400;
  text-align: right;
  color: #0f172a;
  font-family: "Inter", monospace;
  letter-spacing: 0.2px;
}

.dark .tooltip-d3 td:last-child {
  color: #f8fafc;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== PRZYPISY ========== */
.footnote {
  font-size: 0.8rem;
  color: var(--color-gray-600);
  padding: 1rem 1.5rem;
  background: var(--color-gray-50);
  border-top: 1px solid var(--color-gray-200);
}

.footnote .english-part {
    opacity: 0.7;
}

.dark .footnote {
  background: #111827;
  color: var(--color-gray-400);
  border-top-color: var(--color-gray-700);
}

.dark .footnote .english-part {
    opacity: 0.7;
}

/* ========== SIATKA STRONY ========== */
.grid-container {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
}

@media (min-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .grid-container .span-2 {
    grid-column: span 2;
  }
}

.grid-container > * {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 768px) {
  .grid-container {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .grid-container > * {
    grid-column: 1 !important;
  }
}

/* ========== ELEMENTY WYKRESÓW ========== */
.bar {
  transition: opacity 0.3s ease;
}

.line {
  fill: none;
  stroke-width: 2.5px;
  transition:
    opacity 0.3s ease,
    stroke 0.3s ease;
}

.dot {
  r: 5;
  transition: opacity 0.3s ease;
  stroke: white;
  stroke-width: 1;
}

.grid line,
.grid .domain {
  stroke: #b3b3b3;
  stroke-width: 1px;
  shape-rendering: crispEdges;
}

.dark .grid line,
.dark .grid .domain {
  stroke: #b3b3b3;
}

.bar-label {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  fill: white;
  pointer-events: none;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 1024px) {
  .map-info-panel,
  .map-stats {
    justify-content: center !important;
  }
}

@media (max-width: 768px) {
  .split-header {
    flex-direction: column;
    gap: 8px;
  }

  .header-half {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }

  .right-half {
    justify-content: flex-start;
  }

  .split-header::after {
    display: none;
  }

  .dual-chart-row-horizontal {
    flex-direction: column;
  }

  .dual-chart-wrapper {
    display: flex;
    flex-direction: column;
    height: 280px;
  }

  .grid-container .chart-card,
  .grid-container .table-wrapper {
    grid-column: 1 !important;
  }

  .schools-labels {
    width: 80px;
    height: 300px;
  }

  .school-label .label-text {
    font-size: 14px;
    white-space: normal;
    word-break: break-word;
  }

  .school-label.header .label-text {
    font-size: 14px;
  }

  .school-label[data-school="ponadpodstawowe"] .label-text {
    font-size: 14px;
    max-width: 80px;
  }

  .flex-row {
    gap: 10px;
  }

  #chart-age-groups {
    min-height: 250px;
  }
}

@media (max-width: 768px) and (min-width: 641px) {
  .scroll-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .table-container table {
    min-width: 450px;
  }

  .schools-labels {
    width: 70px;
  }

  .school-label .label-text {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .prose-sm {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .prose-sm table {
    font-size: 0.75rem;
  }

  .prose-sm td,
  .prose-sm th {
    padding: 0.5rem;
  }
}

@media (hover: none) and (pointer: coarse) {
  .prose-sm td,
  .prose-sm th {
    padding: 0.75rem 0.5rem;
  }
}

#page-content .font-inter,
#page-content [class*="explanations"],
#page-content .prose {
  font-family: "Inter", sans-serif;
}

#page-content table {
  font-family: "Inter", sans-serif;
}

#page-content table td,
#page-content table th {
  font-family: "Inter", sans-serif;
}

#page-content .font-mono {
  font-family:
    "SF Mono", "Menlo", "Monaco", "Cascadia Code", "Consolas", monospace;
}

/* ========== SIDEBAR CUSTOM ========== */
#sidebar.collapsed .nav-btn:hover::after,
#sidebar.collapsed .nav-btn:hover::before {
  display: none !important;
  content: none !important;
}

#sidebar.collapsed .nav-btn:hover {
  background: transparent !important;
}

.custom-sidebar-tooltip {
  position: fixed;
  background: linear-gradient(135deg, #00175f 0%, #001d77 100%);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 16px;
  font-family: "Inter", sans-serif;
  z-index: 10000;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
  white-space: nowrap;
  display: none;
  max-width: 420px;
  white-space: normal;
  line-height: 1.4;
}
.custom-sidebar-tooltip .tooltip-polish {
  font-weight: 600;
  margin-bottom: 4px;
}
.custom-sidebar-tooltip .tooltip-english {
  font-size: 16px;
  opacity: 0.9;
}
.dark .custom-sidebar-tooltip {
  background: linear-gradient(135deg, #ff00ff 0%, #ff4dff 100%);
}

@media (max-width: 1023px) {
  #sidebar {
    position: fixed !important;
    z-index: 100 !important;
    transition: transform 0.3s ease-in-out;
  }

  #sidebar,
  #sidebar.collapsed {
    width: 5rem !important;
  }

  #sidebar .nav-btn .flex.flex-col {
    display: none !important;
  }

  #sidebar .nav-btn {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #sidebar .nav-btn .h-8.w-8 {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
  }

  #sidebar .nav-btn .flex.items-start {
    justify-content: center !important;
    width: 100%;
  }

  .sidebar-footer {
    display: none !important;
  }

  #sidebar.open {
    transform: translateX(0) !important;
  }
}

@media (min-width: 1024px) {
  #sidebar {
    position: fixed !important;
    z-index: 30 !important;
  }

  #main-content {
    margin-left: 26rem !important;
  }

  #sidebar.collapsed ~ #main-content {
    margin-left: 5rem !important;
  }

  footer {
    position: relative !important;
    z-index: 40 !important;
    width: 100% !important;
  }
}
