/* ==========================================
   OPLEX DASHBOARD HOME
   Sidebar layout + Pulpit (main dashboard)
   Enterprise SaaS styling
   ========================================== */

/* === LAYOUT === */

.dash-layout {
  display: flex;
  height: calc(100vh - 56px);
  margin-top: 56px; /* offset topbar */
}

/* === SIDEBAR === */

.dash-sidebar {
  position: relative;
  width: 64px;
  height: 100%;
  background: #1e1e1e;
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  transition: width 180ms ease;
  overflow: hidden;
  flex-shrink: 0;
  font-family: 'Inter', system-ui, sans-serif;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.dash-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(59, 130, 246, 0.1),
    rgba(59, 130, 246, 0.3),
    rgba(59, 130, 246, 0.1)
  );
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 180ms ease;
}

.dash-sidebar:hover::after {
  opacity: 1;
}

.dash-sidebar:hover {
  width: 220px;
}

.dash-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.dash-sidebar .sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 23px;
  color: #e5e7eb;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.6;
  transition: opacity 140ms ease, background-color 140ms ease;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  width: 100%;
  box-sizing: border-box;
}

.dash-sidebar .sidebar-item:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.05);
}

.dash-sidebar .sidebar-item.active {
  opacity: 1;
  background: rgba(59, 130, 246, 0.14);
  border-left: 3px solid #3b82f6;
  padding-left: 20px;
  box-shadow:
    inset 0 0 0 1px rgba(59, 130, 246, 0.2),
    0 0 12px rgba(59, 130, 246, 0.1);
}

.dash-sidebar .sidebar-item.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Separator */
.dash-sidebar .sidebar-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 16px;
  flex-shrink: 0;
}

/* Bottom section */
.dash-sidebar .sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
  margin-top: auto;
}

/* Icons */
.dash-sidebar .s-icon {
  width: 18px;
  height: 18px;
  stroke: #9ca3af;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.dash-sidebar .sidebar-item.active .s-icon {
  stroke: #3b82f6;
}

.dash-sidebar .sidebar-item:hover .s-icon {
  stroke: #d1d5db;
}

/* Labels */
.dash-sidebar .s-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1px;
  display: none;
  white-space: nowrap;
}

.dash-sidebar:hover .s-label {
  display: inline;
}

.dash-sidebar .sidebar-item.active .s-label {
  font-weight: 600;
  color: #93c5fd;
}

/* Ukryj datę w topbarze — jest już w nagłówku pulpitu */
.topbar .clock-date {
  display: none;
}

/* === TOPBAR overrides for main dash === */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  min-height: 56px;
  background: #202020;
  border-bottom: 1px solid rgba(59,130,246,0.15);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.topbar-brand {
  font-size: 15px;
  font-weight: 700;
  color: #facc15;
  letter-spacing: 1px;
}

.topbar-separator {
  color: #4b5563;
  font-weight: 300;
  font-size: 13px;
}

.topbar-module {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.topbar-user strong {
  color: #e5e7eb;
  font-weight: 600;
}

.topbar-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.topbar-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.topbar-logout svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === MAIN CONTENT === */

.dash-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background: #181818;
  overscroll-behavior-y: contain;
}

.pulpit-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pulpit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.pulpit-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pulpit-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: -0.3px;
}

.pulpit-subtitle {
  margin: 0;
  font-size: 13px;
  color: #9ca3af;
}

.pulpit-header .btn-action.btn-secondary,
.pulpit-error-card .btn-action.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.pulpit-header .btn-action.btn-secondary:hover,
.pulpit-error-card .btn-action.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
}

.pulpit-panels {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.pulpit-panel,
.pulpit-loading-card,
.pulpit-error-card {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}

.pulpit-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pulpit-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pulpit-panel-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
}

.pulpit-panel-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  font-weight: 500;
  border: 1px solid rgba(59,130,246,0.2);
}

.pulpit-trend-list,
.pulpit-days-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 22px 18px;
}

.pulpit-trend-row,
.pulpit-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pulpit-trend-row:last-child,
.pulpit-day-row:last-child {
  border-bottom: none;
}

.pulpit-trend-label,
.pulpit-day-main strong {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
}

.pulpit-trend-value {
  font-size: 13px;
  font-weight: 700;
  color: #f3f4f6;
  margin-left: auto;
}

.pulpit-trend-meta,
.pulpit-day-main span {
  font-size: 12px;
  color: #6b7280;
}

.pulpit-day-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 96px;
}

.pulpit-day-metrics {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  text-align: right;
  font-size: 12px;
  color: #9ca3af;
}

.pulpit-loading-card,
.pulpit-error-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  min-height: 220px;
}

.pulpit-error-card h2 {
  margin: 0;
  font-size: 18px;
  color: #f3f4f6;
}

.pulpit-error-card p {
  margin: 0;
  color: #9ca3af;
}

.pulpit-loading-card .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* === PULPIT PAGE === */

.pulpit-page {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Greeting header */
.pulpit-greeting {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4px;
}

.pulpit-greeting-title {
  font-size: 22px;
  font-weight: 700;
  color: #f3f4f6;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.pulpit-greeting-sub {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  text-transform: capitalize;
}

.pulpit-greeting-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulpit-refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.pulpit-refresh-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
}

.pulpit-refresh-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pulpit-refresh-btn.loading svg {
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Header actions: refresh (icon-only) + Konfiguracja ────── */

.pulpit-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulpit-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pulpit-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.20);
  color: #f3f4f6;
}

.pulpit-icon-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pulpit-icon-btn.loading svg {
  animation: spin 0.7s linear infinite;
}

.pulpit-config-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.pulpit-config-btn:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.45);
  color: #bfdbfe;
}

.pulpit-config-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === KPI GRID === */

.pulpit-kpi-grid {
  display: grid;
  /* --pulpit-cols is set inline by pulpit.js based on the user's saved
     config (PULPIT_CONFIG.gridCols). When 'auto', use a fluid auto-fit
     layout that adapts to viewport width with a sensible min tile size.
     When a numeric value (3/4/5/6), pin to exactly that many columns. */
  grid-template-columns:
    var(--pulpit-cols-resolved, repeat(auto-fit, minmax(220px, 1fr)));
  gap: 16px;
}

.pulpit-kpi-grid[style*="--pulpit-cols: 3"]    { --pulpit-cols-resolved: repeat(3, 1fr); }
.pulpit-kpi-grid[style*="--pulpit-cols: 4"]    { --pulpit-cols-resolved: repeat(4, 1fr); }
.pulpit-kpi-grid[style*="--pulpit-cols: 5"]    { --pulpit-cols-resolved: repeat(5, 1fr); }
.pulpit-kpi-grid[style*="--pulpit-cols: 6"]    { --pulpit-cols-resolved: repeat(6, 1fr); }
.pulpit-kpi-grid[style*="--pulpit-cols: auto"] { --pulpit-cols-resolved: repeat(auto-fit, minmax(220px, 1fr)); }

.pulpit-kpi-card {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
  user-select: none;
}

.pulpit-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--kpi-color, #3b82f6);
  opacity: 0.45;
  transition: opacity 0.18s ease, height 0.18s ease;
}

.pulpit-kpi-card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.025);
}

.pulpit-kpi-card:hover::before {
  opacity: 0.75;
}

/* Active (selected) tile */
.pulpit-kpi-card.active::before {
  opacity: 1;
  height: 3px;
}

.pulpit-kpi-card.active .kpi-label {
  color: var(--kpi-color, #3b82f6);
}

.pulpit-kpi-card[data-variant="revenue"].active      { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.28); }
.pulpit-kpi-card[data-variant="monthly"].active      { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.28); }
.pulpit-kpi-card[data-variant="average"].active      { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.28); }
.pulpit-kpi-card[data-variant="profitability"].active{ background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.28); }
.pulpit-kpi-card[data-variant="bestday"].active      { background: rgba(250,204,21,0.08); border-color: rgba(250,204,21,0.28); }

.pulpit-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.pulpit-kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: -0.5px;
  line-height: 1;
}

.pulpit-kpi-meta {
  font-size: 12px;
  color: #9ca3af;
}

.pulpit-kpi-card[data-variant="revenue"]       { --kpi-color: #3b82f6; }
.pulpit-kpi-card[data-variant="monthly"]       { --kpi-color: #8b5cf6; }
.pulpit-kpi-card[data-variant="average"]       { --kpi-color: #10b981; }
.pulpit-kpi-card[data-variant="profitability"] { --kpi-color: #f59e0b; }
.pulpit-kpi-card[data-variant="bestday"]       { --kpi-color: #facc15; }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrap svg {
  width: 15px;
  height: 15px;
  stroke: var(--kpi-color, #3b82f6);
  fill: none;
  stroke-width: 1.8;
}

.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: -0.5px;
  line-height: 1;
}

.kpi-value.loading {
  color: #374151;
  background: linear-gradient(90deg, #374151 0%, #4b5563 50%, #374151 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
  width: 120px;
  height: 26px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.kpi-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.kpi-trend svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

.kpi-trend.up   { color: #10b981; }
.kpi-trend.down { color: #ef4444; }
.kpi-trend.stable { color: #6b7280; }

.kpi-trend-label {
  font-size: 11px;
  color: #4b5563;
  font-weight: 400;
}

/* === CHARTS ROW === */

.pulpit-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  min-height: 280px;
}

.pulpit-card {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pulpit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.pulpit-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
  letter-spacing: 0.2px;
}

.pulpit-card-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(59,130,246,0.12);
  color: #60a5fa;
  font-weight: 500;
  border: 1px solid rgba(59,130,246,0.2);
}

.pulpit-card-body {
  flex: 1;
  padding: 18px 22px;
  overflow: hidden;
}

/* Trend chart canvas */
.pulpit-trend-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 200px;
}

.pulpit-trend-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.chart-tooltip {
  position: absolute;
  background: #111827;
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #e5e7eb;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.chart-tooltip strong {
  color: #60a5fa;
  font-weight: 600;
}

/* Week breakdown list */
.week-day-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.week-day-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  transition: background 0.12s ease;
}

.week-day-row:hover {
  background: rgba(255,255,255,0.05);
}

.week-day-name {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  width: 28px;
  flex-shrink: 0;
}

.week-day-bar-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.week-day-bar {
  height: 100%;
  border-radius: 2px;
  background: #3b82f6;
  transition: width 0.5s ease;
}

.week-day-amount {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-align: right;
  width: 80px;
  flex-shrink: 0;
}

.week-day-row.today .week-day-name {
  color: #60a5fa;
}

.week-day-row.today .week-day-bar {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.week-day-row.today .week-day-amount {
  color: #93c5fd;
}

/* No data placeholder */
.week-day-empty {
  font-size: 12px;
  color: #374151;
  text-align: center;
  padding: 8px 10px;
}

/* === BOTTOM ROW: MODULES === */

.pulpit-modules-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.pulpit-module-card {
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.pulpit-module-card:hover {
  border-color: rgba(59,130,246,0.3);
  background: rgba(59,130,246,0.06);
  transform: translateY(-2px);
}

.pulpit-module-card.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.pm-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pm-icon svg {
  width: 18px;
  height: 18px;
  stroke: #9ca3af;
  fill: none;
  stroke-width: 1.8;
}

.pulpit-module-card:hover .pm-icon {
  background: rgba(59,130,246,0.15);
}

.pulpit-module-card:hover .pm-icon svg {
  stroke: #60a5fa;
}

.pm-label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-align: center;
  letter-spacing: 0.2px;
}

.pulpit-module-card:hover .pm-label {
  color: #e5e7eb;
}

.pm-tag {
  font-size: 10px;
  color: #4b5563;
  background: rgba(255,255,255,0.04);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.06);
}

.pm-tag.soon {
  color: #92400e;
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.15);
}

/* === BOTTOM ROW 2: STATS + ACTIVITY === */

.pulpit-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Month summary donut-style list */
.month-stat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.month-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.month-stat-row:last-child {
  border-bottom: none;
}

.month-stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.month-stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.month-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
}

.month-stat-value.negative {
  color: #ef4444;
}

/* Activity feed */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
}

.activity-dot.success { background: #10b981; }
.activity-dot.warning { background: #f59e0b; }
.activity-dot.info    { background: #06b6d4; }

.activity-text {
  flex: 1;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
}

.activity-text strong {
  color: #d1d5db;
  font-weight: 600;
}

.activity-time {
  font-size: 11px;
  color: #4b5563;
  flex-shrink: 0;
}

/* === PROGRESS BAR (KPI weekly card) === */

.kpi-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.kpi-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-progress-label {
  font-size: 11px;
  color: #4b5563;
  white-space: nowrap;
  flex-shrink: 0;
}

/* === SPARKLINE === */

.kpi-sparkline-wrap {
  height: 36px;
  width: 100%;
  overflow: hidden;
}

.sparkline-canvas {
  display: block;
}

/* Hide admin item when no access */
.dash-sidebar .sidebar-item.hidden {
  display: none;
}

/* Logout button */
.dash-sidebar .sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
}
.dash-sidebar .sidebar-logout-btn:hover .s-icon {
  stroke: #ef4444;
}

/* === Empty / loading states === */
.pulpit-empty {
  text-align: center;
  padding: 32px;
  color: #374151;
  font-size: 13px;
}

/* === SCROLLBAR === */

.dash-content::-webkit-scrollbar {
  width: 6px;
}

.dash-content::-webkit-scrollbar-track {
  background: transparent;
}

.dash-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}

.dash-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

/* === RESPONSIVE === */

@media (max-width: 1400px) {
  .pulpit-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .pulpit-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .pulpit-panels {
    grid-template-columns: 1fr;
  }

  .pulpit-charts-row {
    grid-template-columns: 1fr;
  }

  .pulpit-bottom-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Sidebar hero link → oplex.pl
   Sits at the very bottom of the sidebar, opens in a new tab.
   Gold wordmark (brand), subtle shimmer on hover so it doesn't
   look like a regular nav item.
   ============================================================ */

.dash-sidebar .sidebar-hero-link {
  opacity: 0.85;
  margin-top: 8px;
  position: relative;
}

.dash-sidebar .sidebar-hero-link .s-icon {
  stroke: #f59e0b;
}

.dash-sidebar .sidebar-hero-link:hover {
  opacity: 1;
  background: linear-gradient(
    90deg,
    rgba(251, 191, 36, 0.10) 0%,
    rgba(245, 158, 11, 0.06) 100%
  );
}

.sidebar-hero-label {
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 14.5px;
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 55%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 0 0 24px rgba(251, 191, 36, 0.15);
  text-transform: lowercase;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.4));
}

.sidebar-hero-dot {
  -webkit-text-fill-color: #fbbf24;
  color: #fbbf24;
  margin: 0 1px;
  font-weight: 900;
}

/* Shimmer sweep on hover — single pass, no infinite loop so it stays
   premium and doesn't distract from real work. */
.dash-sidebar .sidebar-hero-link::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(253, 224, 71, 0.18) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-sidebar .sidebar-hero-link:hover::after {
  transform: translateX(100%);
}
